WO2022116428A1 - End-to-end active-active method, apparatus and device, and storage medium - Google Patents

End-to-end active-active method, apparatus and device, and storage medium Download PDF

Info

Publication number
WO2022116428A1
WO2022116428A1 PCT/CN2021/083256 CN2021083256W WO2022116428A1 WO 2022116428 A1 WO2022116428 A1 WO 2022116428A1 CN 2021083256 W CN2021083256 W CN 2021083256W WO 2022116428 A1 WO2022116428 A1 WO 2022116428A1
Authority
WO
WIPO (PCT)
Prior art keywords
switching
active
data center
application component
calling
Prior art date
Application number
PCT/CN2021/083256
Other languages
French (fr)
Chinese (zh)
Inventor
全志松
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022116428A1 publication Critical patent/WO2022116428A1/en

Links

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present application relates to the field of cloud deployment technologies, and in particular, to an end-to-end active-active method, apparatus, device, and storage medium.
  • an end-to-end active-active solution is proposed.
  • the inventor realized that the common end-to-end active-active solution is actually an active-active solution for each single-application component.
  • different operators perform active-active operations on the single-application components respectively, resulting in the personnel involved in the operation.
  • the end-to-end active-active solution has problems of low handover efficiency and inability to guarantee handover effectiveness.
  • One of the purposes of the embodiments of the present application is to provide an end-to-end active-active method, apparatus, device, and storage medium, so as to solve the problem of low switching efficiency and unguaranteed switching caused by operations involving many operators in the prior art The question of switching validity.
  • a first aspect of the embodiments of the present application provides an end-to-end active-active method, including:
  • the invocation tasks corresponding to the switching strategy are respectively delivered to the asynchronous invocation tool;
  • the switching interfaces corresponding to the switching policies are respectively called, and each target application component is switched based on the switching interfaces.
  • Terminal active-active application components are respectively called, and each target application component is switched based on the switching interfaces.
  • the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display.
  • a second aspect of the embodiments of the present application provides an end-to-end active-active device, including:
  • the loading module is used to load and display the end-to-end switching operation interface in response to the end-to-end switching request triggered by the user;
  • a delivery module configured to respectively deliver the calling tasks corresponding to the switching strategy to the asynchronous calling tool in response to the instruction that carries the switching strategy generated by the user based on the end-to-end switching operation interface;
  • the switching module is used to respectively call the switching interface corresponding to the switching strategy in the asynchronous calling tool, and switch each target application component based on each of the switching interfaces, where the target application component is included in the switching strategy.
  • the display module is used for splicing the switching interface and the return result of calling the switching interface into a character string in a preset format for any one of the switching interfaces for display.
  • a third aspect of the embodiments of the present application provides an end-to-end active-active device, including a memory, a processor, and a computer program stored in the memory and executable on the end-to-end active-active device, where the computer can The following steps are implemented when the read instruction is executed by the processor:
  • the invocation tasks corresponding to the switching strategy are respectively delivered to the asynchronous invocation tool;
  • the switching interfaces corresponding to the switching policies are respectively called, and each target application component is switched based on the switching interfaces.
  • Terminal active-active application components are respectively called, and each target application component is switched based on the switching interfaces.
  • the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display.
  • a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program is executed by a processor as follows:
  • the invocation tasks corresponding to the switching strategy are respectively delivered to the asynchronous invocation tool;
  • the switching interfaces corresponding to the switching policies are respectively called, and each target application component is switched based on the switching interfaces.
  • Terminal active-active application components are respectively called, and each target application component is switched based on the switching interfaces.
  • the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display.
  • the end-to-end active-active method provided by the embodiment of the present application is that, compared with the prior art, the calling task corresponding to the switching strategy is delivered to an asynchronous calling tool; switching interface; switching the active-active application components of the end-to-end communication link based on the switching interface, and storing the switching result in an open source database; respectively obtaining the return result of calling the switching interface by the asynchronous calling tool,
  • the switching interface and the return result of calling each of the switching interfaces are respectively spliced into character strings in a preset format for display.
  • FIG. 1 is a schematic structural diagram of an end-to-end active-active system provided by a first embodiment of the present application
  • FIG. 2 is a schematic flowchart of an end-to-end active-active method provided by a second embodiment of the present application
  • Fig. 3 is the realization flow chart of the end-to-end active-active method provided by the third embodiment of the present application.
  • FIG. 4 is an implementation flowchart of the end-to-end active-active method provided by the fourth embodiment of the present application.
  • FIG. 5 is a structural block diagram of an end-to-end active-active device provided by a fifth embodiment of the present application.
  • FIG. 6 is a structural block diagram of an end-to-end active-active device provided by a sixth embodiment of the present application.
  • the application-layer active-active method involved in the embodiments of the present application may be executed by an application-layer active-active device.
  • the application layer active-active device includes but is not limited to a single server or a cloud server cluster, etc., which is not specifically limited here.
  • the end-to-end active-active method involved in the embodiments of the present application is applied to disaster recovery scenarios of enterprises.
  • the enterprise requires the business system to be protected from human misoperations, malicious attacks, natural disasters, and other emergencies.
  • the active-active solution is used to ensure business continuity.
  • the end-to-end active-active refers to the various application component layers involved in the entire communication link, such as the network layer, application layer, database layer and storage layer, etc., will provide relevant switching solutions and systems for disasters. Quickly switch the system through operation, realize traffic transfer, achieve fault avoidance and rapid recovery.
  • FIG. 1 is a schematic structural diagram of an end-to-end active-active system provided by a first embodiment of the present application.
  • the end-to-end active-active system 100 provided in this embodiment of the present application includes a first data center 101 , a second data center 102 , and an end-to-end active-active device 103 .
  • the first data center 101 is a pre-deployed main data center
  • the second data center 102 is a pre-deployed standby data center
  • the end-to-end active-active device 103 is a configured single server or server cluster.
  • the first data center 101 and the second data center 102 are pre-built by application operation and maintenance personnel when the application is deployed and launched.
  • the first data center 101 and the second data center 102 can simultaneously provide external services, and both the first data center 101 and the second data center 102 are connected in communication with the end-to-end active-active device 103,
  • the end-to-end active-active device 103 is configured to deliver the invocation task corresponding to the handover policy to the asynchronous invocation tool; invoke the handover interface corresponding to the handover policy in the asynchronous invocation tool;
  • the faulty application components involved in the link are switched from the first data center 101 to the second data center 102, and the switching result is stored in the open source database; respectively obtain the asynchronous calling tool to call the switching
  • For the return result of the interface each of the switching interfaces and the return results of calling each of the switching interfaces are spliced into character strings in a preset format for display.
  • FIG. 2 is a schematic flowchart of the end-to-end active-active method provided by the second embodiment of the present application.
  • the end-to-end active-active method provided by this embodiment includes S21 to S24. Details are as follows:
  • the end user may send an end-to-end switching request to the end-to-end dual-active device, and the end-to-end dual-active device loads and displays an end-to-end switching operation interface after receiving the switching request.
  • the end-to-end switching operation interface includes a first area for the user to customize the switching strategy and a second area for the user to select a switching template;
  • the first area includes a first area for the user to select the application component name.
  • the The second area includes a third selection item for the user to select the name of the switching template or a third input box for the user to input the name of the switching template.
  • the end-to-end switching operation interface may further include an OK button. After the user completes the custom switching strategy through the first area or selects a completed switching template through the second area, the user can click the OK button to complete the switching template. Trigger an end-to-end handover instruction.
  • the switching strategy includes the name of the application components to be switched and the switching sequence of each application component; for example, the switching strategy includes the application layer and the database layer of the application system A, and the switching between the application layer and the database layer.
  • the sequence is to switch the application layer first, and then switch the database layer.
  • the switching sequence of each application component may be represented by a sequence number.
  • the switching sequence of the application layer is denoted as 1
  • the switching sequence of the database layer is denoted as 2.
  • S23 Invoke the switching interface corresponding to the switching strategy in the asynchronous calling tool, and switch each target application component based on each switching interface, where the target application component is a preconfigured component included in the switching strategy. End-to-end active-active application components.
  • the asynchronous invocation tool includes a distributed asynchronous invocation tool cerely; in this embodiment, in the asynchronous invocation tool, the switching interfaces corresponding to the switching policies are respectively called, and based on each of the switching interfaces, each The target application components are switched respectively, which may include: sending the task of invoking the switching interface corresponding to the switching policy to the distributed asynchronous invocation tool cerely respectively, and in the distributed asynchronous invocation tool cerely, respectively calling each The switching interface is used to switch each of the target application components respectively.
  • the switching interface is designed and developed uniformly through restful, and is defined in xml format based on http or defined in json format based on http; the switching interface is pre-packaged in a preset programming language, such as python language, respectively. on a data center and a second data center.
  • the string in the preset format may be a string in json format, for example, for the switching interface of the application layer, the return result is "succuess", which corresponds to the switching interface of the application layer and the switching interface that calls the application layer.
  • the result returned by the interface is spliced into a string in json format to obtain a key-value data format, such as "application layer: success”.
  • the end-to-end active-active method delivers the invocation task corresponding to the handover policy to the asynchronous invocation tool; the handover interface corresponding to the handover policy is invoked in the asynchronous invocation tool;
  • the switching interface switches the active-active application components of the end-to-end communication link, and stores the switching results in the open source database; respectively obtains the return results of the asynchronous calling tool calling the switching interface, and compares each switching interface with the calling
  • the return results of each of the switching interfaces are respectively spliced into character strings in a preset format for display.
  • FIG. 3 is an implementation flowchart of the end-to-end active-active method provided by the third embodiment of the present application. It should be noted that, compared with the end-to-end active-active method provided in this embodiment, the specific implementation processes of S32 to S35 and S21 to S24 are the same, and the difference is that in S32 also includes S31 before S32, and S51 and S52 are in a sequential execution relationship. Details are as follows:
  • each application component of the end-to-end communication link preconfigure each application component of the end-to-end communication link to be active-active in a first data center and a second data center, wherein the first data center is the main data center, and the second data center is the standby data center , both the first data center and the second data center provide data services for each application component of the end-to-end communication link.
  • the first data center and the second data center may be pre-built by operation and maintenance personnel, and both the first data center and the second data center are applications of end-to-end communication links.
  • Component data services may be provided.
  • both the first data center and the second data center may provide data services for application components of end-to-end communication links such as an application layer, a network layer, a database layer, and a storage layer.
  • pre-configuring each application component of the end-to-end communication link to be active-active in the first data center and the second data center may include: separately simulating http requests or user requests, sending requests to the first data center and the second data center respectively.
  • the second data center sends a service request, and determines the service status of the first data center and the second data center according to the response results returned by the first data center and the second data center; If the service states of the first data center and the second data center are both normal, it is determined that each application component that completes the configuration of the end-to-end communication link is active-active in the first data center and the second data center; if the first data center and the second data center are both active If the service states of the data center and the second data center are abnormal, operation and maintenance personnel need to re-build until the service states of the first data center and the second data center are normal.
  • the end-to-end active-active method can deliver the calling task corresponding to the switching policy to the asynchronous calling tool; switching interface corresponding to the switching strategy; switching the active-active application components of the end-to-end communication link based on the switching interface, and storing the switching result in the open source database; respectively obtaining the return result of the asynchronous calling tool calling the switching interface,
  • Each of the switching interfaces and the return results of calling each of the switching interfaces are spliced into character strings in a preset format for display.
  • FIG. 4 is an implementation flowchart of the end-to-end active-active method provided by the fourth embodiment of the present application. It should be noted that, compared with the end-to-end active-active method provided in this embodiment, the specific implementation processes of S41 and S31 and S43 to S46 and S32 to S35 are the same. The point is that S42 is also included after S41, and S42 and S43 are in a sequential execution relationship. Details are as follows:
  • the data service center of the application component is switched from the first data center to the second data center based on the preset switching port verification of the application component.
  • the switching state of the data center includes: sending a request to access the application component to the first data center; calling the switching port of the application component after receiving the access state data returned by the first data center; receiving and calling the application component
  • the calling result of the switching port of the application component, and the switching state of the application component is determined according to the calling result; if it is displayed that the traffic of the application component is normally switched to the second data center according to the switching state, the data of the application component is determined.
  • the data service center cannot be switched from the first data center to the second data center normally.
  • S45 Invoke the switching interface corresponding to the switching strategy in the asynchronous calling tool, and switch each target application component based on each switching interface, where the target application component is a preconfigured component included in the switching strategy. End-to-end active-active application components.
  • the end-to-end active-active method compared with the prior art, delivers the invocation task corresponding to the handover policy to the asynchronous invocation tool; invokes the handover interface corresponding to the handover policy in the asynchronous invocation tool;
  • the active-active application components of the end-to-end communication link are switched, and the switching results are stored in the open-source database; the return results of calling the switching interfaces by the asynchronous calling tools are respectively obtained, and the switching interfaces and the switching interfaces are respectively called.
  • the returned results of the interface are spliced into strings of preset formats for display.
  • FIG. 5 is a structural block diagram of an end-to-end active-active device provided by a fifth embodiment of the present application.
  • the modules included in the end-to-end active-active device in this embodiment are used to execute the steps in any of the embodiments in FIG. 2 to FIG. 4 .
  • the end-to-end active-active device 50 includes: including:
  • the loading module 51 is configured to load and display the end-to-end handover operation interface in response to the end-to-end handover request triggered by the user.
  • the issuing module 52 is configured to, in response to the instruction carrying the handover strategy generated by the user based on the end-to-end handover operation interface, respectively dispatch the invocation tasks corresponding to the handover strategy to the asynchronous invocation tool.
  • the switching module 53 is configured to respectively call the switching interface corresponding to the switching strategy in the asynchronous calling tool, and switch each target application component based on each of the switching interfaces, where the target application component is the switching strategy including: pre-configured end-to-end active-active application components.
  • the display module 54 is configured to, for any one of the switching interfaces, splicing the switching interface and the return result of calling the switching interface into a character string in a preset format for display.
  • the configuration module is used to preconfigure each application component of the end-to-end communication link to be active-active in the first data center and the second data center, wherein the first data center is the main data center, and the second data center is A backup data center, both the first data center and the second data center provide data services for each application component of the end-to-end communication link.
  • the verification module is configured to, for any application component of the end-to-end communication link, verify that the application component data service center is switched from the first data center to the first data center based on the preset switching port of the application component. The switching state of the second data center.
  • the end-to-end switching operation interface includes a first area for the user to customize the switching strategy and a second area for the user to select a switching template;
  • the first area includes a user to select The first selection item of the application component name or the first input box for the user to input the application component name, the second selection item for the user to select the switching order of each application component or the second selection item for the user to input the switching order of each application component.
  • the second area includes a third option for the user to select the name of the switching template or a third input box for the user to input the name of the switching template.
  • the asynchronous invocation tool includes a distributed asynchronous invocation tool cerely; the switching module 53 is specifically used for:
  • the task of calling the switching interface corresponding to the switching strategy is respectively delivered to the distributed asynchronous calling tool cerely, and the switching interfaces are called respectively in the distributed asynchronous calling tool cerely, and each of the target applications is called. Components are switched individually.
  • the storage module is used for respectively storing the results of calling each of the switching interfaces in the distributed database redis.
  • the display module 54 includes:
  • an acquisition unit configured to asynchronously acquire the call results of each of the switching interfaces from the redis based on the asynchronous calling tool cerely;
  • the display unit is configured to, for any one of the switching interfaces, splicing the switching interface and the calling result of the switching interface into a character string in a preset format for display.
  • each module is used to execute each step in any one of the embodiments in FIG. 2 to FIG.
  • the steps in the embodiments of FIG. 2 have been explained in detail in the above-mentioned embodiments.
  • FIG. 6 is a structural block diagram of an end-to-end active-active device provided by a sixth embodiment of the present application.
  • the end-to-end active-active device 60 in this embodiment includes: a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61, such as an end-to-end active-active device 63.
  • End-to-end active-active program When the processor 61 executes the computer program 63, the steps in each of the foregoing embodiments of the end-to-end active-active method are implemented, for example, S21 to S24 shown in FIG. 2 .
  • the processor 61 executes the computer program 63 the functions of each module or unit in the embodiment corresponding to FIG. 5 are implemented, for example, the functions of the modules 51 to 54 shown in FIG. The relevant descriptions in the embodiments are not repeated here.
  • the computer program 63 may be divided into one or more units, and the one or more units are stored in the memory 62 and executed by the processor 61 to complete the present application.
  • the one or more units may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program 63 in the end-to-end dual-active device 60 .
  • the computer program 63 can be divided into a loading module, a sending module, a switching module, and a display module; the specific functions of each module are described in FIG. 5 .
  • the end-to-end active-active device may include, but is not limited to, a processor 61 and a memory 62 .
  • FIG. 6 is only an example of the end-to-end active-active device 60, and does not constitute a limitation on the end-to-end active-active device 60, and may include more or less components than those shown, or combinations thereof
  • Certain components, or different components, such as the turntable device may also include input and output devices, network access devices, buses, and the like.
  • the so-called processor 61 may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the storage 62 may be an internal storage unit of the end-to-end active-active device 60 , such as a hard disk or a memory of the end-to-end active-active device 60 .
  • the memory 62 may also be an external storage device of the end-to-end active-active device 60, such as a pluggable hard disk or a smart memory card (Smart Media Card, SMC) equipped on the end-to-end active-active device 60, Secure Digital (SD) card, Flash Card, etc.
  • the memory 62 may also include both an internal storage unit of the end-to-end dual-active device 60 and an external storage device.
  • the memory 62 is used for storing the computer program and other programs and data required by the end-to-end active-active device 60 .
  • the memory 62 may also be used to temporarily store data that has been output or is to be output.
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, the computer program includes program instructions, and the method implemented when the program instructions are executed may refer to this document Various embodiments of the end-to-end active-active method are applied.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable storage medium may be an internal storage unit of the electronic device described in the foregoing embodiments, such as a hard disk or a memory of the electronic device.
  • the computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the electronic device ) card, flash card (Flash Card) and so on.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Telephonic Communication Services (AREA)
  • Stored Programmes (AREA)

Abstract

An end-to-end active-active method, apparatus and device, and a storage medium. The method comprises: issuing a calling task corresponding to a switching policy to an asynchronous calling tool; calling, from the asynchronous calling tool, a switching interface corresponding to the switching policy; switching an active-active application component of an end-to-end communication link on the basis of the switching interface, and storing a switching result in an open source database; and respectively acquiring a returned result of the asynchronous calling tool calling the switching interface, and respectively combining each switching interface and the returned result of calling each switching interface so as to form a character string in a preset format, and displaying the character string. The parallel issuing of a plurality of tasks can be realized by means of an asynchronous calling tool, and a switching process of application components in a communication link is visually displayed, such that non-blocking efficient switching of an end-to-end communication link can be realized, thereby ensuring the effectiveness of an end-to-end active-active scheme while improving the switching efficiency.

Description

端到端双活方法、装置、设备及存储介质End-to-end active-active method, device, device and storage medium
本申请要求于2020年12月03日提交中国专利局、申请号为202011396261.1、发明名称为“端到端双活方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on December 03, 2020 with the application number 202011396261.1 and the title of the invention is "end-to-end active-active method, device, device and storage medium", the entire content of which is approved by Reference is incorporated in this application.
技术领域technical field
本申请涉及云部署技术领域,尤其涉及一种端到端双活方法、装置、设备及存储介质。The present application relates to the field of cloud deployment technologies, and in particular, to an end-to-end active-active method, apparatus, device, and storage medium.
背景技术Background technique
目前,为了保证端到端通信链路在灾难发生时,能够快速通过操作切换系统,实现流量转移,达到故障规避及快速恢复,提出了端到端双活方案。但是发明人意识到,常见的端到端双活方案,其实是分别针对各单应用组件的双活方案,一般是通过不同的操作人员分别对单应用组件进行双活操作,导致操作涉及的人员众多,管理困难,往往更多的时间在于沟通协调上。At present, in order to ensure that the end-to-end communication link can quickly operate the switching system in the event of a disaster to realize traffic transfer, achieve fault avoidance and rapid recovery, an end-to-end active-active solution is proposed. However, the inventor realized that the common end-to-end active-active solution is actually an active-active solution for each single-application component. Generally, different operators perform active-active operations on the single-application components respectively, resulting in the personnel involved in the operation. Many, difficult to manage, often more time on communication and coordination.
因此,现有技术针对端到端的双活方案存在切换效率低下且无法保证切换有效性的问题。Therefore, in the prior art, the end-to-end active-active solution has problems of low handover efficiency and inability to guarantee handover effectiveness.
技术问题technical problem
本申请实施例的目的之一在于:提供了一种端到端双活方法、装置、设备及存储介质,以解决现有技术中由于涉及众多操作人员的操作而导致的切换效率低下且无法保证切换有效性的问题。One of the purposes of the embodiments of the present application is to provide an end-to-end active-active method, apparatus, device, and storage medium, so as to solve the problem of low switching efficiency and unguaranteed switching caused by operations involving many operators in the prior art The question of switching validity.
技术解决方案technical solutions
为解决上述技术问题,本申请实施例采用的技术方案是:In order to solve the above-mentioned technical problems, the technical solutions adopted in the embodiments of the present application are:
本申请实施例第一方面提供了一种端到端双活方法,包括:A first aspect of the embodiments of the present application provides an end-to-end active-active method, including:
响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面;In response to the end-to-end switching request triggered by the user, load and display the end-to-end switching operation interface;
响应于用户基于所述端到端切换操作界面生成的携带有切换策略的指令,将所述切换策略对应的调用任务分别下发到异步调用工具中;In response to the instruction carrying the switching strategy generated by the user based on the end-to-end switching operation interface, the invocation tasks corresponding to the switching strategy are respectively delivered to the asynchronous invocation tool;
在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,所述目标应用组件为所述切换策略包括的预先配置的端到端双活应用组件;In the asynchronous invocation tool, the switching interfaces corresponding to the switching policies are respectively called, and each target application component is switched based on the switching interfaces. Terminal active-active application components;
针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示。For any one of the switching interfaces, the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display.
本申请实施例第二方面提供了一种端到端双活装置,包括:A second aspect of the embodiments of the present application provides an end-to-end active-active device, including:
加载模块,用于响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面;The loading module is used to load and display the end-to-end switching operation interface in response to the end-to-end switching request triggered by the user;
下发模块,用于响应于用户基于所述端到端切换操作界面生成的携带有切换策略的指令,将所述切换策略对应的调用任务分别下发到异步调用工具中;a delivery module, configured to respectively deliver the calling tasks corresponding to the switching strategy to the asynchronous calling tool in response to the instruction that carries the switching strategy generated by the user based on the end-to-end switching operation interface;
切换模块,用于在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,所述目标应用组件为所述切换策略包括的预先配置的端到端双活应用组件;The switching module is used to respectively call the switching interface corresponding to the switching strategy in the asynchronous calling tool, and switch each target application component based on each of the switching interfaces, where the target application component is included in the switching strategy. Pre-configured end-to-end active-active application components;
显示模块,用于针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示。The display module is used for splicing the switching interface and the return result of calling the switching interface into a character string in a preset format for any one of the switching interfaces for display.
本申请实施例第三方面提供一种端到端双活设备,包括存储器、处理器以及存储在所述存储器中并可在所述端到端双活设备上运行的计算机程序,所述计算机可读指令被处理器执行时实现如下步骤:A third aspect of the embodiments of the present application provides an end-to-end active-active device, including a memory, a processor, and a computer program stored in the memory and executable on the end-to-end active-active device, where the computer can The following steps are implemented when the read instruction is executed by the processor:
响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面;In response to the end-to-end switching request triggered by the user, load and display the end-to-end switching operation interface;
响应于用户基于所述端到端切换操作界面生成的携带有切换策略的指令,将所述切换策略对应的调用任务分别下发到异步调用工具中;In response to the instruction carrying the switching strategy generated by the user based on the end-to-end switching operation interface, the invocation tasks corresponding to the switching strategy are respectively delivered to the asynchronous invocation tool;
在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,所述目标应用组件为所述切换策略包括的预先配置的端到端双活应用组件;In the asynchronous invocation tool, the switching interfaces corresponding to the switching policies are respectively called, and each target application component is switched based on the switching interfaces. Terminal active-active application components;
针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示。For any one of the switching interfaces, the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display.
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行如下步骤:A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program is executed by a processor as follows:
响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面;In response to the end-to-end switching request triggered by the user, load and display the end-to-end switching operation interface;
响应于用户基于所述端到端切换操作界面生成的携带有切换策略的指令,将所述切换策略对应的调用任务分别下发到异步调用工具中;In response to the instruction carrying the switching strategy generated by the user based on the end-to-end switching operation interface, the invocation tasks corresponding to the switching strategy are respectively delivered to the asynchronous invocation tool;
在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,所述目标应用组件为所述切换策略包括的预先配置的端到端双活应用组件;In the asynchronous invocation tool, the switching interfaces corresponding to the switching policies are respectively called, and each target application component is switched based on the switching interfaces. Terminal active-active application components;
针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示。For any one of the switching interfaces, the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display.
有益效果beneficial effect
本申请实施例提供的一种端到端双活方法,与现有技术相比,通过将切换策略对应的调用任务下发到异步调用工具中;在所述异步调用工具中调用切换策略对应的切换接口;基于切换接口对端到端通信链路的双活应用组件进行切换,将切换结果存储至开源数据库中;分别获取所述异步调用工具调用所述切换接口的返回结果,将各个所述切换接口和调用各个所述切换接口的返回结果分别拼接为预设格式的字符串进行显示。能够通过异步调用工具实现多任务的并行下发,并将通信链路中各应用组件的切换过程进行可视化显示,可以实现端到端通信链路的非阻塞高效切换,提高切换效率的同时保证了端到端双活方案的有效性。Compared with the prior art, the end-to-end active-active method provided by the embodiment of the present application is that, compared with the prior art, the calling task corresponding to the switching strategy is delivered to an asynchronous calling tool; switching interface; switching the active-active application components of the end-to-end communication link based on the switching interface, and storing the switching result in an open source database; respectively obtaining the return result of calling the switching interface by the asynchronous calling tool, The switching interface and the return result of calling each of the switching interfaces are respectively spliced into character strings in a preset format for display. It can realize the parallel delivery of multiple tasks through asynchronous calling tools, and visualize the switching process of each application component in the communication link, which can realize the non-blocking and efficient switching of the end-to-end communication link, improve the switching efficiency while ensuring Effectiveness of the end-to-end active-active solution.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only for the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本申请第一实施例提供的端到端双活系统的结构示意图;FIG. 1 is a schematic structural diagram of an end-to-end active-active system provided by a first embodiment of the present application;
图2是本申请第二实施例提供的端到端双活方法的流程示意图;2 is a schematic flowchart of an end-to-end active-active method provided by a second embodiment of the present application;
图3是本申请第三实施例提供的端到端双活方法的实现流程图;Fig. 3 is the realization flow chart of the end-to-end active-active method provided by the third embodiment of the present application;
图4是本申请第四实施例提供的端到端双活方法的实现流程图;FIG. 4 is an implementation flowchart of the end-to-end active-active method provided by the fourth embodiment of the present application;
图5是本申请第五实施例提供的端到端双活装置的结构框图;5 is a structural block diagram of an end-to-end active-active device provided by a fifth embodiment of the present application;
图6是本申请第六实施例提供的端到端双活设备的结构框图。FIG. 6 is a structural block diagram of an end-to-end active-active device provided by a sixth embodiment of the present application.
本发明的实施方式Embodiments of the present invention
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
本申请实施例所涉及的应用层双活方法,可以由应用层双活设备执行。所述应用层双活设备包括但不限于单个服务器或者云服务器集群等,在此不做具体限定。The application-layer active-active method involved in the embodiments of the present application may be executed by an application-layer active-active device. The application layer active-active device includes but is not limited to a single server or a cloud server cluster, etc., which is not specifically limited here.
本申请实施例所涉及的端到端双活方法,应用于企业的灾备场景中,例如企业出于对业务更高级别的保护,要求业务系统在人为误操作、恶意攻击、自然灾害等突发事件之后还能够继续提供服务的场景中,采用双活方案来保证业务的连续性。而端到端双活指的是整个通信链路所涉及的各个应用组件层,例如网络层、应用层、数据库层和存储层等都会提供相关的切换方案和系统,以供灾难发生时,能够快速通过操作切换系统,实现流量转移,达到故障规避以及快速恢复。The end-to-end active-active method involved in the embodiments of the present application is applied to disaster recovery scenarios of enterprises. For example, for higher-level protection of services, the enterprise requires the business system to be protected from human misoperations, malicious attacks, natural disasters, and other emergencies. In scenarios where services can continue to be provided after an event occurs, the active-active solution is used to ensure business continuity. The end-to-end active-active refers to the various application component layers involved in the entire communication link, such as the network layer, application layer, database layer and storage layer, etc., will provide relevant switching solutions and systems for disasters. Quickly switch the system through operation, realize traffic transfer, achieve fault avoidance and rapid recovery.
下面具体结合附图,对本申请实施例提供的端到端双活原理及应用场景进行示例性的说明。The following is an exemplary description of the end-to-end active-active principle and application scenarios provided by the embodiments of the present application with reference to the accompanying drawings.
如图1所示,图1是本申请第一实施例提供的端到端双活系统的结构示意图。如图1可知,本申请实施例提供的端到端双活系统100包括第一数据中心101、第二数据中心102和端到端双活设备103。示例性地,第一数据中心101为预先部署的主数据中心,第二数据中心102为预先部署的备数据中心,端到端双活设备103为配置的单个服务器或者服务器集群。具体地,所述第一数据中心101和所述第二数据中心102由应用运维人员在应用部署上线时,预先搭建完成。所述第一数据中心101和所述第二数据中心102可以同时对外提供服务,所述第一数据中心101和所述第二数据中心102均与所述端到端双活设备103通信连接,所述端到端双活设备103用于通过将切换策略对应的调用任务下发到异步调用工具中;在所述异步调用工具中调用切换策略对应的切换接口;基于切换接口对端到端通信链路所涉及的具有故障的应用组件从所述第一数据中心101进行切换,切换至第二数据中心102,并将切换结果存储至开源数据库中;分别获取所述异步调用工具调用所述切换接口的返回结果,将各个所述切换接口和调用各个所述切换接口的返回结果分别拼接为预设格式的字符串进行显示。能够通过异步调用工具实现多任务的并行下发,并将通信链路中各应用组件的切换过程进行可视化显示,可以实现端到端通信链路的非阻塞高效切换,提高切换效率的同时保证了端到端双活方案的有效性。As shown in FIG. 1 , FIG. 1 is a schematic structural diagram of an end-to-end active-active system provided by a first embodiment of the present application. As can be seen from FIG. 1 , the end-to-end active-active system 100 provided in this embodiment of the present application includes a first data center 101 , a second data center 102 , and an end-to-end active-active device 103 . Exemplarily, the first data center 101 is a pre-deployed main data center, the second data center 102 is a pre-deployed standby data center, and the end-to-end active-active device 103 is a configured single server or server cluster. Specifically, the first data center 101 and the second data center 102 are pre-built by application operation and maintenance personnel when the application is deployed and launched. The first data center 101 and the second data center 102 can simultaneously provide external services, and both the first data center 101 and the second data center 102 are connected in communication with the end-to-end active-active device 103, The end-to-end active-active device 103 is configured to deliver the invocation task corresponding to the handover policy to the asynchronous invocation tool; invoke the handover interface corresponding to the handover policy in the asynchronous invocation tool; The faulty application components involved in the link are switched from the first data center 101 to the second data center 102, and the switching result is stored in the open source database; respectively obtain the asynchronous calling tool to call the switching For the return result of the interface, each of the switching interfaces and the return results of calling each of the switching interfaces are spliced into character strings in a preset format for display. It can realize the parallel delivery of multiple tasks through asynchronous calling tools, and visualize the switching process of each application component in the communication link, which can realize the non-blocking and efficient switching of the end-to-end communication link, improve the switching efficiency while ensuring Effectiveness of the end-to-end active-active solution.
如图2所示,图2是本申请第二实施例提供的端到端双活方法的流程示意图。如图2所述,本实施例提供的端到端双活方法包括S21至S24。详述如下:As shown in FIG. 2 , FIG. 2 is a schematic flowchart of the end-to-end active-active method provided by the second embodiment of the present application. As shown in FIG. 2 , the end-to-end active-active method provided by this embodiment includes S21 to S24. Details are as follows:
S21,响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面。S21, in response to an end-to-end handover request triggered by a user, load and display an end-to-end handover operation interface.
在本申请的实施例中,终端用户可以向端到端双活设备发送端到端切换请求,端到端双活设备在接收到所述切换请求后,加载并显示端到端切换操作界面。In the embodiment of the present application, the end user may send an end-to-end switching request to the end-to-end dual-active device, and the end-to-end dual-active device loads and displays an end-to-end switching operation interface after receiving the switching request.
示例性地,所述端到端切换操作界面包括用于供用户自定义切换策略的第一区域和供用户选择切换模板的第二区域;所述第一区域包括供用户选择应用组件名的第一选择项或者供用户输入应用组件名的第一输入框,用于供用户选择各应用组件的切换顺序的第二选择项或者供用户输入各应用组件的切换顺序的第二输入框;所述第二区域包括供用户选择切换模板名称的第三选择项或者供用户输入切换模板名称的第三输入框。Exemplarily, the end-to-end switching operation interface includes a first area for the user to customize the switching strategy and a second area for the user to select a switching template; the first area includes a first area for the user to select the application component name. an option or a first input box for the user to input the name of the application components, a second option for the user to select the switching sequence of each application component or a second input box for the user to input the switching sequence of each application component; the The second area includes a third selection item for the user to select the name of the switching template or a third input box for the user to input the name of the switching template.
此外,所述端到端切换操作界面还可以包括确定按钮,用户通过所述第一区域完成所述自定义切换策略或者通过所述第二区域选择完成切换模板后,通过点击所述确定按钮可以触发端到端切换指令。In addition, the end-to-end switching operation interface may further include an OK button. After the user completes the custom switching strategy through the first area or selects a completed switching template through the second area, the user can click the OK button to complete the switching template. Trigger an end-to-end handover instruction.
S22,响应于用户基于所述端到端切换操作界面生成的携带有切换策略的指令,将所述切换策略对应的调用任务分别下发到异步调用工具中。S22, in response to the instruction carrying the switching policy generated by the user based on the end-to-end switching operation interface, respectively delivering the invocation tasks corresponding to the switching policy to the asynchronous invocation tool.
示例性地,所述切换策略包括需切换的应用组件名以及各应用组件的切换顺序;例如所述切换策略包括应用系统A的应用层和数据库层,所述应用层和所述数据库层的切换顺序为先切换应用层,再切换数据库层。其中,各应用组件的切换顺序可以通过排列序号进行表示,例如,在本实施例中,所述应用层的切换顺序记为1,所述数据库层的切换顺序记为2。Exemplarily, the switching strategy includes the name of the application components to be switched and the switching sequence of each application component; for example, the switching strategy includes the application layer and the database layer of the application system A, and the switching between the application layer and the database layer. The sequence is to switch the application layer first, and then switch the database layer. The switching sequence of each application component may be represented by a sequence number. For example, in this embodiment, the switching sequence of the application layer is denoted as 1, and the switching sequence of the database layer is denoted as 2.
S23,在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,所述目标应用组件为所述切换策略包括的预先配置的端到端双活应用组件。S23: Invoke the switching interface corresponding to the switching strategy in the asynchronous calling tool, and switch each target application component based on each switching interface, where the target application component is a preconfigured component included in the switching strategy. End-to-end active-active application components.
示例性地,所述异步调用工具为包括分布式异步调用工具cerely;在本实施例中,在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,可以包括:将调用所述切换策略对应的切换接口的任务分别下发到所述分布式异步调用工具cerely中,在所述分布式异步调用工具cerely中分别调用各个所述切换接口,对各个所述目标应用组件分别进行切换。Exemplarily, the asynchronous invocation tool includes a distributed asynchronous invocation tool cerely; in this embodiment, in the asynchronous invocation tool, the switching interfaces corresponding to the switching policies are respectively called, and based on each of the switching interfaces, each The target application components are switched respectively, which may include: sending the task of invoking the switching interface corresponding to the switching policy to the distributed asynchronous invocation tool cerely respectively, and in the distributed asynchronous invocation tool cerely, respectively calling each The switching interface is used to switch each of the target application components respectively.
此外,所述切换接口为通过restful统一设计和开发的,基于http得xml格式定义或基于http得json格式定义的接口;所述切换接口预先通过预设的编程语言,例如python语言分别封装在第一数据中心和第二数据中心上。In addition, the switching interface is designed and developed uniformly through restful, and is defined in xml format based on http or defined in json format based on http; the switching interface is pre-packaged in a preset programming language, such as python language, respectively. on a data center and a second data center.
S24,针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示。S24, for any one of the switching interfaces, splicing the switching interface and the return result of calling the switching interface into a character string in a preset format for display.
示例性地,所述预设格式的字符串可以是json格式的字符串,例如针对应用层的切换接口,其返回结果为“succuess”,对应将应用层的切换接口和调用该应用层的切换接口返回的结果拼接为json格式的字符串,得到一种key-value的数据格式,如“应用层:succuess”。Exemplarily, the string in the preset format may be a string in json format, for example, for the switching interface of the application layer, the return result is "succuess", which corresponds to the switching interface of the application layer and the switching interface that calls the application layer. The result returned by the interface is spliced into a string in json format to obtain a key-value data format, such as "application layer: success".
通过上述分析可知,本申请实施例提供的端到端双活方法,通过将切换策略对应的调用任务下发到异步调用工具中;在所述异步调用工具中调用切换策略对应的切换接口;基于切换接口对端到端通信链路的双活应用组件进行切换,将切换结果存储至开源数据库中;分别获取所述异步调用工具调用所述切换接口的返回结果,将各个所述切换接口和调用各个所述切换接口的返回结果分别拼接为预设格式的字符串进行显示。能够通过异步调用工具实现多任务的并行下发,并将通信链路中各应用组件的切换过程进行可视化显示,可以实现端到端通信链路的非阻塞高效切换,提高切换效率的同时保证了端到端双活方案的有效性。It can be seen from the above analysis that the end-to-end active-active method provided by the embodiments of the present application delivers the invocation task corresponding to the handover policy to the asynchronous invocation tool; the handover interface corresponding to the handover policy is invoked in the asynchronous invocation tool; The switching interface switches the active-active application components of the end-to-end communication link, and stores the switching results in the open source database; respectively obtains the return results of the asynchronous calling tool calling the switching interface, and compares each switching interface with the calling The return results of each of the switching interfaces are respectively spliced into character strings in a preset format for display. It can realize the parallel delivery of multiple tasks through asynchronous calling tools, and visualize the switching process of each application component in the communication link, which can realize the non-blocking and efficient switching of the end-to-end communication link, improve the switching efficiency while ensuring Effectiveness of the end-to-end active-active solution.
如图3所示,图3是本申请第三实施例提供的端到端双活方法的实现流程图。需要说明的是,本实施例提供的端到端双活方法与图2所示的端到端双活方法相比,S32至S35与S21至S24的具体实现过程相同,不同之处在于,在S32之前还包括S31,S51与S52为顺序执行关系。详述如下:As shown in FIG. 3 , FIG. 3 is an implementation flowchart of the end-to-end active-active method provided by the third embodiment of the present application. It should be noted that, compared with the end-to-end active-active method provided in this embodiment, the specific implementation processes of S32 to S35 and S21 to S24 are the same, and the difference is that in S32 also includes S31 before S32, and S51 and S52 are in a sequential execution relationship. Details are as follows:
S31,预先配置端到端通信链路的各个应用组件双活在第一数据中心和第二数据中心,其中,所述第一数据中心为主数据中心,所述第二数据中心为备数据中心,所述第一数据中心和所述第二数据中心均提供所述端到端通信链路的各个应用组件的数据服务。S31, preconfigure each application component of the end-to-end communication link to be active-active in a first data center and a second data center, wherein the first data center is the main data center, and the second data center is the standby data center , both the first data center and the second data center provide data services for each application component of the end-to-end communication link.
示例性地,可以通过运维人员预先分别搭建所述第一数据中心和所述第二数据中心,所述第一数据中心和所述第二数据中心均为端到端通信链路的各个应用组件的数据服务。例如,所述第一数据中心和所述第二数据中心均可以为应用层、网络层、数据库层和存储层等端到端通信链路的应用组件提供数据服务。Exemplarily, the first data center and the second data center may be pre-built by operation and maintenance personnel, and both the first data center and the second data center are applications of end-to-end communication links. Component data services. For example, both the first data center and the second data center may provide data services for application components of end-to-end communication links such as an application layer, a network layer, a database layer, and a storage layer.
此外,预先配置端到端通信链路的各个应用组件双活在第一数据中心和第二数据中心,可以包括:通过单独模拟http请求或者用户请求的方式,分别向所述第一数据中心和所述第二数据中心发送服务请求,并根据所述第一数据中心和所述第二数据中心返回的应答结果,确定所述第一数据中心和所述第二数据中心的服务状态;若所述第一数据中心和所述第二数据中心的服务状态均正常,则确定配置完成端到端通信链路的各个应用组件双活在第一数据中心和第二数据中心;若所述第一数据中心和所述第二数据中心的服务状态有异常,则需要运维人员重新进行搭建,直至所述第一数据中心和所述第二数据中心的服务状态正常。In addition, pre-configuring each application component of the end-to-end communication link to be active-active in the first data center and the second data center may include: separately simulating http requests or user requests, sending requests to the first data center and the second data center respectively. The second data center sends a service request, and determines the service status of the first data center and the second data center according to the response results returned by the first data center and the second data center; If the service states of the first data center and the second data center are both normal, it is determined that each application component that completes the configuration of the end-to-end communication link is active-active in the first data center and the second data center; if the first data center and the second data center are both active If the service states of the data center and the second data center are abnormal, operation and maintenance personnel need to re-build until the service states of the first data center and the second data center are normal.
S32,响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面。S32, in response to the end-to-end handover request triggered by the user, load and display the end-to-end handover operation interface.
S33,响应于用户基于所述端到端切换操作界面生成的携带有切换策略的指令,将所述切换策略对应的调用任务分别下发到异步调用工具中。S33, in response to the instruction carrying the switching policy generated by the user based on the end-to-end switching operation interface, respectively delivering the invocation tasks corresponding to the switching policy to the asynchronous invocation tool.
S34,在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,所述目标应用组件为所述切换策略包括的预先配置的端到端双活应用组件。S34, respectively calling the switching interface corresponding to the switching strategy in the asynchronous calling tool, and switching each target application component based on each switching interface, where the target application component is a preconfigured component included in the switching strategy End-to-end active-active application components.
S35,针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示。S35, for any one of the switching interfaces, splicing the switching interface and the return result of calling the switching interface into a character string in a preset format for display.
由以上分析可以看出,本实施例提供的端到端双活方法,与现有技术相比,通过将切换策略对应的调用任务下发到异步调用工具中;在所述异步调用工具中调用切换策略对应的切换接口;基于切换接口对端到端通信链路的双活应用组件进行切换,将切换结果存储至开源数据库中;分别获取所述异步调用工具调用所述切换接口的返回结果,将各个所述切换接口和调用各个所述切换接口的返回结果分别拼接为预设格式的字符串进行显示。能够通过异步调用工具实现多任务的并行下发,并将通信链路中各应用组件的切换过程进行可视化显示,可以实现端到端通信链路的非阻塞高效切换,提高切换效率的同时保证了端到端双活方案的有效性。From the above analysis, it can be seen that, compared with the prior art, the end-to-end active-active method provided by this embodiment can deliver the calling task corresponding to the switching policy to the asynchronous calling tool; switching interface corresponding to the switching strategy; switching the active-active application components of the end-to-end communication link based on the switching interface, and storing the switching result in the open source database; respectively obtaining the return result of the asynchronous calling tool calling the switching interface, Each of the switching interfaces and the return results of calling each of the switching interfaces are spliced into character strings in a preset format for display. It can realize the parallel delivery of multiple tasks through asynchronous calling tools, and visualize the switching process of each application component in the communication link, which can realize the non-blocking and efficient switching of the end-to-end communication link, improve the switching efficiency while ensuring Effectiveness of the end-to-end active-active solution.
如图4所示,图4是本申请第四实施例提供的端到端双活方法的实现流程图。需要说明的是,本实施例提供的端到端双活方法与图3所示的端到端双活方法相比,S41与S31以及S43至S46与S32至S35的具体实现过程相同,不同之处在于,在S41之后还包括S42,S42与S43为顺序执行关系。详述如下:As shown in FIG. 4 , FIG. 4 is an implementation flowchart of the end-to-end active-active method provided by the fourth embodiment of the present application. It should be noted that, compared with the end-to-end active-active method provided in this embodiment, the specific implementation processes of S41 and S31 and S43 to S46 and S32 to S35 are the same. The point is that S42 is also included after S41, and S42 and S43 are in a sequential execution relationship. Details are as follows:
S41,预先配置端到端通信链路的各个应用组件双活在第一数据中心和第二数据中心,其中,所述第一数据中心为主数据中心,所述第二数据中心为备数据中心,所述第一数据中心和所述第二数据中心均提供所述端到端通信链路的各个应用组件的数据服务。S41, preconfigure each application component of the end-to-end communication link to be active-active in the first data center and the second data center, wherein the first data center is the main data center, and the second data center is the backup data center , both the first data center and the second data center provide data services for each application component of the end-to-end communication link.
S42,针对所述端到端通信链路的任意一个应用组件,基于预设的该应用组件的切换端口验证将该应用组件数据服务中心由所述第一数据中心切换为所述第二数据中心时的切换状态。S42, for any application component of the end-to-end communication link, switch the application component data service center from the first data center to the second data center based on the preset switching port verification of the application component switch state.
示例性地,针对所述端到端通信链路的任意一个应用组件,基于预设的该应用组件的切换端口验证将该应用组件数据服务中心由所述第一数据中心切换为所述第二数据中心时的切换状态,包括:向所述第一数据中心发送访问该应用组件的请求;接收到所述第一数据中心返回的访问状态数据后,调用该应用组件的切换端口;接收调用该应用组件的切换端口的调用结果,根据所述调用结果确定该应用组件的切换状态;若根据所述切换状态显示该应用组件的流量正常切换至所述第二数据中心,则确定该应用组件数据服务中心由所述第一数据中心切换为所述第二数据中心时的切换状态;若根据所述切换状态显示该应用组件的流程无法正常切换至所述第二数据中心,则确定该应用组件数据服务中心无法正常由所述第一数据中心切换为所述第二数据中心。Exemplarily, for any application component of the end-to-end communication link, the data service center of the application component is switched from the first data center to the second data center based on the preset switching port verification of the application component. The switching state of the data center includes: sending a request to access the application component to the first data center; calling the switching port of the application component after receiving the access state data returned by the first data center; receiving and calling the application component The calling result of the switching port of the application component, and the switching state of the application component is determined according to the calling result; if it is displayed that the traffic of the application component is normally switched to the second data center according to the switching state, the data of the application component is determined. The switching state when the service center is switched from the first data center to the second data center; if the process of the application component cannot be normally switched to the second data center according to the switching state, then the application component is determined The data service center cannot be switched from the first data center to the second data center normally.
此外,当该应用组件数据服务中心无法正常由所述第一数据中心切换为所述第二数据中心时,需要重新进行切换状态验证。In addition, when the application component data service center cannot be normally switched from the first data center to the second data center, the switching state verification needs to be performed again.
S43,响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面。S43, in response to the end-to-end handover request triggered by the user, load and display the end-to-end handover operation interface.
S44,响应于用户基于所述端到端切换操作界面生成的携带有切换策略的指令,将所述切换策略对应的调用任务分别下发到异步调用工具中。S44, in response to the instruction carrying the switching policy generated by the user based on the end-to-end switching operation interface, respectively delivering the invocation tasks corresponding to the switching policy to the asynchronous invocation tool.
S45,在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,所述目标应用组件为所述切换策略包括的预先配置的端到端双活应用组件。S45: Invoke the switching interface corresponding to the switching strategy in the asynchronous calling tool, and switch each target application component based on each switching interface, where the target application component is a preconfigured component included in the switching strategy. End-to-end active-active application components.
S46,针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示。S46, for any one of the switching interfaces, splicing the switching interface and the return result of calling the switching interface into a character string in a preset format for display.
端到端双活方法,与现有技术相比,通过将切换策略对应的调用任务下发到异步调用工具中;在所述异步调用工具中调用切换策略对应的切换接口;基于切换接口对端到端通信链路的双活应用组件进行切换,将切换结果存储至开源数据库中;分别获取所述异步调用工具调用所述切换接口的返回结果,将各个所述切换接口和调用各个所述切换接口的返回结果分别拼接为预设格式的字符串进行显示。能够通过异步调用工具实现多任务的并行下发,并将通信链路中各应用组件的切换过程进行可视化显示,可以实现端到端通信链路的非阻塞高效切换,提高切换效率的同时保证了端到端双活方案的有效性。The end-to-end active-active method, compared with the prior art, delivers the invocation task corresponding to the handover policy to the asynchronous invocation tool; invokes the handover interface corresponding to the handover policy in the asynchronous invocation tool; The active-active application components of the end-to-end communication link are switched, and the switching results are stored in the open-source database; the return results of calling the switching interfaces by the asynchronous calling tools are respectively obtained, and the switching interfaces and the switching interfaces are respectively called. The returned results of the interface are spliced into strings of preset formats for display. It can realize the parallel delivery of multiple tasks through asynchronous calling tools, and visualize the switching process of each application component in the communication link, which can realize the non-blocking and efficient switching of the end-to-end communication link, improve the switching efficiency while ensuring Effectiveness of the end-to-end active-active solution.
如图5所示,图5是本申请第五实施例提供的端到端双活装置的结构框图。本实施例中的端到端双活装置包括的各模块用于执行图2至图4任一实施例中的各步骤。具体请图2至图4所对应的实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。参见图5,端到端双活装置50包括:包括:As shown in FIG. 5 , FIG. 5 is a structural block diagram of an end-to-end active-active device provided by a fifth embodiment of the present application. The modules included in the end-to-end active-active device in this embodiment are used to execute the steps in any of the embodiments in FIG. 2 to FIG. 4 . For details, please refer to the relevant descriptions in the embodiments corresponding to FIG. 2 to FIG. 4 . For convenience of explanation, only the parts related to this embodiment are shown. Referring to FIG. 5 , the end-to-end active-active device 50 includes: including:
加载模块51,用于响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面。The loading module 51 is configured to load and display the end-to-end handover operation interface in response to the end-to-end handover request triggered by the user.
下发模块52,用于响应于用户基于所述端到端切换操作界面生成的携带有切换策略的指令,将所述切换策略对应的调用任务分别下发到异步调用工具中。The issuing module 52 is configured to, in response to the instruction carrying the handover strategy generated by the user based on the end-to-end handover operation interface, respectively dispatch the invocation tasks corresponding to the handover strategy to the asynchronous invocation tool.
切换模块53,用于在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,所述目标应用组件为所述切换策略包括的预先配置的端到端双活应用组件。The switching module 53 is configured to respectively call the switching interface corresponding to the switching strategy in the asynchronous calling tool, and switch each target application component based on each of the switching interfaces, where the target application component is the switching strategy including: pre-configured end-to-end active-active application components.
显示模块54,用于针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示。The display module 54 is configured to, for any one of the switching interfaces, splicing the switching interface and the return result of calling the switching interface into a character string in a preset format for display.
在一可选的实现方式中,还包括:In an optional implementation manner, it also includes:
配置模块,用于预先配置端到端通信链路的各个应用组件双活在第一数据中心和第二数据中心,其中,所述第一数据中心为主数据中心,所述第二数据中心为备数据中心,所述第一数据中心和所述第二数据中心均提供所述端到端通信链路的各个应用组件的数据服务。The configuration module is used to preconfigure each application component of the end-to-end communication link to be active-active in the first data center and the second data center, wherein the first data center is the main data center, and the second data center is A backup data center, both the first data center and the second data center provide data services for each application component of the end-to-end communication link.
在一可选的实现方式中,还包括:In an optional implementation manner, it also includes:
验证模块,用于针对所述端到端通信链路的任意一个应用组件,基于预设的该应用组件的切换端口验证将该应用组件数据服务中心由所述第一数据中心切换为所述第二数据中心时的切换状态。The verification module is configured to, for any application component of the end-to-end communication link, verify that the application component data service center is switched from the first data center to the first data center based on the preset switching port of the application component. The switching state of the second data center.
在一可选的实现方式中,所述端到端切换操作界面包括用于供用户自定义切换策略的第一区域和供用户选择切换模板的第二区域;所述第一区域包括供用户选择应用组件名的第一选择项或者供用户输入应用组件名的第一输入框,用于供用户选择各应用组件的切换顺序的第二选择项或者供用户输入各应用组件的切换顺序的第二输入框;所述第二区域包括供用户选择切换模板名称的第三选择项或者供用户输入切换模板名称的第三输入框。In an optional implementation manner, the end-to-end switching operation interface includes a first area for the user to customize the switching strategy and a second area for the user to select a switching template; the first area includes a user to select The first selection item of the application component name or the first input box for the user to input the application component name, the second selection item for the user to select the switching order of each application component or the second selection item for the user to input the switching order of each application component. an input box; the second area includes a third option for the user to select the name of the switching template or a third input box for the user to input the name of the switching template.
在一可选的实现方式中,所述异步调用工具包括分布式异步调用工具cerely;所述切换模块53,具体用于:In an optional implementation manner, the asynchronous invocation tool includes a distributed asynchronous invocation tool cerely; the switching module 53 is specifically used for:
将调用所述切换策略对应的切换接口的任务分别下发到所述分布式异步调用工具cerely中,在所述分布式异步调用工具cerely中分别调用各个所述切换接口,对各个所述目标应用组件分别进行切换。The task of calling the switching interface corresponding to the switching strategy is respectively delivered to the distributed asynchronous calling tool cerely, and the switching interfaces are called respectively in the distributed asynchronous calling tool cerely, and each of the target applications is called. Components are switched individually.
在一可选的实现方式中,还包括:In an optional implementation manner, it also includes:
存放模块,用于将对各个所述切换接口的调用结果分别存放在分布式数据库redis中。The storage module is used for respectively storing the results of calling each of the switching interfaces in the distributed database redis.
在一可选的实现方式中,所述显示模块54,包括:In an optional implementation manner, the display module 54 includes:
获取单元,用于基于所述异步调用工具cerely从所述redis中异步获取各个所述切换接口的调用结果;an acquisition unit, configured to asynchronously acquire the call results of each of the switching interfaces from the redis based on the asynchronous calling tool cerely;
显示单元,用于针对任意一个所述切换接口,将该切换接口和该切换接口的调用结果拼接为预设格式的字符串进行显示。The display unit is configured to, for any one of the switching interfaces, splicing the switching interface and the calling result of the switching interface into a character string in a preset format for display.
应当理解的是,图5示出的端到端双活装置50的结构框图中,各模块用于执行图2至图5任一项实施例中的各步骤,而对于图2至图5对应的实施例中的各步骤已在上述实施例中进行详细解释,具体请参阅图2至图5所对应的实施例中的相关描述,此处不再赘述。It should be understood that, in the structural block diagram of the end-to-end active-active device 50 shown in FIG. 5 , each module is used to execute each step in any one of the embodiments in FIG. 2 to FIG. The steps in the embodiments of FIG. 2 have been explained in detail in the above-mentioned embodiments. For details, please refer to the relevant descriptions in the embodiments corresponding to FIG. 2 to FIG. 5 , which will not be repeated here.
图6是本申请第六实施例提供的端到端双活设备的结构框图。如图6所示,该实施例的端到端双活设备60包括:处理器61、存储器62以及存储在所述存储器62中并可在所述处理器61上运行的计算机程序63,例如端到端双活程序。处理器61执行所述计算机程序63时实现上述各个端到端双活方法各实施例中的步骤,例如图2所示的S21至S24。或者,所述处理器61执行所述计算机程序63时实现上述图5对应的实施例中各模块或单元的功能,例如,图5所示的模块51至54的功能,具体请参阅图5对应的实施例中的相关描述,此处不赘述。FIG. 6 is a structural block diagram of an end-to-end active-active device provided by a sixth embodiment of the present application. As shown in FIG. 6 , the end-to-end active-active device 60 in this embodiment includes: a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61, such as an end-to-end active-active device 63. End-to-end active-active program. When the processor 61 executes the computer program 63, the steps in each of the foregoing embodiments of the end-to-end active-active method are implemented, for example, S21 to S24 shown in FIG. 2 . Alternatively, when the processor 61 executes the computer program 63, the functions of each module or unit in the embodiment corresponding to FIG. 5 are implemented, for example, the functions of the modules 51 to 54 shown in FIG. The relevant descriptions in the embodiments are not repeated here.
示例性的,所述计算机程序63可以被分割成一个或多个单元,所述一个或者多个单元被存储在所述存储器62中,并由所述处理器61执行,以完成本申请。所述一个或多个单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序63在所述端到端双活设备60中的执行过程。例如,所述计算机程序63可以被分割成包括加载模块、下发模块、切换模块以及显示模块;各模块具体功能如图5所述。Exemplarily, the computer program 63 may be divided into one or more units, and the one or more units are stored in the memory 62 and executed by the processor 61 to complete the present application. The one or more units may be a series of computer program instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer program 63 in the end-to-end dual-active device 60 . For example, the computer program 63 can be divided into a loading module, a sending module, a switching module, and a display module; the specific functions of each module are described in FIG. 5 .
所述端到端双活设备可包括,但不仅限于,处理器61、存储器62。本领域技术人员可以理解,图6仅仅是端到端双活设备60的示例,并不构成对端到端双活设备60的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述转台设备还可以包括输入输出设备、网络接入设备、总线等。The end-to-end active-active device may include, but is not limited to, a processor 61 and a memory 62 . Those skilled in the art can understand that FIG. 6 is only an example of the end-to-end active-active device 60, and does not constitute a limitation on the end-to-end active-active device 60, and may include more or less components than those shown, or combinations thereof Certain components, or different components, such as the turntable device, may also include input and output devices, network access devices, buses, and the like.
所称处理器61可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 61 may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
所述存储器62可以是所述端到端双活设备60的内部存储单元,例如端到端双活设备60的硬盘或内存。所述存储器62也可以是所述端到端双活设备60的外部存储设备,例如所述端到端双活设备60上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器62还可以既包括所述端到端双活设备60的内部存储单元也包括外部存储设备。所述存储器62用于存储所述计算机程序以及所述端到端双活设备60所需的其他程序和数据。所述存储器62还可以用于暂时地存储已经输出或者将要输出的数据。The storage 62 may be an internal storage unit of the end-to-end active-active device 60 , such as a hard disk or a memory of the end-to-end active-active device 60 . The memory 62 may also be an external storage device of the end-to-end active-active device 60, such as a pluggable hard disk or a smart memory card (Smart Media Card, SMC) equipped on the end-to-end active-active device 60, Secure Digital (SD) card, Flash Card, etc. Further, the memory 62 may also include both an internal storage unit of the end-to-end dual-active device 60 and an external storage device. The memory 62 is used for storing the computer program and other programs and data required by the end-to-end active-active device 60 . The memory 62 may also be used to temporarily store data that has been output or is to be output.
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序中包括程序指令,所述程序指令被执行时所实现的方法可参照本申请端到端双活方法的各个实施例。Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, the computer program includes program instructions, and the method implemented when the program instructions are executed may refer to this document Various embodiments of the end-to-end active-active method are applied.
其中,所述计算机可读存储介质可以是非易失性,也可以是易失性。所述计算机可读存储介质可以是前述实施例所述的电子设备的内部存储单元,例如所述电子设备的硬盘或内存。所述计算机可读存储介质也可以是所述电子设备的外部存储设备,例如所述电子设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。Wherein, the computer-readable storage medium may be non-volatile or volatile. The computer-readable storage medium may be an internal storage unit of the electronic device described in the foregoing embodiments, such as a hard disk or a memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the electronic device ) card, flash card (Flash Card) and so on.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that: it can still be used for the above-mentioned implementations. The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the application, and should be included in the within the scope of protection of this application.

Claims (20)

  1. 一种端到端双活方法,其中,包括:An end-to-end active-active method, which includes:
    响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面;In response to the end-to-end switching request triggered by the user, load and display the end-to-end switching operation interface;
    响应于用户基于所述端到端切换操作界面生成的携带有切换策略的指令,将所述切换策略对应的调用任务分别下发到异步调用工具中;In response to the instruction carrying the switching strategy generated by the user based on the end-to-end switching operation interface, the invocation tasks corresponding to the switching strategy are respectively delivered to the asynchronous invocation tool;
    在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,所述目标应用组件为所述切换策略包括的预先配置的端到端双活应用组件;In the asynchronous invocation tool, the switching interfaces corresponding to the switching policies are respectively called, and each target application component is switched based on the switching interfaces. Terminal active-active application components;
    针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示。For any one of the switching interfaces, the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display.
  2. 如权利要求1所述的方法,其中,在响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面之前,还包括:The method according to claim 1, wherein, before loading and displaying the end-to-end handover operation interface in response to the end-to-end handover request triggered by the user, the method further comprises:
    预先配置端到端通信链路的各个应用组件双活在第一数据中心和第二数据中心,其中,所述第一数据中心为主数据中心,所述第二数据中心为备数据中心,所述第一数据中心和所述第二数据中心均提供所述端到端通信链路的各个应用组件的数据服务。Each application component of the preconfigured end-to-end communication link is active-active in the first data center and the second data center, wherein the first data center is the main data center and the second data center is the standby data center, so Both the first data center and the second data center provide data services for each application component of the end-to-end communication link.
  3. 如权利要求2所述的方法,其中,在预先配置端到端通信链路的各个应用组件双活在第一数据中心和第二数据中心之后,还包括:The method of claim 2, wherein after preconfiguring each application component of the end-to-end communication link to be active-active in the first data center and the second data center, the method further comprises:
    针对所述端到端通信链路的任意一个应用组件,基于预设的该应用组件的切换端口验证将该应用组件数据服务中心由所述第一数据中心切换为所述第二数据中心时的切换状态。For any application component of the end-to-end communication link, verify based on the preset switching port of the application component when the data service center of the application component is switched from the first data center to the second data center. Toggle status.
  4. 如权利要求1至3任一项所述的方法,其中,所述端到端切换操作界面包括用于供用户自定义切换策略的第一区域和供用户选择切换模板的第二区域;所述第一区域包括供用户选择应用组件名的第一选择项或者供用户输入应用组件名的第一输入框,用于供用户选择各应用组件的切换顺序的第二选择项或者供用户输入各应用组件的切换顺序的第二输入框;所述第二区域包括供用户选择切换模板名称的第三选择项或者供用户输入切换模板名称的第三输入框。The method according to any one of claims 1 to 3, wherein the end-to-end switching operation interface comprises a first area for users to customize switching strategies and a second area for users to select switching templates; the The first area includes a first option for the user to select the name of the application component or a first input box for the user to input the name of the application component, and a second option for the user to select the switching order of each application component or for the user to input each application. The second input box of the switching sequence of components; the second area includes a third selection item for the user to select the name of the switching template or a third input box for the user to input the name of the switching template.
  5. 如权利要求4所述的方法,其中,所述异步调用工具包括分布式异步调用工具cerely;在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,包括:The method according to claim 4, wherein the asynchronous invocation tool comprises a distributed asynchronous invocation tool cerely; in the asynchronous invocation tool, the switching interfaces corresponding to the switching policies are respectively called, and the switching interfaces corresponding to the switching strategies are called based on the switching interfaces. The target application components are switched separately, including:
    将调用所述切换策略对应的切换接口的任务分别下发到所述分布式异步调用工具cerely中,在所述分布式异步调用工具cerely中分别调用各个所述切换接口,对各个所述目标应用组件分别进行切换。The task of calling the switching interface corresponding to the switching strategy is respectively delivered to the distributed asynchronous calling tool cerely, and the switching interfaces are called respectively in the distributed asynchronous calling tool cerely, and each of the target applications is called. Components are switched individually.
  6. 如权利要求5所述的方法,其中,所述基于各个所述切换接口对各个目标应用组件分别进行切换之后,还包括:The method according to claim 5, wherein after the switching of each target application component based on each of the switching interfaces, the method further comprises:
    将对各个所述切换接口的调用结果分别存放在分布式数据库redis中。The results of calling each of the switching interfaces are respectively stored in the distributed database redis.
  7. 如权利要求5或6所述的方法,其中,针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示,包括:The method according to claim 5 or 6, wherein, for any one of the switching interfaces, splicing the switching interface and the return result of calling the switching interface into a string in a preset format for display, comprising:
    基于所述异步调用工具cerely从所述redis中异步获取各个所述切换接口的调用结果;Based on the asynchronous invocation tool cerely, asynchronously obtain the invocation results of each of the switching interfaces from the redis;
    针对任意一个所述切换接口,将该切换接口和该切换接口的调用结果拼接为预设格式的字符串进行显示。For any one of the switching interfaces, the switching interface and the calling result of the switching interface are spliced into a character string in a preset format for display.
  8. 一种端到端双活装置,其中,包括:An end-to-end active-active device, comprising:
    加载模块,用于响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面;The loading module is used to load and display the end-to-end switching operation interface in response to the end-to-end switching request triggered by the user;
    下发模块,用于响应于用户基于所述端到端切换操作界面生成的携带有切换策略的指令,将所述切换策略对应的调用任务分别下发到异步调用工具中;a delivery module, configured to respectively deliver the calling tasks corresponding to the switching strategy to the asynchronous calling tool in response to the instruction that carries the switching strategy generated by the user based on the end-to-end switching operation interface;
    切换模块,用于在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,所述目标应用组件为所述切换策略包括的预先配置的端到端双活应用组件;The switching module is used to respectively call the switching interface corresponding to the switching strategy in the asynchronous calling tool, and switch each target application component based on each of the switching interfaces, where the target application component is included in the switching strategy. Pre-configured end-to-end active-active application components;
    显示模块,用于针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示。The display module is used for splicing the switching interface and the return result of calling the switching interface into a character string in a preset format for any one of the switching interfaces for display.
  9. 如权利要求8所述的端到端双活装置,其中,所述装置还包括:The end-to-end active-active device of claim 8, wherein the device further comprises:
    配置模块,用于预先配置端到端通信链路的各个应用组件双活在第一数据中心和第二数据中心,其中,所述第一数据中心为主数据中心,所述第二数据中心为备数据中心,所述第一数据中心和所述第二数据中心均提供所述端到端通信链路的各个应用组件的数据服务。The configuration module is used to preconfigure each application component of the end-to-end communication link to be active-active in the first data center and the second data center, wherein the first data center is the main data center, and the second data center is A backup data center, both the first data center and the second data center provide data services for each application component of the end-to-end communication link.
  10. 如权利要求9所述的端到端双活装置,其中,所述装置还包括:The end-to-end active-active device of claim 9, wherein the device further comprises:
    验证模块,用于针对所述端到端通信链路的任意一个应用组件,基于预设的该应用组件的切换端口验证将该应用组件数据服务中心由所述第一数据中心切换为所述第二数据中心时的切换状态。The verification module is configured to, for any application component of the end-to-end communication link, verify that the application component data service center is switched from the first data center to the first data center based on the preset switching port of the application component. The switching state of the second data center.
  11. 如权利要求8-10任一项所述的端到端双活装置,其中,所述端到端切换操作界面包括用于供用户自定义切换策略的第一区域和供用户选择切换模板的第二区域;所述第一区域包括供用户选择应用组件名的第一选择项或者供用户输入应用组件名的第一输入框,用于供用户选择各应用组件的切换顺序的第二选择项或者供用户输入各应用组件的切换顺序的第二输入框;所述第二区域包括供用户选择切换模板名称的第三选择项或者供用户输入切换模板名称的第三输入框。The end-to-end dual-active device according to any one of claims 8-10, wherein the end-to-end handover operation interface includes a first area for users to customize a handover policy and a first area for users to select a handover template Two areas; the first area includes a first option for the user to select the name of the application component or a first input box for the user to input the name of the application component, and a second option for the user to select the switching sequence of each application component or a second input box for the user to input the switching sequence of each application component; the second area includes a third option for the user to select the name of the switching template or a third input box for the user to input the name of the switching template.
  12. 如权利要求11所述的端到端双活装置,其中,所述异步调用工具包括分布式异步调用工具cerely;所述切换模块,具体用于:The end-to-end active-active device according to claim 11, wherein the asynchronous invocation tool comprises a distributed asynchronous invocation tool cerely; the switching module is specifically used for:
    将调用所述切换策略对应的切换接口的任务分别下发到所述分布式异步调用工具cerely中,在所述分布式异步调用工具cerely中分别调用各个所述切换接口,对各个所述目标应用组件分别进行切换。The task of calling the switching interface corresponding to the switching strategy is respectively delivered to the distributed asynchronous calling tool cerely, and the switching interfaces are called respectively in the distributed asynchronous calling tool cerely, and each of the target applications is called. Components are switched individually.
  13. 如权利要求12所述的端到端双活装置,其中,所述装置还包括:The end-to-end active-active device of claim 12, wherein the device further comprises:
    存放模块,用于将对各个所述切换接口的调用结果分别存放在分布式数据库redis中。The storage module is used for respectively storing the results of calling each of the switching interfaces in the distributed database redis.
  14. 如权利要求12或13所述的端到端双活装置,其中,所述显示模块,包括:The end-to-end dual-active device according to claim 12 or 13, wherein the display module comprises:
    获取单元,用于基于所述异步调用工具cerely从所述redis中异步获取各个所述切换接口的调用结果;an acquisition unit, configured to asynchronously acquire the calling results of each of the switching interfaces from the redis based on the asynchronous calling tool cerely;
    显示单元,用于针对任意一个所述切换接口,将该切换接口和该切换接口的调用结果拼接为预设格式的字符串进行显示。The display unit is used for splicing the switching interface and the calling result of the switching interface into a character string in a preset format for any one of the switching interfaces for display.
  15. 一种端到端双活设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如下步骤:An end-to-end active-active device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
    响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面;In response to the end-to-end switching request triggered by the user, load and display the end-to-end switching operation interface;
    响应于用户基于所述端到端切换操作界面生成的携带有切换策略的指令,将所述切换策略对应的调用任务分别下发到异步调用工具中;In response to the instruction carrying the switching strategy generated by the user based on the end-to-end switching operation interface, the invocation tasks corresponding to the switching strategy are respectively delivered to the asynchronous invocation tool;
    在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,所述目标应用组件为所述切换策略包括的预先配置的端到端双活应用组件;In the asynchronous invocation tool, the switching interfaces corresponding to the switching policies are respectively called, and each target application component is switched based on the switching interfaces. Terminal active-active application components;
    针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示。For any one of the switching interfaces, the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display.
  16. 如权利要求15所述的端到端双活设备,其中,所述处理器实现在响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面之前,还用于实现:The end-to-end active-active device according to claim 15, wherein, before loading and displaying an end-to-end handover operation interface in response to an end-to-end handover request triggered by a user, the processor is further configured to:
    预先配置端到端通信链路的各个应用组件双活在第一数据中心和第二数据中心,其中,所述第一数据中心为主数据中心,所述第二数据中心为备数据中心,所述第一数据中心和所述第二数据中心均提供所述端到端通信链路的各个应用组件的数据服务。Each application component of the preconfigured end-to-end communication link is active-active in the first data center and the second data center, wherein the first data center is the main data center and the second data center is the standby data center, so Both the first data center and the second data center provide data services for each application component of the end-to-end communication link.
  17. 如权利要求16所述的端到端双活设备,其中,所述处理器实现在预先配置端到端通信链路的各个应用组件双活在第一数据中心和第二数据中心之后,还用于实现:The end-to-end active-active device according to claim 16, wherein the processor implements that after each application component of the end-to-end communication link is preconfigured to be active-active in the first data center and the second data center, and further uses To achieve:
    针对所述端到端通信链路的任意一个应用组件,基于预设的该应用组件的切换端口验证将该应用组件数据服务中心由所述第一数据中心切换为所述第二数据中心时的切换状态。For any application component of the end-to-end communication link, verify based on the preset switching port of the application component when the data service center of the application component is switched from the first data center to the second data center. Toggle status.
  18. 如权利要求15-17任一项所述的端到端双活设备,其中,所述端到端切换操作界面包括用于供用户自定义切换策略的第一区域和供用户选择切换模板的第二区域;所述第一区域包括供用户选择应用组件名的第一选择项或者供用户输入应用组件名的第一输入框,用于供用户选择各应用组件的切换顺序的第二选择项或者供用户输入各应用组件的切换顺序的第二输入框;所述第二区域包括供用户选择切换模板名称的第三选择项或者供用户输入切换模板名称的第三输入框。The end-to-end dual-active device according to any one of claims 15-17, wherein the end-to-end handover operation interface includes a first area for users to customize a handover policy and a first area for users to select a handover template Two areas; the first area includes a first option for the user to select the name of the application component or a first input box for the user to input the name of the application component, and a second option for the user to select the switching sequence of each application component or a second input box for the user to input the switching sequence of each application component; the second area includes a third option for the user to select the name of the switching template or a third input box for the user to input the name of the switching template.
  19. 如权利要求18所述的端到端双活设备,其中,所述异步调用工具包括分布式异步调用工具cerely;所述处理器实现在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换时,用于实现:The end-to-end active-active device according to claim 18, wherein the asynchronous invocation tool comprises a distributed asynchronous invocation tool cerely; the processor implements that the handover corresponding to the handover policy is respectively invoked in the asynchronous invocation tool The interface, when each target application component is switched based on each of the switching interfaces, is used to realize:
    将调用所述切换策略对应的切换接口的任务分别下发到所述分布式异步调用工具cerely中,在所述分布式异步调用工具cerely中分别调用各个所述切换接口,对各个所述目标应用组件分别进行切换。The task of calling the switching interface corresponding to the switching strategy is respectively delivered to the distributed asynchronous calling tool cerely, and the switching interfaces are called respectively in the distributed asynchronous calling tool cerely, and each of the target applications is called. Components are switched individually.
  20. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下步骤:A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the following steps are implemented:
    响应于用户触发的端到端切换请求,加载并显示端到端切换操作界面;In response to the end-to-end switching request triggered by the user, load and display the end-to-end switching operation interface;
    响应于用户基于所述端到端切换操作界面生成的携带有切换策略的指令,将所述切换策略对应的调用任务分别下发到异步调用工具中;In response to the instruction carrying the switching strategy generated by the user based on the end-to-end switching operation interface, the invocation tasks corresponding to the switching strategy are respectively delivered to the asynchronous invocation tool;
    在所述异步调用工具中分别调用所述切换策略对应的切换接口,基于各个所述切换接口对各个目标应用组件分别进行切换,所述目标应用组件为所述切换策略包括的预先配置的端到端双活应用组件;In the asynchronous invocation tool, the switching interfaces corresponding to the switching policies are respectively called, and each target application component is switched based on the switching interfaces. Terminal active-active application components;
    针对任意一个所述切换接口,将该切换接口和调用该切换接口的返回结果拼接为预设格式的字符串进行显示。For any one of the switching interfaces, the switching interface and the return result of calling the switching interface are spliced into a character string in a preset format for display.
PCT/CN2021/083256 2020-12-03 2021-03-26 End-to-end active-active method, apparatus and device, and storage medium WO2022116428A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011396261.1A CN112527480A (en) 2020-12-03 2020-12-03 End-to-end double-activity method, device, equipment and storage medium
CN202011396261.1 2020-12-03

Publications (1)

Publication Number Publication Date
WO2022116428A1 true WO2022116428A1 (en) 2022-06-09

Family

ID=74996669

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/083256 WO2022116428A1 (en) 2020-12-03 2021-03-26 End-to-end active-active method, apparatus and device, and storage medium

Country Status (2)

Country Link
CN (1) CN112527480A (en)
WO (1) WO2022116428A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112527480A (en) * 2020-12-03 2021-03-19 平安科技(深圳)有限公司 End-to-end double-activity method, device, equipment and storage medium
CN116909494B (en) * 2023-09-12 2024-01-26 苏州浪潮智能科技有限公司 Storage switching method and device of server and server system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461789A (en) * 2014-12-30 2015-03-25 华夏银行股份有限公司 Control method and system for achieving host and backup switching of disaster backup system
US20170310641A1 (en) * 2016-04-26 2017-10-26 Hillstone Networks, Corp. Data center system
CN108964986A (en) * 2018-06-15 2018-12-07 国网上海市电力公司 Cooperative office system application layer dual-active disaster recovery and backup systems
CN112527480A (en) * 2020-12-03 2021-03-19 平安科技(深圳)有限公司 End-to-end double-activity method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461789A (en) * 2014-12-30 2015-03-25 华夏银行股份有限公司 Control method and system for achieving host and backup switching of disaster backup system
US20170310641A1 (en) * 2016-04-26 2017-10-26 Hillstone Networks, Corp. Data center system
CN108964986A (en) * 2018-06-15 2018-12-07 国网上海市电力公司 Cooperative office system application layer dual-active disaster recovery and backup systems
CN112527480A (en) * 2020-12-03 2021-03-19 平安科技(深圳)有限公司 End-to-end double-activity method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112527480A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
WO2018076759A1 (en) Block chain-based multi-chain management method and system, electronic device, and storage medium
CN111382168B (en) Node group creating method and node group-based transaction method in alliance chain network
US11231957B2 (en) Performing parallel execution of transactions in a distributed ledger system
WO2019227336A1 (en) Blockchain-based information processing method and device, and blockchain network
WO2021139788A1 (en) Cloud gateway configuration method, system, apparatus, and computer readable storage medium
CN102609279A (en) Application execution in a restricted application execution environment
CN108664289B (en) Service data processing method and terminal equipment
CN112714158B (en) Transaction processing method, relay network, cross-link gateway, system, medium and equipment
WO2022116428A1 (en) End-to-end active-active method, apparatus and device, and storage medium
CN111899008B (en) Resource transfer method, device, equipment and system
CN107729176A (en) The disaster recovery method and disaster tolerance system of a kind of profile management systems
GB2529246A (en) Method for securing integrity and consistency of a cloud storage service with efficient client operations
US20240160560A1 (en) Testing automation for open standard cloud services applications
CN108415792A (en) Disaster tolerance system, method, apparatus and equipment
CN112306648B (en) Transaction calling method, device, electronic equipment and storage medium
US10838845B2 (en) Processing failed events on an application server
CN112445860B (en) Method and device for processing distributed transaction
WO2023005500A1 (en) Cross-chain transaction processing method and apparatus, electronic device, and storage medium
WO2023273832A1 (en) Data verification method and apparatus
CN115374098A (en) High concurrent payment order anti-duplication method, apparatus, system, device, medium, and program product
WO2023092316A1 (en) Third-party service login method and apparatus, terminal device, and storage medium
CN112565340B (en) Service scheduling method, device, computer system and medium for distributed application
WO2022241945A1 (en) Data processing method and device, and computer-readable storage medium
CN115018499A (en) Block chain-based digital certificate issuing method, device and system
CN115250276A (en) Distributed system and data processing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21899472

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21899472

Country of ref document: EP

Kind code of ref document: A1