A network service fast switching method and related device

By loading only the data files required to process business requests into the memory, the problem of needing to support twice the amount of data in memory in the existing technology is solved, achieving more efficient network service switching and reducing costs.

CN114296961BActive Publication Date: 2024-08-23TRAVELSKY TECHNOLOGY LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111615072.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2024-08-23
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

Existing freight rate calculation systems need to support high-frequency and high-performance data access during data query, which results in the need to support twice the memory size of the data at the same time, which is expensive and takes a long time to load data files.

Method used

Start the service process manager and monitoring control port through the daemon process, load only the data files required to process business requests into the memory, establish the mapping relationship between the memory virtual address space and the disk address, and avoid loading all data files into the memory.

Benefits of technology

It reduces the memory size requirements, reduces costs, reduces the time spent loading data files, and improves network service switching efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114296961B
    Figure CN114296961B
Patent Text Reader

Abstract

The present disclosure provides a network service fast switching method and related devices, wherein a daemon process starts a first service process manager and a first monitoring control port. The first service process manager starts a first service process controller to establish a first mapping relationship. The first service process controller starts multiple first service processes, thereby processing the service request received by the first service listening port bound to the first service process controller according to the first mapping relationship. If the first monitoring control port receives a load data instruction, the second service process controller is started through the first service process manager to establish a second mapping relationship between the second memory virtual address space and the second disk address. The second service process controller starts multiple second service processes, and the service listening port that receives the service request is switched to the second service listening port, so that the received service request can be processed according to the second mapping relationship through multiple second service processes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a network service fast switching method and related devices. Background Art

[0002] With the gradual development of airlines, in order to support various differentiated needs, the application of freight rates and rules has become increasingly complex. In addition, as the amount of data is increasing, there are many types of data and complex relationships between data. As a typical computing scenario of the freight rate calculation system, it is necessary to complete thousands or even tens of thousands of data queries in one calculation. Therefore, the freight rate calculation system needs to support high-frequency and high-performance data access.

[0003] To this end, the A / B block method can usually be used, that is, the original data is retained in shared memory A while the updated data is stored in shared memory B, and then the mapping of the service process is switched from shared memory A to shared memory B, thereby supporting high-frequency and high-performance data access and avoiding service interruptions or obvious performance jitters.

[0004] However, this method requires a memory size that is twice the size of the data, which is expensive. In addition, it takes a long time to load all the data into the memory. Summary of the invention

[0005] The present disclosure provides a network service fast switching method and related devices, which no longer need to load all data files into the memory, but only the used parts (that is, the data files required to process the business request) will be loaded in, thereby eliminating the need for a hard limit of twice the amount of data in the memory, greatly reducing the requirements for memory size, reducing costs, reducing the time spent on loading data files, and improving the efficiency of network service switching.

[0006] In a first aspect, the present disclosure provides a method for fast switching of network services, the method comprising:

[0007] Starting a first service process manager through a daemon process, and starting a first monitoring control port corresponding to the first service process manager;

[0008] Start a first service process controller through the first service process manager, and establish a first mapping relationship between a first memory virtual address space and a first disk address through the first service process controller, wherein the first disk address is a disk address of an original data file, and the first service process controller has a bound first service listening port, and the first service listening port is used to receive a service request;

[0009] Starting a plurality of first service processes through the first service process controller, wherein the plurality of first service processes are used to load an original data file for processing a service request from the first disk address to the first memory virtual address space according to the first mapping relationship, thereby processing the service request received by the first service listening port;

[0010] If a load data instruction is received through the first monitoring control port, a second service process controller is started through the first service process manager, and a second mapping relationship between a second memory virtual address space and a second disk address is established through the second service process controller, where the second disk address is a disk address of an updated data file, and the second service process controller has a bound second service listening port;

[0011] Multiple second service processes are started through the second service process controller, and the service listening port for receiving business requests is switched from the first service listening port to the second service listening port, so that the multiple second service processes load the updated data file used to process the business request from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the business request received by the second service listening port.

[0012] In a second aspect, the present disclosure provides a network service fast switching device, the device comprising a starting unit, an establishing unit and a switching unit:

[0013] The starting unit is used to start the first service process manager through the daemon process, and start the first monitoring control port corresponding to the first service process manager;

[0014] The starting unit is further used to start the first service process controller through the first service process manager;

[0015] The establishing unit is used to establish a first mapping relationship between a first memory virtual address space and a first disk address through the first service process controller, the first disk address is a disk address of an original data file, the first service process controller has a bound first service listening port, and the first service listening port is used to receive a service request;

[0016] The startup unit is further used to start multiple first service processes through the first service process controller, and the multiple first service processes are used to load the original data file used to process the service request from the first disk address to the first memory virtual address space according to the first mapping relationship, so as to process the service request received by the first service listening port;

[0017] The startup unit is further configured to start the second service process controller through the first service process manager if a load data instruction is received through the first monitoring control port;

[0018] The establishing unit is further used to establish a second mapping relationship between the second memory virtual address space and the second disk address through the second service process controller, the second disk address is the disk address of the updated data file, and the second service process controller has a bound second service listening port;

[0019] The starting unit is further used to start multiple second service processes through the second service process controller;

[0020] The switching unit is used to switch the service listening port for receiving business requests from the first service listening port to the second service listening port, so that the multiple second service processes load the updated data file used to process the business requests from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the business requests received by the second service listening port.

[0021] In a third aspect, the present disclosure provides a computer device, comprising at least one processor and at least one memory, wherein the at least one memory stores computer-readable instructions, and the at least one processor executes the computer-readable instructions so that the computer device performs the method described in the first aspect of the present disclosure or any one implementation of the first aspect.

[0022] In a fourth aspect, the present disclosure provides a computer-readable storage medium including computer-readable instructions, which, when executed on a computer device, enables the computer device to execute the method described in the first aspect or any one of the implementations of the first aspect.

[0023] In a fifth aspect, the present disclosure provides a computer program product comprising instructions, which, when executed on a computer device, enables the computer device to execute the method described in the first aspect or any one of the implementations of the first aspect.

[0024] Based on the implementations provided in the above aspects, the present disclosure can be further combined to provide more implementations.

[0025] Based on the above description, it can be seen that the technical solution of the present disclosure has the following beneficial effects:

[0026] Specifically, a first service process manager is started through a daemon process, and a first monitoring control port corresponding to the first service process manager is started; a first service process controller is started through the first service process manager, and a first mapping relationship between a first memory virtual address space and a first disk address is established through the first service process controller, wherein the first disk address is the disk address of an original data file, and the first service process controller has a bound first service listening port, and the first service listening port is used to receive business requests; multiple first service processes are started through the first service process controller, and the multiple first service processes are used to load the original data file used to process the business request from the first disk address to the first memory virtual address space according to the first mapping relationship, thereby processing the business request received by the first service listening port If a data loading instruction is received through the first monitoring control port, the second service process controller is started through the first service process manager, and a second mapping relationship between the second memory virtual address space and the second disk address is established through the second service process controller, the second disk address is the disk address of the updated data file, and the second service process controller has a bound second service listening port; multiple second service processes are started through the second service process controller, and the service listening port receiving the business request is switched from the first service listening port to the second service listening port, so that multiple second service processes load the updated data file used to process the business request from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the business request received by the second service listening port. Compared with the shared memory solution, this solution no longer needs to load all data files into the memory, but only the used part (that is, the data file required to process the business request) will be loaded in, so there is no need for a hard limit of twice the amount of data memory, which greatly reduces the requirements for memory size, reduces costs, reduces the time spent on loading data files, and improves the efficiency of network service switching. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0028] Figure 1 An example diagram of a network service switching method provided for related technologies;

[0029] Figure 2 A flowchart of a method for fast switching of network services provided by an embodiment of the present disclosure;

[0030] Figure 3An example diagram of the startup sequence and exit sequence between the Master, Controller, and Worker provided in an embodiment of the present disclosure;

[0031] Figure 4 A schematic diagram of the structure of a network service fast switching device provided by an embodiment of the present disclosure;

[0032] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0034] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0035] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0036] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0037] The current network service switching method can be found in Figure 1As shown, the main method is to use shared memory (using A / B blocks), that is, the original data is retained in shared memory A while the updated data is stored in shared memory B. When starting, the shared memory manager is required to load the business data into the shared memory (e.g., shared memory A), and then the service process derived by the service process manager maps the shared memory to its own virtual address space through mmap. When the updated data is pushed to the local machine, the shared memory manager loads the new business data into another shared memory (e.g., shared memory B), and the new service process derived by the service process manager maps the new shared memory to its own virtual address space through mmap. Therefore, all the data needs to be loaded into the memory at the same time, and two copies of the data need to be saved in the memory during the switching period. This requires supporting a memory size twice the amount of data at the same time, which is relatively expensive. In addition, it takes a long time to load all the data into the memory.

[0038] In view of this, an embodiment of the present disclosure provides a method for fast switching of network services. Specifically, a first service process manager is started through a daemon process, and a first monitoring control port corresponding to the first service process manager is started; a first service process controller is started through the first service process manager, and a first mapping relationship between a first memory virtual address space and a first disk address is established through the first service process controller, wherein the first disk address is the disk address of the original data file, and the first service process controller has a bound first service listening port, and the first service listening port is used to receive business requests; multiple first service processes are started through the first service process controller, and the multiple first service processes are used to load the original data file used to process the business request from the first disk address to the first memory virtual address space according to the first mapping relationship, thereby processing the business request received by the first service listening port. Processing; if a load data instruction is received through the first monitoring control port, the second service process controller is started through the first service process manager, and a second mapping relationship between the second memory virtual address space and the second disk address is established through the second service process controller, the second disk address is the disk address of the updated data file, and the second service process controller has a bound second service listening port; multiple second service processes are started through the second service process controller, and the service listening port for receiving business requests is switched from the first service listening port to the second service listening port, so that the multiple second service processes load the updated data file used to process the business request from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the business request received by the second service listening port.

[0039] Compared with the shared memory solution, this solution no longer needs to load all data files into the memory. Instead, only the used parts (that is, the data files required to process business requests) will be loaded in, thus eliminating the hard limit of twice the amount of data in the memory, greatly reducing the requirements for memory size, reducing costs, reducing the time spent on loading data files, and improving network service switching efficiency.

[0040] It should be noted that, in the present disclosure, the execution subject of the network service fast switching method may be a computer device, and the computer device may be a terminal or a server.

[0041] Next, the network service fast switching method provided by the embodiment of the present disclosure will be introduced by taking the server as the execution subject as an example.

[0042] See also Figure 2 The flowchart of the network service fast switching method shown in FIG. 1 includes:

[0043] S201. Start a first service process manager through a daemon process, and start a first monitoring control port corresponding to the first service process manager.

[0044] It should be noted that when the server executes the network service fast switching method provided by the embodiment of the present disclosure, it can call the structure of multi-layer parent-child processes. For example, the server can first start the daemon process (Angel), and then call the version of the current service program to access the executable file to query whether there is a related service process manager (Master). The service process manager is a child process of the daemon process, and the corresponding service process manager can be started according to the configuration file corresponding to the daemon process. Among them, the configuration file corresponding to the daemon process can be expressed as angel.ini, and the names, descriptions and configuration files of processes at different levels can be seen in Table 1. Angel.ini is configured with the path and initialization parameters of the executable file used to start the Master process. For example, the service process manager can be started according to the initialization parameters of the service in the configuration file. At this time, the started service process manager can be called the first service process manager. If the version number of the first service process manager is V1, the first service process manager can be expressed as service process manager V1 (Master_V1).

[0045] Table 1

[0046] Process Name illustrate Configuration Files Angel Daemon angel.ini Master Service process manager process service.ini Controller Process of the service process controller none Worker Service Process none

[0047] In a possible implementation, the first service process manager may start the first monitoring control port according to a control port list in a configuration file corresponding to the first service process manager. The configuration file corresponding to the first service process manager may be represented by service.ini.

[0048] It should be noted that the daemon process can communicate with the first monitoring control port of the first service process manager, thereby reading the status information of the first service process manager through the first monitoring control port. If it is determined according to the status information that the first service process manager (Master_V1) crashes due to an abnormality, the daemon process (Angel) will restart the process of Master_V1.

[0049] S202. Start the first service process controller through the first service process manager, and establish a first mapping relationship between the first memory virtual address space and the first disk address through the first service process controller. The first disk address is the disk address of the original data file. The first service process controller has a bound first service listening port, and the first service listening port is used to receive business requests.

[0050] After the first service process manager is started, the initial service process controller is started according to the database path in the configuration file of the first service process manager. At this time, it can be called the first service process controller, which can be expressed as A service process controller (Controller_A). The first service process controller is a child process of the first service process manager. The first service process controller establishes a first mapping relationship between the first memory virtual address space and the first disk address, and further creates real-time pre-processed data (complex data types such as containers can be used arbitrarily). The first disk address is the disk address of the original data file. The first service process controller has a bound first service listening port, and the first service listening port is used to receive business requests. Among them, the first service process controller can find the first available port (i.e., the first service listening port) for binding according to the service listening port list in service.ini.

[0051] It should be noted that the database involved in the embodiment of the present disclosure is a series of data files on the disk. The data files corresponding to the disk addresses are loaded into the memory virtual address space of the service process through mmap for use. Although it is also mmap, the method provided by the embodiment of the present disclosure no longer needs to load all data files into the memory, but only the used parts will be loaded in. All derived child processes in the embodiment of the present disclosure are completed through the fork function. When fork creates a child process, the copy-on-write method is adopted. The code segment, data segment, and stack of the child process all point to the physical space of the parent process. When the behavior of changing the corresponding segment occurs in the child process, the actual physical space will be allocated for the corresponding segment of the child process, and the file handle opened by the parent process can also be shared.

[0052] S203. Start multiple first service processes through the first service process controller, and the multiple first service processes are used to load the original data file used to process the business request from the first disk address to the first memory virtual address space according to the first mapping relationship, so as to process the business request received by the first service listening port.

[0053] The first service process controller starts multiple first service processes, which are subprocesses of the first service process controller, share the data file of the first service process controller and the first service listening port, accept business requests from the first service listening port, and perform related calculations and return according to the type of business requests. The first service process can be represented as A service process (Worker_A).

[0054] It should be noted that when multiple first service processes process received business requests, the original data file used to process the business request can be loaded from the first disk address to the first memory virtual address space according to the first mapping relationship, thereby processing the received business request. The original data file loaded from the first disk address to the first memory virtual address space can be all the original data files used to process the business request, or it can be part of the original data files used to process the business request (for example, the original data file with missing pages or fragments in the memory).

[0055] It should be noted that the number of first service processes started by the first service process controller may be configured in service.ini, and therefore, the number of the plurality of first service processes is determined according to a configuration file corresponding to the first service process manager.

[0056] S204. If a loading data instruction is received through the first monitoring control port, the second service process controller is started through the first service process manager, and a second mapping relationship between the second memory virtual address space and the second disk address is established through the second service process controller. The second disk address is the disk address of the updated data file, and the second service process controller has a bound second service listening port.

[0057] Wait for the updated data file to arrive, and continue waiting if it has not arrived. If the updated data file is ready, the daemon process sends a load data instruction to the first monitoring control port of the Master_V1 process. At this time, the second service process controller is started through the first service process manager, and the second mapping relationship between the second memory virtual address space and the second disk address is established through the second service process controller, and further real-time pre-processed data is created. The second service process controller is a child process of the first service process manager, and unlike the first service process controller, the second service process controller can be represented as B service process controller (Controller_B). The second disk address is the disk address of the updated data file, and the second service process controller has a bound second service listening port.

[0058] S205. Start multiple second service processes through the second service process controller, and switch the service listening port for receiving business requests from the first service listening port to the second service listening port, so that the multiple second service processes load the updated data file used to process the business requests from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the business requests received by the second service listening port.

[0059] The second service process controller (Controller_B) starts multiple second service processes, and then the business request sent by the front end will change from the first service listening port sent to Controller_A to the second service listening port sent to Controller_B. At this time, the multiple second service processes of Controller_B officially become the current effective service processes. The second service process is a subprocess of the second service process controller, sharing the data file and the second service listening port of the second service process controller, receiving business requests from the second service listening port, and performing related calculations and returning according to the type of business request. Among them, the second service process can be represented as B service process (Worker_B).

[0060] It should be noted that when multiple second service processes process received business requests, they can load updated data files used to process business requests from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the received business requests. The updated data files loaded from the second disk address to the second memory virtual address space can be all updated data files used to process business requests, or can be partially updated data files used to process business requests (e.g., updated data files with missing pages or fragments in the memory).

[0061] In a possible implementation, after confirming that the business request received by the second service listening port is processed by multiple second service processes, in order to reduce resource consumption, the no longer needed process can be exited. Specifically, multiple first service processes (Worker_A) can be controlled to exit first, for example, the first service process controller (Controller_A) sends an exit instruction to multiple first service processes (Worker_A) of one, and multiple first service processes (Worker_A) automatically exit after receiving the exit instruction. If there are business requests being processed, they can wait until the processing is completed before exiting. After confirming that multiple first service processes have exited, the resource recovery of multiple first service processes (Worker_A) is completed through the first service process controller (Controller_A). After the first service process controller (Controller_A) releases all dynamically applied memory, the first service process controller (Controller_A) exits. After confirming that the first service process controller (Controller_A) has exited, the resource recovery of the first service process controller (Controller_A) is completed through the first service process manager (Master_V1).

[0062] In one possible case, the service process manager that is started can be determined based on the service program version number, and different service program version numbers can start different service process managers. Under normal circumstances, the daemon process (Angel) will cyclically call the program that obtains the service program version number (there is relevant configuration in angel.ini) to obtain the service program version number. When the returned service program version number changes, another service process manager can be started through the daemon process, such as the second service process manager, and the version number of the second service process manager is different from the version number of the first service process manager. The second monitoring control port corresponding to the second service process manager is bound according to service.ini, and the second monitoring control port corresponding to the second service process manager is started. If the version number of the second service process manager is V2, the second service process manager can be represented as service process manager V2 (Master_V2).

[0063] The third service process controller is started through the second service process manager, and a third mapping relationship between the third memory virtual address space and the third disk address is established through the third service process controller, the third disk address is the disk address of the updated data file, and the third service process controller has a bound third service listening port. The third service process controller can be represented as service process controller C (Controller_C).

[0064] Start multiple third service processes through the third service process controller, and then switch the service listening port for receiving business requests from the second service listening port to the third service listening port. The third service process can be represented as service process C (Worker_C). At this time, the service process C (Worker_C) of Controller_C officially becomes the currently effective service process. Multiple third service processes are used to load the updated data file used to process the business request from the third disk address to the third memory virtual address space according to the third mapping relationship, thereby processing the business request received by the third service listening port. Among them, the updated data file loaded from the third disk address to the third memory virtual address space can be a fully updated data file for processing the business request, or it can be a partially updated data file for processing the business request (for example, an updated data file with a missing page or fragment in the memory).

[0065] In a possible implementation, after confirming that the service request received by the third service listening port is processed by multiple third service processes, in order to reduce resource consumption, the no longer needed process can be exited. After confirming that the service request received by the third service listening port is processed by multiple third service processes, multiple second service processes are controlled to exit; after confirming that the multiple second service processes exit, the resource recovery of the multiple second service processes is completed through the second service process controller, and the second service process controller is controlled to exit; after confirming that the second service process controller exits, the resource recovery of the second service process controller is completed through the first service process manager.

[0066] The currently effective service program version number is V2. Angel will send a shutdown command to the monitoring control port of the non-V2 service process manager, which is the first service process manager (Master_V1) in this example. After receiving the shutdown command, Master_V1 will send a signal to its child process, such as the second service process controller (Controller_B). After receiving the signal, Controller_B will send a signal to its child process, the second service process (Worker_B). Worker_B will automatically exit after receiving the signal. Controller_B completes the resource recovery of its own Worker_B, releases the memory resources it applied for, and then automatically exits. Master_V1 completes the resource recovery of its own child process Controller_B, and then automatically exits. Angel completes the resource recovery of Master_V1.

[0067] From the above introduction, we can see that the Controller is the child process of the Master, and the Worker is the child process of the Controller. Their startup order and exit order are exactly the opposite. Figure 3 As shown. Combined with the above process startup (also called derivation) and exit process and Figure 3 As shown in the figure, when a process starts, the parent process starts the child process, that is, the Master is started first, the Master starts the Controller, and then the Controller starts the Worker. When a process exits, the child process exits first, and then the corresponding parent process exits, that is, the Master exits first, then the Controller corresponding to the Master exits, and then the Master corresponding to the Controller exits.

[0068] It should be noted that in the disclosed embodiment, the change in the service program version number can be a larger service program version number, that is, the new version of the service program is ready, and the new version (for example, version number V2) of the service program is installed and deployed. The change in the service program version number can also be a smaller service program version number, that is, the old version of the service program is reused (also known as program rollback). Angel will start the old version of the Master and exit the new version of the Master process after the switch is completed.

[0069] Based on the above description, it can be seen that the technical solution of the present disclosure has the following beneficial effects:

[0070] Specifically, a first service process manager is started through a daemon process, and a first monitoring control port corresponding to the first service process manager is started; a first service process controller is started through the first service process manager, and a first mapping relationship between a first memory virtual address space and a first disk address is established through the first service process controller, wherein the first disk address is the disk address of an original data file, and the first service process controller has a bound first service listening port, and the first service listening port is used to receive business requests; multiple first service processes are started through the first service process controller, and the multiple first service processes are used to load the original data file used to process the business request from the first disk address to the first memory virtual address space according to the first mapping relationship, thereby processing the business request received by the first service listening port If a data loading instruction is received through the first monitoring control port, the second service process controller is started through the first service process manager, and a second mapping relationship between the second memory virtual address space and the second disk address is established through the second service process controller, the second disk address is the disk address of the updated data file, and the second service process controller has a bound second service listening port; multiple second service processes are started through the second service process controller, and the service listening port receiving the business request is switched from the first service listening port to the second service listening port, so that multiple second service processes load the updated data file used to process the business request from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the business request received by the second service listening port. Compared with the shared memory solution, this solution no longer needs to load all data files into the memory, but only the used part (that is, the data file required to process the business request) will be loaded in, so there is no need for a hard limit of twice the amount of data memory, which greatly reduces the requirements for memory size, reduces costs, reduces the time spent on loading data files, and improves the efficiency of network service switching.

[0071] At the same time, the multi-layer parent-child process structure can easily derive and close processes, and has a certain degree of high availability support. For example, when a child process crashes, the parent process can quickly start a child process.

[0072] The method provided by the disclosed embodiment is mainly designed to support the update and switching of domestic freight rate calculation services. Compared with the shared memory solution, there is no longer a hard limit of twice the amount of data memory, and it supports fast startup and switching of services. No additional shared memory manager process is required, and all processes will be included in the management scope of their own processes.

[0073] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0074] The names of the messages or information (eg, service requests) involved in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0075] Although operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in a sequential order.Multitasking and parallel processing may be advantageous under certain circumstances.

[0076] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0077] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer device, partially on the user's computer device, as a separate software package, partially on the user's computer and partially on a remote computer device, or entirely on a remote computer device or server. In cases involving a remote computer device, the remote computer device may be connected to the user terminal via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external terminal (e.g., via the Internet using an Internet service provider).

[0078] Based on the above method provided by the embodiment of the present disclosure, the embodiment of the present disclosure also provides a network service fast switching device corresponding to the above method. The units / modules involved in the embodiments of the present disclosure can be implemented by software or by hardware. The name of the unit / module does not constitute a limitation on the unit / module itself in some cases.

[0079] See also Figure 4 The schematic diagram of the structure of the network service fast switching device shown in the figure includes a starting unit 401, an establishing unit 402 and a switching unit 403:

[0080] The starting unit 401 is used to start the first service process manager through the daemon process, and start the first monitoring control port corresponding to the first service process manager;

[0081] The starting unit 401 is further used to start the first service process controller through the first service process manager;

[0082] The establishing unit 402 is used to establish a first mapping relationship between a first memory virtual address space and a first disk address through the first service process controller, the first disk address is a disk address of an original data file, the first service process controller has a bound first service listening port, and the first service listening port is used to receive a service request;

[0083] The starting unit 401 is further used to start multiple first service processes through the first service process controller, and the multiple first service processes are used to load the original data file used to process the service request from the first disk address to the first memory virtual address space according to the first mapping relationship, so as to process the service request received by the first service listening port;

[0084] The startup unit 401 is further configured to start the second service process controller through the first service process manager if a load data instruction is received through the first monitoring control port;

[0085] The establishing unit 402 is further used to establish a second mapping relationship between the second memory virtual address space and the second disk address through the second service process controller, the second disk address is the disk address of the updated data file, and the second service process controller has a bound second service listening port;

[0086] The starting unit 401 is further used to start multiple second service processes through the second service process controller;

[0087] The switching unit 403 is used to switch the service listening port for receiving business requests from the first service listening port to the second service listening port, so that the multiple second service processes load the updated data file for processing business requests from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the business requests received by the second service listening port.

[0088] In a possible implementation, the startup unit is used to:

[0089] Starting the first service process manager according to the configuration file corresponding to the daemon process;

[0090] The first monitoring control port is started according to the control port list in the configuration file corresponding to the first service process manager.

[0091] In a possible implementation, the daemon process is used to read the status information of the first service process manager through the first monitoring control port.

[0092] In a possible implementation manner, the number of the multiple first service processes is determined according to a configuration file corresponding to the first service process manager.

[0093] In a possible implementation, the device further includes a control unit:

[0094] The control unit is used to control the multiple first service processes to exit after confirming that the business requests received by the second service listening port are processed by multiple second service processes; after confirming the exit of the multiple first service processes, complete the resource recovery of the multiple first service processes through the first service process controller, and control the exit of the first service process controller; after confirming the exit of the first service process controller, complete the resource recovery of the first service process controller through the first service process manager.

[0095] In a possible implementation, the service process manager to be started is determined according to the service program version number, and the starting unit is further used to:

[0096] When the obtained service program version number changes, starting a second service process manager through the daemon process, and starting a second monitoring control port corresponding to the second service process manager, the version number of the second service process manager being different from the version number of the first service process manager;

[0097] Starting a third service process controller through the second service process manager, and establishing a third mapping relationship between a third memory virtual address space and a third disk address through the third service process controller, wherein the third disk address is a disk address of an updated data file, and the third service process controller has a bound third service listening port;

[0098] Multiple third service processes are started through the third service process controller, and the service listening port for receiving business requests is switched from the second service listening port to the third service listening port, so that the multiple third service processes load the updated data files used to process business requests from the third disk address to the third memory virtual address space according to the third mapping relationship, thereby processing the business requests received by the third service listening port.

[0099] In a possible implementation, the control unit is further configured to:

[0100] After confirming that the service request received by the third service listening port is processed by the plurality of third service processes, controlling the plurality of second service processes to exit;

[0101] After confirming that the plurality of second service processes have exited, completing resource recovery of the plurality of second service processes through the second service process controller, and controlling the second service process controller to exit;

[0102] After confirming that the second service process controller exits, resource recovery of the second service process controller is completed through the first service process manager.

[0103] The network service fast switching device according to the embodiment of the present disclosure may correspond to executing the method described in the embodiment of the present disclosure, and the above and other operations and / or functions of each module / unit of the network service fast switching device are respectively to implement Figure 2 For the sake of brevity, the corresponding processes of each method in the illustrated embodiment are not described in detail here.

[0104] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), etc. The following is an example of a computer device including multiple hardware logic components.

[0105] The present disclosure provides a computer device for realizing the function of a network service fast switching device. Figure 5The structural diagram of the computer device shown in the figure, the computer device 500 may include a server or a terminal, wherein the server may be a cloud server or a physical server, and the terminal includes but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The computer device 500 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0106] like Figure 5 As shown, the computer device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 506 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the computer device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0107] Typically, the following devices may be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication devices 509 may allow the computer device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The computer device 500 is shown with various devices, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.

[0108] The present disclosure also provides a computer-readable storage medium, also referred to as a machine-readable medium. In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0109] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0110] The computer-readable medium may be included in the computer device, or may exist independently without being incorporated into the computer device.

[0111] The computer-readable medium carries one or more programs. When the one or more programs are executed by the computer device 500, the computer device 500 performs the following steps:

[0112] Starting a first service process manager through a daemon process, and starting a first monitoring control port corresponding to the first service process manager;

[0113] Start a first service process controller through the first service process manager, and establish a first mapping relationship between a first memory virtual address space and a first disk address through the first service process controller, wherein the first disk address is a disk address of an original data file, and the first service process controller has a bound first service listening port, and the first service listening port is used to receive a service request;

[0114] Starting a plurality of first service processes through the first service process controller, wherein the plurality of first service processes are used to load an original data file for processing a service request from the first disk address to the first memory virtual address space according to the first mapping relationship, thereby processing the service request received by the first service listening port;

[0115] If a load data instruction is received through the first monitoring control port, a second service process controller is started through the first service process manager, and a second mapping relationship between a second memory virtual address space and a second disk address is established through the second service process controller, where the second disk address is a disk address of an updated data file, and the second service process controller has a bound second service listening port;

[0116] Multiple second service processes are started through the second service process controller, and the service listening port for receiving business requests is switched from the first service listening port to the second service listening port, so that the multiple second service processes load the updated data file used to process the business request from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the business request received by the second service listening port.

[0117] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0118] According to one or more embodiments of the present disclosure, Example 1 provides a method for fast switching of network services, including:

[0119] Starting a first service process manager through a daemon process, and starting a first monitoring control port corresponding to the first service process manager;

[0120] Start a first service process controller through the first service process manager, and establish a first mapping relationship between a first memory virtual address space and a first disk address through the first service process controller, wherein the first disk address is a disk address of an original data file, and the first service process controller has a bound first service listening port, and the first service listening port is used to receive a service request;

[0121] Starting a plurality of first service processes through the first service process controller, wherein the plurality of first service processes are used to load an original data file for processing a service request from the first disk address to the first memory virtual address space according to the first mapping relationship, thereby processing the service request received by the first service listening port;

[0122] If a load data instruction is received through the first monitoring control port, a second service process controller is started through the first service process manager, and a second mapping relationship between a second memory virtual address space and a second disk address is established through the second service process controller, where the second disk address is a disk address of an updated data file, and the second service process controller has a bound second service listening port;

[0123] Multiple second service processes are started through the second service process controller, and the service listening port for receiving business requests is switched from the first service listening port to the second service listening port, so that the multiple second service processes load the updated data file used to process the business request from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the business request received by the second service listening port.

[0124] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein starting the first service process manager through the daemon process and starting the first monitoring control port corresponding to the first service process manager include:

[0125] Starting the first service process manager according to the configuration file corresponding to the daemon process;

[0126] The first monitoring control port is started according to the control port list in the configuration file corresponding to the first service process manager.

[0127] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, wherein the daemon process is used to read the status information of the first service process manager through the first monitoring control port.

[0128] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 2, wherein the number of the multiple first service processes is determined according to a configuration file corresponding to the first service process manager.

[0129] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, when it is confirmed that the service request received by the second service listening port is processed by multiple second service processes, the multiple first service processes are controlled to exit;

[0130] After confirming that the multiple first service processes have exited, completing resource recovery of the multiple first service processes through the first service process controller, and controlling the first service process controller to exit;

[0131] After confirming that the first service process controller exits, resource recovery of the first service process controller is completed through the first service process manager.

[0132] According to one or more embodiments of the present disclosure, Example 6 provides a method of any one of Examples 1 to 5, wherein the started service process manager is determined according to the service program version number, and the method further includes:

[0133] When the obtained service program version number changes, starting a second service process manager through the daemon process, and starting a second monitoring control port corresponding to the second service process manager, the version number of the second service process manager being different from the version number of the first service process manager;

[0134] Starting a third service process controller through the second service process manager, and establishing a third mapping relationship between a third memory virtual address space and a third disk address through the third service process controller, wherein the third disk address is a disk address of an updated data file, and the third service process controller has a bound third service listening port;

[0135] Multiple third service processes are started through the third service process controller, and the service listening port for receiving business requests is switched from the second service listening port to the third service listening port, so that the multiple third service processes load the updated data files used to process business requests from the third disk address to the third memory virtual address space according to the third mapping relationship, thereby processing the business requests received by the third service listening port.

[0136] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 6, wherein the method further includes:

[0137] After confirming that the service request received by the third service listening port is processed by the plurality of third service processes, controlling the plurality of second service processes to exit;

[0138] After confirming that the plurality of second service processes have exited, completing resource recovery of the plurality of second service processes through the second service process controller, and controlling the second service process controller to exit;

[0139] After confirming that the second service process controller exits, resource recovery of the second service process controller is completed through the first service process manager.

[0140] According to one or more embodiments of the present disclosure, Example 8 provides a network service fast switching device, the device comprising a starting unit, an establishing unit and a switching unit:

[0141] The starting unit is used to start the first service process manager through the daemon process, and start the first monitoring control port corresponding to the first service process manager;

[0142] The starting unit is further used to start the first service process controller through the first service process manager;

[0143] The establishing unit is used to establish a first mapping relationship between a first memory virtual address space and a first disk address through the first service process controller, the first disk address is a disk address of an original data file, the first service process controller has a bound first service listening port, and the first service listening port is used to receive a service request;

[0144] The startup unit is further used to start multiple first service processes through the first service process controller, and the multiple first service processes are used to load the original data file used to process the service request from the first disk address to the first memory virtual address space according to the first mapping relationship, so as to process the service request received by the first service listening port;

[0145] The startup unit is further configured to start the second service process controller through the first service process manager if a load data instruction is received through the first monitoring control port;

[0146] The establishing unit is further used to establish a second mapping relationship between the second memory virtual address space and the second disk address through the second service process controller, the second disk address is the disk address of the updated data file, and the second service process controller has a bound second service listening port;

[0147] The starting unit is further used to start multiple second service processes through the second service process controller;

[0148] The switching unit is used to switch the service listening port for receiving business requests from the first service listening port to the second service listening port, so that the multiple second service processes load the updated data file used to process the business requests from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the business requests received by the second service listening port.

[0149] According to one or more embodiments of the present disclosure, Example 9 provides the device of Example 8, wherein the starting unit is used to:

[0150] Starting the first service process manager according to the configuration file corresponding to the daemon process;

[0151] The first monitoring control port is started according to the control port list in the configuration file corresponding to the first service process manager.

[0152] According to one or more embodiments of the present disclosure, Example 10 provides the apparatus of Example 8, wherein the daemon process is used to read the status information of the first service process manager through the first monitoring control port.

[0153] According to one or more embodiments of the present disclosure, Example 11 provides the apparatus of Example 9, wherein the number of the plurality of first service processes is determined according to a configuration file corresponding to the first service process manager.

[0154] According to one or more embodiments of the present disclosure, Example 12 provides the device of Example 8, wherein the device further includes a control unit:

[0155] The control unit is used to control the multiple first service processes to exit after confirming that the business requests received by the second service listening port are processed by multiple second service processes; after confirming the exit of the multiple first service processes, complete the resource recovery of the multiple first service processes through the first service process controller, and control the exit of the first service process controller; after confirming the exit of the first service process controller, complete the resource recovery of the first service process controller through the first service process manager.

[0156] According to one or more embodiments of the present disclosure, Example 13 provides the apparatus of any one of Examples 8 to 12, wherein the service process manager started is determined according to the service program version number, and the starting unit is further used to:

[0157] When the obtained service program version number changes, starting a second service process manager through the daemon process, and starting a second monitoring control port corresponding to the second service process manager, the version number of the second service process manager being different from the version number of the first service process manager;

[0158] Starting a third service process controller through the second service process manager, and establishing a third mapping relationship between a third memory virtual address space and a third disk address through the third service process controller, wherein the third disk address is a disk address of an updated data file, and the third service process controller has a bound third service listening port;

[0159] Multiple third service processes are started through the third service process controller, and the service listening port for receiving business requests is switched from the second service listening port to the third service listening port, so that the multiple third service processes load the updated data files used to process business requests from the third disk address to the third memory virtual address space according to the third mapping relationship, thereby processing the business requests received by the third service listening port.

[0160] According to one or more embodiments of the present disclosure, Example 14 provides the device of Example 13, wherein the control unit is further configured to:

[0161] After confirming that the service request received by the third service listening port is processed by the plurality of third service processes, controlling the plurality of second service processes to exit;

[0162] After confirming that the plurality of second service processes have exited, completing resource recovery of the plurality of second service processes through the second service process controller, and controlling the second service process controller to exit;

[0163] After confirming that the second service process controller exits, resource recovery of the second service process controller is completed through the first service process manager.

[0164] According to one or more embodiments of the present disclosure, Example 15 provides a computer device 500. The computer device 500 includes at least one processor and at least one memory, wherein the at least one memory stores computer-readable instructions, and the at least one processor executes the computer-readable instructions, so that the computer device 500 executes any one of the methods described in Examples 1 to 7.

[0165] According to one or more embodiments of the present disclosure, Example 16 provides a computer-readable storage medium. The computer-readable storage medium includes computer-readable instructions, and when the computer-readable instructions are executed on a computer device 500, the computer device 500 executes any one of the methods described in Examples 1 to 7.

[0166] According to one or more embodiments of the present disclosure, Example 17 provides a computer program product. The computer program product includes instructions, and when the instructions are executed on a computer device 500, the computer device 500 executes any one of the methods described in Examples 1 to 7.

[0167] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

[0168] Although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Certain features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.

[0169] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

Claims

1. A method for fast switching of network services, characterized in that: The method comprises: Starting a first service process manager through a daemon process, and starting a first monitoring control port corresponding to the first service process manager; Start a first service process controller through the first service process manager, and establish a first mapping relationship between a first memory virtual address space and a first disk address through the first service process controller, wherein the first disk address is a disk address of an original data file, and the first service process controller has a bound first service listening port, and the first service listening port is used to receive a service request; Starting a plurality of first service processes through the first service process controller, wherein the plurality of first service processes are used to load an original data file for processing a service request from the first disk address to the first memory virtual address space according to the first mapping relationship, thereby processing the service request received by the first service listening port; If a load data instruction is received through the first monitoring control port, a second service process controller is started through the first service process manager, and a second mapping relationship between a second memory virtual address space and a second disk address is established through the second service process controller, where the second disk address is a disk address of an updated data file, and the second service process controller has a bound second service listening port; Multiple second service processes are started through the second service process controller, and the service listening port for receiving business requests is switched from the first service listening port to the second service listening port, so that the multiple second service processes load the updated data files used to process business requests from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the business requests received by the second service listening port.

2. The method according to claim 1, characterized in that: The starting of the first service process manager through the daemon process and the starting of the first monitoring control port corresponding to the first service process manager include: Starting the first service process manager according to the configuration file corresponding to the daemon process; The first monitoring control port is started according to the control port list in the configuration file corresponding to the first service process manager.

3. The method according to claim 1, characterized in that The daemon process is used to read the status information of the first service process manager through the first monitoring control port.

4. The method according to claim 2, characterized in that: The number of the multiple first service processes is determined according to a configuration file corresponding to the first service process manager.

5. The method according to claim 1, characterized in that The method further comprises: When it is confirmed that the service request received by the second service listening port is processed by the plurality of second service processes, controlling the plurality of first service processes to exit; After confirming that the multiple first service processes have exited, completing resource recovery of the multiple first service processes through the first service process controller, and controlling the first service process controller to exit; After confirming that the first service process controller exits, resource recovery of the first service process controller is completed through the first service process manager.

6. The method according to any one of claims 1 to 5, characterized in that: The service process manager started is determined according to the service program version number, and the method further includes: When the obtained service program version number changes, starting a second service process manager through the daemon process, and starting a second monitoring control port corresponding to the second service process manager, the version number of the second service process manager being different from the version number of the first service process manager; Starting a third service process controller through the second service process manager, and establishing a third mapping relationship between a third memory virtual address space and a third disk address through the third service process controller, wherein the third disk address is a disk address of an updated data file, and the third service process controller has a bound third service listening port; Multiple third service processes are started through the third service process controller, and the service listening port for receiving business requests is switched from the second service listening port to the third service listening port, so that the multiple third service processes load the updated data files used to process business requests from the third disk address to the third memory virtual address space according to the third mapping relationship, thereby processing the business requests received by the third service listening port.

7. The method according to claim 6, characterized in that The method further comprises: After confirming that the service request received by the third service listening port is processed by the plurality of third service processes, controlling the plurality of second service processes to exit; After confirming that the plurality of second service processes have exited, completing resource recovery of the plurality of second service processes through the second service process controller, and controlling the second service process controller to exit; After confirming that the second service process controller exits, resource recovery of the second service process controller is completed through the first service process manager.

8. A network service fast switching device, characterized in that: The device comprises a starting unit, a setting unit and a switching unit: The starting unit is used to start the first service process manager through the daemon process, and start the first monitoring control port corresponding to the first service process manager; The starting unit is further used to start the first service process controller through the first service process manager; The establishing unit is used to establish a first mapping relationship between a first memory virtual address space and a first disk address through the first service process controller, the first disk address is a disk address of an original data file, the first service process controller has a bound first service listening port, and the first service listening port is used to receive a service request; The startup unit is further used to start multiple first service processes through the first service process controller, and the multiple first service processes are used to load the original data file used to process the service request from the first disk address to the first memory virtual address space according to the first mapping relationship, so as to process the service request received by the first service listening port; The startup unit is further configured to start the second service process controller through the first service process manager if a load data instruction is received through the first monitoring control port; The establishing unit is further used to establish a second mapping relationship between the second memory virtual address space and the second disk address through the second service process controller, the second disk address is the disk address of the updated data file, and the second service process controller has a bound second service listening port; The starting unit is further used to start multiple second service processes through the second service process controller; The switching unit is used to switch the service listening port for receiving business requests from the first service listening port to the second service listening port, so that the multiple second service processes load the updated data file used to process the business requests from the second disk address to the second memory virtual address space according to the second mapping relationship, thereby processing the business requests received by the second service listening port.

9. A computer device, characterized in that: The computer device includes at least one processor and at least one memory, wherein the at least one memory stores computer-readable instructions, and the at least one processor executes the computer-readable instructions, so that the computer device executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The method comprises computer-readable instructions, which, when executed on a computer device, cause the computer device to execute the method according to any one of claims 1 to 7.