CN112751782A - Flow switching method, device, equipment and medium based on multi-activity data center - Google Patents

Flow switching method, device, equipment and medium based on multi-activity data center Download PDF

Info

Publication number
CN112751782A
CN112751782A CN202011593919.8A CN202011593919A CN112751782A CN 112751782 A CN112751782 A CN 112751782A CN 202011593919 A CN202011593919 A CN 202011593919A CN 112751782 A CN112751782 A CN 112751782A
Authority
CN
China
Prior art keywords
target service
switching
service
target
verification
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
CN202011593919.8A
Other languages
Chinese (zh)
Other versions
CN112751782B (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.)
Weiyiyun Hangzhou Holding Co ltd
Original Assignee
Weiyiyun Hangzhou Holding 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 Weiyiyun Hangzhou Holding Co ltd filed Critical Weiyiyun Hangzhou Holding Co ltd
Priority to CN202011593919.8A priority Critical patent/CN112751782B/en
Publication of CN112751782A publication Critical patent/CN112751782A/en
Application granted granted Critical
Publication of CN112751782B publication Critical patent/CN112751782B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2408Traffic characterised by specific attributes, e.g. priority or QoS for supporting different services, e.g. a differentiated services [DiffServ] type of service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)

Abstract

The embodiment of the invention discloses a flow switching method, a device, equipment and a medium based on a multi-activity data center, wherein the method comprises the following steps: when receiving a flow switching instruction for switching from a current service to at least one target service, performing service node verification on the at least one target service; if the verification is detected to pass, generating configuration information according to switching information carried in the switching instruction, and uploading the configuration information to a configuration center; and when the configuration information is matched with the switching information, switching the flow from the current service to the at least one target service. The technical scheme of the embodiment of the invention solves the problem that the switched target service possibly cannot carry out corresponding response on the corresponding request because the target service is not verified during flow switching in the prior art, and realizes the technical effect that the switched target service can respond to the sent request.

Description

Flow switching method, device, equipment and medium based on multi-activity data center
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a flow switching method, a flow switching device, flow switching equipment and a flow switching medium based on a multi-activity data center.
Background
Currently, when performing traffic switching, mostly after receiving a traffic switching instruction, switching from a current service to a target service, and when detecting that the switching is completed, considering that the traffic switching is completed.
However, in the actual application process, although the current service is switched to the target service, it is uncertain whether the target service can process the corresponding data acquisition request, so that even if the service switching is successful, the corresponding request cannot be processed.
Disclosure of Invention
The invention provides a flow switching method, a flow switching device, flow switching equipment and a flow switching medium based on a multi-activity data center.
In a first aspect, an embodiment of the present invention provides a method for switching traffic based on a multi-active data center, where the method includes:
when receiving a flow switching instruction for switching from a current service to at least one target service, performing service node verification on the at least one target service;
if the verification is detected to pass, generating configuration information according to switching information carried in the switching instruction, and uploading the configuration information to a configuration center;
and when the configuration information is matched with the switching information, switching the flow from the current service to the at least one target service.
In a second aspect, an embodiment of the present invention further provides a traffic switching apparatus based on a multi-active data center, where the apparatus includes:
the service node verification module is used for verifying the service node of at least one target service when receiving a flow switching instruction for switching from the current service to the at least one target service;
the configuration information generation module is used for generating configuration information according to the switching information carried in the switching instruction and uploading the configuration information to a configuration center if the verification is detected to pass;
and the target service switching module is used for switching the flow from the current service to the at least one target service when the configuration information is matched with the switching information.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for switching traffic based on a multi-active data center according to any of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the method for multi-active data center based traffic switching according to any one of the embodiments of the present invention.
The technical scheme of the embodiment of the invention can verify the service node of at least one target service when receiving the flow switching instruction for switching from the current service to at least one target service, and further verify the configuration information uploaded to the configuration center after the verification is passed so as to ensure that the target service can process the corresponding data acquisition request, thereby solving the technical problem that the corresponding request cannot be processed after the switching because the current service is only required to be switched to the target service regardless of whether the target service can process the corresponding data acquisition request or not, realizing the verification of each target service in advance so as to ensure that the switched target service can process the data acquisition request, further, after the flow switching is successful, further verifying whether the flow is switched to the corresponding target service or not, the service switching accuracy and the corresponding request processing convenience are improved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flow chart of a flow switching method based on a multi-active data center according to a first embodiment of the present invention;
fig. 2 is a schematic diagram of a flow switching method based on a multi-active data center according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a flow switching device based on a multi-active data center according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flow chart of a traffic switching method based on a multi-active data center according to an embodiment of the present invention, where this embodiment is applicable to switching traffic corresponding to a current service to another service when some services have a failure, that is, to a case of traffic switching, and the method may be executed by a traffic switching apparatus based on the multi-active data center, where the apparatus may be implemented in the form of software and/or hardware, and the hardware may be an electronic device, an optional mobile terminal or a PC terminal, and the like.
Before the technical solution of the present embodiment is introduced, an application scenario is exemplarily described. The multiple servers may be deployed in the machine rooms, and the server in each machine room may process the corresponding data acquisition request and feed back the corresponding feedback data. In an actual application process, when a service in a machine room is down or has a fault, the traffic corresponding to each server in the machine room a may be switched to other machine rooms, so that the servers in the other machine rooms may process corresponding data acquisition requests.
As shown in fig. 1, the method of this embodiment includes:
s110, when receiving a flow switching instruction for switching from the current service to at least one target service, performing service node verification on the at least one target service.
The service to be switched to may be used as a target service, for example, if the current service a has a fault or is down, and the control switched to the service B is triggered, the service B is the service to be switched to, and therefore the service B is the target service. The number of the target services can be one, two or more, and the specific number of the services is determined according to the number of the down services or the number of the target services selected by the user trigger. When a user triggers an operation of switching from a current service to a target service, a switching instruction corresponding to the triggered operation may be generated. I.e. the handover instruction is an instruction to switch from the current service to the target service. In order to determine whether the handed-to target service can be used, node verification may be performed for each target service. In this embodiment, the advantage of verifying the service nodes is that it is possible to avoid a state where the target service corresponding to each service node is faulty, and further achieve a technical effect that the target service to which the service node is switched can provide corresponding traffic.
Specifically, when a server failure is detected in the machine room, the traffic that needs the service provided by the failed server may be switched to another server that can provide the corresponding service, and at this time, the user may trigger a service switching key, that is, a traffic switching instruction for switching from the current service to at least one target service. When the switching instruction is received, the service node of each target service can be verified in advance to ensure that the switched target service is a service which can be normally used.
In this embodiment, the service node verification for the at least one target service may include three aspects, which may be: verifying a data updating scheduling task corresponding to the service node of the at least one target service; verifying the number of threads corresponding to the service node of the at least one target service; and performing benchmark test verification on the at least one target service. It should be noted that the service node of the target service may be verified through the traffic switching system, and the traffic switching system may be a system that switches from the current service to another service.
The data update invoking task is verified, and whether the target service corresponding to each target service node can normally respond to each data acquisition request can be understood. Each target service may correspond to one or more threads, the traffic switching system may record an operating thread corresponding to each target service, and correspondingly, the thread quantity verification performed on the service node of at least one target service is to ensure that the service node may normally provide a corresponding service for a newly accessed data acquisition request. Further, the benchmark test may be understood as that the same service is called in different machine rooms by using the same request, the feedback results of the machine rooms are obtained and compared, and it is further determined that the response result of the same service in the multiple machine rooms is correct, that is, when the traffic is switched from the current service to another service, it is ensured that the processing results of the same request by the other service and the current service are consistent.
Specifically, the verifying the service node may be to determine whether a data update scheduling task corresponding to the service node of the target service operates normally, verify the number of threads corresponding to the service node of each target service, or perform benchmark test verification on at least one target service.
And S120, if the verification is detected to pass, generating configuration information according to the switching information carried in the switching instruction, and uploading the configuration information to a configuration center.
The verification passes may be verification passes after the three aspects are respectively verified. Correspondingly, when the verification is passed, namely the data updating scheduling task corresponding to each target service is verified, the scheduling task normally runs; each data acquisition request can be regarded as a task, the server can process the corresponding task, and the data update scheduling task can be understood as a task corresponding to the processing of each data acquisition request. The verification of the threads of each target service may be that the number of threads corresponding to each target service is greater than or equal to a preset thread number threshold, where the preset thread number threshold is preset in the traffic switching system and is used to verify whether each target service can process a corresponding data acquisition request based on the preset thread number threshold. The benchmark test passing means that each target service and the current service process the same data acquisition request, and the fed back data are consistent. The configuration center may be understood as a storage center that stores configuration files corresponding to the respective switching instructions. It should be noted that the handover command includes corresponding handover information, i.e. handover information from which service to which service. The switching information can be extracted and the configuration information uploaded to the configuration center can be generated according to the switching information.
Specifically, when it is verified that the data update scheduling task of each target service node normally runs, the actual thread running number of each target service is greater than or equal to the preset thread number threshold, and the benchmark test corresponding to each target service passes, it is determined that each target service is in a normal state, and the verification can be considered as passing. The verification is passed, that is, the current service can be switched to each target service. After the verification is passed, the switching information in the switching instruction, that is, the switching information from which service needs to be switched to which service, can be extracted, and corresponding configuration information can be generated according to the switching information.
S130, when the configuration information is matched with the switching information, switching the flow from the current service to the at least one target service.
It should be noted that, when the configuration information is uploaded to the configuration center, there may be a situation of uploading failure or uploading abnormality, and at this time, the configuration content of the configuration center may be rolled back, so as to avoid the situation that the traffic switching failure affects the online service recovery. The failure or abnormality of uploading the configuration information can be understood that the configuration information is not stored in the configuration center due to network failure or other reasons; or, the generated configuration information has an error, for example, it is necessary to switch from the machine room a to the machine room B, but the content in the configuration information is to switch from the machine room a to the machine room C, that is, the actually generated configuration information is inconsistent with the switching information carried in the switching instruction.
Here, matching may be understood as that the content in the configuration information is the same as the content in the switching information.
Specifically, when it is detected that the configuration information just uploaded in the configuration center is consistent with the switching information, it is considered that switching from the current service to another target service is possible, that is, switching from the current service to the target service written in the switching instruction.
In this embodiment, before the switching the traffic from the current service to the at least one target service, the method further includes: performing heartbeat detection on the at least one target service; and if the at least one target service feeds back response data corresponding to the heartbeat detection, switching from the current service to the at least one target service.
It should be noted that, in order to further verify whether the handover from the current service to each target service is possible, heartbeat detection may be performed on each target service.
Specifically, each target service may receive a heartbeat packet at regular time, and if data corresponding to the heartbeat packet can be fed back, it is indicated that each target service can process a corresponding request, and at this time, it may be further determined that traffic corresponding to the current service can be switched to another target service.
In this embodiment, it should be noted that the operation of switching from the current service to another service may be performed by a traffic distribution system in the traffic switching system, and when it is determined that heartbeat detection of each target service is normal, the operation of switching from the current service to each target service, that is, the operation of switching from the current service to the target service is implemented.
In this embodiment, the advantage of further performing service verification before switching from the current service to each target service is that it can be further ensured that the target service to which switching is performed can process the data acquisition request.
On the basis of the technical scheme, after the current service is switched to the target service, in order to further verify whether the traffic is switched to the target service in the target machine room, each target service can be further verified.
Optionally, a call request is sent based on at least one interface corresponding to the target service, and the call request is sent to the at least one target service; receiving response data and a response target service identifier fed back by the at least one target service; when the target service identification is matched with the at least one target service, feeding back feedback data of successful flow switching; and when the target service identification is not matched with the at least one target service, feeding back feedback data of which the flow switching is not successful.
Each target service may have a service identifier corresponding thereto, i.e., the service identifier is a unique identifier of the corresponding service. The interface corresponding to each target service can be determined, and the data acquisition request is sent through the interface corresponding to each target service based on a multithreading mode. The corresponding target service may feed back response data corresponding to the data acquisition request and the service identifier of the target service. After receiving the response data and the target service identifier, it may be determined whether the target service identifier is fed back by the target service in the target machine room, and if so, it indicates that the traffic switching is successful, and a successful feedback message may be fed back. Otherwise, if the response data is not received or the received target service identifier is not matched with the switched target service, it indicates that the traffic switching result is a failure, and at this time, a feedback message of the traffic switching failure may be fed back to the administrator.
That is, it is said that a call request is sent to at least one interface corresponding to a target service based on multiple threads, and the call request is sent to the at least one target service.
In this embodiment, after the traffic switching is completed, an online request is called, and a corresponding request is sent to the target service based on the interface corresponding to each target service. The service identifier of the corresponding machine room and the target service fed back by the current request can be received, and if the service identifier is a preset service identifier, that is, the identifier corresponding to the target service switched to is consistent, it indicates that the flow is switched to the designated machine room. The advantage of this kind of setting is, can further confirm whether the target service that switches to is available, has improved the technological effect that the flow switches and further confirms.
The technical scheme of the embodiment of the invention can verify the service node of at least one target service when receiving the flow switching instruction for switching from the current service to at least one target service, and further verify the configuration information uploaded to the configuration center after the verification is passed so as to ensure that the target service can process the corresponding data acquisition request, thereby solving the technical problem that the corresponding request cannot be processed after the switching because the current service is only required to be switched to the target service regardless of whether the target service can process the corresponding data acquisition request or not, realizing the verification of each target service in advance so as to ensure that the switched target service can process the data acquisition request, further, after the flow switching is successful, further verifying whether the flow is switched to the corresponding target service or not, the service switching accuracy and the corresponding request processing convenience are improved.
Example two
As an alternative embodiment of the foregoing embodiment, fig. 2 is a schematic diagram of a traffic switching method based on a multi-active data center according to a second embodiment of the present invention. The technical terms that are the same as or corresponding to the above-mentioned embodiments are not repeated.
Before the technical solution of this embodiment is introduced, it should be noted that after the uploading configuration file is added in the flow switching process, a detection flow and a switched flow state detection flow are configured, and a specific implementation manner of this embodiment may be referred to in the technical solution of this embodiment.
As shown in fig. 2, the method includes:
s201, receiving a flow switching and calling instruction.
Specifically, when a failure or downtime condition of a server in a certain machine room is detected, a user may determine a target service matched with a current service according to a data request processed by the downtime service, and trigger a key for switching from the current service to the target service. Of course, the server corresponding relationship between the same data acquisition requests is predetermined, when a current service is detected to be out of order or down, a corresponding target service can be determined according to the corresponding relationship, and meanwhile, the operation of switching from the current service to the target service can be automatically triggered. When this operation is triggered, the traffic switching system may receive a traffic switching instruction.
S202, flow switching pre-verification.
When receiving the traffic switching instruction, the traffic switching operation is not immediately executed, and pre-verification may be performed first, that is, whether each target service is available or not may be verified, so as to support switching of traffic to the target service.
In this embodiment, the specific implementation of verifying the target service can be referred to the following detailed description.
Step 1, starting verification of a data updating task of multiple data centers.
Wherein, the multiple data centers refer to corresponding target services.
Specifically, the traffic switching system may send an instruction indicating whether the data update scheduling task is normally running to the traffic scheduling system, and based on the instruction, may determine the task executed by each target service, and if the data update scheduling task is normally running, that is, each target service may normally process each data acquisition request, it indicates that the corresponding target service may normally process the request, and at this time, it may be considered that the target service is verified.
And 2, verifying the number of available nodes of the multi-data center service.
The verification of the data updating task of the multidata center is started, and meanwhile, the number of available nodes served by the multidata center can be verified. The verification of the number of the nodes of the multi-data center service can be to verify whether the number of the available threads of each target service is lower than a preset threshold value of the number of the available threads, if not, the number of the available nodes of the multi-data center service is verified to be passed, otherwise, the verification is not passed.
And 3, performing data benchmark test and verification on multiple data centers.
Meanwhile, the multi-data center data is subjected to benchmark test verification, namely, whether response data fed back by each target service to the same data acquisition request is the same or not is determined, if yes, the benchmark test verification is passed, and if not, the verification is not passed.
It should be noted that, the steps 1 to 3 may be executed sequentially or not, and may also be executed in parallel, and if there is a case that the verification fails, the corresponding handover cannot be completed. And only when the verification passes, the verification is passed.
S203, checking whether the configuration file uploaded by the configuration center is correct; if yes, executing S204; if not, go to S205.
When the verification is passed, the switching information carried in the switching instruction can be extracted, and the switching information can include a specific identifier of which service needs to be switched from the current service. Corresponding configuration information, i.e. the mentioned configuration files, can be generated from the switching information. When uploading the configuration file to the configuration center, the content in the configuration file may be verified. It should be noted that, when the configuration file is uploaded, there may be a situation that the network is down, and there may be an error in the uploaded configuration file. To avoid this problem, after uploading the configuration file to the configuration center, it may be checked whether the content in the configuration file is correct. Wherein, whether the content in the configuration file is the content in the switching instruction or not is determined by matching.
Specifically, whether the configuration file uploaded by the configuration center is correct or not can be checked, if yes, the traffic switching operation can be executed, and if not, the rollback configuration is executed, and information of traffic switching failure is fed back.
And S204, switching the flow.
Specifically, if the specification passes the verification, the corresponding traffic switching may be performed. The traffic switching is implemented by a traffic distribution module in the traffic switching system, and before performing a corresponding traffic switching operation, whether each target service is available or not may be further verified, and optionally, the determination is performed based on heartbeat data corresponding to a heartbeat packet fed back by each target service. If the feedback heartbeat data is received, the target service can process the corresponding request, otherwise, the target service cannot process the request. When it is determined that the target service can process the corresponding request, it is described that the traffic corresponding to the current service is switched to the target service. The benefit of heartbeat detection prior to switching to the target service is: it may further be determined that the target service to which the traffic is handed over is available.
And S205, rolling back the configuration, and feeding back the information of the flow switching failure.
Specifically, if it is detected that the verification fails, that is, any one or more of S2021 to S2023 are not verified, or the configuration file uploaded to the configuration center is different from the content in the switching information, the traffic switching cannot be performed at this time. The operation that can be performed is to roll back the configuration and feed back the feedback information of the traffic switching failure to the developer.
S206, starting a check service after flow switching, judging whether a failed service exists, and if so, executing S207; if not, returning to execute the start detection service, and if the detection fails within the preset times, executing S208.
It can be understood that the traffic switching is complete. After the traffic switching is completed, in order to further determine whether the switched target service is available, final traffic state detection may be performed on each target service. Optionally, a multithreading form may be adopted to perform a data call request on all interfaces of the target service switched to this time. If the feedback data are received, the failure service is not available; and if the service which does not receive the feedback data exists, indicating that the service which fails exists. If there is a failed service, S206 may be performed multiple times to determine whether the service is a failed service. If all the feedback services are failed within a certain number of times, the flow cannot be switched to the target service, and at this time, the flow switching is finished.
And S207, updating the state and feeding back the switching service.
That is, the target service may feed back corresponding data, which indicates that the traffic switching is successful, and at this time, may feed back a push message indicating that the traffic switching is successful to the background staff, otherwise, feed back a push message indicating that the traffic switching is failed.
And S208, ending.
I.e. the traffic switching operation is completed.
The technical scheme of the embodiment of the invention can verify the service node of at least one target service when receiving the flow switching instruction for switching from the current service to at least one target service, and further verify the configuration information uploaded to the configuration center after the verification is passed so as to ensure that the target service can process the corresponding data acquisition request, thereby solving the technical problem that the corresponding request cannot be processed after the switching because the current service is only required to be switched to the target service regardless of whether the target service can process the corresponding data acquisition request or not, realizing the verification of each target service in advance so as to ensure that the switched target service can process the data acquisition request, further, after the flow switching is successful, further verifying whether the flow is switched to the corresponding target service or not, the service switching accuracy and the corresponding request processing convenience are improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a flow switching device based on a multi-active data center according to a third embodiment of the present invention, where the device includes: a service node verification module 310, a configuration information generation module 320, and a target service switching module 330.
The service node verification module 310 is configured to perform service node verification on at least one target service when receiving a traffic switching instruction for switching from a current service to the at least one target service; a configuration information generating module 320, configured to generate configuration information according to the switching information carried in the switching instruction if it is detected that the verification passes, and upload the configuration information to a configuration center; a target service switching module 330, configured to switch the traffic from the current service to the at least one target service when the configuration information matches the switching information.
On the basis of the above technical solution, the apparatus further includes: the target service checking module comprises a target service checking unit, a target service identification determining unit, a first data feedback unit and a second data feedback unit;
the target service checking unit is further configured to send a call request based on at least one interface corresponding to the target service, and send the call request to the at least one target service; the target service identification determining unit is further used for receiving response data fed back by the at least one target service and a response target service identification; the first data feedback unit is further configured to feed back feedback data with successfully switched traffic when the target service identifier matches the at least one target service; and the second data feedback unit is further configured to feed back feedback data of which the traffic switching is unsuccessful when the target service identifier is not matched with the at least one target service. On the basis of the above technical solutions, the target service checking module is further configured to send a call request to at least one interface corresponding to a target service based on multiple threads, and send the call request to the at least one target service.
On the basis of the above technical solutions, the service node verification module includes:
the data updating scheduling task verifying unit is used for verifying the data updating scheduling task corresponding to the service node of the at least one target service; the thread quantity verifying unit is used for verifying the thread quantity corresponding to the service node of the at least one target service; and the benchmark test verification unit is used for performing benchmark test verification on the at least one target service.
On the basis of the technical schemes, the verification meets the following conditions: the data updating scheduling task normally runs; the number of threads is greater than a preset thread number threshold; the benchmark test passed.
On the basis of the foregoing technical solutions, the target service switching module, before the switching the traffic from the current service to the at least one target service, is further configured to: performing heartbeat detection on the at least one target service; and if the at least one target service feeds back response data corresponding to the heartbeat detection, switching from the current service to the at least one target service.
On the basis of the above technical solutions, the apparatus further includes: and the reminding module is used for generating early warning information based on the feedback data so as to remind a target user.
The technical scheme of the embodiment of the invention can verify the service node of at least one target service when receiving the flow switching instruction for switching from the current service to at least one target service, and further verify the configuration information uploaded to the configuration center after the verification is passed so as to ensure that the target service can process the corresponding data acquisition request, thereby solving the technical problem that the corresponding request cannot be processed after the switching because the current service is only required to be switched to the target service regardless of whether the target service can process the corresponding data acquisition request or not, realizing the verification of each target service in advance so as to ensure that the switched target service can process the data acquisition request, further, after the flow switching is successful, further verifying whether the flow is switched to the corresponding target service or not, the service switching accuracy and the corresponding request processing convenience are improved.
The flow switching device based on the multi-active data center provided by the embodiment of the invention can execute the flow switching method based on the multi-active data center provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
Example four
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary electronic device 40 suitable for use in implementing embodiments of the present invention. The electronic device 40 shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 4, electronic device 40 is embodied in the form of a general purpose computing device. The components of electronic device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that couples the various system components (including the system memory 402 and the processing unit 401).
Bus 403 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 40 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 40 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 402 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)404 and/or cache memory 405. The electronic device 40 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 406 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 403 by one or more data media interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 407 generally perform the functions and/or methods of the described embodiments of the invention.
The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboard, pointing device, display 410, etc.), with one or more devices that enable a user to interact with the electronic device 40, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 40 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interface 411. Also, the electronic device 40 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 412. As shown, the network adapter 412 communicates with the other modules of the electronic device 40 over the bus 403. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 401 executes various functional applications and data processing by running a program stored in the system memory 402, for example, to implement the method for switching traffic based on multiple active data centers according to the embodiment of the present invention.
EXAMPLE five
An embodiment of the present invention also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for multi-active data center based traffic switching.
The method comprises the following steps:
when receiving a flow switching instruction for switching from a current service to at least one target service, performing service node verification on the at least one target service;
if the verification is detected to pass, generating configuration information according to switching information carried in the switching instruction, and uploading the configuration information to a configuration center;
and when the configuration information is matched with the switching information, switching the flow from the current service to the at least one target service. Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A flow switching method based on a multi-activity data center is characterized by comprising the following steps:
when receiving a flow switching instruction for switching from a current service to at least one target service, performing service node verification on the at least one target service;
if the verification is detected to pass, generating configuration information according to switching information carried in the switching instruction, and uploading the configuration information to a configuration center;
and when the configuration information is matched with the switching information, switching the flow from the current service to the at least one target service.
2. The method of claim 1, wherein after switching the current service to the at least one target service, the method further comprises:
sending a calling request based on at least one interface corresponding to the target service, and sending the calling request to the at least one target service;
receiving response data and a response target service identifier fed back by the at least one target service;
when the target service identification is matched with the at least one target service, feeding back feedback data of successful flow switching;
and when the target service identification is not matched with the at least one target service, feeding back feedback data of which the flow switching is not successful.
3. The method of claim 2, wherein sending a call request based on at least one interface corresponding to the target service and sending the call request to the at least one target service comprises:
and sending a calling request to at least one interface corresponding to the target service based on multithreading, and sending the calling request to the at least one target service.
4. The method of claim 1, wherein the performing service node authentication on the at least one target service comprises:
verifying a data updating scheduling task corresponding to the service node of the at least one target service;
verifying the number of threads corresponding to the service node of the at least one target service;
and performing benchmark test verification on the at least one target service.
5. The method of claim 4, wherein the verification passes the following condition:
the data updating scheduling task normally runs;
the number of threads is greater than a preset thread number threshold;
the benchmark test passed.
6. The method of claim 1, further comprising, prior to said switching said traffic from said current service to said at least one target service:
performing heartbeat detection on the at least one target service;
and if the at least one target service feeds back response data corresponding to the heartbeat detection, switching from the current service to the at least one target service.
7. The method of claim 2, wherein after obtaining the feedback data, the method further comprises:
and generating early warning information based on the feedback data to remind a target user.
8. A flow switching device based on a multi-activity data center is characterized by comprising:
the service node verification module is used for verifying the service node of at least one target service when receiving a flow switching instruction for switching from the current service to the at least one target service;
the configuration information generation module is used for generating configuration information according to the switching information carried in the switching instruction and uploading the configuration information to a configuration center if the verification is detected to pass;
and the target service switching module is used for switching the flow from the current service to the at least one target service when the configuration information is matched with the switching information.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the multi-activity data center based traffic switching method of any of claims 1-7.
10. A storage medium containing computer executable instructions for performing the multi-activity data center based traffic switching method of any one of claims 1-7 when executed by a computer processor.
CN202011593919.8A 2020-12-29 2020-12-29 Flow switching method, device, equipment and medium based on multi-activity data center Active CN112751782B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011593919.8A CN112751782B (en) 2020-12-29 2020-12-29 Flow switching method, device, equipment and medium based on multi-activity data center

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011593919.8A CN112751782B (en) 2020-12-29 2020-12-29 Flow switching method, device, equipment and medium based on multi-activity data center

Publications (2)

Publication Number Publication Date
CN112751782A true CN112751782A (en) 2021-05-04
CN112751782B CN112751782B (en) 2022-09-30

Family

ID=75646769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011593919.8A Active CN112751782B (en) 2020-12-29 2020-12-29 Flow switching method, device, equipment and medium based on multi-activity data center

Country Status (1)

Country Link
CN (1) CN112751782B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626095A (en) * 2021-06-29 2021-11-09 欧电云信息科技(江苏)有限公司 Switching method and switching system of configuration center, electronic equipment and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020080723A1 (en) * 2000-12-26 2002-06-27 Hoch Thomas A. Apparatus and method for flow path based fault detection and service restoration in a packet based switching system
CN102595492A (en) * 2008-09-22 2012-07-18 中兴通讯股份有限公司 Robust header compression (ROHC) service flow processing method and device based on worldwide interoperability for microwave access (WiMAX) system
CN103188098A (en) * 2011-12-30 2013-07-03 ***通信集团河南有限公司 Method, system and device for disaster recovery switching
US20140359053A1 (en) * 2013-05-29 2014-12-04 International Business Machines Corporation Coordinating Application Migration Processes
US20160164722A1 (en) * 2014-12-04 2016-06-09 Microsoft Technology Licensing, Llc Zero-downtime, reversible, client-driven service migration
CN106130763A (en) * 2016-06-24 2016-11-16 平安科技(深圳)有限公司 Server cluster and be applicable to the database resource group method for handover control of this cluster
CN106506278A (en) * 2016-11-17 2017-03-15 杭州华三通信技术有限公司 A kind of service availability monitoring method and device
CN106973093A (en) * 2017-03-23 2017-07-21 北京奇艺世纪科技有限公司 A kind of service switch method and device
CN107231221A (en) * 2016-03-25 2017-10-03 阿里巴巴集团控股有限公司 Job flow control method, apparatus and system between data center
CN107846294A (en) * 2016-09-19 2018-03-27 北京京东尚科信息技术有限公司 A kind of active and standby service switch method and device
US20190098545A1 (en) * 2016-04-22 2019-03-28 Telefonaktiebolaget Lm Ericsson (Publ) Method and Network Element for Handover of User Plane Traffic
CN109542659A (en) * 2018-11-14 2019-03-29 深圳前海微众银行股份有限公司 Using more activating methods, equipment, data center's cluster and readable storage medium storing program for executing
CN110990200A (en) * 2019-11-26 2020-04-10 苏宁云计算有限公司 Flow switching method and device based on multi-activity data center
CN111277373A (en) * 2020-01-14 2020-06-12 深圳震有科技股份有限公司 Server switching control method, terminal and storage medium
CN111756711A (en) * 2020-06-11 2020-10-09 微医云(杭州)控股有限公司 Flow control method, device, system and storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020080723A1 (en) * 2000-12-26 2002-06-27 Hoch Thomas A. Apparatus and method for flow path based fault detection and service restoration in a packet based switching system
CN102595492A (en) * 2008-09-22 2012-07-18 中兴通讯股份有限公司 Robust header compression (ROHC) service flow processing method and device based on worldwide interoperability for microwave access (WiMAX) system
CN103188098A (en) * 2011-12-30 2013-07-03 ***通信集团河南有限公司 Method, system and device for disaster recovery switching
US20140359053A1 (en) * 2013-05-29 2014-12-04 International Business Machines Corporation Coordinating Application Migration Processes
US20160164722A1 (en) * 2014-12-04 2016-06-09 Microsoft Technology Licensing, Llc Zero-downtime, reversible, client-driven service migration
CN107231221A (en) * 2016-03-25 2017-10-03 阿里巴巴集团控股有限公司 Job flow control method, apparatus and system between data center
US20190098545A1 (en) * 2016-04-22 2019-03-28 Telefonaktiebolaget Lm Ericsson (Publ) Method and Network Element for Handover of User Plane Traffic
CN106130763A (en) * 2016-06-24 2016-11-16 平安科技(深圳)有限公司 Server cluster and be applicable to the database resource group method for handover control of this cluster
CN107846294A (en) * 2016-09-19 2018-03-27 北京京东尚科信息技术有限公司 A kind of active and standby service switch method and device
CN106506278A (en) * 2016-11-17 2017-03-15 杭州华三通信技术有限公司 A kind of service availability monitoring method and device
CN106973093A (en) * 2017-03-23 2017-07-21 北京奇艺世纪科技有限公司 A kind of service switch method and device
CN109542659A (en) * 2018-11-14 2019-03-29 深圳前海微众银行股份有限公司 Using more activating methods, equipment, data center's cluster and readable storage medium storing program for executing
CN110990200A (en) * 2019-11-26 2020-04-10 苏宁云计算有限公司 Flow switching method and device based on multi-activity data center
CN111277373A (en) * 2020-01-14 2020-06-12 深圳震有科技股份有限公司 Server switching control method, terminal and storage medium
CN111756711A (en) * 2020-06-11 2020-10-09 微医云(杭州)控股有限公司 Flow control method, device, system and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626095A (en) * 2021-06-29 2021-11-09 欧电云信息科技(江苏)有限公司 Switching method and switching system of configuration center, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112751782B (en) 2022-09-30

Similar Documents

Publication Publication Date Title
CN108681565B (en) Block chain data parallel processing method, device, equipment and storage medium
CN111880826A (en) Cloud service application upgrading method and device, electronic equipment and storage medium
CN111796978B (en) Interface detection method, device, system, equipment and storage medium
CN113064748B (en) Process succession method, device, electronic equipment and storage medium
CN110851471A (en) Distributed log data processing method, device and system
CN112363753A (en) Data verification method and device, electronic equipment and storage medium
CN107783844A (en) A kind of computer program operation exception detection method, device and medium
CN110502399B (en) Fault detection method and device
CN112751782B (en) Flow switching method, device, equipment and medium based on multi-activity data center
CN111581077A (en) Intelligent contract testing method and device
CN111694684A (en) Abnormal construction method and device of storage equipment, electronic equipment and storage medium
CN112713964B (en) Data verification acceleration method and device, computer equipment and storage medium
CN111694724B (en) Test method and device of distributed form system, electronic equipment and storage medium
CN117499412A (en) Cluster optimization processing method based on high-availability link and related equipment thereof
CN110134419B (en) System upgrading method, device, equipment and storage medium for double-sided cabinet
CN111966461A (en) Virtual machine cluster node guarding method, device, equipment and storage medium
CN114579473B (en) Application testing method, device, equipment and storage medium
CN110708203A (en) Fault tolerance method, device and equipment
CN112818204B (en) Service processing method, device, equipment and storage medium
CN115099670A (en) Battery replacement station management method and device, electronic equipment and storage medium
CN111124455B (en) Battery management system upgrading method, device, server and storage medium
CN114036218A (en) Data model switching method and device, server and storage medium
CN114489667A (en) Script generation method and device, electronic equipment and storage medium
CN111475400A (en) Verification method of service platform and related equipment
CN112328423A (en) Processing method, device and storage medium for search service loophole

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