CN115695158A - 5G core network hot standby method and device, 5G core network system and computer equipment - Google Patents

5G core network hot standby method and device, 5G core network system and computer equipment Download PDF

Info

Publication number
CN115695158A
CN115695158A CN202211720578.5A CN202211720578A CN115695158A CN 115695158 A CN115695158 A CN 115695158A CN 202211720578 A CN202211720578 A CN 202211720578A CN 115695158 A CN115695158 A CN 115695158A
Authority
CN
China
Prior art keywords
server
switching
standby
core network
host
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211720578.5A
Other languages
Chinese (zh)
Inventor
马启龙
李秀文
刘仑
刘碧波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sany Electronic Technology Co ltd
Beijing Diwei Shuangxing Communication Technology Co ltd
Original Assignee
Shanghai Sany Electronic Technology Co ltd
Beijing Diwei Shuangxing Communication Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Sany Electronic Technology Co ltd, Beijing Diwei Shuangxing Communication Technology Co ltd filed Critical Shanghai Sany Electronic Technology Co ltd
Priority to CN202211720578.5A priority Critical patent/CN115695158A/en
Publication of CN115695158A publication Critical patent/CN115695158A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a 5G core network hot standby method and device, a 5G core network system and computer equipment. Wherein, the method comprises the following steps: detecting a state of a first server of an overground core network serving as a host server in a mine private network; under the condition that the first server is in an abnormal state, a second server of an underground core network serving as a standby server executes a host switching script, and the second server is switched to a host server; executing the standby machine switching script by the first server, and switching the first server into a standby machine server; and under the condition that the first server is detected to be recovered to the normal state from the abnormal state, switching the first server of the overground core network back to the host server in the mine special network, and switching the second server of the underground core network back to the standby server in the mine special network. The invention solves the technical problem of unreliable hot standby switching between the underground 5G core network and the ground 5G core network caused by the imperfect existing hot standby scheme.

Description

5G core network hot standby method and device, 5G core network system and computer equipment
Technical Field
The invention relates to the field of mine network safety, in particular to a 5G core network hot standby method and device, a 5G core network system and computer equipment.
Background
In a coal mine 5G project, a 5GC core network has many functions including data service and voice service, and the power of equipment is high, so that the 5GC core network cannot be made into intrinsic safety equipment and applied to a downhole working surface. In order to improve the reliability of the whole system, hot standby can be carried out between the underground 5G core network and the ground 5G core network, and when communication with the ground network is in problem, the underground 5G core network takes over the 5G base station equipment of the underground working face, so that the normal operation of the 5G communication of the working face is ensured. However, the hot standby scheme in the above scenario cannot be reliable enough, and sometimes, the phenomena of downtime, split brain, memory leakage, etc. occur, which affect the operation.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a 5G core network hot standby method and device, a 5G core network system and computer equipment, which are used for at least solving the technical problem of unreliable hot standby switching of an underground 5G core network and a ground 5G core network caused by the imperfect existing hot standby scheme.
According to an aspect of the embodiments of the present invention, a method for hot standby of a 5G core network is provided, including: detecting the state of a first server of a ground core network, wherein the first server is a host server in a mine special network; under the condition that the first server is detected to be in an abnormal state, a second server of the mine core network executes a switching host script preset in the second server, and the second server serving as a standby server in the mine special network is switched to a host server; executing a switching standby script preset in the first server by the first server, and switching the first server into a standby server; switching the first server of the above-ground core network back to a host server in the mine private network and switching the second server of the mine core network back to a standby server in the mine private network upon detecting that the first server is restored from an abnormal state to a normal state.
Optionally, the executing, by a second server of the core network under the mine, a host switching script preset in the second server, and switching the second server serving as a standby server in the mine private network to a host server includes: the second server calls the switching host script from a configuration file of the second server, and a host server running environment is deployed in the second server; deactivating a data backup function of the second server according to the switching host script, wherein the data backup function is used for controlling a standby server to acquire synchronous data from a host server; and starting a scheduling server in the second server according to the switching host script, and starting the second server as a host server.
Optionally, the executing, by the first server, a standby machine switching script preset in the first server to switch the first server to a standby machine server includes: the first server calls the switching standby script from the configuration file of the first server, and starts a data backup function of the first server; and according to the standby machine switching script, stopping a scheduling server in the first server, and switching the first server into a standby machine server.
Optionally, the method further comprises: after the second server is switched to a host server and the first server is switched to a standby server, the second server regularly generates a MySQL database table, wherein the MySQL database table is used for recording at least one of the following files: a registration information file, a configuration information file and an account opening information file; the second server leads the MySQL database table into an sql file; and the second server sends the registration information file, the configuration information file and the sql file to the first server, and the first server performs backup according to a data backup function.
Optionally, the importing, by the second server, the MySQL database table into an sql file includes: and the second server calls a syncServer script included in the switching host script, starts an rsync daemon process according to the syncServer script, and regularly exports the MySQL database table to the sql file.
Optionally, the sending, by the second server, the registration information file, the configuration information file, and the sql file to the first server, and backing up by the first server according to a data backup function includes: the first server calls a syncClient script included in the switching standby script, and regularly calls an rsync client to request the second server for data backup according to the syncClient script; the second server responds to a data backup request sent by the second server and sends the registration information file, the configuration information file and the sql file to the first server; and the first server leads the received SQL file into an SQL database of the first server according to the syncClient script.
According to another aspect of the embodiments of the present invention, there is also provided a hot standby apparatus for a 5G core network, including: the system comprises a detection module, a detection module and a monitoring module, wherein the detection module is used for detecting the state of a first server of a ground core network by adopting KeepaliveD (KEEPALIVED), and the first server is a host server in a mine special network; the first switching module is used for executing a switching host script preset in a second server by the second server of the mine core network under the condition that keepalive D detects that the first server is in an abnormal state, and switching the second server serving as a standby server in the mine special network into a host server; the second switching module is used for executing a switching standby script preset in the first server by the first server and switching the first server into a standby server; and the third switching module is used for switching the first server of the overground core network back to a host server in the mine special network and switching the second server of the underground core network back to a standby server in the mine special network under the condition that the first server is detected to be recovered to a normal state from an abnormal state.
According to another aspect of the embodiments of the present invention, there is also provided a 5G core network system, including: the system comprises a plurality of servers in a mine private network and a hot standby device of the 5G core network, wherein the plurality of servers comprise a first server in the overground core network as a host server and a second server in the underground core network as a standby server, the first server is preset with a switching standby script, the second server is preset with the switching host script, and the hot standby device of the 5G core network is used for switching the first server to the standby server and switching the second server to the host server when the first server is in an abnormal state.
According to another aspect of the embodiment of the present invention, a nonvolatile storage medium is further provided, where the nonvolatile storage medium includes a stored program, and when the program runs, the device where the nonvolatile storage medium is located is controlled to execute any one of the hot standby methods of the 5G core network.
According to still another aspect of the embodiments of the present invention, there is further provided a computer device, where the computer device includes a memory and a processor, the memory is used for storing a program, and the processor is used for executing the program stored in the memory, where when the program is executed, the method for hot standby of the 5G core network is performed.
In the embodiment of the invention, a mode of presetting scripts in a 5G core network server is adopted, and a switching standby machine script preset in a first server and a switching host machine script preset in a second server serving as a standby machine server are respectively called when the first server serving as a host machine server is detected to be in an abnormal state, so that the purpose of reliably switching the standby states of the first server and the second server is achieved, the technical effect of improving the reliability of the hot standby switching of an underground 5G core network and a ground 5G core network is realized, and the technical problem that the hot standby switching of the underground 5G core network and the ground 5G core network is unreliable due to the existing incomplete hot standby scheme is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention and do not constitute a limitation of the invention. In the drawings:
fig. 1 is a block diagram showing a hardware configuration of a computer terminal for implementing a 5G core network hot standby method;
fig. 2 is a schematic flowchart of a 5G core network hot standby method according to an embodiment of the present invention;
fig. 3 is a timing diagram of data backup during active/standby switching of a 5G core network according to an alternative embodiment of the present invention;
fig. 4 is a schematic diagram of a core network architecture provided according to the related art;
fig. 5 is a block diagram illustrating a hot standby apparatus of a 5G core network according to an embodiment of the present invention;
fig. 6 is a block diagram of a 5G core network system provided according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a 5G core network hot standby system according to an alternative embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided a method embodiment for 5G core network hot-standby, where the steps illustrated in the flowchart of the figure may be performed in a computer system, such as a set of computer executable instructions, and where a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that illustrated herein.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Fig. 1 shows a block diagram of a hardware structure of a computer terminal for implementing a 5G core network hot standby method. As shown in FIG. 1, the computer terminal 10 may include one or more processors (shown as 102a, 102b, \8230;, 102 n) which may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc., a memory 104 for storing data. In addition, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial BUS (USB) port (which may be included as one of the ports of the BUS), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. For example, the computer terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
It should be noted that the one or more processors and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuit may be a single stand-alone processing module, or incorporated in whole or in part into any of the other elements in the computer terminal 10. As referred to in the embodiments of the application, the data processing circuit acts as a processor control (e.g. selection of a variable resistance termination path connected to the interface).
The memory 104 may be configured to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the 5G core network hot standby method in the embodiment of the present invention, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the 5G core network hot standby method of the application program. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor, which may be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with the user interface of the computer terminal 10.
Fig. 2 is a schematic flow chart of a 5G core network hot standby method according to an embodiment of the present invention, and as shown in fig. 2, the method includes the following steps:
step S202, detecting the state of a first server of the overground core network, wherein the first server is a host server in the mine special network.
The 5G core network product in the embodiment of the application can adopt miniaturized equipment, is suitable for a production environment with space limitation, and meets the requirement of intrinsic safety in a mine, the 5GC and the IMS system can be arranged on a universal X86 and ARM platform server in a combined mode, the power of the equipment can meet the requirement of intrinsic safety through light-weight capacity design, the power supply of the equipment adopts 18V, and the integral power is not higher than 18W.
It should be noted that, in the present application, when the active-standby switching of the core network servers is implemented, a keepalive d tool may be used, the keepalive d is a lightweight-level high-availability solution under linux, and detects the state of each machine according to a third layer, a fourth layer, and a fifth layer switching mechanism of a TCP/IP reference model, if a certain machine node is abnormal or works fail, the keepalive d will detect, and remove the failed server node from a cluster system, all the works are automatically completed without manual intervention, the keepalive further includes a function of a VRRP (virtual Router Redundancy Protocol), and a purpose of the VRRP appearing is to solve a single point failure problem occurring in a static route, and the network may be implemented to operate stably through the VRRP without interruption. KeepaliveD may remove the failed machine from the server cluster in the entire mine private network and assign virtual IP to the high priority backup, which becomes the new host. However, the problem of insufficient reliability exists when the main/standby switch is performed by simply adopting KeepaliveD, so that the application provides a method of introducing a preset script to improve the reliability in the hot standby switch process.
In addition, the mine dedicated network may be a local area network specially used for a mine production site, and the network is used for connecting and managing fixed production equipment, movable equipment, communication tools, security tools, terminal equipment of operators and the like in the mine production site, and the mine dedicated network supports 5G communication and also can support 4G communication or Wifi communication, which is not limited herein.
And step S204, under the condition that the first server is detected to be in an abnormal state, executing a switching host script preset in the second server by the second server of the mine core network, and switching the second server serving as a standby server in the mine special network into a host server.
As an alternative embodiment, the second server may be switched to the host server as follows: the second server calls a host switching script from the configuration file of the second server, and deploys a host server running environment in the second server; deactivating a data backup function of the second server according to the switching host script, wherein the data backup function is used for controlling the standby server to acquire synchronous data from the host server; and starting the scheduling server in the second server according to the switching host script, and starting the second server as a host server.
Step S206, the first server executes a standby machine switching script preset in the first server, and switches the first server to the standby machine server.
As an alternative embodiment, the step of executing, by the first server, a standby machine switching script preset in the first server to switch the first server to the standby machine server includes the following steps: the first server calls a switching standby script from the configuration file of the first server, and starts a data backup function of the first server; and according to the standby machine switching script, the scheduling server in the first server is deactivated, and the first server is switched to the standby machine server.
As an optional embodiment, in the above step, the scripts that need to be called from the master to the slave or from the slave to the master may be respectively specified in the keepalive d configuration file (keepalive.
Switching the standby script: notify _ master "/etc/keepalive/fs _ master.
Switching the host script: notify _ backup "/etc/keepalive/fs _ slave.
Therefore, when the primary and standby machines are switched, the keepalived can automatically call the corresponding script, for example, fs _ master.
And step S208, under the condition that the first server is detected to be recovered to the normal state from the abnormal state, switching the first server of the overground core network back to the host server in the mine special network, and switching the second server of the underground core network back to the standby server in the mine special network. In a server hot standby application scene of a core network in a mining area, because the work of the overground core network is more convenient and efficient, the server in the overground core network usually executes the function of a host server, only when the host server in the overground core network has an abnormal condition, a second server serving as a standby machine in the underground core network (also called an underground core network) is temporarily switched into the host server, and a host scheduling task is temporarily executed to serve as the host server; when the first server in the local upper core network returns to normal, the first server can be switched back to the host server as soon as possible, and the problem that the overall performance of the network is reduced for a long time due to the fact that the second server in the mine lower core network is adopted as the host server in the whole mine special network for a long time is avoided.
Optionally, when the first server of the above-ground core network needs to be switched back to the host server in the mine dedicated network and the second server of the mine core network needs to be switched back to the standby server in the mine dedicated network, the first server may also call a switching host script preset in the first server, and the second server calls a switching standby script preset in the second server, so as to implement switching of the preparation states of the servers. In this optional embodiment, the first server and the second server may respectively preset a whole set of main/standby switching scripts, so as to implement free switching of the main/standby machines.
Through the steps, by adopting the mode of presetting scripts in the 5G core network server, the purpose of reliably switching the main standby state of the first server and the second server is achieved by respectively calling the switching standby script preset in the first server and the switching host script preset in the second server serving as the standby server when the first server serving as the host server is detected to be in an abnormal state, so that the technical effect of improving the reliability of the hot standby switching of the underground 5G core network and the ground 5G core network is realized, and the technical problem of unreliable hot standby switching of the underground 5G core network and the ground 5G core network caused by the defect of the existing hot standby scheme is solved.
As an alternative embodiment, the method further comprises: after the second server is switched to be the host server and the first server is switched to be the standby server, the second server generates a MySQL database table at regular time, wherein the MySQL database table is used for recording at least one of the following files: a registration information file, a configuration information file and an account opening information file; the second server imports the MySQL database table into the sql file; and the second server sends the registration information file, the configuration information file and the sql file to the first server, and the first server performs backup according to the data backup function.
In this optional embodiment, the registration information file and the configuration information file may be used to record registration information and configuration information of the host server and software and scripts in the server, and may also be used to record user account opening information of field workers who are used by the mine private network for service, such as a phone card account number of a mine private mobile terminal of the worker, a phone account in a coal mine private network, and the like. In the related art, the information adopts the data transmission synchronization function of MySQL when performing primary and standby synchronization, so that the risk of data mistransmission or data transmission failure exists, and the data synchronization is not stable. By adopting the method provided by the optional embodiment, the key data is imported into the sql file and the sql file is transmitted between the main server and the standby server, so that the data can be stably synchronized from the original host server to the standby server, and the necessary configuration data and service data serving as the host server are not lacked when the standby server is switched to the host server.
As an alternative embodiment, the importing, by the second server, the MySQL database table into the sql file includes: and the second server calls a syncServer script included in the switching host script, starts an rsync daemon process according to the syncServer script, and regularly exports the MySQL database table to the sql file.
As an alternative embodiment, the second server sends the registration information file, the configuration information file, and the sql file to the first server, and the first server performs backup according to the data backup function, including: the first server calls a syncClient script included in the switching standby script, and regularly calls an rsync client to request a second server for data backup according to the syncClient script; the second server responds to a data backup request sent by the second server and sends the registration information file, the configuration information file and the sql file to the first server; and the first server imports the received SQL file into an SQL database of the first server according to the syncClient script.
Fig. 3 is a timing diagram of data backup in active-standby switching of a 5G core network according to an alternative embodiment of the present invention, where during data backup, registration information is required to be uninterrupted and configuration information is synchronized after active-standby switching, so that it is determined that the following content needs to be synchronized: data for recovery registration, data stored in AUSF, synchronized once in 30 seconds. Configuration files for network management configuration, stored under UDM, are synchronized every 3 minutes. Configuration data for network management configuration is stored in UPF and synchronized every 3 minutes.
All synchronization is that the host is responsible for generating files at regular time, the standby machine acquires files from the server at regular time (through virtual IP), and the standby machine can directly acquire configuration files and db files, but the mysql database table needs the host to import the table to be synchronized into the sql file, and after the standby machine acquires the table, the sql file is imported into the local database through mysql dump.
The primary and standby synchronization adopts an rsync scheme, and as a host, a path capable of being synchronized and a synchronous authentication password need to be specified in a configuration file, and then a daemon (rsync-daemon) is started to wait for the standby machine to actively acquire a file; as a standby machine, the rsync client needs to be called regularly to synchronize files.
Synchronization is performed by two scripts, one is a syncServer, the synchronization is only started in a host, and is in charge of starting an rsync daemon process, and exporting the mysql table to the sql file at regular time, the recovery table is once every 3 seconds, and the other tables are once every 3 minutes. The other is syncClient which is only started at the standby machine and is responsible for synchronizing the data of the host machine to the local at regular time and importing the sql file into the mysql database. These two scripts are automatically called in fs _ master.sh and fs _ slave.sh as described above.
In the service, after the standby machine is switched to the host machine, the service is restarted and the configuration file is loaded, so that the standby machine runs the latest configuration in reality, but user data (registration state, online state, call state and the like) and service data (call service, conference service and the like) need to be actively recovered by the scheduling server.
In the current IMS service, most voice services are based on the sip protocol and the RTP protocol, both protocols are based on UDP, and after switching between the main and standby devices, the standby device binds a virtual IP, so that an original UDP packet can be normally sent to the standby device, and then the standby device acquires an IP and a port of an opposite party of a certain service from recovered user data, and re-creates a UDP session, so that the services can be connected.
Fig. 4 is an architecture diagram of a core network provided according to the related art, and as shown in fig. 4, a 5G network node (network element) in the core network may include the following functional modules: AMF: access and Mobility Management Function module, which executes Access control and Mobility Management Function in MME; SMF: session Management Function, which is equivalent to the aggregation of Session Management Function, SGW-C and PGW-C functions in MME; AUSF: the Authentication Server Function Authentication Server Function is matched with the UDM to be specially responsible for the relevant processing of user Authentication data; and (2) UDM: the Unified Data Management is responsible for Unified processing of foreground Data, including user identification, user subscription Data, authentication Data and the like; UPF: user plane Function, which is responsible for data forwarding; PCF: policy Control Function.
After the main and standby servers in the server cluster of the mine private network are switched, the registration information is required to be uninterrupted, the configuration information is also synchronous, the following data for synchronization can be respectively stored in the functional modules in the following mode for recovering the registered data, and the data are stored in the AUSF and synchronized once every 30 seconds; the configuration file for network management configuration is stored below the UDM and is synchronized every 3 minutes; configuration data for network management configuration is stored in UPF and synchronized every 3 minutes.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art will appreciate that the embodiments described in this specification are presently preferred and that no acts or modules are required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the hot standby method of the 5G core network according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
According to an embodiment of the present invention, there is further provided a hot standby apparatus of a 5G core network for implementing the hot standby method of the 5G core network, where fig. 5 is a block diagram of a structure of the hot standby apparatus of the 5G core network according to the embodiment of the present invention, and as shown in fig. 5, the hot standby apparatus 50 of the 5G core network includes: the detection module 52, the first switching module 54, the second switching module 56 and the third switching module 58 are described below with respect to the hot standby apparatus 50 of the 5G core network.
The detection module 52 is configured to detect a state of a first server of the above-ground core network, where the first server is a host server in the mine private network;
a first switching module 54, connected to the detecting module 52, configured to, when detecting that the first server is in an abnormal state, execute, by a second server of a mine core network, a switching host script preset in the second server, and switch, to a host server, the second server serving as a standby server in the mine private network;
a second switching module 56, connected to the first switching module 54, for executing a switching standby script preset in the first server by the first server, and switching the first server to a standby server;
and a third switching module 58, connected to the second switching module 56, for switching the first server of the above-ground core network back to the host server in the mine dedicated network and switching the second server of the mine core network back to the standby server in the mine dedicated network when detecting that the first server is recovered from the abnormal state to the normal state.
It should be noted that the detecting module 52, the first switching module 54, the second switching module 56 and the third switching module 58 correspond to steps S202 to S208 in the embodiment, and the modules are the same as the corresponding steps in the implementation example and application scenarios, but are not limited to the disclosure in the embodiment. It should be noted that the above modules as a part of the apparatus may be run in the computer terminal 10 provided in the embodiment.
According to an embodiment of the present invention, there is also provided a 5G core network system, and fig. 6 is a block diagram of a structure of the 5G core network system provided according to an embodiment of the present invention, as shown in fig. 6, the 5G core network system 60 includes: the hot standby device 50 comprises a plurality of servers 62 and a 5G core network, wherein the plurality of servers 62 comprise a first server in the overground core network as a host server and a second server in the underground core network as a standby server, a switching standby script is preset in the first server, and a switching host script is preset in the second server, and the hot standby device 50 of the 5G core network is used for switching the first server to the standby server and switching the second server to the host server when the first server is in an abnormal state.
Fig. 7 is a schematic structural diagram of a 5G core network hot standby system according to an alternative embodiment of the present invention, as shown in fig. 7, a host server (host a) and standby servers (standby B, standby C, and other standby) in a mine private network may be connected to each other through a switch in a unified manner, and the host a is responsible for performing data backup on other standby in the mine private network, so as to ensure that when the host a is in an abnormal state, the other standby can be switched to the host server at any time and perform a host function.
An embodiment of the present invention may provide a computer device, and optionally, in this embodiment, the computer device may be located in at least one network device of a plurality of network devices of a computer network. The computer device includes a memory and a processor.
The memory may be configured to store a software program and a module, such as a program instruction/module corresponding to the 5G core network hot standby method and apparatus in the embodiment of the present invention, and the processor executes various functional applications and data processing by running the software program and the module stored in the memory, that is, the 5G core network hot standby method is implemented. The memory may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include memory located remotely from the processor, and these remote memories may be connected to the computer terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor can call the information and application program stored in the memory through the transmission device to execute the following steps: detecting the state of a first server of the overground core network, wherein the first server is a host server in the mine special network; under the condition that the first server is detected to be in an abnormal state, a second server of the mine core network executes a switching host script preset in the second server, and the second server serving as a standby server in the mine special network is switched to a host server; executing a switching standby script preset in a first server by the first server, and switching the first server into a standby server; and under the condition that the first server is detected to be recovered to the normal state from the abnormal state, switching the first server of the overground core network back to the host server in the mine special network, and switching the second server of the underground core network back to the standby server in the mine special network.
Optionally, the processor may further execute the program code of the following steps: executing a switching host script preset in a second server by the second server of the core network under the mine, and switching the second server serving as a standby server in the mine special network into a host server, wherein the switching host script comprises the following steps: the second server calls a switching host script from the configuration file of the second server, and deploys a host server running environment in the second server; deactivating a data backup function of the second server according to the switching host script, wherein the data backup function is used for controlling the standby server to acquire synchronous data from the host server; and starting the scheduling server in the second server according to the switching host script, and starting the second server as a host server.
Optionally, the processor may further execute the program code of the following steps: executing a switching standby script preset in a first server by the first server, and switching the first server into a standby server, wherein the switching standby script comprises: the first server calls a switching standby script from the configuration file of the first server, and starts a data backup function of the first server; and according to the standby machine switching script, the scheduling server in the first server is stopped, and the first server is switched to the standby machine server.
Optionally, the processor may further execute the program code of the following steps: after the second server is switched to be the host server and the first server is switched to be the standby server, the second server generates a MySQL database table at regular time, wherein the MySQL database table is used for recording at least one of the following files: a registration information file, a configuration information file and an account opening information file; the second server imports the MySQL database table into the sql file; and the second server sends the registration information file, the configuration information file and the sql file to the first server, and the first server performs backup according to the data backup function.
Optionally, the processor may further execute the program code of the following steps: the second server imports the MySQL database table into the sql file, which comprises the following steps: and the second server calls a syncServer script included in the switching host script, starts an rsync daemon process according to the syncServer script, and regularly exports the MySQL database table to an sql file.
Optionally, the processor may further execute the program code of the following steps: the second server sends the registration information file, the configuration information file and the sql file to the first server, and the first server performs backup according to the data backup function, wherein the backup comprises the following steps: the first server calls a syncClient script included in the switching standby script, and regularly calls an rsync client to request a second server for data backup according to the syncClient script; the second server responds to a data backup request sent by the second server and sends the registration information file, the configuration information file and the sql file to the first server; and the first server imports the received SQL file into an SQL database of the first server according to the syncClient script.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a non-volatile storage medium, and the storage medium may include: flash disks, read-Only memories (ROMs), random Access Memories (RAMs), magnetic or optical disks, and the like.
Embodiments of the present invention also provide a non-volatile storage medium. Optionally, in this embodiment, the nonvolatile storage medium may be configured to store a program code executed by the 5G core network hot standby method provided in the foregoing embodiment.
Optionally, in this embodiment, the nonvolatile storage medium may be located in any one of computer terminals in a computer terminal group in a computer network, or in any one of mobile terminals in a mobile terminal group.
Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: detecting the state of a first server of the overground core network, wherein the first server is a host server in the mine special network; under the condition that the first server is detected to be in an abnormal state, a second server of the mine core network executes a switching host script preset in the second server, and the second server serving as a standby server in the mine special network is switched to a host server; executing a switching standby script preset in a first server by the first server, and switching the first server into a standby server; and under the condition that the first server is detected to be recovered to the normal state from the abnormal state, switching the first server of the overground core network back to the host server in the mine special network, and switching the second server of the underground core network back to the standby server in the mine special network.
Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: executing a switching host script preset in a second server by the second server of the core network under the mine, and switching the second server serving as a standby server in the mine special network into a host server, wherein the switching host script comprises the following steps: the second server calls a host switching script from the configuration file of the second server, and deploys a host server running environment in the second server; deactivating a data backup function of the second server according to the switching host script, wherein the data backup function is used for controlling the standby server to acquire synchronous data from the host server; and starting a scheduling server in the second server according to the host switching script, and starting the second server as a host server.
Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: executing a switching standby script preset in a first server by the first server, and switching the first server into a standby server, wherein the switching standby script comprises: the first server calls a switching standby script from the configuration file of the first server, and starts a data backup function of the first server; and according to the standby machine switching script, the scheduling server in the first server is stopped, and the first server is switched to the standby machine server.
Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: after the second server is switched to be the host server and the first server is switched to be the standby server, the second server regularly generates a MySQL database table, wherein the MySQL database table is used for recording at least one of the following files: a registration information file, a configuration information file and an account opening information file; the second server imports the MySQL database table into the sql file; and the second server sends the registration information file, the configuration information file and the sql file to the first server, and the first server performs backup according to the data backup function.
Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: the second server imports the MySQL database table into the sql file, which includes: and the second server calls a syncServer script included in the switching host script, starts an rsync daemon process according to the syncServer script, and regularly exports the MySQL database table to the sql file.
Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: the second server sends the registration information file, the configuration information file and the sql file to the first server, and the first server performs backup according to the data backup function, wherein the backup comprises the following steps: the first server calls a syncClient script included in the switching standby script, and regularly calls an rsync client to request a second server for data backup according to the syncClient script; the second server responds to a data backup request sent by the second server and sends the registration information file, the configuration information file and the sql file to the first server; and the first server leads the received SQL file into an SQL database of the first server according to the syncClient script.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.
In the above embodiments of the present invention, the description of each embodiment has its own emphasis, and reference may be made to the related description of other embodiments for parts that are not described in detail in a certain embodiment.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a non-volatile memory storage medium. Based on such understanding, the technical solution of the present invention, which is substantially or partly contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A5G core network hot standby method is characterized by comprising the following steps:
detecting the state of a first server of a ground core network, wherein the first server is a host server in a mine special network;
under the condition that the first server is detected to be in an abnormal state, a second server of the mine core network executes a switching host script preset in the second server, and the second server serving as a standby server in the mine special network is switched to a host server;
executing a switching standby script preset in the first server by the first server, and switching the first server into a standby server;
switching the first server of the above-ground core network back to a host server in the mine private network and switching the second server of the mine core network back to a standby server in the mine private network upon detecting that the first server is restored from an abnormal state to a normal state.
2. The method of claim 1, wherein executing, by a second server of the core network under the mine, a switching host script preset in the second server to switch the second server as a standby server in the mine private network to a host server comprises:
the second server calls the switching host script from the configuration file of the second server, and deploys a host server running environment in the second server;
deactivating a data backup function of the second server according to the switching host script, wherein the data backup function is used for controlling a standby server to acquire synchronous data from a host server;
and starting a scheduling server in the second server according to the switching host script, and starting the second server as a host server.
3. The method according to claim 1, wherein the executing, by the first server, a standby machine switching script preset in the first server to switch the first server to a standby machine server comprises:
the first server calls the switching standby script from the configuration file of the first server, and starts a data backup function of the first server;
and according to the standby machine switching script, stopping a scheduling server in the first server, and switching the first server into a standby machine server.
4. The method according to any one of claims 1-3, further comprising:
after the second server is switched to a host server and the first server is switched to a standby server, the second server regularly generates a MySQL database table, wherein the MySQL database table is used for recording at least one of the following files: a registration information file, a configuration information file and an account opening information file;
the second server imports the MySQL database table into an sql file;
and the second server sends the registration information file, the configuration information file and the sql file to the first server, and the first server performs backup according to a data backup function.
5. The method of claim 4, wherein the second server importing the MySQL database table into an sql file comprises:
and the second server calls a syncServer script included in the switching host script, starts an rsync daemon process according to the syncServer script, and regularly exports the MySQL database table to the sql file.
6. The method of claim 5, wherein the second server sends the registration information file, the configuration information file, and the sql file to the first server, and the first server performs backup according to a data backup function, comprising:
the first server calls a syncClient script included in the switching standby script, and regularly calls an rsync client to request the second server for data backup according to the syncClient script;
the second server responds to a data backup request sent by the second server and sends the registration information file, the configuration information file and the sql file to the first server;
and the first server imports the received SQL file into an SQL database of the first server according to the syncClient script.
7. A hot standby device of a 5G core network is characterized by comprising:
the system comprises a detection module, a detection module and a processing module, wherein the detection module is used for detecting the state of a first server of a ground core network, and the first server is a host server in a mine special network;
the first switching module is used for executing a switching host script preset in a second server by the second server of the mine core network under the condition that the first server is detected to be in an abnormal state, and switching the second server serving as a standby server in the mine special network into a host server;
the second switching module is used for executing a switching standby machine script preset in the first server by the first server and switching the first server into a standby machine server;
and the third switching module is used for switching the first server of the aboveground core network back to a host server in the mine special network and switching the second server of the mine core network back to a standby server in the mine special network under the condition that the first server is detected to be recovered from the abnormal state to the normal state.
8. A 5G core network system, comprising: the plurality of servers in the mine private network and the hot standby apparatus of the 5G core network recited in claim 7, wherein the plurality of servers include a first server in the above-ground core network as a host server and a second server in the mine core network as a standby server, the first server is pre-installed with the switching standby script, the second server is pre-installed with the switching host script, and the hot standby apparatus of the 5G core network is configured to switch the first server to the standby server and the second server to the host server when the first server is in an abnormal state.
9. A non-volatile storage medium, characterized in that the non-volatile storage medium includes a stored program, and when the program runs, the device where the non-volatile storage medium is located is controlled to execute the hot standby method of the 5G core network according to any one of claims 1 to 6.
10. A computer device comprising a memory for storing a program and a processor for executing the program stored in the memory, wherein the program when executed performs a method for hot-standby of a 5G core network as claimed in any one of claims 1 to 6.
CN202211720578.5A 2022-12-30 2022-12-30 5G core network hot standby method and device, 5G core network system and computer equipment Pending CN115695158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211720578.5A CN115695158A (en) 2022-12-30 2022-12-30 5G core network hot standby method and device, 5G core network system and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211720578.5A CN115695158A (en) 2022-12-30 2022-12-30 5G core network hot standby method and device, 5G core network system and computer equipment

Publications (1)

Publication Number Publication Date
CN115695158A true CN115695158A (en) 2023-02-03

Family

ID=85057138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211720578.5A Pending CN115695158A (en) 2022-12-30 2022-12-30 5G core network hot standby method and device, 5G core network system and computer equipment

Country Status (1)

Country Link
CN (1) CN115695158A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107454104A (en) * 2017-09-15 2017-12-08 国网上海市电力公司 A kind of multifunctional network system and its disaster recovery method based on IMS
WO2019149029A1 (en) * 2018-01-31 2019-08-08 华为技术有限公司 Service equipment switching method, and device for same
CN114860502A (en) * 2022-04-04 2022-08-05 广州优谷信息技术有限公司 Project backup and recovery technology based on reading booth system
CN115495289A (en) * 2022-09-27 2022-12-20 中国建设银行股份有限公司 Equipment state switching control method, device, equipment and computer storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107454104A (en) * 2017-09-15 2017-12-08 国网上海市电力公司 A kind of multifunctional network system and its disaster recovery method based on IMS
WO2019149029A1 (en) * 2018-01-31 2019-08-08 华为技术有限公司 Service equipment switching method, and device for same
CN114860502A (en) * 2022-04-04 2022-08-05 广州优谷信息技术有限公司 Project backup and recovery technology based on reading booth system
CN115495289A (en) * 2022-09-27 2022-12-20 中国建设银行股份有限公司 Equipment state switching control method, device, equipment and computer storage medium

Similar Documents

Publication Publication Date Title
CN103744809B (en) Vehicle information management system double hot standby method based on VRRP
US9979784B2 (en) Method for cloud data backup and recovery
EP2426827B1 (en) Method and network system for implementing user port orientation in multi-machine backup scenario of broadband remote access server
CN106997306B (en) Method, device and system for migrating physical machine data to cloud
EP2882136B1 (en) Method and system for implementing remote disaster recovery switching of service delivery platform
CN103647849A (en) Method and device for migrating businesses and disaster recovery system
CN105554130A (en) Distributed storage system-based NameNode switching method and switching device
WO2021057438A1 (en) Main/standby switching method and apparatus, bras device, and storage medium
CN104010034A (en) Management method for high availability cluster relative to dependence of groups
WO2012155630A1 (en) Method, device, and system for disaster recovery
CN110895469A (en) Method and device for upgrading dual-computer hot standby system, electronic equipment and storage medium
CN110633174A (en) Disaster recovery switching method, device and computer readable storage medium
CN110399202B (en) Efficient virtual machine disaster recovery method and device
CN113377702B (en) Method and device for starting two-node cluster, electronic equipment and storage medium
WO2012171346A1 (en) Telephone number mapping-domain name system (enum-dns) and disaster tolerance method thereof
WO2017016196A1 (en) Data synchronization method, apparatus, and system
CN105591801B (en) A kind of virtual network function VNF fault handling method and VNF management equipment
EP2887592A1 (en) Enum-dns disaster recovery method and system in ims network
CN113438111A (en) Method for restoring RabbitMQ network partition based on Raft distribution and application
CN115695158A (en) 5G core network hot standby method and device, 5G core network system and computer equipment
CN111813606A (en) Fault-tolerant method, system, equipment and medium for double-node virtual machine
CN108984346B (en) Method, system and storage medium for producing data disaster tolerance
CN113609232B (en) Data management method, data management system, and computer-readable storage medium
CN110851526B (en) Data synchronization method, device and system
CN111241200B (en) Master-slave synchronous processing method and device based on SQLite database

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20230203