CN115118673B - Service traffic migration method, device, equipment and computer readable storage medium - Google Patents

Service traffic migration method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN115118673B
CN115118673B CN202210742474.8A CN202210742474A CN115118673B CN 115118673 B CN115118673 B CN 115118673B CN 202210742474 A CN202210742474 A CN 202210742474A CN 115118673 B CN115118673 B CN 115118673B
Authority
CN
China
Prior art keywords
flow
traffic
switching
service
database
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.)
Active
Application number
CN202210742474.8A
Other languages
Chinese (zh)
Other versions
CN115118673A (en
Inventor
李慎刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202210742474.8A priority Critical patent/CN115118673B/en
Publication of CN115118673A publication Critical patent/CN115118673A/en
Application granted granted Critical
Publication of CN115118673B publication Critical patent/CN115118673B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/20Network architectures or network communication protocols for network security for managing network security; network security policies in general
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The application belongs to the technical field of data processing, and provides a service flow migration method, a device, computer equipment and a computer readable storage medium.

Description

Service traffic migration method, device, equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a service traffic migration method, a device, a computer device, and a computer readable storage medium.
Background
When switching traffic from one database to another, it is not suitable to directly switch traffic from one database to another, especially when traffic is large and the traffic sources are complex. For example, in a property risk service, a property risk payment platform is used as a core system of property risk finance, and is butted with dozens of related party systems, and is called by the related party systems every day, so that hundreds of thousands of single amounts are carried, the transaction amount is up to billions, when a property risk database is switched from one database to another, all service flows of the property risk cannot be switched from the current database to other databases in a one-step manner, otherwise, once a problem occurs in the database switching process, the service flows are not easy to fall back, storage abnormality occurs to the service flows, and loss of a company is conceivable. Therefore, in the conventional technology, when the service traffic needs to be migrated between different databases, there is a technical problem that the traffic switching security is low.
Disclosure of Invention
The application provides a service traffic migration method, a device, computer equipment and a computer readable storage medium, which can solve the technical problem of low service traffic migration safety in the traditional technology.
In a first aspect, the present application provides a service traffic migration method, including: receiving first service flows of a plurality of flow categories in a preset flow category range, and acquiring respective switch states of a flow switching master switch and a flow switching sub-switch corresponding to the first service flows of each flow category, wherein the flow switching master switch is in an open state and used for controlling all flows in the preset flow category range to flow to a first database, and the flow switching sub-switch is in an open state and used for controlling first service flows of a single flow category in the preset flow category range to flow to the first database; identifying whether the respective switch states of the flow switching master switch and the flow switching disconnector are in an open state; if the switch states of the flow switching master switch and the flow switching sub switches are in the open state, controlling the first service flow to the first database; monitoring whether the first service flow is abnormal or not; and if the first service flow is not abnormal, switching other flow switching switches corresponding to the service flows of other flow categories in the preset flow category range to be in an open state so as to control the service flows of the other flow categories to flow to the first database until all the service flows flow to the first database.
In a second aspect, the present application further provides a service traffic migration apparatus, including: the switching state acquisition unit is used for receiving first service flows of a plurality of flow categories in a preset flow category range, and acquiring respective switching states of a flow switching master switch and a flow switching slave switch corresponding to the first service flows of each flow category, wherein the flow switching master switch is in an open state and used for controlling all flows in the preset flow category range to flow to a first database, and the flow switching slave switch is in an open state and used for controlling first service flows of a single flow category in the preset flow category range to flow to the first database; the switch state identification unit is used for identifying whether the respective switch states of the flow switching master switch and the flow switching separation switch are in an open state or not; the flow direction control unit is used for controlling the flow direction of the first service flow to the first database if the switch states of the flow switching master switch and the flow switching sub switches are in the open state; the traffic state monitoring unit is used for monitoring whether the first service traffic is abnormal or not; and the other switch switching unit is used for switching other flow switching sub-switches corresponding to the traffic of other traffic categories in the preset traffic category range into an on state if the first traffic does not have abnormality, so as to control the traffic of the other traffic categories to flow to the first database until all the traffic flows flow to the first database.
In a third aspect, the present application further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the traffic migration method when executing the computer program.
In a fourth aspect, the present application also provides a computer readable storage medium storing a computer program, which when executed by a processor causes the processor to perform the steps of the traffic migration method.
The application provides a service traffic migration method, a service traffic migration device, computer equipment and a computer readable storage medium. According to the processing method, by setting the traffic switching master switch corresponding to all traffic in the preset traffic category range and the traffic switching sub switch corresponding to the traffic of the single traffic category, the traffic switching master switch is matched with the traffic switching sub switch, when traffic migration is normal and abnormal, the traffic flow is controlled to flow to different databases, the gradual migration of the categories of the traffic is realized, compared with the total migration of the traffic in the prior art, the risk of abnormality of a traffic system in the traffic migration process can be reduced, and the data safety in the traffic migration process is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a service traffic migration method provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a first sub-flow of a service traffic migration method according to an embodiment of the present application;
FIG. 3 is a schematic block diagram of a traffic migration apparatus according to an embodiment of the present application;
fig. 4 is a schematic block diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The embodiment of the application provides a service flow migration method, which can be applied to computer equipment such as a server and the like, and can be applied to the insurance industry, for example, when a database of a property risk payment platform is switched from an Oracle database to a domestic database TIDB, the service flow migration method provided by the embodiment of the application can be adopted. Referring to fig. 1, fig. 1 is a flow chart of a service traffic migration method according to an embodiment of the present application. As shown in fig. 1, the method includes the following steps S11 to S17:
s11, receiving first service flows of a plurality of flow categories in a preset flow category range, and acquiring respective switch states of a flow switching master switch and a flow switching separate switch corresponding to the first service flows of each flow category, wherein the flow switching master switch is in an open state and used for controlling all flows in the preset flow category range to flow to a first database, the flow switching master switch is in a closed state and used for controlling all flows in the preset flow category range to flow to a second database, and the flow switching sub switch is in an open state and used for controlling the flow of the first service flows of a single flow category in the preset flow category range to flow to the first database.
The traffic category is a category of traffic by using a mechanism as a unit, using an area as a unit, using a service type as a unit and other traffic attributes, and the preset traffic category range is a range containing a plurality of traffic categories. For example, in the protection industry, the preset flow category range may be in units of an organization, the preset flow category range may include a plurality of organization flows such as an a organization, a B organization, a C organization, and the like, the migration of the flows is performed in units of the flows of each organization, the preset flow category range may also be in units of regions, and the preset flow category range may include flows of a plurality of regions such as an a region, a B region, a C region, and a D region, and the like, and the migration of the flows is performed in units of the flows of each region.
And setting a flow switching master switch for controlling whether all flows in the preset flow category range flow to a first database or flow to a second database, wherein the flow switching master switch is in an open state for controlling all flows in the preset flow category range flow to the first database, and the flow switching master switch is in a closed state for controlling all flows in the preset flow category range flow to the second database. And for the service flow of each flow category in the preset flow category range, setting a flow switching sub-switch corresponding to the service flow of the flow category, wherein the flow switching sub-switch is used for controlling whether the service flow of the single flow category flows to the first database or flows to the second database, the flow switching sub-switch can be configured to be in an open state for controlling the service flow of the single flow category to flow to the first database, and the flow switching sub-switch is in a closed state for controlling the service flow of the single flow category to flow to the second database. If the first database is a new database, the second database is an old database, and the second database is a database to which the traffic originally flows, the migration of the traffic from the old database to the new database can be realized. It should be noted that "first" and "second" in the first database and the second database are only for distinguishing different databases, and are not intended to limit the databases.
When the service flow of a single flow category in the preset flow category range is switched from the second database to the first database, the flow switching master switch corresponding to all flows in the preset flow category range is configured to be in an open state, and meanwhile, the flow switching sub switch corresponding to the service flow of the single flow category is configured to be in an open state. After receiving the service traffic of the single traffic class, the service traffic of the single traffic class can be guided to the first database, so that the service traffic of the single traffic class is migrated to the first database. After receiving first service flows of a plurality of flow categories in a preset flow category range, acquiring respective switch states of a flow switching master switch and a flow switching sub switch corresponding to the first service flows of each flow category, and determining whether the first service flows of the single flow category flow to a first database or flow to a second database according to the respective switch states of the flow switching master switch and the flow switching sub switch.
S12, identifying whether the respective switch states of the flow switching master switch and the flow switching separation switch are in an open state;
S13, if the switch states of the flow switching master switch and the flow switching sub switches are in the open state, controlling the first service flow to the first database;
and S14, if the switch states of the flow switching master switch and the flow switching sub switches are not in the open state, controlling the first service flow to a second database.
Specifically, the on-off state of the traffic switch master switch may be described as a first on-off state, the on-off state of the traffic switch sub-switch may be described as a second on-off state, according to the received first traffic, the first on-off state of the traffic switch master switch and the second on-off state of the traffic switch sub-switch corresponding to the first traffic of each traffic class are obtained, whether the first on-off state and the second on-off state are both on is identified, whether the respective on-off states of the traffic switch master switch and the traffic switch sub-switch are both on is identified, if the respective on-off states of the traffic switch master switch and the traffic switch sub-switch are both on, the first traffic is moved to the first database, so that the first traffic is moved to the first database, and if the respective on-off states of the traffic switch master switch and the traffic switch sub-switch are not both on, the first traffic is still moved to the second database, so that the traffic is still moved to the first database according to the traffic class. If the first database is a new database and the second database is an old database, gradual migration of part of service traffic can be realized, and the service traffic of which the traffic switching sub-switch is in a closed state is still led to the old database, especially when the service traffic is switched between the new database and the old database, the migration of a small part of less important service traffic can be performed firstly, and on the premise of ensuring that a system for migrating the service traffic is stable and data safety, the migration of a large part of important service traffic is performed gradually, so that the stability and safety of service traffic migration can be ensured. Wherein "first" of the first switch states and "second" of the second switch states are for distinguishing between the different switch states, and are not for limiting the switch states.
S15, monitoring whether the first service flow is abnormal or not.
S16, if the first service flow is not abnormal, switching other flow switching sub-switches corresponding to the service flows of other flow categories in the preset flow category range to be in an on state so as to control the service flows of the other flow categories to flow to the first database until all the service flows flow to the first database.
And S17, if the first service flow is abnormal, switching the flow switching master switch to an off state so as to control the first service flow to the second database.
Specifically, it may be determined whether the first traffic is abnormal, for example, whether the first traffic migrated to the first database has an abnormal condition such as a data storage error, incorrect call, and a substantial decrease in the first traffic, especially, whether the first traffic is abnormal in a preset time period, that is, whether the first traffic migrated to the first database is continuously in a normal steady state in the preset time period is determined, if the first traffic is not abnormal, other traffic switches corresponding to traffic in other traffic categories in the preset traffic category range are continuously switched to an open state, if the other traffic switches are multiple, a plurality of the other traffic switches can be gradually switched to an open state, for example, according to the order of small to large traffic of each other traffic category or the importance of traffic of each other traffic category from light to heavy traffic, the other traffic switches corresponding to the other traffic in each other traffic category are gradually switched to an open state, so that the traffic in the first traffic category is gradually switched to an abnormal traffic, and the traffic in the database is gradually switched to the first traffic category, thereby the risk of all traffic in the database is gradually reduced, and the risk of the traffic in the database is gradually reduced. If the first traffic has an abnormality, in order to avoid migration risk of the traffic migrated to the first database, the traffic switch is switched to a closed state, no traffic is migrated to the first database, the first traffic flows to the second database until no problem exists in the first database, and then the traffic is migrated to the first database, especially when traffic of a plurality of traffic categories is migrated, the traffic switch is adopted, so that all the migrated traffic can be migrated back to the second database in one step, any migration risk of the traffic is reduced to the minimum, the security in the traffic migration process is ensured, and the abnormality existing in the traffic system is repaired manually until no risk exists in the traffic system, and then the traffic of the traffic category is imported to the first database.
Further, if the first traffic has an abnormality, the abnormality may be further alerted, for example, by alerting in an alert manner such as text alert, short message, mail or acousto-optic alert, so as to alert related personnel to perform abnormality processing.
According to the embodiment of the application, through setting the traffic switching master switch corresponding to all traffic in the preset traffic category range and the traffic switching sub-switch corresponding to the single traffic category traffic, the traffic switching master switch is matched with the traffic switching sub-switch, when traffic migration is normal and abnormal, the traffic flow is controlled to flow to different databases, the gradual migration of the traffic categories is realized, compared with the total traffic migration of the traffic in the prior art, the risk of abnormality of a traffic system in the traffic migration process can be reduced, and the data security in the traffic migration process is ensured.
In an embodiment, after the first traffic flows to the second database, the method further includes:
and synchronizing the service flow in the second database to the first database.
Specifically, since the final objective is to migrate the traffic from the second database to the first database, in order to avoid the problem that the time for intensively migrating a large amount of traffic in the second database is long and the memory is occupied for a long time, after the first traffic flows to the second database, the traffic in the second database is timely synchronized to the first database, and a Kafka consumption message-based manner may be adopted to gradually synchronize the traffic in the second database to the first database, so as to realize timely and gradual migration of the traffic in the second database to the first database.
In an embodiment, referring to fig. 2, fig. 2 is a schematic diagram of a first sub-flow of a traffic migration method provided in the embodiment of the present application, as shown in fig. 2, in this embodiment, the step of switching a plurality of other traffic switching sub-switches to an on state includes:
s21, acquiring a flow size weight corresponding to the flow size of the service flow of each other flow category and an importance degree weight corresponding to the importance degree of the service flow of each other flow category;
s22, counting the comprehensive weights corresponding to the flow size weights and the importance degree weights according to a preset counting mode to obtain the comprehensive weights of the service flows of each other flow category;
s23, according to the sequence of the comprehensive weights from small to large, the other flow switching sub-switches corresponding to the service flows of the other flow categories are gradually switched to an open state.
Specifically, for each traffic of other traffic categories, a traffic size is given a weight according to the traffic size corresponding to the traffic of the single traffic category, a traffic category with a large traffic may be given a larger weight, a category with a small traffic may be given a smaller weight, and a importance degree is given a weight according to the importance degree of the traffic corresponding to the traffic of the single traffic category, a traffic category with relatively important traffic data corresponding to the traffic may be given a larger weight, and a traffic category with relatively less important traffic data corresponding to the traffic may be given a smaller weight. The method comprises the steps of obtaining the flow size weight corresponding to the flow size of the service flow of each other flow category and the importance degree weight corresponding to the importance degree of the service flow of each other flow category, according to a preset statistical mode, the preset statistical mode can be an operation mode of adding, subtracting, multiplying, dividing and the like the flow size weight and the importance degree, as long as an operation result of the preset statistical mode can show an operation mode with positive corresponding relation with the flow size weight and the importance degree, counting the comprehensive weight corresponding to the flow size weight and the importance degree, obtaining the comprehensive weight of the service flow of each other flow category, then gradually switching other flow switching sub-switches corresponding to the service flow of each other flow category into an open state according to the sequence of the comprehensive weight from small to large, comprehensively considering the comprehensive importance (i.e. comprehensive weight) of the service flow, gradually switching the service flow corresponding to the service flow of each other flow category into a first important flow according to the sequence of the comprehensive importance from light to heavy, gradually shifting the service flow to a second important flow, and gradually shifting the service flow to a first important flow, and gradually shifting the service flow to a higher important flow to a higher security, and gradually shifting the service flow to a higher priority.
It should be noted that, in the service traffic migration method described in each embodiment, the technical features included in different embodiments may be recombined according to needs to obtain a combined embodiment, which is within the scope of protection claimed in the present application.
Referring to fig. 3, fig. 3 is a schematic block diagram of a service traffic migration apparatus according to an embodiment of the present application. Corresponding to the above service traffic migration method, the embodiment of the present application further provides a service traffic migration device. As shown in fig. 3, the traffic migration apparatus includes a unit for performing the above-mentioned traffic migration method, and the traffic migration apparatus may be configured in a computer device. Specifically, referring to fig. 3, the traffic migration device 30 includes a switch state obtaining unit 31, a switch state identifying unit 32, a traffic flow direction control unit 33, a traffic state monitoring unit 34, and other switch switching units 35.
The switch state obtaining unit 31 is configured to receive first traffic flows of a plurality of traffic categories within a preset traffic category range, obtain respective switch states of a traffic switch master switch and a traffic switch slave switch corresponding to the first traffic flows of each traffic category, where the traffic switch master switch is in an on state for controlling all traffic flows within the preset traffic category range to flow to the first database, and the traffic switch slave switch is in an on state for controlling first traffic flows of a single traffic category within the preset traffic category range to flow to the first database;
A switch state identifying unit 32, configured to identify whether the respective switch states of the flow switching master switch and the flow switching slave switch are all in an open state;
a flow direction control unit 33, configured to control the flow direction of the first service flow to the first database if the switch states of the flow switching master switch and the flow switching sub switch are both in an on state;
a traffic state monitoring unit 34, configured to monitor whether the first traffic has an abnormality;
and the other switch switching unit 35 is configured to switch, if the first traffic is abnormal, other traffic switches corresponding to traffic of other traffic classes within the preset traffic class range to an on state, so as to control traffic of the other traffic classes to flow to the first database until all traffic flows flow to the first database.
In an embodiment, the other switch switching unit 35 is configured to switch the plurality of other flow switching sub-switches to the on state step by step.
In an embodiment, the other switch switching unit 35 is configured to switch the other traffic switch sub-switches corresponding to the traffic of the plurality of other traffic classes to the on state step by step according to the order of the traffic of each other traffic class from small to large or the importance of the traffic of each other traffic class from light to heavy.
In an embodiment, the other switch switching unit 35 includes:
the weight acquisition subunit is used for acquiring the flow weight corresponding to the flow of the service flow of each other flow category and the importance weight corresponding to the importance of the service flow of each other flow category;
the weight statistics subunit is used for counting the comprehensive weights corresponding to the flow size weights and the importance degree weights according to a preset statistical mode to obtain the comprehensive weights of the service flows of each other flow category;
and the switch opening subunit is used for gradually switching the other flow switching sub-switches corresponding to the service flows of the plurality of other flow categories into an open state according to the sequence from small to large of the comprehensive weight.
In an embodiment, the flow-switching master switch is in an off state and is used for controlling all flows in the preset flow category range to flow to the second database; the traffic migration device 30 further includes:
and the switch closing unit is used for switching the flow switching master switch into a closing state if the first service flow is abnormal so as to control the first service flow to the second database.
In one embodiment, the service traffic migration device 30 further includes:
and the flow synchronization unit is used for synchronizing the service flow in the second database to the first database.
In one embodiment, the service traffic migration device 30 further includes:
and the abnormality alarming unit is used for alarming the abnormality if the first service flow is abnormal.
It should be noted that, as those skilled in the art can clearly understand, the specific implementation process of the foregoing service traffic migration apparatus and each unit may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, the description is omitted herein.
Meanwhile, the division and connection modes of the units in the service flow migration device are only used for illustration, in other embodiments, the service flow migration device can be divided into different units according to the needs, and different connection sequences and modes can be adopted for the units in the service flow migration device so as to complete all or part of functions of the service flow migration device.
The traffic migration means described above may be implemented in the form of a computer program which is executable on a computer device as shown in fig. 4.
Referring to fig. 4, fig. 4 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 may be a computer device such as a desktop computer or a server, or may be a component or part of another device.
With reference to fig. 4, the computer device 500 includes a processor 502, a memory, and a network interface 505, which are connected by a system bus 501, wherein the memory may include a non-volatile storage medium 503 and an internal memory 504, which may also be a volatile storage medium.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer programs 5032, when executed, enable the processor 502 to perform a traffic migration method as described above.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the non-volatile storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform a traffic migration method as described above.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of a portion of the architecture in connection with the present application and is not intended to limit the computer device 500 to which the present application is applied, and that a particular computer device 500 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components. For example, in some embodiments, the computer device may include only a memory and a processor, and in such embodiments, the structure and function of the memory and the processor are consistent with the embodiment shown in fig. 4, and will not be described again.
Wherein the processor 502 is configured to execute a computer program 5032 stored in a memory to implement the steps of: receiving first service flows of a plurality of flow categories in a preset flow category range, and acquiring respective switch states of a flow switching master switch and a flow switching sub-switch corresponding to the first service flows of each flow category, wherein the flow switching master switch is in an open state and used for controlling all flows in the preset flow category range to flow to a first database, and the flow switching sub-switch is in an open state and used for controlling first service flows of a single flow category in the preset flow category range to flow to the first database; identifying whether the respective switch states of the flow switching master switch and the flow switching disconnector are in an open state; if the switch states of the flow switching master switch and the flow switching sub switches are in the open state, controlling the first service flow to the first database; monitoring whether the first service flow is abnormal or not; and if the first service flow is not abnormal, switching other flow switching switches corresponding to the service flows of other flow categories in the preset flow category range to be in an open state so as to control the service flows of the other flow categories to flow to the first database until all the service flows flow to the first database.
In an embodiment, when the processor 502 realizes that the other traffic switch corresponding to the traffic of the other traffic classes within the preset traffic class range is switched to the on state, the following steps are specifically implemented:
and gradually switching the other flow switching sub-switches into an open state.
In one embodiment, when the processor 502 performs the step of switching the plurality of other flow switches to the on state, the following steps are specifically implemented:
according to the sequence that the service flow of each other flow category is from small to large or the importance of the service flow of each other flow category is from light to heavy, the other flow switching sub-switches corresponding to the service flows of the other flow categories are gradually switched to an open state.
In one embodiment, when the processor 502 performs the step of switching the plurality of other flow switches to the on state, the following steps are specifically implemented:
acquiring the flow weight corresponding to the flow of the service flow of each other flow category and the importance weight corresponding to the importance of the service flow of each other flow category;
According to a preset statistical mode, counting the comprehensive weights corresponding to the flow size weights and the importance degree weights to obtain the comprehensive weights of the service flows of each other flow category;
and gradually switching the other flow switching sub-switches corresponding to the service flows of the other flow categories into an open state according to the sequence of the comprehensive weights from small to large.
In an embodiment, the flow-switching master switch is in an off state and is used for controlling all flows in the preset flow category range to flow to the second database; the processor 502 also implements the following steps:
and if the first service flow is abnormal, switching the flow switching master switch into a closed state so as to control the first service flow to the second database.
In an embodiment, after implementing the flowing the first traffic to the second database, the processor 502 further implements the following steps:
and synchronizing the service flow in the second database to the first database.
In one embodiment, the processor 502 further performs the steps of:
and if the first service flow is abnormal, alarming the abnormality.
It should be appreciated that in embodiments of the present application, the processor 502 may be a central processing unit (Central Processing Unit, CPU), the processor 502 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It will be appreciated by those skilled in the art that all or part of the flow of the method of the above embodiments may be implemented by a computer program, which may be stored on a computer readable storage medium. The computer program is executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present application also provides a computer-readable storage medium. The computer readable storage medium may be a nonvolatile computer readable storage medium or a volatile computer readable storage medium, and the computer readable storage medium stores a computer program, and when executed by a processor, causes the processor to execute the steps of:
A computer program product which, when run on a computer, causes the computer to perform the steps of the traffic migration method described in the above embodiments.
The computer readable storage medium may be an internal storage unit of the aforementioned device, such as a hard disk or a memory of the device. The computer readable storage medium may also be an external storage device of the device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the device. Further, the computer readable storage medium may also include both internal storage units and external storage devices of the device.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, device and unit described above may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
The storage medium is a physical, non-transitory storage medium, and may be, for example, a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the application can be combined, divided and deleted according to actual needs. In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The integrated unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing an electronic device (which may be a personal computer, a terminal, a network device, or the like) to perform all or part of the steps of the method described in the embodiments of the present application.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (7)

1. A traffic migration method, comprising:
receiving first service flows of a plurality of flow categories in a preset flow category range, and acquiring respective switch states of a flow switching master switch and a flow switching sub-switch corresponding to the first service flows of each flow category, wherein the flow switching master switch is in an open state and used for controlling all flows in the preset flow category range to flow to a first database, and the flow switching sub-switch is in an open state and used for controlling first service flows of a single flow category in the preset flow category range to flow to the first database;
identifying whether the respective switch states of the flow switching master switch and the flow switching disconnector are in an open state;
if the switch states of the flow switching master switch and the flow switching sub switches are in the open state, controlling the first service flow to the first database;
monitoring whether the first service flow is abnormal or not;
if the first service flow is not abnormal, switching other flow switching switches corresponding to the service flows of other flow categories in the preset flow category range to be in an open state so as to control the service flows of the other flow categories to flow to the first database until all the service flows flow to the first database;
The switching the other traffic switch corresponding to the traffic of the other traffic classes within the preset traffic class range to the on state includes:
gradually switching the other flow switching sub-switches to an on state;
the step of switching the plurality of other flow switching sub-switches to an on state includes:
according to the sequence that the service flow of each other flow category is from small to large or the importance of the service flow of each other flow category is from light to heavy, the other flow switching sub-switches corresponding to the service flows of the other flow categories are gradually switched to an open state;
the flow switching master switch is in a closing state and is used for controlling all flow in the preset flow category range to flow to the second database; the method further comprises the steps of:
and if the first service flow is abnormal, switching the flow switching master switch into a closed state so as to control the first service flow to the second database.
2. The traffic migration method according to claim 1, wherein said gradually switching the plurality of other traffic switching sub-switches to an on state comprises:
Acquiring the flow weight corresponding to the flow of the service flow of each other flow category and the importance weight corresponding to the importance of the service flow of each other flow category;
according to a preset statistical mode, counting the comprehensive weights corresponding to the flow size weights and the importance degree weights to obtain the comprehensive weights of the service flows of each other flow category;
and gradually switching the other flow switching sub-switches corresponding to the service flows of the other flow categories into an open state according to the sequence of the comprehensive weights from small to large.
3. The traffic migration method of claim 1, wherein after the first traffic flows to the second database, further comprising:
and synchronizing the service flow in the second database to the first database.
4. The traffic migration method of claim 1, further comprising:
and if the first service flow is abnormal, alarming the abnormality.
5. A traffic migration apparatus, comprising:
the switching state acquisition unit is used for receiving first service flows of a plurality of flow categories in a preset flow category range, and acquiring respective switching states of a flow switching master switch and a flow switching slave switch corresponding to the first service flows of each flow category, wherein the flow switching master switch is in an open state and used for controlling all flows in the preset flow category range to flow to a first database, and the flow switching slave switch is in an open state and used for controlling first service flows of a single flow category in the preset flow category range to flow to the first database;
The switch state identification unit is used for identifying whether the respective switch states of the flow switching master switch and the flow switching separation switch are in an open state or not;
the flow direction control unit is used for controlling the flow direction of the first service flow to the first database if the switch states of the flow switching master switch and the flow switching sub switches are in the open state;
the traffic state monitoring unit is used for monitoring whether the first service traffic is abnormal or not;
the other switch switching unit is used for switching other flow switching sub-switches corresponding to the service flows of other flow categories in the preset flow category range into an open state if the first service flow is not abnormal, so as to control the service flows of the other flow categories to flow to the first database until all the service flows flow to the first database;
the other switch switching unit is specifically configured to gradually switch other flow switching sub-switches corresponding to the service flows of the plurality of other flow categories into an on state according to a sequence that the service flows of each other flow category are from small to large or the importance of the service flows of each other flow category is from light to heavy;
The flow switching master switch is in a closing state and is used for controlling all flow in the preset flow category range to flow to the second database; the service flow migration device further comprises:
and the switch closing unit is used for switching the flow switching master switch into a closing state if the first service flow is abnormal so as to control the first service flow to the second database.
6. A computer device comprising a memory and a processor coupled to the memory; the memory is used for storing a computer program; the processor being adapted to run the computer program to perform the steps of the method according to any of claims 1-4.
7. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the steps of the method according to any of claims 1-4.
CN202210742474.8A 2022-06-28 2022-06-28 Service traffic migration method, device, equipment and computer readable storage medium Active CN115118673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210742474.8A CN115118673B (en) 2022-06-28 2022-06-28 Service traffic migration method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210742474.8A CN115118673B (en) 2022-06-28 2022-06-28 Service traffic migration method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN115118673A CN115118673A (en) 2022-09-27
CN115118673B true CN115118673B (en) 2023-05-26

Family

ID=83330299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210742474.8A Active CN115118673B (en) 2022-06-28 2022-06-28 Service traffic migration method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115118673B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108763405A (en) * 2018-05-22 2018-11-06 深信服网络科技(深圳)有限公司 A kind of business datum moving method, device, system and readable storage medium storing program for executing
WO2019148722A1 (en) * 2018-02-01 2019-08-08 平安科技(深圳)有限公司 Electronic device, data migrating and calling method and storage medium
CN113468148A (en) * 2021-08-13 2021-10-01 上海浦东发展银行股份有限公司 Data migration method and device of database, electronic equipment and storage medium thereof
CN113986879A (en) * 2021-10-27 2022-01-28 金蝶云科技有限公司 Service data migration method and related device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10382281B1 (en) * 2013-06-26 2019-08-13 Hcl Technologies Limited Rule based IPv4 to IPv6 migration assisting framework

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019148722A1 (en) * 2018-02-01 2019-08-08 平安科技(深圳)有限公司 Electronic device, data migrating and calling method and storage medium
CN108763405A (en) * 2018-05-22 2018-11-06 深信服网络科技(深圳)有限公司 A kind of business datum moving method, device, system and readable storage medium storing program for executing
CN113468148A (en) * 2021-08-13 2021-10-01 上海浦东发展银行股份有限公司 Data migration method and device of database, electronic equipment and storage medium thereof
CN113986879A (en) * 2021-10-27 2022-01-28 金蝶云科技有限公司 Service data migration method and related device

Also Published As

Publication number Publication date
CN115118673A (en) 2022-09-27

Similar Documents

Publication Publication Date Title
US11226989B2 (en) Dynamic interest-based notifications
CN110516928B (en) Decision method, device, equipment and computer readable medium for business private line
JP2021121956A (en) Failure prediction method, device, electronic facility, storage media and program
CN105095056A (en) Method for monitoring data in data warehouse
US20150081376A1 (en) Customization of event management and incident management policies
US9030923B2 (en) Power and connectivity aware switch
US20170329655A1 (en) Method and apparatus of unloading out of memory processing flow to user space
CN110175165A (en) Transaction account checking method, device, computer equipment and storage medium
CN113141410B (en) Dynamically adjusted QPS control method, system, device and storage medium
CN111694677A (en) Message queue management method, device, terminal and computer-readable storage medium
CN109893854A (en) A kind of server data management method and system
CN115118673B (en) Service traffic migration method, device, equipment and computer readable storage medium
CN111338869A (en) Configuration parameter management method, device, equipment and storage medium
US9787534B1 (en) System, method, and computer program for generating event tests associated with a testing project
CN114301760A (en) Test method, test device, electronic equipment and storage medium
CN113760634A (en) Data processing method and device
CN108038127A (en) A kind of method, apparatus, terminal device and the storage medium of data synchronization
WO2019227622A1 (en) Task tracking method, apparatus, and device for call center, and storage medium
CN113590287B (en) Task processing method, device, equipment, storage medium and scheduling system
CN115729786A (en) Monitoring method, device, equipment and storage medium applied to multiple systems
CN107957915B (en) Heartbeat detection method of called party system, storage medium and server
CN110543470A (en) Message early warning method and device, storage medium and electronic device
CN113765730A (en) Method and device for monitoring data link network
CN110490737A (en) Transaction channel control method, device and electronic equipment
CN112860271A (en) Method, device, equipment and storage medium for switching between new system and old system

Legal Events

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