CN113220448A - Dual-computer system and control method thereof - Google Patents

Dual-computer system and control method thereof Download PDF

Info

Publication number
CN113220448A
CN113220448A CN202110406130.5A CN202110406130A CN113220448A CN 113220448 A CN113220448 A CN 113220448A CN 202110406130 A CN202110406130 A CN 202110406130A CN 113220448 A CN113220448 A CN 113220448A
Authority
CN
China
Prior art keywords
server
state
module
resource
resources
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.)
Granted
Application number
CN202110406130.5A
Other languages
Chinese (zh)
Other versions
CN113220448B (en
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.)
GHT CO Ltd
Original Assignee
GHT 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 GHT CO Ltd filed Critical GHT CO Ltd
Priority to CN202110406130.5A priority Critical patent/CN113220448B/en
Publication of CN113220448A publication Critical patent/CN113220448A/en
Application granted granted Critical
Publication of CN113220448B publication Critical patent/CN113220448B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2038Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant with a single idle spare processing component

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention discloses a dual-computer system and a control method thereof, wherein the system comprises two servers which are respectively preset to be in a main state and a standby state; each server comprises a logic control module, an access module for accessing a scheduling terminal and a plurality of resource modules corresponding to a plurality of services one by one; the logic control module is used for acquiring the number of available idle resources in each resource module of the two servers at regular time under the condition that the server to which the logic control module belongs is in a main state; and the logic control module is further used for calling the available idle resources in the two target resource modules to process the target service according to the number of the available idle resources in the target resource module corresponding to the target service in the two servers which are acquired last time and a preset resource allocation strategy when receiving a service processing request aiming at the target service and sent by the scheduling terminal. By adopting the embodiment of the invention, the resource utilization rate in the dual-computer system can be improved.

Description

Dual-computer system and control method thereof
Technical Field
The invention relates to the technical field of scheduling communication, in particular to a dual-computer system and a control method thereof.
Background
In the field of power dispatching, the requirement on equipment reliability is high, and a single equipment fault point is not allowed to be generated on the software and hardware level, so that a double-machine system is basically used for providing service for a dispatching terminal, and when one server fails, the other server can take over service in time. However, in the process of implementing the present invention, the inventor finds that, in the current dual-server system, only one server can provide resources to process the scheduling service, and even if the other server has available resources, the resources cannot be shared, which results in waste of resources.
Disclosure of Invention
The embodiment of the invention provides a dual-computer system and a control method thereof, which can improve the resource utilization rate in the dual-computer system.
An embodiment of the present invention provides a dual-server system, including two servers that are preset to a primary state and a standby state, respectively;
each server comprises a logic control module, an access module for accessing a scheduling terminal and a plurality of resource modules corresponding to a plurality of services one by one;
the resource module corresponding to each service comprises a plurality of resources for processing the service;
the logic control module is used for acquiring the number of available idle resources in each resource module of the two servers at regular time under the condition that the server to which the logic control module belongs is in a main state;
the logic control module is further configured to, when receiving a service processing request for a target service sent by a scheduling terminal, invoke available idle resources in two target resource modules to process the target service according to the number of available idle resources in the target resource modules corresponding to the target service in the two servers acquired last time and a preset resource allocation policy.
As an improvement of the above scheme, when each resource module in the two servers operates normally, the resource modules all send state information to the logic control module of the server in the main state at regular time; wherein the state information comprises a total number of resources and a number of used resources;
the logic control module of the server in the active state obtains the number of available idle resources in each resource module of the two servers by the following method:
regularly judging whether state information sent by each resource module in the two servers is received within the latest preset time or not to obtain a judgment result corresponding to each resource module of each server; wherein the state information comprises a total number of resources and a number of used resources;
for each resource module with the positive judgment result, calculating the number of available idle resources in the resource module according to the total number of resources and the number of used resources in the state information of the resource module;
and for each resource module with the negative judgment result, determining that the number of available idle resources in the resource module is 0.
As an improvement of the above scheme, each server further comprises a main/standby decision module, and the main/standby decision modules of the two servers are connected;
the main/standby decision module is used for regularly detecting whether the server to which the server belongs meets a preset main/standby switching condition or not under the condition that the server to which the server belongs is in a main state, if so, switching the server to which the server belongs to a standby state, sending a message of switching the server to the standby state to other modules in the server to which the server belongs, and sending a state switching request to the main/standby decision module in the server in the standby state;
and the main/standby decision module is further configured to switch the server to which the main/standby decision module belongs to the main state when receiving the state switching request, and send a message indicating that the server is switched to the main state to other modules in the server to which the server belongs.
As an improvement of the scheme, the logic control modules of the two servers are connected;
and the logic control module is also used for synchronizing data to the logic control module of the server in the standby state in real time under the condition that the server to which the logic control module belongs is in the active state.
As an improvement of the above scheme, a server preset to be in a master state binds a preset virtual address, where the virtual address is used for the dual-computer system to communicate with the scheduling terminal;
the logic control module is further configured to release the binding between the server and the virtual address after receiving the message that the server is switched to the standby state;
and the access module is further configured to bind the server to which the server belongs with the virtual address after receiving the message that the server is switched to the active state.
Compared with the prior art, the dual-computer system provided in this embodiment includes two servers that are preset in the active state and the standby state, where the server in the active state may periodically obtain the number of available idle resources in each resource module of the two servers, and when receiving a service processing request for a target service sent by a scheduling terminal, may invoke the available idle resources in the two target resource modules to process the target service according to the number of available idle resources in the target resource module corresponding to the target service, which is obtained last time, and a preset resource allocation policy. The server in the active state not only utilizes the available idle resources in the server but also utilizes the available idle resources of the server in the standby state when processing the service, so that the effective sharing and sharing utilization of the resources in the dual-computer system are ensured, and the resource utilization rate in the dual-computer system is improved.
Another embodiment of the present invention provides a method for controlling a dual-machine system, where the dual-machine system is composed of two servers that are preset in a primary state and a standby state, respectively; the method comprises the following steps:
the server in the main state regularly acquires the number of available idle resources in each resource module in the two servers; one resource module corresponds to one service, and the resource module corresponding to each service comprises a plurality of resources for processing the service;
when the server in the main state receives a service processing request aiming at a target service and sent by a scheduling terminal, the server calls the available idle resources in the two target resource modules to process the target service according to the number of the available idle resources in the target resource modules corresponding to the target service in the two servers which are obtained last time and a preset resource allocation strategy.
As an improvement of the above scheme, each resource module in the two servers sends state information to the server in the primary state at regular time when the resource module runs normally; wherein the state information comprises a total number of resources and a number of used resources;
the server in the active state obtains the number of available idle resources in each resource module of the two servers by the following method:
regularly judging whether state information sent by each resource module in the two servers is received within the latest preset time or not to obtain a judgment result corresponding to each resource module of each server; wherein the state information comprises a total number of resources and a number of used resources;
for each resource module with the positive judgment result, calculating the number of available idle resources in the resource module according to the total number of resources and the number of used resources in the state information of the resource module;
and for each resource module with the negative judgment result, determining that the number of available idle resources in the resource module is 0.
As an improvement of the above, the method further comprises:
the server in the main state regularly detects whether the server meets preset main/standby switching conditions, if so, the server is switched to the standby state, and a state switching request is sent to the server in the standby state, so that the server in the standby state switches the server to the main state.
As an improvement of the above, the method further comprises:
and the server in the main state synchronizes data to the server in the standby state in real time.
As an improvement of the above scheme, a server preset to be in a master state binds a preset virtual address, where the virtual address is used for the dual-computer system to communicate with the scheduling terminal;
after the server in the active state switches itself to the standby state, the method further includes:
unbinding itself from the virtual address;
after the server in the standby state switches itself to the active state, the method further includes:
binding itself with the virtual address.
Compared with the prior art, in the control method of the dual-computer system provided in this embodiment, the server in the active state regularly acquires the number of available idle resources in each resource module in the two servers, and when a service processing request for a target service, which is sent by the scheduling terminal, is received, the available idle resources in the two target resource modules are called to process the target service according to the number of available idle resources in the target resource module, which is corresponding to the target service, in the two servers, which is acquired last time and a preset resource allocation policy. The server in the active state not only utilizes the available idle resources in the server but also utilizes the available idle resources of the server in the standby state when processing the service, so that the effective sharing and sharing utilization of the resources in the dual-computer system are ensured, and the resource utilization rate in the dual-computer system is improved.
Drawings
Fig. 1 is a schematic structural diagram of a dual-computer system according to an embodiment of the present invention;
fig. 2 is a schematic network connection diagram of a dual-machine system according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a control method of a dual-computer system according to an embodiment of the present invention.
Detailed Description
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 derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic structural diagram of a dual-computer system according to an embodiment of the present invention.
The dual-computer system provided by the embodiment comprises a server 1 preset to be in a main state and a server 2 preset to be in a standby state;
each server comprises a logic control module 11, an access module 13 for accessing a scheduling terminal and a plurality of resource modules 12 corresponding to a plurality of services one by one;
the resource module 12 corresponding to each service includes a plurality of resources for processing the service;
the logic control module 11 is configured to periodically acquire the number of available idle resources in each resource module 12 of the two servers when the server to which the logic control module belongs is in the active state;
the logic control module 11 is further configured to, when receiving a service processing request for a target service sent by a scheduling terminal, call available idle resources in two target resource modules to process the target service according to the number of available idle resources in the target resource modules corresponding to the target service in the two servers obtained last time and a preset resource allocation policy.
It should be noted that only one resource module 12 is shown in fig. 1, not all resource modules 12, and in particular, each server may include more than one resource module 12.
Illustratively, the access module 13 is further configured to authenticate the accessed scheduling terminal. All the scheduling terminals need to be authenticated by the access module 13, and then the service function of the server can be used, so that the safety and reliability of scheduling can be effectively guaranteed.
It should be noted that the logic control module 11 is a business processing and analyzing brain, and is used for controlling business logic and managing resource modules 12 corresponding to various types of businesses. The logic control module 11 does not process the service and is in a dormant state when the server is in a standby state.
Exemplary services that the server may handle include, but are not limited to: audio codec, video codec, voice print recognition, automatic voice response, and data query, among others.
In a specific embodiment, when the server in the standby state is completely down (power down, system crash), the available idle resources of the target resource module in the server in the standby state are zero, and in this case, the resource allocation policy is to provide resources only by the target resource module in the server in the active state.
In another specific embodiment, when the partial resource module 12 of the server in the standby state exits or dies abnormally, if the target resource module on the server in the standby state still operates normally, the resource can still be shared, in this case, the resource allocation policy provides a part of resources for processing the target service by the target resource module in the server in the active state and the target resource module in the server in the standby state, respectively. Therefore, even if one machine in the dual-machine system is abnormal, the available resources are maximally shared and used, more devices are not required to be added, and the method is more suitable for the power dispatching field with high requirements and not too large concurrency.
In another specific embodiment, when the external network of the server service network port in the standby state is abnormal or unstable, the resource modules 12 on the server in the standby state both operate normally and can be shared and used normally, in this case, the resource allocation policy is that the target resource module in the server in the active state and the target resource module in the server in the standby state respectively provide a part of resources to process the target service. Therefore, even if one machine in the dual-machine system is abnormal, the available resources are maximally shared and used, more devices are not required to be added, and the method is more suitable for the power dispatching field with high requirements and not too large concurrency.
The dual-computer system provided in this embodiment includes two servers that are preset in a primary state and a standby state, where the server in the primary state may periodically obtain the number of available idle resources in each resource module in the two servers, and when receiving a service processing request for a target service sent by a scheduling terminal, may invoke the available idle resources in the two target resource modules to process the target service according to the number of available idle resources in the target resource modules corresponding to the target service, which are obtained last time, and a preset resource allocation policy. The server in the active state not only utilizes the available idle resources in the server but also utilizes the available idle resources of the server in the standby state when processing the service, so that the effective sharing and sharing utilization of the resources in the dual-computer system are ensured, and the resource utilization rate in the dual-computer system is improved.
As one optional implementation, when the resource modules 12 in the two servers operate normally, the resource modules all send state information to the logic control module 11 of the server in the active state at regular time; wherein the state information comprises a total number of resources and a number of used resources;
the logic control module 11 of the server in the active state obtains the number of available idle resources in each resource module 12 of the two servers by the following specific method:
regularly judging whether state information sent by each resource module 12 in the two servers is received within the latest preset time or not to obtain a judgment result corresponding to each resource module 12 of each server; wherein the state information comprises a total number of resources and a number of used resources;
for each resource module 12 whose judgment result is yes, calculating the number of available idle resources in the resource module 12 according to the total number of resources and the number of used resources in the state information of the resource module 12;
for each resource module 12 with a negative determination, it is determined that the number of available free resources in the resource module 12 is 0.
In a specific embodiment, taking an audio resource module corresponding to an audio codec service as an example, an audio resource module C in a server in a primary state and an audio resource module D in a server in a standby state both register with a logic control module 11 in the server in the primary state, and, during normal operation, send state information to the logic control module 11 in the server in the primary state at regular time, so that the logic control module 11 in the server in the primary state can detect whether the audio resource module C and the audio resource module D are alive according to whether the state information sent by each resource module in the two servers is received within a latest preset time; in the state information sent by the audio resource module C and the audio resource module D, the total amount of resources of the server and the amount of used resources are taken, so that the logic control module 11 of the server in the primary state can calculate whether the audio processing resource module a and the audio resource module D have idle resources, and the number of the idle resources is.
In this embodiment, each resource module in the two servers sends state information to the logic control module 11 of the server in the active state at regular time when the resource module runs normally, so that the logic control module 11 of the server in the active state can quickly and accurately obtain the number of available idle resources in each resource module in the two servers according to the condition of receiving the state information and the received state information.
As one optional implementation manner, each server further includes a main/standby decision module 14, and the main/standby decision modules 14 of the two servers are connected;
the active/standby decision module 14 is configured to detect whether the server to which the server belongs meets a preset active/standby switching condition at regular time when the server to which the server belongs is in the active state, and if so, switch the server to which the server belongs to the standby state, send a message indicating that the server is switched to the standby state to other modules in the server to which the server belongs, and send a state switching request to the active/standby decision module 14 in the server in the standby state;
the active/standby decision module 14 is further configured to switch the server to which the active/standby decision module belongs to the active state when receiving the state switching request, and send a message indicating that the server is switched to the active state to other modules in the server to which the server belongs.
It should be noted that the other modules in the server to which the above-mentioned server belongs include a logic control module 11, an access module 13 and each resource module 12.
Illustratively, the master-slave switching conditions include, but are not limited to: the service network interruption, the overall downtime and the logic control module 11 are abnormal.
In this embodiment, each server further includes a main/standby decision module 14, and when the main/standby decision module 14 detects that the server to which it belongs meets a preset main/standby switching condition, it triggers the two servers to perform main/standby exchange, thereby implementing a mutual standby mechanism and improving the reliability of the dual-computer system.
Further, the logic control modules 11 of the two servers are connected;
the logic control module 11 is further configured to synchronize data to the logic control module 11 of the server in the standby state in real time when the server to which the logic control module 11 belongs is in the active state.
Illustratively, in the dual-computer system, only the logic control module 11 of the server in the active state processes the service, the service data and the state information are stored in the logic control module 11 of the server in the active state, and whenever there is a data change or a state update, the logic control module 11 of the server in the active state synchronizes the changed data to the logic control module 11 of the server in the standby state through the synchronous network port in real time, so as to ensure that the data and the state in the logic control module 11 of the server which is just switched to the active state are the latest after the active-standby switching occurs, so as to achieve the non-aware switching, ensure the reliability of the service processing, and improve the reliability of the dual-computer system.
In a specific embodiment, two servers of the dual-computer system each have 2 network ports, as shown in fig. 2, a network port a and a network port B, where the network port a is used for accessing a service network, and the network ports B of the two servers are directly connected to serve as a dual-computer internal message negotiation channel and an internal data synchronization channel.
Furthermore, a server preset to be in a master state binds a preset virtual address, and the virtual address is used for the dual-computer system to communicate with the scheduling terminal;
the logic control module 11 is further configured to release the binding between the server and the virtual address after receiving the message that the server is switched to the standby state;
the access module 13 is further configured to bind the server to which the server belongs with the virtual address after receiving the message that the server is switched to the active state.
It should be noted that, when the active-standby state is set or the active-standby switching is performed, the server in the active state is bound to the virtual address, so that the scheduling terminal accesses the service through the virtual address, and no matter whether the active-standby switching occurs in the dual-computer system, it can be ensured that the service processing request of the scheduling terminal is sent to the server in the active state for processing, so that the address switching of the scheduling terminal is not needed, and the practicability and the adaptability of the dual-computer system are improved.
As an optional implementation, each server in the dual-machine system further includes a bus 15; in each server, the modules are connected to a bus 15 in the server to communicate via the bus 15; furthermore, the resource modules 12 in each server are also connected to the bus 15 of the other server.
It should be noted that the bus is an mmidserver bus.
In this embodiment, it is agreed on the architecture of the dual-computer system that the logic control module 11 and the resource module 12 are separated and the resource module 12 is connected to the dual bus, so that the resource module 12 of any one server interacts with not only the logic control module 11 of the same server but also the logic control module 11 of another server, thereby conveniently realizing the capability sharing of the resource module 12 of the dual-computer system, improving the reliability and maximally using the available resources.
Fig. 3 is a schematic flow chart of a control method of a dual-computer system according to an embodiment of the present invention.
The embodiment of the present invention provides a method for controlling a dual-machine system, which may be applied to the dual-machine system described in the above example, or may be applied to another dual-machine system that is composed of two servers that are preset in the active state and the standby state, respectively. The method comprises the following steps:
s1, the server in the main state regularly acquires the number of available idle resources in each resource module in the two servers; one resource module corresponds to one service, and the resource module corresponding to each service comprises a plurality of resources for processing the service;
s2, when the server in the active state receives a service processing request for a target service sent by a scheduling terminal, the server calls the available idle resources in the two target resource modules to process the target service according to the number of the available idle resources in the target resource modules corresponding to the target service in the two servers which are obtained last time and a preset resource allocation strategy.
In the control method of the dual-computer system provided in this embodiment, the server in the active state periodically obtains the number of available idle resources in each resource module in the two servers, and when a service processing request for a target service sent by the scheduling terminal is received, the method calls the available idle resources in the two target resource modules to process the target service according to the number of available idle resources in the target resource module corresponding to the target service, which is obtained last time, and a preset resource allocation policy. The server in the active state not only utilizes the available idle resources in the server but also utilizes the available idle resources of the server in the standby state when processing the service, so that the effective sharing and sharing utilization of the resources in the dual-computer system are ensured, and the resource utilization rate in the dual-computer system is improved.
As one optional implementation manner, when each resource module in the two servers operates normally, the resource modules all send state information to the server in the active state at regular time; wherein the state information comprises a total number of resources and a number of used resources;
the server in the active state obtains the number of available idle resources in each resource module of the two servers by the following method:
regularly judging whether state information sent by each resource module in the two servers is received within the latest preset time or not to obtain a judgment result corresponding to each resource module of each server; wherein the state information comprises a total number of resources and a number of used resources;
for each resource module with the positive judgment result, calculating the number of available idle resources in the resource module according to the total number of resources and the number of used resources in the state information of the resource module;
and for each resource module with the negative judgment result, determining that the number of available idle resources in the resource module is 0.
As one optional implementation, the method further includes:
the server in the main state regularly detects whether the server meets preset main/standby switching conditions, if so, the server is switched to the standby state, and a state switching request is sent to the server in the standby state, so that the server in the standby state switches the server to the main state.
Furthermore, a server preset to be in a master state binds a preset virtual address, and the virtual address is used for the dual-computer system to communicate with the scheduling terminal;
after the server in the active state switches itself to the standby state, the method further includes:
unbinding itself from the virtual address;
after the server in the standby state switches itself to the active state, the method further includes:
binding itself with the virtual address.
Further, the method further comprises:
and the server in the main state synchronizes data to the server in the standby state in real time.
It should be noted that, since each embodiment of the control method of the dual-computer system in this embodiment corresponds to each embodiment in the foregoing dual-computer system embodiment, specific descriptions and beneficial effects related to each embodiment of the control method of the dual-computer system in this embodiment may refer to the specific descriptions and beneficial effects related to each embodiment in the foregoing dual-computer system embodiment, and are not described herein again.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A dual-machine system is characterized by comprising two servers which are respectively preset to be in a main state and a standby state;
each server comprises a logic control module, an access module for accessing a scheduling terminal and a plurality of resource modules corresponding to a plurality of services one by one;
the resource module corresponding to each service comprises a plurality of resources for processing the service;
the logic control module is used for acquiring the number of available idle resources in each resource module of the two servers at regular time under the condition that the server to which the logic control module belongs is in a main state;
the logic control module is further configured to, when receiving a service processing request for a target service sent by a scheduling terminal, invoke available idle resources in two target resource modules to process the target service according to the number of available idle resources in the target resource modules corresponding to the target service in the two servers acquired last time and a preset resource allocation policy.
2. The dual-computer system as claimed in claim 1, wherein each resource module in the two servers periodically sends status information to the logic control module of the server in the active state when the resource module normally runs; wherein the state information comprises a total number of resources and a number of used resources;
the logic control module of the server in the active state obtains the number of available idle resources in each resource module of the two servers by the following method:
regularly judging whether state information sent by each resource module in the two servers is received within the latest preset time or not to obtain a judgment result corresponding to each resource module of each server; wherein the state information comprises a total number of resources and a number of used resources;
for each resource module with the positive judgment result, calculating the number of available idle resources in the resource module according to the total number of resources and the number of used resources in the state information of the resource module;
and for each resource module with the negative judgment result, determining that the number of available idle resources in the resource module is 0.
3. The dual-server system of claim 1, wherein each server further comprises a master-slave decision module, the master-slave decision modules of the two servers being connected;
the main/standby decision module is used for regularly detecting whether the server to which the server belongs meets a preset main/standby switching condition or not under the condition that the server to which the server belongs is in a main state, if so, switching the server to which the server belongs to a standby state, sending a message of switching the server to the standby state to other modules in the server to which the server belongs, and sending a state switching request to the main/standby decision module in the server in the standby state;
and the main/standby decision module is further configured to switch the server to which the main/standby decision module belongs to the main state when receiving the state switching request, and send a message indicating that the server is switched to the main state to other modules in the server to which the server belongs.
4. The dual-server system according to claim 3, wherein the logic control modules of the two servers are connected;
and the logic control module is also used for synchronizing data to the logic control module of the server in the standby state in real time under the condition that the server to which the logic control module belongs is in the active state.
5. The dual-computer system according to claim 3, wherein the server preset to the active state binds a preset virtual address, and the virtual address is used for the dual-computer system to communicate with the scheduling terminal;
the logic control module is further configured to release the binding between the server and the virtual address after receiving the message that the server is switched to the standby state;
and the access module is further configured to bind the server to which the server belongs with the virtual address after receiving the message that the server is switched to the active state.
6. A control method of dual-machine system is characterized in that the dual-machine system is composed of two servers which are respectively preset to be in a main state and a standby state; the method comprises the following steps:
the server in the main state regularly acquires the number of available idle resources in each resource module in the two servers; one resource module corresponds to one service, and the resource module corresponding to each service comprises a plurality of resources for processing the service;
when the server in the main state receives a service processing request aiming at a target service and sent by a scheduling terminal, the server calls the available idle resources in the two target resource modules to process the target service according to the number of the available idle resources in the target resource modules corresponding to the target service in the two servers which are obtained last time and a preset resource allocation strategy.
7. The method as claimed in claim 6, wherein each resource module in the two servers periodically sends status information to the server in the active state when operating normally; wherein the state information comprises a total number of resources and a number of used resources;
the server in the active state obtains the number of available idle resources in each resource module of the two servers by the following method:
regularly judging whether state information sent by each resource module in the two servers is received within the latest preset time or not to obtain a judgment result corresponding to each resource module of each server; wherein the state information comprises a total number of resources and a number of used resources;
for each resource module with the positive judgment result, calculating the number of available idle resources in the resource module according to the total number of resources and the number of used resources in the state information of the resource module;
and for each resource module with the negative judgment result, determining that the number of available idle resources in the resource module is 0.
8. The method of controlling a dual system as claimed in claim 6, wherein the method further comprises:
the server in the main state regularly detects whether the server meets preset main/standby switching conditions, if so, the server is switched to the standby state, and a state switching request is sent to the server in the standby state, so that the server in the standby state switches the server to the main state.
9. The method of controlling a dual system as claimed in claim 8, wherein the method further comprises:
and the server in the main state synchronizes data to the server in the standby state in real time.
10. The method according to claim 8, wherein the server pre-set to the active state binds a pre-set virtual address, and the virtual address is used for the dual-computer system to communicate with the scheduling terminal;
after the server in the active state switches itself to the standby state, the method further includes:
unbinding itself from the virtual address;
after the server in the standby state switches itself to the active state, the method further includes:
binding itself with the virtual address.
CN202110406130.5A 2021-04-15 2021-04-15 Dual-computer system and control method thereof Active CN113220448B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110406130.5A CN113220448B (en) 2021-04-15 2021-04-15 Dual-computer system and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110406130.5A CN113220448B (en) 2021-04-15 2021-04-15 Dual-computer system and control method thereof

Publications (2)

Publication Number Publication Date
CN113220448A true CN113220448A (en) 2021-08-06
CN113220448B CN113220448B (en) 2023-02-17

Family

ID=77087452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110406130.5A Active CN113220448B (en) 2021-04-15 2021-04-15 Dual-computer system and control method thereof

Country Status (1)

Country Link
CN (1) CN113220448B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025475A (en) * 2009-09-23 2011-04-20 中兴通讯股份有限公司 Address allocation method, apparatus and system in hot backup scene
CN105282230A (en) * 2015-09-11 2016-01-27 中国人民解放军63796部队 Hard real-time computer cluster dynamic scheduling system
CN103152414B (en) * 2013-03-01 2016-03-30 四川省电力公司信息通信公司 A kind of high-availability system based on cloud computing
CN111611074A (en) * 2020-05-14 2020-09-01 北京达佳互联信息技术有限公司 Method and device for scheduling cluster resources

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102025475A (en) * 2009-09-23 2011-04-20 中兴通讯股份有限公司 Address allocation method, apparatus and system in hot backup scene
CN103152414B (en) * 2013-03-01 2016-03-30 四川省电力公司信息通信公司 A kind of high-availability system based on cloud computing
CN105282230A (en) * 2015-09-11 2016-01-27 中国人民解放军63796部队 Hard real-time computer cluster dynamic scheduling system
CN111611074A (en) * 2020-05-14 2020-09-01 北京达佳互联信息技术有限公司 Method and device for scheduling cluster resources

Also Published As

Publication number Publication date
CN113220448B (en) 2023-02-17

Similar Documents

Publication Publication Date Title
US9141491B2 (en) Highly available server system based on cloud computing
CN113014634B (en) Cluster election processing method, device, equipment and storage medium
CN112671882B (en) Same-city double-activity system and method based on micro-service
CN102075643B (en) Terminal device and backup system
CN109802986B (en) Equipment management method, system, device and server
CN109218232B (en) Method, equipment and system for realizing Mux machine
CN103702065A (en) Backup system and method of video conference system
JP2009118063A (en) Redundant system, method, program and server
CN112532452A (en) Switching method, device and equipment of communication terminal main and standby servers and storage medium
CN114265753A (en) Management method and management system of message queue and electronic equipment
US20200136912A1 (en) Method, Device, and System for Implementing MUX Machine
CN113220448B (en) Dual-computer system and control method thereof
CN115514698A (en) Protocol calculation method, switch, cross-device link aggregation system and storage medium
US20160261476A1 (en) Message system for avoiding processing-performance decline
US8209421B2 (en) Computer telephony system
CN114237906A (en) Load balancing method, device, equipment and storage medium based on synchronous call
CN110839068B (en) Service request processing method and device, electronic equipment and readable storage medium
CN113055427B (en) Service-based server cluster access method and device
CN113992685A (en) Method, system and device for determining service controller
JP2009246475A (en) Communication system with redundancy composition, and system switching method of the system
CN100574347C (en) A kind of method for synchronous and equipment of equipment for auto-calling queue distributed service
JP2007258791A (en) System and method for processing call
CN101616025B (en) Method for determining active-standby of services on control panel and a device
CN115208943A (en) Communication method and device based on multiple network cards
JPH04362820A (en) Line changeover control system

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
GR01 Patent grant
GR01 Patent grant