Application service load balancing method and device in software development process, computer equipment, readable storage medium and program product

By dynamically selecting the target service nodes for application service deployment, the problem of unbalanced server resource allocation in low-code platforms is solved, the system's resource utilization and performance is improved, and the platform's efficient and stable are ensured.

CN119003175APending Publication Date: 2024-11-22SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411123186.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing low-code platforms have imbalances in server resource allocation, resulting in insufficient or overloading of some nodes, affecting the stability and performance of the system.

Method used

By dynamically obtaining the operation information of preset service nodes, selecting the most suitable target service node based on real-time data for application services deployment and operation, ensuring full utilization of resources and avoiding node overload or insufficient resources.

Benefits of technology

It improves the overall resource utilization and performance of the system, ensuring that the low-code platform remains efficient and stable during development and operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003175A_ABST
    Figure CN119003175A_ABST
Patent Text Reader

Abstract

The invention relates to an application service load balancing method and device in a software development process, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps of obtaining node operation information of a preset service node corresponding to a software development process in response to a calling request for an application service in the software development process; determining a target service node from preset service nodes according to the node operation information; and sending the calling request to the target service node, so that the target service node deploys and operates the application service. By adopting the method, the resource utilization rate in the software development process can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software development technology, and in particular to a method, device, computer equipment, computer-readable storage medium and computer program product for application service load balancing in a software development process. Background Art

[0002] With the rapid development of software development, many software developments have shifted from offline to online low-code platforms, which can efficiently and quickly develop software. However, among the existing low-code platforms, although there are platforms that can support the generation of front-end engineering codes similar to those with Vue as the technology stack, since online startup of Vue services and other application services often requires a lot of server resources, it is not ideal in terms of server resource allocation.

[0003] Existing technologies usually perform load balancing through static allocation or simple polling algorithms. This approach has certain limitations in terms of resource utilization and system performance, and may cause insufficient or overloaded resources on some nodes, affecting the stability and performance of the overall system. Summary of the invention

[0004] Based on this, it is necessary to provide an application service load balancing method, device, computer equipment, computer-readable storage medium and computer program product for a software development process that can improve resource utilization in the software development process in response to the above technical problems.

[0005] In a first aspect, the present application provides an application service load balancing method in a software development process, comprising:

[0006] In response to a call request for an application service of a software development process, obtaining node operation information of a preset service node corresponding to the software development process;

[0007] Determine a target service node from the preset service nodes according to the node operation information;

[0008] The call request is sent to the target service node, so that the target service node deploys and runs the application service.

[0009] In one of the embodiments, the node operation information includes at least node startup service quantity information, node availability detection information, node dependency installation information and node free memory information;

[0010] The step of determining a target service node from the preset service nodes according to the node operation information includes:

[0011] Determine an available service node from the preset service nodes according to the node availability detection information and the node free memory information of the preset service node;

[0012] The target service node is determined from the available service nodes according to the node startup service quantity information and the node dependency installation information of the available service nodes.

[0013] In one embodiment, determining the target service node from the available service nodes according to the node startup service quantity information and the node dependency installation information of the available service nodes includes:

[0014] According to the node dependency installation information of the available service nodes, the available service nodes are divided into a node set with installed dependencies and a node set without installed dependencies; the node dependency installation information is used to characterize the installation status of the dependency files corresponding to the application service;

[0015] In the case that the node set of installed dependencies is a non-empty set, according to the node startup service quantity information, from the available service nodes in the node set of installed dependencies, an available service node with the smallest number of node startup services is selected as the target service node;

[0016] When the node set with installed dependencies is an empty set, based on the node startup service quantity information, the available service node with the smallest number of node startup services is selected from the available service nodes in the node set without installed dependencies as the target service node.

[0017] In one embodiment, before sending the call request to the target service node so that the target service node deploys and runs the application service, the method further includes:

[0018] In the case where the target service node is an available service node in the node set without installed dependencies, calling a file synchronization tool in the target service node to synchronize non-dependent files to the target service node; the non-dependent files are files other than the dependent files in the software development process;

[0019] The dependency management tool in the target service node is called to download and install the dependency file into the target service node.

[0020] In one embodiment, after sending the call request to the target service node so that the target service node deploys and runs the application service, the method further includes:

[0021] Send a hot update instruction to the target service node, so that the target service node monitors the file update in the shared storage in real time, and performs synchronous update of the file in the shared storage based on a file synchronization tool.

[0022] In one embodiment, after sending the call request to the target service node so that the target service node deploys and runs the application service, the method further includes:

[0023] Obtaining current node operation information and log information of the target service node;

[0024] Input the current node operation information and the log information into a pre-trained abnormality prediction model to obtain the current abnormality prediction information of the target service node;

[0025] In a case where the current abnormality prediction information indicates that the target service node has an abnormality risk, a preventive maintenance instruction for the target service node is executed.

[0026] In a second aspect, the present application also provides an application service load balancing device for a software development process, including:

[0027] A node information acquisition module, for obtaining node operation information of a preset service node corresponding to the software development process in response to a call request for an application service of the software development process;

[0028] A target node determination module, used to determine a target service node from the preset service nodes according to the node operation information;

[0029] The call request sending module is used to send the call request to the target service node, so that the target service node deploys and runs the application service.

[0030] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0031] In response to a call request for an application service of a software development process, obtaining node operation information of a preset service node corresponding to the software development process;

[0032] Determine a target service node from the preset service nodes according to the node operation information;

[0033] The call request is sent to the target service node, so that the target service node deploys and runs the application service.

[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0035] In response to a call request for an application service of a software development process, obtaining node operation information of a preset service node corresponding to the software development process;

[0036] Determine a target service node from the preset service nodes according to the node operation information;

[0037] The call request is sent to the target service node, so that the target service node deploys and runs the application service.

[0038] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0039] In response to a call request for an application service of a software development process, obtaining node operation information of a preset service node corresponding to the software development process;

[0040] Determine a target service node from the preset service nodes according to the node operation information;

[0041] The call request is sent to the target service node, so that the target service node deploys and runs the application service.

[0042] The above-mentioned software development process application service load balancing method, device, computer equipment, computer-readable storage medium and computer program product, first, in response to a call request for an application service of the software development process, obtain the node operation information of the preset service node corresponding to the software development process, by obtaining the real-time operation information of the preset service node, the current load condition, resource usage status and availability of each node can be accurately understood, providing reliable data support for subsequent dynamic load balancing, avoiding the imbalance and resource waste problems that may be caused by static allocation and simple polling methods; then, according to the node operation information, the target service node is determined from the preset service nodes, and according to the real-time node operation information, the target node that is most suitable for deploying and running the application service is dynamically selected, which can make full use of existing resources and avoid overloading or insufficient resources of some nodes, thereby improving the overall resource utilization and performance of the system; finally, a call request is sent to the target service node, so that the target service node deploys and runs the application service, by sending the call request to the determined target service node, ensuring that the application service is deployed and run on the most suitable node, not only can the startup speed and response efficiency of the application service be improved, but also through reasonable resource allocation, the stability and overall performance of the system can be further optimized. In the above method, by dynamically obtaining the operation information of the preset service node, selecting the target service node according to the real-time data, and sending the call request to the target service node, the application service is deployed and run, which effectively realizes the load balancing of the application service, optimizes the utilization of server resources, and improves the overall performance and stability of the system. Compared with the existing static allocation and simple polling algorithms, this method can manage and allocate server resources more flexibly and efficiently, avoids the problem of insufficient or overloaded node resources, and ensures that the low-code platform always maintains an efficient and stable state during the development and operation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0044] FIG1 is an application environment diagram of an application service load balancing method for a software development process in one embodiment;

[0045] FIG2 is a flow chart of an application service load balancing method in a software development process according to an embodiment;

[0046] FIG3 is a schematic diagram of a flow chart of a target service node determination step in one embodiment;

[0047] FIG4 is a flow chart of an application service load balancing method in a software development process in another embodiment;

[0048] FIG5 is a flow chart of an application service load balancing method in a software development process according to an embodiment;

[0049] FIG6 is a structural block diagram of an application service load balancing device for a software development process in one embodiment;

[0050] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] The application service load balancing method for the software development process provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the server 102 communicates with the preset service node 104 through the network. The data storage system can store the data that the server 102 needs to process. The data storage system can be integrated on the server 102, or it can be placed on the cloud or other network servers. In response to the call request for the application service of the software development process, the server 102 obtains the node operation information of the preset service node 104 corresponding to the software development process; then, the server 102 determines the target service node from the preset service node 104 according to the node operation information; finally, the server 104 sends a call request to the target service node, so that the target service node deploys and runs the application service. Among them, the server 102 can be an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers, or it can be a cloud server that provides cloud computing services. The preset service node 104 is a node in a server cluster or a distributed system.

[0053] In an exemplary embodiment, as shown in FIG. 2 , a method for load balancing an application service in a software development process is provided, which is described by taking the method applied to the server 102 in FIG. 1 as an example, and includes the following steps:

[0054] Step S201, in response to a call request for an application service of a software development process, obtaining node operation information of a preset service node corresponding to the software development process.

[0055] Among them, node operation information refers to the current CPU usage, memory usage, disk I / O, network bandwidth, node availability, etc. of the service node.

[0056] Exemplarily, the server first receives the user's call request and regularly collects and updates the operating status data of all preset service nodes through the distributed monitoring system. The server can communicate with the monitoring agent of each service node through the API interface to obtain real-time performance data and store it in the database. The server uses these real-time collected data to analyze the load and resource usage status of each node, thereby ensuring the accuracy and real-time nature of the node operation information.

[0057] Step S202: Determine a target service node from preset service nodes according to the node operation information.

[0058] The target service node refers to the service node that is most suitable for deploying and running application services under current conditions.

[0059] For example, the server analyzes the collected node operation information, including the CPU usage, memory usage, disk I / O, network bandwidth and node availability of each node, and uses the intelligent scheduling algorithm to conduct a comprehensive evaluation. Based on the evaluation results, the server selects the node with the lowest load, the most abundant resources and the highest availability from the preset service nodes and determines it as the target service node.

[0060] Step S203: sending a call request to a target service node, so that the target service node deploys and runs the application service.

[0061] Exemplarily, after receiving the user's call request, the server sends the call request to the target service node according to the determined target service node. After receiving the call request, the target service node starts to deploy and run the required application service. This process usually includes loading the necessary components of the application service, initializing the operating environment, and starting the service so that the application service can run normally and respond to user requests. The server also monitors the deployment process, records logs, and sends alarm notifications to the operation and maintenance personnel when problems occur so that they can be handled in a timely manner.

[0062] In the above-mentioned application service load balancing method of the software development process, first, in response to the call request for the application service of the software development process, the node operation information of the preset service node corresponding to the software development process is obtained. By obtaining the real-time operation information of the preset service node, the current load condition, resource usage status and availability of each node can be accurately understood, which provides reliable data support for the subsequent dynamic load balancing and avoids the imbalance and resource waste problems that may be caused by static allocation and simple polling methods; then, according to the node operation information, the target service node is determined from the preset service nodes, and according to the real-time node operation information, the target node that is most suitable for deploying and running the application service is dynamically selected, which can make full use of existing resources and avoid overloading or insufficient resources of some nodes, thereby improving the overall resource utilization and performance of the system; finally, a call request is sent to the target service node, so that the target service node deploys and runs the application service. By sending the call request to the determined target service node, it is ensured that the application service is deployed and run on the most suitable node, which can not only improve the startup speed and response efficiency of the application service, but also further optimize the stability and overall performance of the system through reasonable resource allocation. In the above method, by dynamically obtaining the operation information of the preset service node, selecting the target service node according to the real-time data, and sending the call request to the target service node, the application service is deployed and run, which effectively realizes the load balancing of the application service, optimizes the utilization of server resources, and improves the overall performance and stability of the system. Compared with the existing static allocation and simple polling algorithms, this method can manage and allocate server resources more flexibly and efficiently, avoids the problem of insufficient or overloaded node resources, and ensures that the low-code platform always maintains an efficient and stable state during the development and operation process.

[0063] In an exemplary embodiment, the node operation information includes at least node startup service quantity information, node availability detection information, node dependency installation information and node free memory information; as shown in FIG3 , the above step S201 determines the target service node from the preset service nodes according to the node operation information, and can also be implemented by the following steps:

[0064] Step S301, determining an available service node from preset service nodes according to node availability detection information and node free memory information of the preset service node;

[0065] Step S302: determining a target service node from available service nodes according to node startup service quantity information and node dependency installation information of the available service nodes.

[0066] Among them, the node availability detection information refers to the current availability status and health status of the service node, and the node free memory information refers to the current free memory amount of the service node.

[0067] For example, first, the server can collect node availability detection information from all preset service nodes through the heartbeat detection mechanism, and filter out nodes that can reply and are in good health. At the same time, the server also collects the free memory information of each node, and compares it with the memory resources required by the application service, and filters out nodes with sufficient memory as available service nodes. Then, the server further analyzes the startup service quantity information and dependency installation information of the available service nodes, and gives priority to nodes with low load and required dependency packages installed as target service nodes. The server uses a weighted scoring system to assign weights to the performance indicators of each node and calculate a comprehensive score. In addition, the server can also consider the geographical location of the service node and select a service node that is geographically closer to optimize network latency and response time.

[0068] In this embodiment, by further refining the selection process of the target service node, it is ensured that the selected target service node reaches the best state in terms of resource utilization and service quality. First, the available service nodes are screened out, and then, based on the load of the node (the number of services started) and the dependency installation status, the nodes with low load and installed required dependencies are given priority, thereby reducing deployment time and resource consumption. Through this step-by-step screening method, the target service node can be determined more accurately and efficiently, resource allocation can be optimized, and the overall performance and stability of the system can be improved.

[0069] In an exemplary embodiment, the above-mentioned step S302 determines the target service node from the available service nodes according to the node startup service quantity information and the node dependency installation information of the available service nodes, and also includes: dividing the available service nodes into a node set with installed dependencies and a node set without installed dependencies according to the node dependency installation information of the available service nodes; the node dependency installation information is used to characterize the installation status of the dependency files corresponding to the application service; when the node set with installed dependencies is a non-empty set, according to the node startup service quantity information, the available service node with the smallest number of node startup services is filtered out from the available service nodes in the node set with installed dependencies as the target service node; when the node set with installed dependencies is an empty set, according to the node startup service quantity information, the available service node with the smallest number of node startup services is filtered out from the available service nodes in the node set without installed dependencies as the target service node.

[0070] The node startup service quantity information refers to the number of service instances currently running on the service node, and the node dependency installation information refers to the status of dependency files corresponding to the application services installed on the service node.

[0071] Exemplarily, the server first collects the node startup service quantity information and node dependency installation information of all available service nodes. Then, the server divides the available service nodes into a node set with installed dependencies and a node set without installed dependencies according to the node dependency installation information. The node set with installed dependencies includes those nodes that have installed the dependency files required by the application service, while the node set without installed dependencies includes those nodes that have not yet installed the required dependency files. Next, if the node set with installed dependencies is not empty, the server will filter out the available service node with the smallest number of node startup services from the set according to the node startup service quantity information as the target service node, that is, give priority to the already prepared nodes to reduce deployment time and resource consumption. If the node set with installed dependencies is empty, the server will filter out the available service node with the smallest number of node startup services from the node set without installed dependencies according to the node startup service quantity information as the target service node, so that even if the node is not prepared in advance, the node with the smallest load can be effectively selected for deployment.

[0072] In this embodiment, by collecting and analyzing node dependency installation information, available service nodes are divided into node sets with and without installed dependencies, ensuring that nodes with installed dependencies are used first, thereby reducing deployment time and resource consumption. Subsequently, based on the number of node startup services, the node with the smallest load is selected for deployment, which improves the response speed and overall performance of the system. Through this step-by-step screening method, the target service node can be determined more accurately and efficiently, resource allocation can be optimized, and the overall performance and stability of the system can be improved.

[0073] In an exemplary embodiment, before the above step S203 sends a call request to the target service node so that the target service node deploys and runs the application service, it also includes: when the target service node is an available service node in a set of nodes without installed dependencies, calling a file synchronization tool in the target service node to synchronize non-dependent files to the target service node; non-dependent files are files other than dependent files in the software development process; calling a dependency management tool in the target service node to download and install dependent files to the target service node.

[0074] Among them, non-dependent files refer to all files except dependent files in the software development process, including source code, configuration files, static resources, document files, test files, etc. Dependent files refer to libraries and modules required by application services.

[0075] Exemplarily, when the target service node determined by the server is a service node in the node set without installed dependencies, the server first calls the file synchronization tool (such as Network File System) in the target service node to synchronize non-dependent files from the central storage or other shared storage to the target service node, ensuring that the target service node has all the code and configuration files required to run the application service. Then, the server calls the dependency management tool (such as npm / Node Package Manager, yarn or pip) in the target service node to download and install the dependency files required for the application service, ensuring that the target service node has all the dependency packages required to run the application service.

[0076] It should be noted that file synchronization tools usually synchronize the files of the entire software development project to the target node. Since these usually contain a large number of small files and deeply nested directory structures, and the dependent files are usually large in size and numerous, directly synchronizing these files will consume a lot of hard disk I / O and network bandwidth. Dependency management tools will only download and decompress the dependent packages that are actually needed, avoiding the transmission overhead of a large number of files; dependency management tools all support parallel download of dependent packages, can download multiple packages at the same time, thereby speeding up the download speed, and can also identify the packages that have been downloaded and only download the missing parts. When pulling dependent files, dependency management tools usually transfer them through compressed files (such as tarballs), which is more efficient than synchronizing files one by one. File synchronization tools are often less efficient when processing a large number of files, because the transmission of each file requires establishing a connection, transmitting data, and closing the connection. At the same time, dependency management tools usually use content distribution networks to store and provide dependent packages. Content distribution networks can select the nearest node for downloading based on the user's location through nodes on the Internet, thereby improving download speed; while file synchronization tools synchronize in a local area network. When processing a large number of files and complex directory structures, the transmission overhead is large, and network bottlenecks may occur, affecting the overall speed. In addition, dependency management tools automatically handle dependencies to ensure the order and version matching of dependency packages, while file synchronization tools simply copy files and cannot optimize the dependency installation process.

[0077] In this embodiment, by separately synchronizing non-dependent files and dependent files, the efficiency of file synchronization and dependent installation can be significantly improved. Synchronizing non-dependent files to the target service node can ensure that necessary files such as code, configuration, and static resources are quickly in place, because these files can usually only be synchronized through a local area network. Calling a dependency management tool to download and install dependent files can utilize the network and computing resources of the target service node for efficient processing.

[0078] In an exemplary embodiment, after sending a call request to the target service node in the above step S203 so that the target service node deploys and runs the application service, it also includes: sending a hot update instruction to the target service node so that the target service node monitors the file updates in the shared storage in real time, and performs synchronous updates of the files in the shared storage based on the file synchronization tool.

[0079] Exemplarily, when the server determines that the target service node has successfully deployed and run the application service, the server sends a hot update instruction to the target service node. After receiving the hot update instruction, the target service node starts a file listener to monitor the file changes in the shared storage in real time. The listener checks whether the file in the shared storage has changed at a fixed time interval (such as every 5 seconds). Once a file update is detected, the target service node will call the file synchronization tool to synchronize the updated file from the shared storage to the local. Ensure that the application service can obtain the latest file updates in real time during operation, improving development and debugging efficiency.

[0080] In this embodiment, by sending hot update instructions, the target service node can monitor file changes in the shared storage in real time after deploying and running the application service, and synchronize the updated files to the local based on the file synchronization tool, thereby improving development and debugging efficiency, reducing service downtime, ensuring the consistency of file versions, optimizing resource utilization, and ultimately improving the overall performance and stability of the system.

[0081] In an exemplary embodiment, after sending a call request to the target service node in the above step S203 so that the target service node deploys and runs the application service, it also includes: obtaining the current node operation information and log information of the target service node; inputting the current node operation information and log information into a pre-trained abnormal prediction model to obtain the current abnormal prediction information of the target service node; and executing preventive maintenance instructions for the target service node when the current abnormal prediction information indicates that the target service node has an abnormal risk.

[0082] The log information includes system logs, application logs and error logs.

[0083] For example, after the application service is deployed and running, the server obtains the current node operation information and log information of the target service node in real time through the distributed monitoring system and log collection tool. The server inputs this data into a pre-trained anomaly prediction model, which is trained using a machine learning algorithm (such as a random forest, support vector machine, or deep learning model).

[0084] For model training, a large amount of historical node operation information and log information is first collected. These data include various performance indicators and log information under normal and abnormal operation states. Then, key features are extracted from the collected data, such as fluctuation patterns of CPU usage, signs of memory leaks, abnormal disk I / O behavior, error frequency and type in logs, etc. And the machine learning algorithm for anomaly detection selected by the user is obtained, such as random forest, support vector machine (SVM), long short-term memory network (LSTM), etc. The selected machine learning model is trained using the extracted features, and the model identifies potential anomalies by learning the feature differences under normal and abnormal states. Finally, the accuracy and robustness of the model are verified through cross-validation and test sets, and the model parameters are adjusted to improve the prediction performance.

[0085] In the process of applying the model, the server inputs the current node operation information and log information collected in real time into the pre-trained anomaly prediction model, and the model predicts the abnormal risk of the target service node based on the input data. If the model prediction result indicates that the target service node has an abnormal risk, the server will immediately execute preventive maintenance instructions, such as dynamically adjusting resource allocation, expanding the container capacity, or migrating workloads, to prevent potential problems from affecting the normal operation of the service.

[0086] In this embodiment, after the application service is deployed and run, the current node operation information and log information of the target service node are obtained, and the pre-trained abnormal prediction model is input to obtain abnormal prediction information. When the target service node is detected to have abnormal risk, preventive maintenance instructions will be executed to prevent potential problems from affecting the normal operation of the service. Not only can possible faults be discovered and prevented in a timely manner to ensure the high reliability and stability of the system, but also resource allocation can be optimized to improve the overall performance of the system.

[0087] In another exemplary embodiment, as shown in FIG4 , the present application provides an application service load balancing method in a software development process, the method comprising the following steps:

[0088] Step S401, in response to a call request for an application service of a software development process, obtaining node operation information of a preset service node corresponding to the software development process.

[0089] The node operation information includes at least the node startup service quantity information, node availability detection information, node dependency installation information and node free memory information.

[0090] Step S402: determining an available service node from the preset service nodes according to the node availability detection information and the node free memory information of the preset service nodes.

[0091] Step S403: According to the node dependency installation information of the available service nodes, the available service nodes are divided into a node set with installed dependencies and a node set with no installed dependencies.

[0092] The node dependency installation information is used to represent the installation status of the dependency files corresponding to the application service.

[0093] Step S404, when the node set of installed dependencies is a non-empty set, based on the node startup service quantity information, select the available service node with the smallest node startup service quantity from the available service nodes in the node set of installed dependencies as the target service node.

[0094] Step S405, when the node set with installed dependencies is an empty set, based on the node startup service quantity information, select the available service node with the smallest node startup service quantity from the available service nodes in the node set without installed dependencies as the target service node.

[0095] Step S406: When the target service node is an available service node in the node set without installed dependencies, a file synchronization tool in the target service node is called to synchronize the non-dependent files to the target service node.

[0096] Among them, non-dependent files are files other than dependent files in the software development process;

[0097] Step S407: calling a dependency management tool in the target service node to download and install the dependency files into the target service node.

[0098] Step S408: sending a call request to the target service node, so that the target service node deploys and runs the application service.

[0099] Step S409: Send a hot update instruction to the target service node, so that the target service node monitors the file update in the shared storage in real time, and performs synchronous update of the file in the shared storage based on the file synchronization tool.

[0100] Step S410, obtaining current node operation information and log information of the target service node.

[0101] Step S411, input the current node operation information and log information into the pre-trained abnormality prediction model to obtain the current abnormality prediction information of the target service node.

[0102] Step S412: When the current abnormal prediction information indicates that the target service node has an abnormal risk, a preventive maintenance instruction for the target service node is executed.

[0103] In this embodiment, by dynamically obtaining the operation information of the preset service node, selecting the target service node according to the real-time data, and sending the call request to the target service node, the application service is deployed and run, which effectively realizes the load balancing of the application service, optimizes the utilization of server resources, and improves the overall performance and stability of the system. Compared with the existing static allocation and simple polling algorithms, this method can manage and allocate server resources more flexibly and efficiently, avoids the problem of insufficient or overloaded node resources, and ensures that the low-code platform always maintains an efficient and stable state during the development and operation process.

[0104] In an exemplary embodiment, as shown in FIG5 , the present application provides an application service load balancing method in a software development process, the method comprising:

[0105] Step S501: the distribution server receives an application service startup request and obtains node operation information of a service node.

[0106] Step S502, the distribution server performs polling scheduling on the service nodes in ascending order according to the number of node startup services in the node operation information, and preferentially schedules the service node with the smallest number of startup services.

[0107] Step S503, before distributing the start request, the distribution server will determine whether the service node is available through heartbeat detection. If the service node is available, a subsequent judgment is made; if the node is not available, the next service node is polled for judgment.

[0108] Step S504, the distribution server will first obtain the service node that has installed the dependent files of the development project for scheduling. If the dependent files of the project have not been installed, the distribution server will poll the next service node for judgment.

[0109] Step S505: The distribution server obtains the service node memory usage information and calculates whether the remaining memory resources are sufficient to start the application service.

[0110] Step S506, before starting the application service, the service node that performs scheduling needs to adopt an on-demand file synchronization strategy, using the file synchronization tool to only synchronize and copy all files under the project except the dependent files, and then use the dependency management tool to pull the project dependencies.

[0111] Step S507, after the application service is started, the service node that performs scheduling will start a monitoring thread to monitor whether the file in the shared storage has changed, and if so, update the file synchronously.

[0112] Exemplarily, this method can be applied to online low-code platforms, starting Vue services and other scenarios. Due to file synchronization, load balancing and other reasons, the current low-code platform may only support starting Vue services on a single node, and may not even support the online starting Vue service function, and cannot effectively support a large number of users starting Vue projects for online debugging; the load balancing achieved through nginx's hash algorithm, weight configuration and other methods cannot reasonably and effectively distribute the start-up service requests to multiple nodes, and there is often a situation where a single node is busy and other nodes are idle; there is a problem of file synchronization when starting services on multiple nodes. Since there are many dependent files under the Vue project and the overall file size is usually large, the file synchronization achieved through file synchronization tools and other methods will still have problems such as slow speed, which will lead to the Vue project starting service taking too long.

[0113] In this embodiment, by analyzing the resource usage of the server cluster, the service startup request is reasonably allocated to the node with less resource usage, so that the load balancing effect is better. By combining file synchronization on demand with file monitoring, the problem of slow file synchronization rate caused by too large a number of dependent files and large file sizes is avoided, and the problem of too long time to start the service of the development project is solved. Through the scheduling of multiple service nodes, users are supported to start the application service of the online development project, and then the development project is debugged online, effectively improving the development efficiency.

[0114] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0115] Based on the same inventive concept, the embodiment of the present application also provides an application service load balancing device for a software development process for implementing the application service load balancing method for the software development process involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiment of the application service load balancing device for one or more software development processes provided below can refer to the limitations of the application service load balancing method for the software development process above, and will not be repeated here.

[0116] In an exemplary embodiment, as shown in FIG6 , an application service load balancing device for a software development process is provided, comprising: a node information acquisition module 601, a target node determination module 602 and a call request sending module 603, wherein:

[0117] The node information acquisition module 601 is used to obtain the node operation information of the preset service node corresponding to the software development process in response to the call request of the application service of the software development process;

[0118] The target node determination module 602 is used to determine the target service node from the preset service nodes according to the node operation information;

[0119] The call request sending module 603 is used to send the call request to the target service node, so that the target service node deploys and runs the application service.

[0120] In one of the embodiments, the node operation information includes at least node startup service quantity information, node availability detection information, node dependency installation information and node free memory information; the above-mentioned target node determination module 602 is also used to determine the available service nodes from the preset service nodes according to the node availability detection information and the node free memory information of the preset service nodes; determine the target service node from the available service nodes according to the node startup service quantity information and the node dependency installation information of the available service nodes.

[0121] In one of the embodiments, the target node determination module 602 is further used to divide the available service nodes into a set of nodes with installed dependencies and a set of nodes without installed dependencies according to the node dependency installation information of the available service nodes; the node dependency installation information is used to characterize the installation status of the dependency files corresponding to the application service; when the set of nodes with installed dependencies is a non-empty set, based on the node startup service quantity information, the available service node with the smallest number of node startup services is screened out from the available service nodes in the set of nodes with installed dependencies as the target service node; when the set of nodes with installed dependencies is an empty set, based on the node startup service quantity information, the available service node with the smallest number of node startup services is screened out from the available service nodes in the set of nodes without installed dependencies as the target service node.

[0122] In one of the embodiments, the application service load balancing device of the above-mentioned software development process also includes a node file deployment module, which is used to call the file synchronization tool in the target service node to synchronize non-dependent files to the target service node when the target service node is an available service node in the node set without installed dependencies; non-dependent files are files other than dependent files in the software development process; call the dependency management tool in the target service node to download and install the dependent files to the target service node.

[0123] In one of the embodiments, the application service load balancing device of the above-mentioned software development process also includes a hot update instruction sending module, which is used to send hot update instructions to the target service node, so that the target service node monitors the file updates in the shared storage in real time, and performs synchronous updates of the files in the shared storage based on the file synchronization tool.

[0124] In one of the embodiments, the application service load balancing device of the above-mentioned software development process also includes a node anomaly prediction module, which is used to obtain the current node operation information and log information of the target service node; input the current node operation information and log information into a pre-trained anomaly prediction model to obtain the current anomaly prediction information of the target service node; when the current anomaly prediction information indicates that the target service node has an abnormal risk, execute preventive maintenance instructions for the target service node.

[0125] Each module in the application service load balancing device of the software development process can be implemented in whole or in part by software, hardware and their combination. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0126] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store preset service node related data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an application service load balancing method of a software development process is implemented.

[0127] Those skilled in the art will understand that the structure shown in FIG. 7 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0128] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0129] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0130] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0131] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0132] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0133] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0134] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for load balancing application services in a software development process, characterized in that: The method comprises: In response to a call request for an application service of a software development process, obtaining node operation information of a preset service node corresponding to the software development process; Determine a target service node from the preset service nodes according to the node operation information; The call request is sent to the target service node, so that the target service node deploys and runs the application service.

2. The method according to claim 1, characterized in that The node operation information includes at least node startup service quantity information, node availability detection information, node dependency installation information and node free memory information; The step of determining a target service node from the preset service nodes according to the node operation information includes: Determine an available service node from the preset service nodes according to the node availability detection information and the node free memory information of the preset service node; The target service node is determined from the available service nodes according to the node startup service quantity information and the node dependency installation information of the available service nodes.

3. The method according to claim 2, characterized in that The step of determining the target service node from the available service nodes according to the node startup service quantity information and the node dependency installation information of the available service nodes includes: According to the node dependency installation information of the available service nodes, the available service nodes are divided into a node set with installed dependencies and a node set without installed dependencies; the node dependency installation information is used to characterize the installation status of the dependency files corresponding to the application service; In the case that the node set of installed dependencies is a non-empty set, according to the node startup service quantity information, from the available service nodes in the node set of installed dependencies, an available service node with the smallest number of node startup services is selected as the target service node; When the node set with installed dependencies is an empty set, based on the node startup service quantity information, the available service node with the smallest number of node startup services is selected from the available service nodes in the node set without installed dependencies as the target service node.

4. The method according to claim 3, characterized in that Before sending the call request to the target service node so that the target service node deploys and runs the application service, the method further includes: In the case where the target service node is an available service node in the node set without installed dependencies, calling a file synchronization tool in the target service node to synchronize non-dependent files to the target service node; the non-dependent files are files other than the dependent files in the software development process; The dependency management tool in the target service node is called to download and install the dependency file into the target service node.

5. The method according to claim 1, characterized in that After sending the call request to the target service node so that the target service node deploys and runs the application service, the method further includes: Send a hot update instruction to the target service node, so that the target service node monitors the file update in the shared storage in real time, and performs synchronous update of the file in the shared storage based on a file synchronization tool.

6. The method according to claim 1, characterized in that After sending the call request to the target service node so that the target service node deploys and runs the application service, the method further includes: Obtaining current node operation information and log information of the target service node; Input the current node operation information and the log information into a pre-trained abnormality prediction model to obtain the current abnormality prediction information of the target service node; In a case where the current abnormality prediction information indicates that the target service node has an abnormality risk, a preventive maintenance instruction for the target service node is executed.

7. An application service load balancing device for a software development process, characterized in that: The device comprises: A node information acquisition module, for obtaining node operation information of a preset service node corresponding to the software development process in response to a call request for an application service of the software development process; A target node determination module, used to determine a target service node from the preset service nodes according to the node operation information; The call request sending module is used to send the call request to the target service node, so that the target service node deploys and runs the application service.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Method and system for realizing multi-copy file storage based on fragmented storage

    CN119357129A