High availability method and device of zero-trust authentication server and computer equipment

By using the parent process to listen to the process data of the child process in the zero-trust authentication server, the problem of service interruption caused by abnormal exit of the child process is solved, and the effect of improving server stability and reliability is achieved.

CN120217390APending Publication Date: 2025-06-27CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510487974.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

How to ensure high availability of zero-trust authentication servers and prevent service interruptions caused by abnormal exit of child processes.

Method used

By obtaining process data of the child process, including exit identification, performance data, log data and heartbeat data, the parent process can monitor the status of the child process, locate the cause of the abnormality in a timely manner, and take measures such as restarting or repairing the child process to avoid service interruption.

Benefits of technology

Improves the stability and reliability of zero-trust authentication servers, reduces the time of service outages, and ensures the continuous availability of authentication services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120217390A_ABST
    Figure CN120217390A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a high-availability method and device of a zero-trust authentication server and computer equipment. The method is applied to a parent process in a zero-trust authentication server, the zero-trust authentication server further comprises a plurality of sub-processes, and the method comprises the following steps: acquiring process data of a first sub-process; the process data comprises at least one of an exit identifier, performance data, log data and heartbeat data; the exit identifier is used for indicating an exit reason of the first sub-process; the first sub-process is one of a plurality of sub-processes; and monitoring the first sub-process based on the process data. According to the invention, high availability of the zero-trust authentication server is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and particularly to a high-availability method, device, and computer equipment for a zero-trust authentication server. Background Art

[0002] In today's digital age, network security is of utmost importance. As a key component for ensuring network access security, the reliability and stability of a zero-trust authentication server directly affect the security of the entire network environment. A zero-trust authentication server usually consists of multiple processes working together, and the stable operation of the processes is extremely important for the zero-trust authentication server. Therefore, how to detect the processes in the zero-trust authentication server to ensure its high availability is an urgent problem to be solved currently. Summary of the Invention

[0003] In view of this, the present invention provides a high-availability method, device, and computer equipment for a zero-trust authentication server to achieve the high availability of the zero-trust authentication server.

[0004] In a first aspect, the present invention provides a high-availability method for a zero-trust authentication server, which is applied to a parent process in the zero-trust authentication server. The zero-trust authentication server further includes multiple child processes; the method includes:

[0005] Obtain the process data of a first child process; the process data includes at least one of an exit flag, performance data, log data, and heartbeat data; the exit flag is used to indicate the reason for the exit of the first child process; the first child process is one of the multiple child processes;

[0006] Based on the process data, monitor the first child process.

[0007] Through the method provided in this embodiment, on the one hand, by obtaining the exit flag of the first child process, the parent process can timely obtain the reason for the exit of the first child process. For example, when the child process exits due to an abnormal situation such as a code error, the parent process can quickly locate the abnormal reason and timely take measures such as restarting the first child process and fixing the code of the first child process to avoid service interruption caused by the abnormal exit of the first child process and improve the stability of the service. On the other hand, through the performance data of the first child process, such as CPU usage rate, memory occupancy rate, etc., the parent process can understand the workload of the first child process to ensure the load balance of the zero-trust authentication server and improve the stability of the zero-trust authentication server. On the other hand, the log data records various events during the operation of the first child process. Based on the log data, the parent process can understand the operation details of the first child process and timely discover problems of the first child process; while the heartbeat data can directly reflect the survival state of the child process. The parent process can quickly judge the fault through the heartbeat data to prevent the fault from affecting the entire service.

[0008] In an alternative embodiment, the exit reason includes any one of an exception, an upgraded version, and a rolled-back version; listening to the first subprocess based on the process data includes:

[0009] Based on the exit reason indicated by the exit flag of the first subprocess, replacing the current code of the first subprocess with the code corresponding to the exit reason;

[0010] Based on the code corresponding to the exit reason, restart the first subprocess.

[0011] Through the above embodiments, when the first subprocess exits due to an exception, replacing the current code with the code of the stable version and restarting the subprocess can quickly restore the normal operation of the subprocess, avoid affecting the entire service due to the exception of the first subprocess, and reduce the time of interruption of the authentication service. When the first subprocess needs to exit due to an upgraded version, replacing the current code with the new version code and restarting the subprocess can enable the authentication service to promptly adopt new functions and optimizations, improving the performance of the zero-trust authentication server. When an error occurs during the operation of the first subprocess, rolling back the current code of the first subprocess to the code of the stable version gives the zero-trust authentication server a certain fault tolerance ability, ensuring a smooth transition of the performance of the zero-trust authentication server during version updates and enhancing the adaptability of the performance of the zero-trust authentication server to different version codes.

[0012] In an alternative embodiment, when the exit reason indicated by the exit flag of the first subprocess is an exception, the code corresponding to the exit reason is the preset historical code corresponding to the first subprocess.

[0013] Through the above embodiments, when the first subprocess exits due to an exception, replacing the current code with the preset historical code corresponding to the first subprocess. Here, the preset historical code can be understood as the code that has been actually run, which can enable the first subprocess to quickly resume normal operation. For example, if the current code has logical vulnerabilities that were not discovered due to newly launched functions and causes an exception, switching to the historical code that has run stably before can immediately allow the subprocess to resume providing authentication services, greatly shortening the service interruption time and ensuring the continuous and stable operation of the zero-trust authentication server.

[0014] In an alternative embodiment, the parent process is a Windows service registered in the user system corresponding to the zero-trust authentication server.

[0015] Through the above implementation, the parent process of the zero-trust authentication server is registered as a Windows service. In this way, as the parent process, it will be automatically started with the startup of the Windows system, ensuring that the zero-trust authentication server can be put into operation at the first moment when the user system is started, without manual intervention in the startup process, effectively avoiding the security vulnerability window period caused by forgetting to start the authentication service, ensuring the continuous availability of the authentication service, and providing uninterrupted security protection for users. In addition, the Windows service runs in the background of the user system and is relatively isolated from the user's interactive operations, reducing the interference to the parent process caused by user misoperations or abnormal foreground applications.

[0016] In an alternative implementation, the reason for exit includes deleting the services corresponding to multiple child processes; based on the process data, monitoring the first child process includes:

[0017] In the case where the exit flag indicates deleting the services corresponding to multiple child processes, stop the multiple child processes;

[0018] Delete the registration information of the parent process from the Windows service of the user system and exit the operation in the user system.

[0019] Through the above implementation, when the service is deleted, stopping multiple child processes can immediately terminate the occupation of system resources by these processes, such as CPU computing resources, memory space, and network bandwidth, etc., avoiding unnecessary resource consumption. At the same time, deleting the registration information of the parent process from the Windows service of the user system can reduce the maintenance complexity of the user system.

[0020] In an alternative implementation, the performance data includes at least one of coroutine data, central processing unit (CPU) data, memory data, and bandwidth data; based on the process data, monitoring the first child process includes:

[0021] Generate a first warning message in the case where the performance data exceeds a preset threshold.

[0022] Through the above implementation, the parent process monitors the first child process in real time based on coroutine data, CPU data, memory data, bandwidth data, etc. Once these performance data exceed the preset threshold, a warning message is immediately generated. For example, when the CPU usage rate continuously exceeds 80% (preset threshold), the parent process generates a first warning message to timely notify the operation and maintenance personnel to ensure that the zero-trust authentication server continuously and stably provides authentication services.

[0023] In an alternative implementation, based on the process data, monitoring the first child process includes:

[0024] In the case where the process data includes log data, determine the error information in the log data;

[0025] Generate a second warning message based on the error information.

[0026] Through the above implementation, the log data details various events during the operation of the first subprocess. The parent process can capture error information from the log data, such as code logic errors, resource shortages, etc. Once the parent process determines the error information from the log data and generates a second warning message, in this way, the troubleshooting time for process failures is shortened, the troubleshooting efficiency is improved, and the long-term interruption of the authentication service caused by untimely fault location is avoided.

[0027] In an alternative implementation, the method further includes:

[0028] Obtain a first control instruction; the first control instruction is used to indicate the reason for the first subprocess to exit.

[0029] Based on the first control instruction and the Transmission Control Protocol (TCP), send a second control instruction to the first subprocess; the second control instruction causes the first subprocess to determine an exit flag and exit the operation.

[0030] In a second aspect, the present invention provides a high-availability device for a zero-trust authentication server, which is applied to the parent process in the zero-trust authentication server. The zero-trust authentication server further includes multiple subprocesses; the device includes:

[0031] A first acquisition module, configured to acquire the process data of the first subprocess; the process data includes at least one of an exit flag, performance data, log data, and heartbeat data; the exit flag is used to indicate the reason for the first subprocess to exit; the first subprocess is one of the multiple subprocesses.

[0032] A monitoring module, configured to monitor the first subprocess based on the process data.

[0033] Through the device provided in this embodiment, on the one hand, by obtaining the exit flag of the first subprocess, the parent process can timely obtain the reason for the exit of the first subprocess. For example, when the subprocess exits due to abnormal situations such as code errors, the parent process can quickly locate the cause of the abnormality and timely take measures such as restarting the first subprocess and fixing the code of the first subprocess, so as to avoid service interruption caused by abnormal exit of the first subprocess and improve the stability of the service. On the other hand, through the performance data of the first subprocess, such as CPU usage rate, memory occupancy rate, etc., the parent process can understand the workload situation of the first subprocess, ensure the load balance of the zero-trust authentication server, and improve the stability of the zero-trust authentication server. On the other hand, the log data records various events during the operation of the first subprocess. Based on the log data, the parent process can understand the operation details of the first subprocess and timely discover problems of the first subprocess; while the heartbeat data can directly reflect the survival status of the subprocess. The parent process can quickly judge faults through the heartbeat data and prevent the faults from affecting the entire service.

[0034] In a third aspect, the present invention provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the high-availability method of the zero-trust authentication server in the first aspect or any corresponding embodiment thereof.

[0035] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the high-availability method of the zero-trust authentication server in the first aspect or any corresponding embodiment thereof.

[0036] In a fifth aspect, the present invention provides a computer program product, including computer instructions, and the computer instructions are used to cause a computer to execute the high-availability method of the zero-trust authentication server in the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0038] Figure 1 is a schematic flowchart of a high-availability method for a zero-trust authentication server according to an embodiment of the present invention;

[0039] Figure 2Schematic diagram of an application scenario of a high-availability method for a zero-trust authentication server according to an embodiment of the present invention;

[0040] Figure 3 Block diagram of the structure of a high-availability device for a zero-trust authentication server according to an embodiment of the present invention;

[0041] Figure 4 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Specific embodiments

[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0043] Hereinafter, the terms related to the embodiments of the present application will be introduced.

[0044] Zero-trust authentication server: Installed on the application side, used to connect the gateway and the application that requires authorized access, and implement intranet reverse proxy and application probe back to the source. The request of the client arrives at the zero-trust authentication server through a lightweight VPN (Virtual Private Network) protocol (such as a wireguard tunnel). The zero-trust authentication server then uses the Source Network Address Translation (SNAT) technology to forward the request from the physical network card to the application that requires authorized access. In the embodiments of the present application, the zero-trust authentication server includes a parent process and multiple child processes. Among them, the parent process is used to monitor and manage multiple child processes, and multiple child processes are used to provide services for users.

[0045] High availability: Refers to the ability of a system or service to maintain a high degree of stability, reliability, and continuous service provision during long-term operation. In the embodiments of the present application, high availability refers to the coordinated operation of multiple processes in the zero-trust authentication server to ensure the uninterruptedness of the service.

[0046] First, an exemplary introduction to the application scenario of the embodiments of the present application will be given.

[0047] In a Windows environment, the zero-trust authentication server is registered as a background service, capable of running in the background and executing various long-term tasks without user interaction. Currently, many services highly rely on the zero-trust authentication server to verify user identities and authorize access. If the zero-trust authentication server fails, the services will come to a standstill, resulting in service interruptions and other situations. Therefore, ensuring the high availability of the zero-trust authentication server is the current focus.

[0048] In view of this, the embodiments of the present application provide a method for high availability of a zero-trust authentication server to achieve the high availability of the zero-trust authentication server. It should be noted that the execution subject of the method for high availability of the zero-trust authentication server provided by the embodiments of the present invention can be a device for high availability of the zero-trust authentication server, and this device for high availability of the zero-trust authentication server can be implemented as part or all of an electronic device through software, hardware, or a combination of software and hardware. Among them, the electronic device can be a server or a terminal. Among them, the server in the embodiments of the present application can be a single server or a server cluster composed of multiple servers, and the terminal in the embodiments of the present application can be other intelligent hardware devices such as a smart phone, a personal computer, a tablet computer, a wearable device, and a smart robot. In the following method embodiments, the execution subject is taken as an electronic device for example to illustrate.

[0049] According to the embodiments of the present invention, an embodiment of a method for high availability of a zero-trust authentication server is provided. It should be noted that the steps shown in the flowchart of 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 a different order than here.

[0050] In this embodiment, a method for high availability of a zero-trust authentication server is provided, which can be used for the above-mentioned electronic devices such as servers, Figure 1 is a flowchart of the method for high availability of a zero-trust authentication server according to the embodiments of the present invention, which is applied to the parent process in the zero-trust authentication server. The zero-trust authentication server also includes multiple child processes. As Figure 1 shown, the process includes the following S101 - S102:

[0051] S101: Obtain the process data of the first child process.

[0052] Among them, the process data includes at least one of an exit flag, performance data, log data, and heartbeat data; the exit flag is used to indicate the reason for the exit of the first child process; the first child process is one of the multiple child processes.

[0053] In a possible implementation, the zero-trust authentication server executes specific tasks through multiple subprocesses, such as user authentication, data processing, and so on.

[0054] In a possible implementation, the process data of the first subprocess is a data set that describes information such as the running state of the first subprocess. The embodiments of the present application do not specifically limit the specific manifestation form of the process data, which can be in the form of a list, or any form such as a table, which is an information set composed of process data, and this information set can display one or more process data of the first subprocess.

[0055] Optionally, the exit flag is used to indicate the reason for the exit of the first subprocess. The exit flag can be represented by a preset text message, code, etc. Exemplarily, when the exit flag is abnormal / panic, it means that the first subprocess exits abnormally. The reasons for the exit of the first subprocess include but are not limited to exceptions, version upgrades, version rollbacks, etc. When the first subprocess exits the operation, the first subprocess will generate an exit flag to indicate the reason for its exit.

[0056] Optionally, the performance data reflects the performance of the first subprocess. Exemplarily, the performance data of the first subprocess can be Central Processing Unit (CPU) data (such as CPU utilization rate), memory data (such as memory occupancy, memory, occupancy rate, etc.), bandwidth data (such as bandwidth utilization rate, etc.). The parent process can obtain the performance data of the first subprocess through the operating system running on the zero-trust authentication server.

[0057] Optionally, the log data contains various event information during the running process of the first subprocess, such as operation records, error messages, key process points, etc. The parent process can obtain it through a log collection tool, or by reading the database where the log data is located, etc.

[0058] Optionally, the heartbeat data is used to indicate whether the first subprocess is alive and running normally. Exemplarily, the first subprocess sends a heartbeat signal (such as a network request, writing to a specific file, etc.) to the parent process at a preset time interval. If the parent process receives the heartbeat data within the preset time, it determines that the first subprocess is running normally. If it does not receive the heartbeat data within the preset time, it determines that the first subprocess has a fault.

[0059] S102: Monitor the first subprocess based on the process data.

[0060] In a possible implementation, if it is detected that the process data does not meet the preset conditions, the parent process improves the high availability of the zero-trust authentication server by sending an alarm message to the operation and maintenance personnel, or restarting the first subprocess, stopping the first subprocess, etc.

[0061] In the embodiments of the present application, on the one hand, by obtaining the exit identifier of the first child process, the parent process can timely obtain the reason for the exit of the first child process. For example, when the child process exits due to abnormal situations such as code errors, the parent process can quickly locate the abnormal reason and timely take measures such as restarting the first child process and fixing the code of the first child process, avoiding service interruption caused by abnormal exit of the first child process and improving the stability of the service. On the other hand, through the performance data of the first child process, such as CPU usage rate, memory occupancy rate, etc., the parent process can understand the workload situation of the first child process, ensure the load balancing of the zero-trust authentication server, and improve the stability of the zero-trust authentication server. On the other hand, the log data records various events during the operation of the first child process. Based on the log data, the parent process can understand the operation details of the first child process and timely discover problems of the first child process; while the heartbeat data can directly reflect the survival state of the child process. The parent process can quickly judge faults through the heartbeat data and prevent faults from affecting the entire service.

[0062] In some embodiments, the parent process is a Windows service registered in the user system corresponding to the zero-trust authentication server.

[0063] In this way, as the parent process will be automatically started with the startup of the Windows system, it ensures that the zero-trust authentication server can be put into operation at the first moment when the user system is started, without manual intervention in the startup process, effectively avoiding the security vulnerability window period caused by forgetting to start the authentication service, ensuring the continuous availability of the authentication service, and providing uninterrupted security protection for users. In addition, the Windows service runs in the background of the user system, relatively isolated from the user's interactive operations, reducing the interference to the parent process caused by user misoperations or abnormal foreground applications.

[0064] In a possible implementation manner, the parent process has an automatic startup function. Here, the automatic startup function means that if the parent process crashes or the like during operation, the parent process will be automatically restarted. Exemplarily, when the parent process is registered as a Windows service, the configuration item of the parent process is set to automatic, and the service will be restarted immediately after failure.

[0065] In a possible implementation manner, the parameters at the startup of the pass-through parent process are used as the parameters at service registration. Exemplarily, the parameters at the startup of the parent process can be the development environment in which the parent process runs, database connection information, etc.

[0066] In a possible implementation, after the parent process is started, it automatically starts multiple child processes and monitors each child process based on the process data of the multiple child processes. In this way, the multiple child processes of the zero-trust authentication server are uniformly managed by the parent process. When a child process crashes, the parent process automatically starts the child process to ensure continuous service and improve the high availability of the service.

[0067] In some embodiments, the multiple child processes are split from each other, and their business logics cooperate with each other but are not coupled. A problem with one child process will not affect other child processes.

[0068] The multiple child processes in the zero-trust authentication server include a Border Gateway Protocol (BGP) child process, a Domain Name System (DNS) child process, a client login child process, and an operation and maintenance configuration update / tunnel handshake child process. Among them, the BGP child process is used to handle BGP-related transactions, including establishing connections with other BGP routers, exchanging routing information, selecting the optimal route according to policies, and maintaining the routing table, etc. The DNS child process is responsible for the conversion between domain names and IP addresses. The client login child process is responsible for handling client login requests, verifying user identity information, and ensuring that only legitimate users can access the service. The operation and maintenance configuration update / tunnel handshake child process is responsible for receiving configuration update instructions, applying new configuration information to corresponding system components or devices to achieve purposes such as system function adjustment, optimization, or fault repair; in addition, the operation and maintenance configuration update / tunnel handshake child process is also used to establish a secure communication tunnel. The four child processes are responsible for different functions, reducing the coupling between child processes. When one child process crashes, it will not affect the other three child processes, and the parent process can promptly restart the crashed child process to ensure the stable operation of the overall service to the greatest extent.

[0069] In some embodiments, the reasons for exit include any one of exception, version upgrade, and version rollback.

[0070] Among them, a child process exception refers to a situation where the child process encounters errors, faults, etc. during operation and cannot continue to execute tasks normally. The factors causing a child process exception include, but are not limited to, logical errors in the code of the child process, insufficient memory resources obtained by the child process, and hardware failures of the zero-trust authentication server (such as disk damage, CPU failure), etc.

[0071] Version upgrade means modifying the code of the child process to add new functions to the child process, fix vulnerabilities of the child process, improve the performance or security of the child process, etc. When the zero-trust authentication server upgrades the version of the child process, in order to ensure that the new version code can be correctly installed and run, the child process running with the old version code needs to exit first. After exiting, the parent process will install the new version code and start a new child process to provide services.

[0072] A rollback version means replacing the current code of a subprocess with the historical code of the subprocess. For example, after upgrading to a new version of the code, there may be some problems with the new version of the code of the subprocess (such as compatibility issues, logical errors, the subprocess cannot work properly, etc.). In this case, in order to restore the normal operation of the subprocess, it is necessary to roll back the current code of the subprocess to the previous stable code. During the process of rolling back the version, the subprocess running with the new version of the code needs to exit first, and then the parent process installs the old version of the code and starts the subprocess based on the old version of the code.

[0073] In the above S102, the first subprocess is monitored in the following manner:

[0074] First, based on the exit reason indicated by the exit flag of the first subprocess, replace the current code of the first subprocess with the code corresponding to the exit reason.

[0075] In some embodiments, when the exit reason indicated by the exit flag of the first subprocess is an exception, the code corresponding to the exit reason is the preset historical code corresponding to the first subprocess.

[0076] Here, the preset historical code can be the historical code when the first subprocess has run normally (such as the historical code during the most recent normal operation). The preset historical code can be understood as the code that has been actually run and can enable the first subprocess to quickly resume normal operation. For example, if the current code is abnormal due to undetected logical vulnerabilities in the newly launched function, switching to the historical code that has run stably before can immediately allow the subprocess to resume providing authentication services, greatly shortening the service interruption time and ensuring the continuous and stable operation of the zero-trust authentication server.

[0077] Of course, the code corresponding to the exit reason can also be a preset code, etc., and the corresponding code can be selected according to the actual situation to quickly resume the first subprocess.

[0078] In a possible implementation, when the exit reason is to upgrade the version, replace the current code of the first subprocess with the new version code.

[0079] In a possible implementation, when the exit reason is to roll back the version, replace the current code of the first subprocess with the preset rollback version code. Here, the preset rollback version code can be the historical code when the subprocess has run normally, or it can be a preset code, and the present application does not make specific limitations on this.

[0080] Then, based on the code corresponding to the exit reason, restart the first subprocess.

[0081] Exemplarily, the parent process starts the child process through a command prompt (cmd) instruction.

[0082] In the embodiments of the present application, when the first child process exits abnormally, replacing the current code with the stable version of the code and restarting the child process can quickly restore the normal operation of the child process, avoid affecting the entire service due to the abnormality of the first child process, and reduce the time of interruption of the authentication service. When the first child process needs to exit due to an upgraded version, replacing the current code with the new version code and restarting the child process can enable the authentication service to promptly adopt new functions and optimizations, improving the performance of the zero-trust authentication server. When an error occurs during the operation of the first child process, rolling back the current code of the first child process to the stable version of the code gives the zero-trust authentication server's performance a certain fault tolerance ability, ensuring a smooth transition of the zero-trust authentication server's performance during version updates and enhancing the adaptability of the zero-trust authentication server's performance to different version codes.

[0083] In some embodiments, the reason for exit includes deleting the services corresponding to multiple child processes. Deleting the services corresponding to multiple child processes means stopping the operation of multiple child processes to suspend the services provided by the multiple child processes. For example, in the case where the user does not need the services provided by the zero-trust authentication server, a deletion instruction can be sent to the parent process to instruct the stop of the operation of multiple child processes. The parent process responds to this deletion instruction and stops multiple child processes.

[0084] After the above S102, the first child process is monitored in the following manner:

[0085] First, when the exit flag indicates deleting the services corresponding to multiple child processes, stop multiple child processes.

[0086] Then, delete the registration information of the parent process from the Windows service of the user system and exit the operation in the user system.

[0087] Here, deleting the registration information of the parent process from the Windows service of the user system means removing the service corresponding to the parent process from the Windows service list of the user system and deleting the records of the parent process in the registry and the service control manager database. In this way, the user system no longer recognizes the parent process as a service and will not automatically start the parent process when the user system starts.

[0088] In the embodiments of the present application, when a service is deleted, stopping multiple child processes can immediately terminate the occupation of system resources by these processes, such as CPU computing resources, memory space, network bandwidth, etc., avoiding unnecessary resource consumption. At the same time, deleting the registration information of the parent process from the Windows service of the user system can reduce the maintenance complexity of the user system.

[0089] In some embodiments, when the parent process does not receive the heartbeat data of the first child process within a preset duration, it is determined that the first child process enters a deadlock state, and the first child process is stopped and restarted. The preset duration can be set according to actual needs and is not limited here.

[0090] In some embodiments, the performance data includes at least one of coroutine data, central processing unit (CPU) data, memory data, and bandwidth data.

[0091] Among them, a child process is a process created and independently run by the parent process, and the coroutines in the child process are lightweight threads that implement concurrent operations inside the child process. The coroutine data includes, but is not limited to, the number of coroutines, the execution status of the coroutines (such as running status, paused status, ended status, etc.), execution time, and so on. Based on the coroutine data, the parent process can determine whether there are problems such as excessive competition for resources among the coroutines in the child process, thereby optimizing the concurrent performance of the service.

[0092] The CPU data of the child process can reflect the usage of CPU resources during the operation of the child process, including but not limited to the CPU usage rate (the proportion of time the child process occupies the CPU within a preset time) and the CPU clock frequency.

[0093] The memory data of the child process reflects the usage of memory resources during the operation of the child process, including but not limited to the size of the memory occupied by the child process. The memory data is crucial for the parent process to determine whether there are problems such as memory shortage and memory leakage in the child process.

[0094] The bandwidth data of the child process reflects the network bandwidth usage during the network communication process of the child process, including but not limited to the network upload and download rates of the child process (i.e., the amount of data sent and received by the child process through the network per unit time) and the packet loss rate. The parent process optimizes the network communication strategy based on the performance of the child process in the network environment to ensure that multiple child processes can transmit network data efficiently and stably.

[0095] In the above S102, when the performance data exceeds the preset threshold, a first warning message is generated.

[0096] Exemplarily, taking the performance data including the number of coroutines as an example, when the number of coroutines exceeds the preset threshold corresponding to the number of coroutines (for example, the preset threshold corresponding to the number of coroutines is 1000, and the number of coroutines of the first subprocess is 1200), the parent process will generate a first warning message, such as "The number of coroutines of the first subprocess reaches 1200, exceeding the preset threshold of 1000".

[0097] Exemplarily, taking the performance data including the CPU usage rate as an example, when the CPU usage rate exceeds the preset threshold corresponding to the CPU usage rate (for example, the preset threshold corresponding to the CPU usage rate is 80%, and the CPU usage rate of the first subprocess is 90%), the parent process will generate a first warning message, such as "The CPU usage rate of the first subprocess is 90%, exceeding the preset threshold of 80%".

[0098] Exemplarily, taking the performance data including the total memory occupied by the subprocess as an example, when the total memory occupied exceeds the preset threshold corresponding to the total memory occupied (for example, the preset threshold corresponding to the total memory occupied is 500MB, and the total memory occupied by the first subprocess is 600MB), the parent process will generate a first warning message, such as "The total memory occupied by the first subprocess is 600MB, exceeding the preset threshold of 500MB".

[0099] Exemplarily, taking the performance data including the download bandwidth of the subprocess as an example, when the download bandwidth exceeds the preset threshold corresponding to the download bandwidth (for example, the preset threshold corresponding to the download bandwidth is 100Mbps, and the download bandwidth of the first subprocess is 150Mbps), the parent process will generate a first warning message, such as "The download bandwidth of the first subprocess is 150Mbps, exceeding the preset threshold of 100Mbps".

[0100] Through the above implementation manners, the parent process performs real-time monitoring on the first subprocess based on coroutine data, CPU data, memory data, bandwidth data, etc. Once these performance data exceed the preset threshold, warning messages are immediately generated to notify the operation and maintenance personnel in a timely manner to ensure that the zero-trust authentication server continuously and stably provides authentication services.

[0101] In some embodiments, in the above S102, the first subprocess is listened to through the following content:

[0102] First, when the process data includes log data, the error information in the log data is determined.

[0103] Exemplarily, the parent process analyzes and filters the log data to determine error information from the log data. Error information usually has a specific identifier or format, such as containing a specific error code, error keywords (such as "error", "exception", etc.), or describing the specific situation that causes the process to have an exception. By parsing and judging the log data, the error information therein can be accurately determined.

[0104] Then, based on the error information, a second warning message is generated.

[0105] For example, the second warning message is "There is error information in the first child process", etc.

[0106] In the embodiment of the present application, the log data details various events during the running of the first child process. The parent process can capture error information from the log data, such as code logic errors, resource shortages, etc. Once the parent process determines the error information from the log data and generates the second warning message, in this way, the troubleshooting time for the process is shortened, the troubleshooting efficiency is improved, and the long-term interruption of the authentication service caused by untimely fault location is avoided.

[0107] In some embodiments, the method provided by the embodiment of the present application further includes the following content:

[0108] First, obtain a first control instruction.

[0109] Among them, the first control instruction is used to indicate the exit reason for the first child process to exit. The exit reason for the first child process to exit has been described in the above embodiments and will not be elaborated here.

[0110] Exemplarily, the user sends a first control instruction to the parent process through the user system.

[0111] Then, based on the first control instruction and the Transmission Control Protocol (TCP), a second control instruction is sent to the first child process.

[0112] Among them, the second control instruction enables the first child process to determine an exit identifier and exit the operation.

[0113] Exemplarily, the parent process notifies the first child process through tcpSocket (that is, a socket (Socket) that implements network communication based on the TCP protocol). In response to the second control instruction, the first child process determines an exit identifier based on the exit reason corresponding to the second control instruction and exits the operation. Here, the exit reason corresponding to the second control instruction is the exit reason indicated in the first instruction.

[0114] Exemplarily, when the first subprocess exits the running state, the virtual network card started for the first subprocess will not be recycled. During the restart process of the first subprocess, if there is a virtual network card corresponding to the first subprocess, the virtual network card will be reused; if there is no virtual network card corresponding to the first subprocess, a new virtual network card will be created to meet the network communication requirements of the first subprocess itself.

[0115] In addition, the user can send an instruction to start the first subprocess to the parent process through the user system; in response to the instruction to start the first subprocess, the parent process deletes the historical first subprocess and notifies the first subprocess through the TCP protocol to restart the first subprocess.

[0116] In this way, after receiving the instruction to start the first subprocess, the parent process first deletes the historical first subprocess. This can prevent the abnormal state or error data remaining in the historical subprocess from interfering with the newly started subprocess, ensuring that each started subprocess runs based on a brand-new and correct state, thereby improving the stability and consistency of the entire service. For example, if there are problems such as memory leaks or unclosed file handles in the historical subprocess, deleting the historical subprocess can prevent these problems from affecting the normal execution of the new subprocess.

[0117] Figure 2 It is a schematic diagram of the application scenario of a high-availability method for a zero-trust authentication server. In Figure 2 this, the parent process starts automatically when the computer is powered on. When the parent process crashes, the parent process will be automatically restarted (i.e., started). Subsequently, the parent process starts multiple subprocesses (BGP subprocess, DNS subprocess, client login subprocess, registration distribution / tunnel handshake subprocess). The parent process implements process guardianship for the subprocesses, including disabling / enabling, version management, crash restart, deadlock restart, etc. At the same time, the parent process listens to the heartbeat data, exit code (i.e., exit identifier), tcpSocket instruction, log data, performance data, etc. of multiple subprocesses. And when the process data of the subprocess does not meet the preset conditions, the subprocess is stopped and the service corresponding to the subprocess is deleted.

[0118] The above mainly introduces the solution provided in the embodiments of the present application from the perspective of the method.

[0119] In the embodiments of the present application, a high-availability device for a zero-trust authentication server is also provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0120] This embodiment provides a high-availability device for a zero-trust authentication server, which is applied to the parent process in the zero-trust authentication server. The zero-trust authentication server further includes a plurality of child processes. As Figure 3 shown, the device includes:

[0121] A first acquisition module 301, configured to acquire the process data of the first child process; the process data includes at least one of an exit flag, performance data, log data, and heartbeat data; the exit flag is used to indicate the reason for the exit of the first child process; the first child process is one of the plurality of child processes.

[0122] A monitoring module 302, configured to monitor the first child process based on the process data.

[0123] In some alternative embodiments, the reason for exit includes any one of exception, version upgrade, and version rollback; specifically, the monitoring module 302 is configured to replace the current code of the first child process with the code corresponding to the reason for exit based on the reason for exit indicated by the exit flag of the first child process; and restart the first child process based on the code corresponding to the reason for exit.

[0124] In some alternative embodiments, in this device, when the reason for exit indicated by the exit flag of the first child process is an exception, the code corresponding to the reason for exit is the preset historical code corresponding to the first child process.

[0125] In some alternative embodiments, the parent process is a Windows service registered in the user system corresponding to the zero-trust authentication server.

[0126] In some alternative embodiments, the reason for exit includes deleting the services corresponding to the plurality of child processes; specifically, the monitoring module 302 is configured to stop the plurality of child processes when the exit flag indicates deleting the services corresponding to the plurality of child processes; delete the registration information of the parent process from the Windows service in the user system, and exit the operation in the user system.

[0127] In some alternative embodiments, the performance data includes at least one of coroutine data, central processing unit (CPU) data, memory data, and bandwidth data; specifically, the monitoring module 302 is configured to generate a first warning message when the performance data exceeds a preset threshold.

[0128] In some alternative embodiments, the monitoring module 302 is specifically configured to determine the error information in the log data when the process data includes log data; and generate a second warning message based on the error information.

[0129] In some alternative embodiments, the device further includes:

[0130] A second acquisition module, configured to acquire a first control instruction; the first control instruction is used to indicate the reason for the exit of the first subprocess.

[0131] An occurrence module, configured to send a second control instruction to the first subprocess based on the first control instruction and the Transmission Control Protocol (TCP); the second control instruction causes the first subprocess to determine an exit identifier and exit the operation.

[0132] The further function descriptions of the above-mentioned various modules and units are the same as those in the corresponding embodiments above, and will not be elaborated here.

[0133] The high-availability device of the zero-trust authentication server in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0134] An embodiment of the present invention further provides a computer device having the above-mentioned Figure 3 high-availability device of the zero-trust authentication server shown.

[0135] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of a computer device provided by an optional embodiment of the present invention. As shown in Figure 4 , the computer device includes: one or more processors 10, a memory 20, and an interface for connecting each component, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as a server array, a set of blade servers, or a multi-processor system). Figure 4 In

[0136] Processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, processor 10 can further include a hardware chip. The above-mentioned hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The above-mentioned programmable logic device can be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.

[0137] Among them, the memory 20 stores instructions that can be executed by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiments.

[0138] The memory 20 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely provided with respect to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0139] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 may further include a combination of the above types of memories.

[0140] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or communication networks.

[0141] The embodiments of the present invention further provide a computer-readable storage medium. The method according to the embodiments of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be processed by such software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium may further include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.

[0142] A part of the present invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can call or provide the methods and / or technical solutions according to the present invention through the operations of the computer. Those skilled in the art should understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0143] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A high availability method for a zero-trust authentication server, characterized in that: A parent process applied to a zero-trust authentication server, wherein the zero-trust authentication server further includes a plurality of child processes; the method comprising: Acquire process data of a first subprocess; the process data includes at least one of an exit identifier, performance data, log data, and heartbeat data; the exit identifier is used to indicate the reason for exiting the first subprocess; the first subprocess is one of the multiple subprocesses; Based on the process data, the first sub-process is monitored.

2. The method according to claim 1, characterized in that The exit reason includes any one of an exception, an upgraded version, and a rolled back version; and monitoring the first sub-process based on the process data includes: Based on the exit reason indicated by the exit identifier of the first subprocess, replacing the current code of the first subprocess with a code corresponding to the exit reason; Restart the first subprocess based on the code corresponding to the exit reason.

3. The method according to claim 2, characterized in that When the exit reason indicated by the exit identifier of the first sub-process is abnormal, the code corresponding to the exit reason is a preset historical code corresponding to the first sub-process.

4. The method according to any one of claims 1 to 3, characterized in that The parent process is a Windows service registered in the user system corresponding to the zero-trust authentication server.

5. The method according to claim 4, characterized in that The exit reason includes deleting services corresponding to the multiple sub-processes; and monitoring the first sub-process based on the process data includes: When the exit identifier indicates to delete the services corresponding to the multiple sub-processes, stopping the multiple sub-processes; The registration information of the parent process is deleted from the Windows service of the user system, and the operation is terminated in the user system.

6. The method according to claim 1, characterized in that The performance data includes at least one of coroutine data, central processing unit CPU data, memory data, and bandwidth data; and monitoring the first subprocess based on the process data includes: When the performance data exceeds a preset threshold, a first alarm message is generated.

7. The method according to claim 1, characterized in that The monitoring the first sub-process based on the process data includes: In a case where the process data includes log data, determining error information in the log data; Based on the error information, second warning information is generated.

8. The method according to claim 1, characterized in that The method further comprises: Obtaining a first control instruction; the first control instruction is used to indicate the exit reason of the first sub-process; Based on the first control instruction and the transmission control TCP protocol, a second control instruction is sent to the first sub-process; the second control instruction enables the first sub-process to determine the exit identifier and exit operation.

9. A high availability device for a zero-trust authentication server, characterized in that: A parent process applied to a zero-trust authentication server, wherein the zero-trust authentication server further includes a plurality of child processes; the device includes: A first acquisition module is used to acquire process data of a first sub-process; the process data includes at least one of an exit identifier, performance data, log data, and heartbeat data; the exit identifier is used to indicate the exit reason of the first sub-process; the first sub-process is one of the multiple sub-processes; A monitoring module is used to monitor the first sub-process based on the process data.

10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the high availability method of the zero-trust authentication server according to any one of claims 1 to 8 by executing the computer instructions.