CN114020724A - Instruction library migration method and device, computer equipment and storage medium - Google Patents

Instruction library migration method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114020724A
CN114020724A CN202111328977.2A CN202111328977A CN114020724A CN 114020724 A CN114020724 A CN 114020724A CN 202111328977 A CN202111328977 A CN 202111328977A CN 114020724 A CN114020724 A CN 114020724A
Authority
CN
China
Prior art keywords
switch
library
state
data
operation request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111328977.2A
Other languages
Chinese (zh)
Inventor
韩金涛
马坤
李玲君
卢永安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202111328977.2A priority Critical patent/CN114020724A/en
Publication of CN114020724A publication Critical patent/CN114020724A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/21Design, administration or maintenance of databases
    • G06F16/214Database migration support
    • 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/23Updating
    • 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/24Querying
    • G06F16/245Query processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to an instruction library migration method, an instruction library migration device, a computer device, a storage medium and a computer program product, which can be used in the financial field or other fields. The method comprises the following steps: responding to a data operation request of an instruction library, and acquiring an operation type of the data operation request; determining a corresponding control switch according to the operation type; and migrating the data operation request from the instruction library to a corresponding centralized library according to the state of the control switch in the configuration center. By adopting the method, the data operation request can be transferred from the instruction library to the corresponding centralized library only according to the state of the control switch in the configuration center without issuing a change script or restarting a server, so that the instruction library transfer process is simplified, the time is saved, and the instruction library transfer efficiency is improved.

Description

Instruction library migration method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for instruction library migration, a computer device, a storage medium, and a computer program product.
Background
In the technical field of computers, corresponding data operations, such as data query operations, data deletion operations and the like, can be performed by accessing an instruction library.
In the related art, when instruction library migration is performed, the channel flow is generally controlled by storing technical parameters into a table and then issuing a change script; however, the process of issuing the change script is complicated, and takes a long time, resulting in low instruction library migration efficiency.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an instruction library migration method, apparatus, computer device, computer readable storage medium, and computer program product capable of improving instruction library migration efficiency.
In a first aspect, the present application provides a method for instruction library migration. The method comprises the following steps:
responding to a data operation request of an instruction library, and acquiring an operation type of the data operation request;
determining a corresponding control switch according to the operation type;
and migrating the data operation request from the instruction library to a corresponding centralized library according to the state of the control switch in the configuration center.
In one embodiment, the determining the corresponding control switch according to the operation type includes:
when the operation type is data query operation, determining a gray-turning positive switch, an emergency switch, a double-write switch and a query switch as a control switch corresponding to the data query operation;
and when the operation type is data change operation, determining the emergency switch and the double-write switch as the control switch corresponding to the data change operation.
In one embodiment, when the operation type is a data query operation, the migrating the data operation request from the instruction library to a corresponding centralized library according to the state of the control switch in the configuration center includes:
when the grey-transition positive switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to a first centralized library;
and when the grey-transition positive switch in the configuration center is in an on state, migrating the data operation request from the instruction library to a corresponding centralized library according to the states of the emergency switch, the double-write switch and the query switch in the configuration center.
In one embodiment, the migrating the data operation request from the instruction library to a corresponding centralized library according to the states of the emergency switch, the double-write switch, and the query switch in the configuration center includes:
when the emergency switch in the configuration center is in an on state, or when the emergency switch in the configuration center is in an off state, and the double-write switch and the query switch are both in an on state, migrating the data operation request from the instruction library to the first centralized library;
and when the emergency switch and the double-write switch in the configuration center are in an off state, or when the emergency switch in the configuration center is in an off state, the double-write switch is in an on state, and the query switch is in an off state, the data operation request is transferred from the instruction library to a second centralized library.
In one embodiment, when the operation type is a data change operation, the migrating the data operation request from the instruction library to a corresponding centralized library according to the state of the control switch in the configuration center includes:
when the emergency switch in the configuration center is in an on state, the data operation request is transferred from the instruction library to a first centralized library;
and when the emergency switch in the configuration center is in an off state, migrating the data operation request from the instruction library to a corresponding centralized library according to the state of the double-write switch in the configuration center.
In one embodiment, the migrating the data operation request from the instruction library to the corresponding centralized library according to the state of the dual-write switch in the configuration center includes:
migrating the data operation request from the instruction library to the first centralized library and the second centralized library when the double-write switch in the configuration center is in an on state;
migrating the data operation request from the instruction library to the second centralized library when the dual write switch is in an off state in the configuration center.
In a second aspect, the present application further provides an instruction library apparatus. The device comprises:
the type acquisition module is used for responding to a data operation request of an instruction library and acquiring the operation type of the data operation request;
the switch determining module is used for determining a corresponding control switch according to the operation type;
and the request transferring module is used for transferring the data operation request from the instruction library to the corresponding centralized library according to the state of the control switch in the configuration center.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
responding to a data operation request of an instruction library, and acquiring an operation type of the data operation request;
determining a corresponding control switch according to the operation type;
and migrating the data operation request from the instruction library to a corresponding centralized library according to the state of the control switch in the configuration center.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
responding to a data operation request of an instruction library, and acquiring an operation type of the data operation request;
determining a corresponding control switch according to the operation type;
and migrating the data operation request from the instruction library to a corresponding centralized library according to the state of the control switch in the configuration center.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
responding to a data operation request of an instruction library, and acquiring an operation type of the data operation request;
determining a corresponding control switch according to the operation type;
and migrating the data operation request from the instruction library to a corresponding centralized library according to the state of the control switch in the configuration center.
The instruction library method, the instruction library device, the computer equipment, the storage medium and the computer program product are used for responding to the data operation request of the instruction library and acquiring the operation type of the data operation request; then determining a corresponding control switch according to the operation type; finally, according to the state of a control switch in the configuration center, the data operation request is transferred from the instruction library to the corresponding centralized library; therefore, the data operation request can be transferred from the instruction library to the corresponding centralized library only according to the state of the control switch in the configuration center without issuing a change script or restarting a server, so that the instruction library transfer process is simplified, the time is saved, and the instruction library transfer efficiency is improved.
Drawings
FIG. 1 is a flow diagram illustrating a method for instruction library migration according to one embodiment;
FIG. 2 is a flow diagram illustrating the steps for determining a corresponding control switch in one embodiment;
FIG. 3 is a flowchart illustrating a method for instruction library migration according to another embodiment;
FIG. 4 is a flowchart illustrating a method for instruction library migration in accordance with yet another embodiment;
FIG. 5 is a block diagram of an instruction library migration apparatus according to one embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that the instruction library migration method and apparatus provided by the present application can be used in the financial field, for operating electronic banking services, and can also be used in any field other than the financial field, such as the field of computer technology; the application fields of the instruction library migration method and the instruction library migration device provided by the application are not limited.
In an embodiment, as shown in fig. 1, an instruction library migration method is provided, and this embodiment is illustrated by applying the method to a server, it is to be understood that the method may also be applied to a terminal, and may also be applied to a system including the terminal and the server, and is implemented by interaction between the terminal and the server. In this embodiment, the method includes the steps of:
step S101, responding to the data operation request to the instruction library, and acquiring the operation type of the data operation request.
The instruction library is a single-point database and is used for different nodes to access. The data operation request refers to an operation request for data in the instruction library, and includes but is not limited to a data query request, a data deletion request, a data addition request and a data change request.
The operation type refers to a type corresponding to the data operation request, and includes but is not limited to data query operation and data change operation; data change operations include, but are not limited to, data delete operations, data add operations, data alter operations.
Specifically, the server responds to a data operation request to the instruction library, and obtains the operation type of the data operation request through an operation type obtaining instruction. Wherein, the operation type obtaining instruction is an instruction for obtaining the operation type of the data operation request.
And step S102, determining a corresponding control switch according to the operation type.
The control switches are a gray turning positive switch, an emergency switch, a double-writing switch and an inquiry switch, and the control switches corresponding to different operation types are different. For example, the control switches corresponding to the data query operation are a gray-turning positive switch, an emergency switch, a double-writing switch and a query switch; the control switches corresponding to the data change operation are an emergency switch and a double-write switch. It should be noted that each control switch has two states, i.e., an on state and an off state.
Specifically, the server queries the corresponding relationship between the operation type and the control switch according to the operation type of the data operation request, and obtains the control switch corresponding to the operation type.
And step S103, migrating the data operation request from the instruction library to a corresponding centralized library according to the state of a control switch in the configuration center.
Wherein, different states of the control switch are pre-configured in the configuration center. The configuration center is a parameter configuration framework which takes effect in real time, and can be an Apollo configuration center or other configuration centers. It should be noted that the state of the control switch in the configuration center is effective in real time, and the server does not need to be restarted.
The centralized database is a database which can realize the function of operating data according to the data operation request; in an actual scene, one centralized repository refers to an original centralized repository, and the other centralized repository refers to a centralized repository abstracted by services provided by electronic banking business application; an electronic banking application is a distributed application framework.
Specifically, the server queries a configuration center to obtain the state of the control switch; and determining a corresponding centralized library according to the state of the control switch, transferring the data operation request from the instruction library to the centralized library, and processing the data operation request through the centralized library, such as deleting corresponding data, adding corresponding data and the like according to the data operation request.
In the instruction library migration method, the operation type of the data operation request is obtained by responding to the data operation request of the instruction library; then determining a corresponding control switch according to the operation type; finally, according to the state of a control switch in the configuration center, the data operation request is transferred from the instruction library to the corresponding centralized library; therefore, the data operation request can be transferred from the instruction library to the corresponding centralized library only according to the state of the control switch in the configuration center without issuing a change script or restarting a server, so that the instruction library transfer process is simplified, the time is saved, and the instruction library transfer efficiency is improved.
In an embodiment, as shown in fig. 2, the step S102 of determining a corresponding control switch according to the operation type specifically includes the following steps:
step S201, when the operation type is a data query operation, determining the graying positive switch, the emergency switch, the double-write switch and the query switch as a control switch corresponding to the data query operation.
And step S202, when the operation type is data change operation, determining the emergency switch and the double-write switch as the control switch corresponding to the data change operation.
The gray-turning positive switch is in an off state by default, only gray-scale customers can access services provided by electronic banking application aiming at data query operation, and non-gray-scale customers continue to query the centralized repository; if the grey-transition positive switch is in an on state, all customers need to judge how to call the services provided by the centralized library and the electronic banking application according to the on-off states of the emergency switch, the double-write switch and the query switch when performing data query operation.
If the emergency switch is in an on state, the channel inquires the centralized library when processing the business, and does not call the service provided by the electronic banking application. If the emergency switch is in an off state, judging the state of the double-write switch for data adding operation, data deleting operation or data changing operation, and determining whether to call the service provided by the electronic banking application or call the service provided by the centralized library and the electronic banking application; for the data query operation, it is necessary to determine how to invoke the services provided by the centralized repository and the electronic banking application according to the states of the double-write switch and the query switch.
If the double-write switch is in an on state, services provided by a centralized library and electronic banking application need to be called for data adding operation, data deleting operation or data changing operation, and data consistency is kept; for the data query operation, how to operate needs to be judged according to the state of the query switch; if the double-write switch is in an off state, only calling the service provided by the electronic banking application for data adding operation, data deleting operation or data changing operation; for data query operations, only the services provided by the e-banking application are invoked.
If the query switch is in an on state, querying the centralized library; and if the query switch is in an off state, querying the service provided by the electronic banking application.
Specifically, the server queries the corresponding relation between the operation type and the control switch according to the operation type of the data operation request; in the corresponding relation, the control switches corresponding to the data query operation are a gray turning positive switch, an emergency switch, a double-writing switch and a query switch, and the control switches corresponding to the data change operation are an emergency switch and a double-writing switch; then, when the operation type is data query operation, determining the grey transition positive switch, the emergency switch, the double-write switch and the query switch as control switches corresponding to the data query operation; and when the operation type is data change operation, determining the emergency switch and the double-write switch as the control switch corresponding to the data change operation.
For example, when the operation type is a data deletion operation, the server determines the emergency switch and the double-write switch as the control switch corresponding to the data change operation.
In this embodiment, according to the operation type of the data operation request, the corresponding relationship between the operation type and the control switch is queried, and the corresponding control switch is determined, which is beneficial to subsequently migrating the data operation request from the instruction library to the corresponding centralized library according to the state of the control switch in the configuration center, so that the purpose of migrating the data operation request from the instruction library to the corresponding centralized library according to the state of the control switch is achieved.
In an embodiment, when the operation type is a data query operation, the step S103, according to the state of the control switch in the configuration center, migrating the data operation request from the instruction library to the corresponding centralized library, specifically includes: when the grey-transition positive switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the first centralized library; and when the grey-transition positive switch in the configuration center is in an on state, the data operation request is transferred from the instruction library to the corresponding centralized library according to the states of the emergency switch, the double-write switch and the query switch in the configuration center.
Wherein, the first centralized library is the original centralized library.
Specifically, when the operation type is data query operation, the server queries the configuration center to obtain the state of the grey-transition positive switch; and when the grey-transition positive switch is in an off state, determining that the corresponding centralized library is the first centralized library, transferring the data operation request from the instruction library to the first centralized library, and performing corresponding data query operation according to the data operation request through the first centralized library. When the grey-turning positive switch is in an on state, the server inquires the configuration center to obtain states of the emergency switch, the double-write switch and the inquiry switch, determines a corresponding centralized library according to the states of the emergency switch, the double-write switch and the inquiry switch, migrates the data operation request from the instruction library to the corresponding centralized library, and performs corresponding data inquiry operation according to the data operation request through the centralized library.
In the embodiment, for data query operation, according to the states of different control switches, a data operation request can be transferred from an instruction library to a corresponding centralized library without issuing a change script or restarting a server, so that the instruction library transfer process is simplified, the time is saved, and the instruction library transfer efficiency is improved; meanwhile, the data operation request is transferred from the instruction library to the corresponding centralized library, and the pressure and the risk of single points of the instruction library are solved.
In one embodiment, migrating the data operation request from the instruction library to the corresponding centralized library according to the states of the emergency switch, the double-write switch and the query switch in the configuration center specifically includes: when the emergency switch in the configuration center is in an on state, or when the emergency switch in the configuration center is in an off state, and the double-write switch and the query switch are in the on states, the data operation request is transferred from the instruction library to the first centralized library; and when the emergency switch and the double-write switch in the configuration center are in an off state, or when the emergency switch in the configuration center is in an off state, the double-write switch is in an on state, and the query switch is in an off state, the data operation request is transferred from the instruction library to the second centralized library.
The second centralized library is obtained by abstracting services provided by the electronic banking application.
Specifically, the server queries a configuration center to obtain states of an emergency switch, a double-write switch and a query switch; and when the emergency switch is in an on state, determining that the corresponding centralized library is a first centralized library, transferring the data operation request from the instruction library to the first centralized library, and performing corresponding data query operation according to the data operation request through the first centralized library. And when the emergency switch is in an off state, the double-write switch is in an on state, and the query switch is in an on state, determining the corresponding centralized library as a first centralized library, transferring the data operation request from the instruction library to the first centralized library, and performing corresponding data query operation according to the data operation request through the first centralized library. And when the emergency switch is in an off state and the double-write switch is in the off state, determining the corresponding centralized library as a second centralized library, transferring the data operation request from the instruction library to the second centralized library, and performing corresponding data query operation according to the data operation request through the second centralized library. And when the emergency switch is in an off state, the double-write switch is in an on state, and the query switch is in an off state, determining the corresponding centralized library as a second centralized library, transferring the data operation request from the instruction library to the second centralized library, and performing corresponding data query operation according to the data operation request through the second centralized library.
In the embodiment, the data operation request is migrated from the instruction library to the corresponding centralized library according to the states of the emergency switch, the double-write switch and the query switch in the configuration center without issuing a change script or restarting a server, so that the effect of service stability in the instruction library migration implementation process is ensured, and the influence on service processing in the instruction library migration process is reduced; meanwhile, the problems that the data consistency of the database under the normal condition can only be ensured by arranging a single-double-write switch, the condition that normal customers are not influenced under the abnormal condition cannot be ensured, and the flexible switching of the query cannot be realized in real time are solved.
In one embodiment, when the operation type is a data change operation, migrating the data operation request from the instruction library to the corresponding centralized library according to the state of the control switch in the configuration center, specifically including: when an emergency switch in the configuration center is in an on state, transferring a data operation request from the instruction library to a first centralized library; and when the emergency switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the corresponding centralized library according to the state of the double-write switch in the configuration center.
Specifically, when the operation type is data change operation, the server queries the configuration center to obtain the state of the emergency switch; and when the emergency switch is in an on state, determining that the corresponding centralized library is a first centralized library, transferring the data operation request from the instruction library to the first centralized library, and performing corresponding data change operation, such as data deletion operation, data addition operation and the like, through the first centralized library according to the data operation request. When the emergency switch is in an off state, the server inquires the configuration center to obtain the state of the double-write switch; and determining a corresponding centralized library according to the state of the double-write switch, transferring the data operation request from the instruction library to the corresponding centralized library, and performing corresponding data modification operation, such as data deletion operation, data addition operation and the like, according to the data operation request through the centralized library.
In the embodiment, for data change operation, according to the states of the emergency switch and the double-write switch, the data operation request is transferred from the instruction library to the corresponding centralized library without issuing a change script or restarting a server, so that the instruction library transfer process is simplified, the time is saved, and the instruction library transfer efficiency is improved.
In one embodiment, migrating a data operation request from an instruction library to a corresponding centralized library according to a state of a dual-write switch in a configuration center specifically includes: when a double-write switch in the configuration center is in an on state, transferring a data operation request from the instruction library to the first centralized library and the second centralized library; and when the double-write switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the second centralized library.
Specifically, for data change operation, under the condition that the emergency switch is in an off state, when the double-write switch is in an on state, the corresponding centralized libraries are determined to be the first centralized library and the second centralized library, the data operation request is migrated from the instruction library to the first centralized library and the second centralized library, and corresponding data change operation, such as data deletion operation, data addition operation and the like, is performed through the first centralized library and the second centralized library according to the data operation request. And when the double-write switch is in an off state, determining that the corresponding centralized library is a second centralized library, transferring the data operation request from the instruction library to the second centralized library, and performing corresponding data change operation, such as data deletion operation, data addition operation and the like, through the second centralized library according to the data operation request.
In this embodiment, for data change operation, under the condition that the emergency switch is in the off state, the data operation request is migrated from the instruction library to the corresponding centralized library according to the state of the double-write switch, without issuing a change script or restarting the server, so that the effect of service stability in the instruction library migration implementation process is ensured, and the influence on service processing in the instruction library migration process is reduced.
In one embodiment, as shown in fig. 3, another instruction library migration method is provided, which is described by taking the method as an example applied to a server, and includes the following steps:
step S301, in response to a data operation request to the instruction library, obtains an operation type of the data operation request.
Step S301 has two branches, which are step S302 and step S306.
Step S302, when the operation type is data query operation, determining the grey transition positive switch, the emergency switch, the double-write switch and the query switch as the control switch corresponding to the data query operation.
Step S302 has three branches, which are step S303, step S304 and step S305.
Step S303, when the grey-transition positive switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the first centralized library.
And step S304, when the grey-transition positive switch in the configuration center is in an on state and the emergency switch is in an on state, or when the grey-transition positive switch in the configuration center is in an on state and the emergency switch is in an off state and the double-write switch and the query switch are in the on states, the data operation request is transferred from the instruction library to the first centralized library.
And S305, when the positive graying switch in the configuration center is in an on state and the emergency switch and the double-writing switch are in off states, or when the positive graying switch in the configuration center is in an on state, the emergency switch is in an off state, the double-writing switch is in an on state and the query switch is in an off state, migrating the data operation request from the instruction library to a second centralized library.
And step S306, when the operation type is the data change operation, determining the emergency switch and the double-write switch as the control switch corresponding to the data change operation.
Step S306 has three branches, which are step S307, step S308 and step S309.
And step S307, when the emergency switch in the configuration center is in an on state, the data operation request is transferred from the instruction library to the first centralized library.
And step S308, when the emergency switch in the configuration center is in an off state and the double-write switch is in an on state, transferring the data operation request from the instruction library to the first centralized library and the second centralized library.
And step S309, when the emergency switch in the configuration center is in an off state and the double-write switch is in an off state, transferring the data operation request from the instruction library to the second centralized library.
In the instruction library migration method, the operation type of the data operation request is obtained by responding to the data operation request of the instruction library; then determining a corresponding control switch according to the operation type; finally, according to the state of a control switch in the configuration center, the data operation request is transferred from the instruction library to the corresponding centralized library; therefore, the data operation request can be transferred from the instruction library to the corresponding centralized library only according to the state of the control switch in the configuration center without issuing a change script or restarting a server, so that the instruction library transfer process is simplified, the time is saved, and the instruction library transfer efficiency is improved.
In an embodiment, in order to more clearly illustrate the instruction library migration method provided in the embodiments of the present application, the instruction library migration method is specifically described below with a specific embodiment. In an embodiment, as shown in fig. 4, the present application further provides an instruction library migration method, where four parameters, namely a graying-out positive switch a, an emergency switch B, a double-write switch C, and an inquiry switch D, are configured in a real-time effective configuration center, and the four parameters are effective in real time without restarting a server; by different combinations of the four switches, the influence on service processing in the instruction library migration process can be reduced. The method specifically comprises the following steps:
when the channel side is put into production on a normal production day, the switch is set to be 0-non-positive gray turning switch, 0-off emergency switch, 1-1 double writing switch and 0-inquiry electronic banking business application service. Before grey scale is corrected after production, if grey scale verification is free of problems, when grey scale is corrected, a grey scale correction switch is turned on to show that the grey scale is corrected successfully, all clients walk the judgment logics of switches A, B and C when inquiring, one version is tried to run, and if the grey scale is not corrected, the next version turns off a double-writing switch and is completely switched to an electronic banking business application side. If the gray scale verification has a problem before gray scale conversion is positive after production, if the query has a problem, switching the query switch into a query centralized library, and not converting the gray scale conversion positive switch into the positive switch; if the electronic banking business application has problems in adding, deleting and modifying services, the emergency switch needs to be opened, and the operation is completely switched to the operation of only the centralized library.
For example, referring to fig. 4, for the query operation, it is determined whether to query the electronic banking service or the original flow centralized repository according to the states of the graying positive switch a, the emergency switch B, the double-write switch C, and the query switch D. And aiming at the operation of adding and deleting, determining whether to operate the electronic banking service and the centralized library, or to operate the electronic banking service or the centralized library according to the states of the emergency switch B and the double-write switch C.
The instruction library migration method ensures the effect of service stability in the instruction library migration implementation process, and if a problem exists, the switch can be switched urgently, so that the influence on service processing and normal customers in the migration process is reduced.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides an instruction library migration apparatus for implementing the above-mentioned instruction library migration method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so specific limitations in one or more embodiments of the instruction library migration device provided below may refer to the limitations on the instruction library migration method in the foregoing, and details are not described here.
In one embodiment, as shown in fig. 5, there is provided an instruction library migration apparatus including: a type acquisition module 510, a switch determination module 520, and a request migration module 530, wherein:
the type obtaining module 510 is configured to, in response to a data operation request to the instruction library, obtain an operation type of the data operation request.
And a switch determining module 520, configured to determine a corresponding control switch according to the operation type.
And the request transferring module 530 is configured to transfer the data operation request from the instruction library to the corresponding centralized library according to the state of the control switch in the configuration center.
In one embodiment, the switch determining module 520 is further configured to determine, when the operation type is a data query operation, a gray-turning positive switch, an emergency switch, a double-write switch, and a query switch as a control switch corresponding to the data query operation; and when the operation type is data change operation, determining the emergency switch and the double-write switch as the control switch corresponding to the data change operation.
In one embodiment, when the operation type is a data query operation, the request migration module 530 is further configured to migrate the data operation request from the instruction library to the first centralized library when the graying-out positive switch in the configuration center is in an off state; and when the grey-transition positive switch in the configuration center is in an on state, the data operation request is transferred from the instruction library to the corresponding centralized library according to the states of the emergency switch, the double-write switch and the query switch in the configuration center.
In one embodiment, the request migration module 530 is further configured to migrate the data operation request from the instruction library to the first centralized library when the emergency switch in the configuration center is in an on state, or when the emergency switch in the configuration center is in an off state and both the double-write switch and the query switch are in an on state; and when the emergency switch and the double-write switch in the configuration center are in an off state, or when the emergency switch in the configuration center is in an off state, the double-write switch is in an on state, and the query switch is in an off state, the data operation request is transferred from the instruction library to the second centralized library.
In one embodiment, when the operation type is a data change operation, the request migration module 530 is further configured to migrate the data operation request from the instruction library to the first centralized library when the emergency switch in the configuration center is in an on state; and when the emergency switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the corresponding centralized library according to the state of the double-write switch in the configuration center.
In one embodiment, the request migrating module 530 is further configured to migrate the data operation request from the instruction library to the first centralized library and the second centralized library when the dual-write switch in the configuration center is in an on state; and when the double-write switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the second centralized library. The modules in the instruction library migration apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data such as the state of the control switch. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an instruction library migration method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
responding to a data operation request of an instruction library, and acquiring an operation type of the data operation request;
determining a corresponding control switch according to the operation type;
and migrating the data operation request from the instruction library to the corresponding centralized library according to the state of a control switch in the configuration center.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the operation type is data query operation, determining a gray-turning positive switch, an emergency switch, a double-writing switch and a query switch as a control switch corresponding to the data query operation; and when the operation type is data change operation, determining the emergency switch and the double-write switch as the control switch corresponding to the data change operation.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the grey-transition positive switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the first centralized library; and when the grey-transition positive switch in the configuration center is in an on state, the data operation request is transferred from the instruction library to the corresponding centralized library according to the states of the emergency switch, the double-write switch and the query switch in the configuration center.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the emergency switch in the configuration center is in an on state, or when the emergency switch in the configuration center is in an off state, and the double-write switch and the query switch are in the on states, the data operation request is transferred from the instruction library to the first centralized library; and when the emergency switch and the double-write switch in the configuration center are in an off state, or when the emergency switch in the configuration center is in an off state, the double-write switch is in an on state, and the query switch is in an off state, the data operation request is transferred from the instruction library to the second centralized library.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when an emergency switch in the configuration center is in an on state, transferring a data operation request from the instruction library to a first centralized library; and when the emergency switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the corresponding centralized library according to the state of the double-write switch in the configuration center.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when a double-write switch in the configuration center is in an on state, transferring a data operation request from the instruction library to the first centralized library and the second centralized library; and when the double-write switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the second centralized library.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
responding to a data operation request of an instruction library, and acquiring an operation type of the data operation request;
determining a corresponding control switch according to the operation type;
and migrating the data operation request from the instruction library to the corresponding centralized library according to the state of a control switch in the configuration center.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the operation type is data query operation, determining a gray-turning positive switch, an emergency switch, a double-writing switch and a query switch as a control switch corresponding to the data query operation; and when the operation type is data change operation, determining the emergency switch and the double-write switch as the control switch corresponding to the data change operation.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the grey-transition positive switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the first centralized library; and when the grey-transition positive switch in the configuration center is in an on state, the data operation request is transferred from the instruction library to the corresponding centralized library according to the states of the emergency switch, the double-write switch and the query switch in the configuration center.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the emergency switch in the configuration center is in an on state, or when the emergency switch in the configuration center is in an off state, and the double-write switch and the query switch are in the on states, the data operation request is transferred from the instruction library to the first centralized library; and when the emergency switch and the double-write switch in the configuration center are in an off state, or when the emergency switch in the configuration center is in an off state, the double-write switch is in an on state, and the query switch is in an off state, the data operation request is transferred from the instruction library to the second centralized library.
In one embodiment, the computer program when executed by the processor further performs the steps of: when an emergency switch in the configuration center is in an on state, transferring a data operation request from the instruction library to a first centralized library; and when the emergency switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the corresponding centralized library according to the state of the double-write switch in the configuration center.
In one embodiment, the computer program when executed by the processor further performs the steps of: when a double-write switch in the configuration center is in an on state, transferring a data operation request from the instruction library to the first centralized library and the second centralized library; and when the double-write switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the second centralized library.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the steps of:
responding to a data operation request of an instruction library, and acquiring an operation type of the data operation request;
determining a corresponding control switch according to the operation type;
and migrating the data operation request from the instruction library to the corresponding centralized library according to the state of a control switch in the configuration center.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the operation type is data query operation, determining a gray-turning positive switch, an emergency switch, a double-writing switch and a query switch as a control switch corresponding to the data query operation; and when the operation type is data change operation, determining the emergency switch and the double-write switch as the control switch corresponding to the data change operation.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the grey-transition positive switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the first centralized library; and when the grey-transition positive switch in the configuration center is in an on state, the data operation request is transferred from the instruction library to the corresponding centralized library according to the states of the emergency switch, the double-write switch and the query switch in the configuration center.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the emergency switch in the configuration center is in an on state, or when the emergency switch in the configuration center is in an off state, and the double-write switch and the query switch are in the on states, the data operation request is transferred from the instruction library to the first centralized library; and when the emergency switch and the double-write switch in the configuration center are in an off state, or when the emergency switch in the configuration center is in an off state, the double-write switch is in an on state, and the query switch is in an off state, the data operation request is transferred from the instruction library to the second centralized library.
In one embodiment, the computer program when executed by the processor further performs the steps of: when an emergency switch in the configuration center is in an on state, transferring a data operation request from the instruction library to a first centralized library; and when the emergency switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the corresponding centralized library according to the state of the double-write switch in the configuration center.
In one embodiment, the computer program when executed by the processor further performs the steps of: when a double-write switch in the configuration center is in an on state, transferring a data operation request from the instruction library to the first centralized library and the second centralized library; and when the double-write switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to the second centralized library.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. An instruction base migration method, the method comprising:
responding to a data operation request of an instruction library, and acquiring an operation type of the data operation request;
determining a corresponding control switch according to the operation type;
and migrating the data operation request from the instruction library to a corresponding centralized library according to the state of the control switch in the configuration center.
2. The method of claim 1, wherein determining a corresponding control switch based on the operation type comprises:
when the operation type is data query operation, determining a gray-turning positive switch, an emergency switch, a double-write switch and a query switch as a control switch corresponding to the data query operation;
and when the operation type is data change operation, determining the emergency switch and the double-write switch as the control switch corresponding to the data change operation.
3. The method according to claim 2, wherein when the operation type is a data query operation, the migrating the data operation request from the instruction library to a corresponding centralized library according to the state of the control switch in the configuration center includes:
when the grey-transition positive switch in the configuration center is in an off state, the data operation request is transferred from the instruction library to a first centralized library;
and when the grey-transition positive switch in the configuration center is in an on state, migrating the data operation request from the instruction library to a corresponding centralized library according to the states of the emergency switch, the double-write switch and the query switch in the configuration center.
4. The method of claim 3, wherein migrating the data operation request from the command repository to a corresponding centralized repository according to the states of the panic switch, the dual write switch, and the query switch in the configuration center comprises:
when the emergency switch in the configuration center is in an on state, or when the emergency switch in the configuration center is in an off state, and the double-write switch and the query switch are both in an on state, migrating the data operation request from the instruction library to the first centralized library;
and when the emergency switch and the double-write switch in the configuration center are in an off state, or when the emergency switch in the configuration center is in an off state, the double-write switch is in an on state, and the query switch is in an off state, the data operation request is transferred from the instruction library to a second centralized library.
5. The method according to claim 2, wherein when the operation type is a data change operation, the migrating the data operation request from the instruction library to a corresponding centralized library according to the state of the control switch in the configuration center includes:
when the emergency switch in the configuration center is in an on state, the data operation request is transferred from the instruction library to a first centralized library;
and when the emergency switch in the configuration center is in an off state, migrating the data operation request from the instruction library to a corresponding centralized library according to the state of the double-write switch in the configuration center.
6. The method of claim 5, wherein migrating the data operation request from the command repository to a corresponding centralized repository according to the state of the dual write switch in the configuration center comprises:
migrating the data operation request from the instruction library to the first centralized library and the second centralized library when the double-write switch in the configuration center is in an on state;
migrating the data operation request from the instruction library to the second centralized library when the dual write switch is in an off state in the configuration center.
7. An instruction library migration apparatus, the apparatus comprising:
the type acquisition module is used for responding to a data operation request of an instruction library and acquiring the operation type of the data operation request;
the switch determining module is used for determining a corresponding control switch according to the operation type;
and the request transferring module is used for transferring the data operation request from the instruction library to the corresponding centralized library according to the state of the control switch in the configuration center.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 6 when executed by a processor.
CN202111328977.2A 2021-11-10 2021-11-10 Instruction library migration method and device, computer equipment and storage medium Pending CN114020724A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111328977.2A CN114020724A (en) 2021-11-10 2021-11-10 Instruction library migration method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111328977.2A CN114020724A (en) 2021-11-10 2021-11-10 Instruction library migration method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114020724A true CN114020724A (en) 2022-02-08

Family

ID=80063257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111328977.2A Pending CN114020724A (en) 2021-11-10 2021-11-10 Instruction library migration method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114020724A (en)

Similar Documents

Publication Publication Date Title
US11711420B2 (en) Automated management of resource attributes across network-based services
US9912752B1 (en) Retention-based data management in a network-based data store
US9720620B1 (en) Efficient data volume replication for block-based storage
US9600203B2 (en) Reducing data volume durability state for block-based storage
CN102193807B (en) Method for upgrading image file, server and computer network system
US7567257B2 (en) Partition-based undo of partitioned object graph
US10699190B1 (en) Systems and methods for efficiently updating neural networks
JP2022101479A (en) Transaction processing method of ethereum virtual machine, device, apparatus, program, and medium
US10182104B1 (en) Automatic propagation of resource attributes in a provider network according to propagation criteria
CN111209120A (en) Data synchronization method and device for microservice and computer readable storage medium
CN115686932B (en) Backup set file recovery method and device and computer equipment
US10824641B1 (en) Deterministic query-based replication
CN115344284A (en) Automatic driving software upgrading method and device, storage medium and computer equipment
CN116541336A (en) Software running method of multi-core chip and coprocessor
CN114924911B (en) Method, device, equipment and storage medium for backing up effective data of Windows operating system
CN114020724A (en) Instruction library migration method and device, computer equipment and storage medium
CN114328032A (en) Disaster recovery switching processing method and device based on big data double activities and computer equipment
CN115328704A (en) File backup method, file recovery method, device, equipment and storage medium
CN114691653A (en) Account set migration method and device, computer equipment and storage medium
CN115730016B (en) Data synchronization method, system, device, computer equipment and storage medium
CN115982101B (en) Machine room data migration method and device based on multi-machine room copy placement strategy
CN113311995B (en) Cloud hard disk preparation method and device, computer equipment and storage medium
CN115454651A (en) Operation task processing method and device, storage medium and computer equipment
CN117032729A (en) Configuration information modification method, device, computer equipment and storage medium
CN115237891A (en) Data source configuration method, device, equipment, medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination