CN113572865B - Dual-stack flow switching method, device, storage medium and equipment - Google Patents

Dual-stack flow switching method, device, storage medium and equipment Download PDF

Info

Publication number
CN113572865B
CN113572865B CN202110829942.0A CN202110829942A CN113572865B CN 113572865 B CN113572865 B CN 113572865B CN 202110829942 A CN202110829942 A CN 202110829942A CN 113572865 B CN113572865 B CN 113572865B
Authority
CN
China
Prior art keywords
index
value
terminal
time period
availability
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
CN202110829942.0A
Other languages
Chinese (zh)
Other versions
CN113572865A (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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202110829942.0A priority Critical patent/CN113572865B/en
Publication of CN113572865A publication Critical patent/CN113572865A/en
Application granted granted Critical
Publication of CN113572865B publication Critical patent/CN113572865B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/686Types of network addresses using dual-stack hosts, e.g. in Internet protocol version 4 [IPv4]/Internet protocol version 6 [IPv6] networks

Abstract

The application discloses a method, a device, a storage medium and equipment for switching dual stack flow, wherein a first availability index of a terminal is obtained through calculation according to an index in a first index set fed back by the terminal, and a second availability index of the terminal is obtained through calculation according to an index in a second index set fed back by the terminal. An IPv4 availability indicator is obtained based on a first availability indicator of the terminal, and an IPv6 availability indicator is obtained based on a second availability indicator of the terminal. And under the condition that the value of the IPv4 availability index is greater than the preset threshold and the value of the IPv6 availability index is not greater than the preset threshold, suspending IPv6 domain name resolution and resolving all flow domain names to IPv4. Based on the IPv4 availability index and the IPv6 availability index of the preset time period, the method can ensure that only one Internet protocol switching can be performed in each preset time period, thereby improving the user experience.

Description

Dual-stack flow switching method, device, storage medium and equipment
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, an apparatus, a storage medium, and a device for switching dual stack flows.
Background
Internet Protocol Version 6 (IPv 6) is The next generation Internet Protocol (IP) designed by The Internet Engineering Task Force (IETF) to replace Internet Protocol Version4 (IPv 4), and The number of addresses can be called to code an address for each sand worldwide. Due to various factors, IPv6 cannot immediately replace IPv4, so that IPv4 and IPv6 coexist in a network environment for a considerable period of time, and the IPv4/IPv6 dual stack technology (referred to as dual stack mechanism) is a solution in the transition period. The dual-stack mechanism is that the network node has both IPv4 and IPv6 and supports both IPv4 and IPv6. Therefore, how to reasonably switch between IPv4 and IPv6 becomes a current research focus.
At present, the existing dual stack traffic switching scheme is: and in the case of detecting the congestion of the IPv6, switching the IPv6 to the IPv4. However, in the case of frequent network fluctuation, the existing switching manner has frequent internet protocol switching frequency, which seriously affects the user experience.
Disclosure of Invention
The application provides a method, a device, a storage medium and equipment for switching dual-stack flow, and aims to reduce the switching frequency of an internet protocol so as to ensure user experience.
In order to achieve the above object, the present application provides the following technical solutions:
a dual-stack traffic switching method comprises the following steps:
in each preset time period, regularly sending a monitoring instruction to each terminal, and receiving monitoring information fed back by each terminal based on the monitoring instruction; the monitoring information comprises a first index set and a second index set;
calculating to obtain a first availability index of each terminal according to each index in a first index set fed back by each terminal, and calculating to obtain a second availability index of each terminal according to each index in a second index set fed back by each terminal;
calculating to obtain an IPv4 availability index of the preset time period based on the first availability index of each terminal, and calculating to obtain an IPv6 availability index of the preset time period based on the second availability index of each terminal;
and under the condition that the value of the IPv4 availability index in the preset time period is greater than a preset threshold value and the value of the IPv6 availability index in the preset time period is not greater than the preset threshold value, suspending IPv6 domain name resolution in the preset time period and resolving all flow domain names in the preset time period to IPv4.
Optionally, the method further includes:
and under the condition that the value of the IPv4 availability index in the preset time period is not greater than the preset threshold and the value of the IPv6 availability index in the preset time period is greater than the preset threshold, suspending the IPv4 domain name resolution in the preset time period and resolving all flow domain names in the preset time period to IPv6.
Optionally, the method further includes:
and under the condition that the value of the IPv4 availability index in the preset time period is not greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is not greater than the preset threshold value, suspending IPv4 domain name resolution and IPv6 domain name resolution in the preset time period and sending an alarm prompt to a user.
Optionally, the method further includes:
and under the condition that the value of the IPv4 availability index in the preset time period is greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is greater than the preset threshold value, analyzing all the flow domain names in the preset time period to IPv4 and IPv6 respectively according to a preset proportion.
Optionally, the calculating to obtain the first availability index of each terminal according to each index in the first index set fed back by each terminal, and calculating to obtain the second availability index of each terminal according to each index in the second index set fed back by each terminal includes:
normalizing the value of each index in the first index set fed back by each terminal to obtain a scalar corresponding to each index in the first index set fed back by each terminal, and performing weighted summation on the scalars corresponding to each index in the first index set fed back by each terminal according to the preset weight of each index in the first index set fed back by each terminal to obtain a first availability index of each terminal;
and carrying out normalization processing on the value of each index in the second index set fed back by each terminal to obtain a scalar corresponding to each index in the second index set fed back by each terminal, and carrying out weighted summation on the scalars corresponding to each index in the second index set fed back by each terminal according to the preset weight of each index in the second index set fed back by each terminal to obtain a second availability index of each terminal.
Optionally, the calculating an IPv4 availability index for the preset time period based on the first availability index of each terminal, and calculating an IPv6 availability index for the preset time period based on the second availability index of each terminal includes:
counting the number of terminals with the value of the first availability index larger than a preset value to obtain a first value, and calculating the ratio of the first value to a target value to obtain the IPv4 availability index of the preset time period; the target value is used for indicating the total number of the terminals;
and counting the number of the terminals of which the values of the second availability indexes are larger than the preset value to obtain a second value, and calculating the ratio of the second value to the target value to obtain the IPv6 availability index of the preset time period.
A dual stack traffic switching apparatus, comprising:
the monitoring unit is used for sending a monitoring instruction to each terminal at regular time in each preset time period and receiving monitoring information fed back by each terminal based on the monitoring instruction; the monitoring information comprises a first index set and a second index set;
the first calculation unit is used for calculating a first availability index of each terminal according to each index in a first index set fed back by each terminal, and calculating a second availability index of each terminal according to each index in a second index set fed back by each terminal;
a second calculating unit, configured to calculate an IPv4 availability index for the preset time period based on the first availability index of each terminal, and calculate an IPv6 availability index for the preset time period based on the second availability index of each terminal;
and the traffic switching unit is used for suspending the IPv6 domain name resolution within the preset time period and resolving all traffic domain names within the preset time period to IPv4 when the value of the IPv4 availability index within the preset time period is greater than a preset threshold and the value of the IPv6 availability index within the preset time period is not greater than the preset threshold.
Optionally, the first computing unit is specifically configured to:
normalizing the value of each index in the first index set fed back by each terminal to obtain a scalar corresponding to each index in the first index set fed back by each terminal, and performing weighted summation on the scalars corresponding to each index in the first index set fed back by each terminal according to the preset weight of each index in the first index set fed back by each terminal to obtain a first availability index of each terminal;
normalizing the value of each index in the second index set fed back by each terminal to obtain a scalar corresponding to each index in the second index set fed back by each terminal, and performing weighted summation on the scalars corresponding to each index in the second index set fed back by each terminal according to the preset weight of each index in the second index set fed back by each terminal to obtain a second availability index of each terminal.
A computer-readable storage medium comprising a stored program, wherein the program performs the dual stack traffic switching method.
A dual stack traffic switching apparatus comprising: a processor, memory, and a bus; the processor and the memory are connected through the bus;
the memory is used for storing a program, and the processor is used for executing the program, wherein the program executes the dual stack flow switching method during running.
According to the technical scheme, the monitoring instruction is sent to each terminal at regular time in each preset time period, monitoring information fed back by each terminal based on the monitoring instruction is received, and the monitoring information comprises a first index set and a second index set. And calculating to obtain a first availability index of each terminal according to each index in the first index set fed back by each terminal, and calculating to obtain a second availability index of each terminal according to each index in the second index set fed back by each terminal. And calculating the IPv4 availability index of the preset time period based on the first availability index of each terminal, and calculating the IPv6 availability index of the preset time period based on the second availability index of each terminal. And under the conditions that the value of the IPv4 availability index in the preset time period is greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is not greater than the preset threshold value, suspending IPv6 domain name resolution in the preset time period and resolving all flow domain names in the preset time period to IPv4. Based on the IPv4 availability index and the IPv6 availability index of the preset time period, the method can ensure that only one Internet protocol switching can be performed in each preset time period, and the Internet protocol switching cannot be performed frequently, so that the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a dual stack traffic switching method according to an embodiment of the present application;
fig. 2 is a schematic diagram of another dual stack traffic switching method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a dual stack traffic switching apparatus according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As shown in fig. 1, a schematic diagram of a dual stack traffic switching method provided in the embodiment of the present application includes the following steps:
s101: and in each preset time period, regularly sending a monitoring instruction to each terminal, and receiving monitoring information fed back by each terminal based on the monitoring instruction.
Each terminal is a user of the dual stack flow, and the dual stack flow comprises the IPv4 flow and the IPv6 flow. The monitoring instruction includes service information, which includes but is not limited to: service name, service domain name, application protocol, IPv4 address of service, IPv6 address of service, etc. The monitoring information comprises a first index set and a second index set, each index in the first index set is used for measuring the probability that the terminal successfully realizes the service access by using the IPv4 flow, and each index in the second index set is used for measuring the probability that the terminal successfully realizes the service access by using the IPv6 flow.
It should be noted that the types of the indexes included in the first index set are the same as the types of the indexes included in the second index set, and include, but are not limited to: the index of the web page/application program element, the index of the streaming media, the index of the transmission, the index of the network, the index of the protocol, and the like.
Besides, the monitoring instructions are sent to the terminals at regular time, maintenance instructions are also sent to the terminals at regular time, and maintenance information fed back by the terminals based on the maintenance instructions is received. The maintenance information includes information of a region to which the terminal belongs, hardware information of the terminal, an operating system used by the terminal, a browser used by the terminal, and a network state of the terminal.
S102: and carrying out normalization processing on the value of each index in the first index set fed back by each terminal to obtain a scalar corresponding to each index in the first index set fed back by each terminal, and carrying out weighted summation on the scalars corresponding to each index in the first index set fed back by each terminal according to the preset weight of each index in the first index set fed back by each terminal to obtain a first availability index of each terminal.
S103: and counting the number of the terminals of which the value of the first availability index is greater than the preset value to obtain a first value, and calculating the ratio of the first value to the target value to obtain the IPv4 availability index of the preset time period.
The target value is used for indicating the total number of each terminal, and the total number of each terminal is obtained through statistics in advance.
S104: and carrying out normalization processing on the value of each index in the second index set fed back by each terminal to obtain a scalar corresponding to each index in the second index set fed back by each terminal, and carrying out weighted summation on the scalars corresponding to each index in the second index set fed back by each terminal according to the preset weight of each index in the second index set fed back by each terminal to obtain a second availability index of each terminal.
Wherein S104 and S102 may be executed concurrently.
S105: and counting the number of the terminals of which the values of the second availability indexes are larger than the preset value to obtain a second value, and calculating the ratio of the second value to the target value to obtain the IPv6 availability index of the preset time period.
S106: and under the condition that the value of the IPv4 availability index in the preset time period is greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is not greater than the preset threshold value, suspending IPv6 domain name resolution in the preset time period and resolving all flow domain names in the preset time period to IPv4.
If the value of the IPv6 availability index of the preset time period is not greater than the preset threshold, it indicates that the IPv6 of the preset time period has a problem.
S107: and under the condition that the value of the IPv4 availability index in the preset time period is not greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is greater than the preset threshold value, suspending the IPv4 domain name resolution in the preset time period and resolving all flow domain names in the preset time period to the IPv6.
And if the value of the IPv4 availability index in the preset time period is not greater than the preset threshold, the IPv4 in the preset time period is represented to have a problem.
S108: and under the condition that the value of the IPv4 availability index in the preset time period is not greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is not greater than the preset threshold value, suspending IPv4 domain name resolution and IPv6 domain name resolution in the preset time period and sending an alarm prompt to a user.
S109: and under the condition that the value of the IPv4 availability index in the preset time period is greater than a preset threshold value and the value of the IPv6 availability index in the preset time period is greater than the preset threshold value, analyzing all the flow domain names in the preset time period to IPv4 and IPv6 respectively according to a preset proportion.
In summary, it can be detected whether there is a problem in IPv4 according to the IPv4 availability index, and if there is a problem in IPv4, the IPv4 domain name resolution is suspended, and all traffic domain names are resolved to IPv6. Similarly, whether the IPv4 has a problem or not can be detected according to the IPv6 availability index, if the IPv6 has the problem, the IPv6 domain name resolution is suspended, and all the flow domain names are resolved to the IPv4. Therefore, when any one of the IPv4 and the IPv6 has a problem, the domain name of all the traffic can be timely analyzed to the other normal Internet protocol, the continuity of the service is guaranteed, and the user experience is improved. In addition, based on the IPv4 availability index and the IPv6 availability index of the preset time period, it can be ensured that only one internet protocol switch can be performed within each preset time period (i.e., all traffic domain names are resolved to a normal internet protocol in the case that any one internet protocol has a problem), and the internet protocol switch is not performed frequently, thereby improving user experience.
It should be noted that, in the above embodiment, the step S108 is an optional implementation manner of the dual stack traffic switching method described in this application. In addition, S109 mentioned in the foregoing embodiment is also an optional implementation manner of the dual stack traffic switching method described in this application. For this reason, the flow mentioned in the above embodiment can be summarized as the method shown in fig. 2.
As shown in fig. 2, a schematic diagram of a dual stack traffic switching method provided in the embodiment of the present application includes the following steps:
s201: and in each preset time period, regularly sending a monitoring instruction to each terminal, and receiving monitoring information fed back by each terminal based on the monitoring instruction.
The monitoring information comprises a first index set and a second index set.
S202: and calculating to obtain a first availability index of each terminal according to each index in the first index set fed back by each terminal, and calculating to obtain a second availability index of each terminal according to each index in the second index set fed back by each terminal.
S203: and calculating the IPv4 availability index of the preset time period based on the first availability index of each terminal, and calculating the IPv6 availability index of the preset time period based on the second availability index of each terminal.
S204: and under the conditions that the value of the IPv4 availability index in the preset time period is greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is not greater than the preset threshold value, suspending IPv6 domain name resolution in the preset time period and resolving all flow domain names in the preset time period to IPv4.
In summary, it can be detected whether there is a problem in IPv4 according to the IPv4 availability index, and if there is a problem in IPv4, the IPv4 domain name resolution is suspended, and all traffic domain names are resolved to IPv6. Similarly, whether the IPv4 has a problem or not can be detected according to the IPv6 availability index, if the IPv6 has the problem, the IPv6 domain name resolution is suspended, and all the flow domain names are resolved to the IPv4. Therefore, when any one of the IPv4 and the IPv6 has a problem, the domain name of all the traffic can be timely analyzed to the other normal Internet protocol, the continuity of the service is guaranteed, and the user experience is improved. Based on the IPv4 availability index and the IPv6 availability index of the preset time period, the method can ensure that only one Internet protocol switching can be performed in each preset time period, and the Internet protocol switching can not be frequently performed, thereby improving the user experience.
Corresponding to the dual stack traffic switching method provided in the embodiment of the present application, an embodiment of the present application further provides a dual stack traffic switching apparatus.
As shown in fig. 3, an architecture diagram of a dual stack traffic switching apparatus provided in the embodiment of the present application includes:
the monitoring unit 100 is configured to send a monitoring instruction to each terminal at regular time within each preset time period, and receive monitoring information fed back by each terminal based on the monitoring instruction; the monitoring information includes a first set of metrics and a second set of metrics.
The first calculating unit 200 is configured to calculate a first availability index of each terminal according to each index in the first index set fed back by each terminal, and calculate a second availability index of each terminal according to each index in the second index set fed back by each terminal.
The first computing unit 200 is specifically configured to: normalizing the value of each index in the first index set fed back by each terminal to obtain a scalar corresponding to each index in the first index set fed back by each terminal, and performing weighted summation on the scalars corresponding to each index in the first index set fed back by each terminal according to the preset weight of each index in the first index set fed back by each terminal to obtain a first availability index of each terminal; and carrying out normalization processing on the value of each index in the second index set fed back by each terminal to obtain a scalar corresponding to each index in the second index set fed back by each terminal, and carrying out weighted summation on the scalars corresponding to each index in the second index set fed back by each terminal according to the preset weight of each index in the second index set fed back by each terminal to obtain a second availability index of each terminal.
A second calculating unit 300, configured to calculate an IPv4 availability index for a preset time period based on the first availability index of each terminal, and calculate an IPv6 availability index for the preset time period based on the second availability index of each terminal.
The second computing unit 300 is specifically configured to: counting the number of terminals of which the value of the first availability index is larger than a preset value to obtain a first value, and calculating the ratio of the first value to a target value to obtain an IPv4 availability index of a preset time period; the target value is used for indicating the total number of each terminal; and counting the number of the terminals of which the values of the second availability indexes are larger than the preset value to obtain a second value, and calculating the ratio of the second value to the target value to obtain the IPv6 availability index of the preset time period.
The traffic switching unit 400 is configured to suspend the IPv6 domain name resolution within the preset time period and resolve all traffic domain names within the preset time period to IPv4 when the value of the IPv4 availability index within the preset time period is greater than the preset threshold and the value of the IPv6 availability index within the preset time period is not greater than the preset threshold.
Wherein, the flow switching unit 400 is further configured to: and under the condition that the value of the IPv4 availability index in the preset time period is not greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is greater than the preset threshold value, suspending the IPv4 domain name resolution in the preset time period and resolving all flow domain names in the preset time period to the IPv6.
The traffic switching unit 400 is further configured to: and under the condition that the value of the IPv4 availability index in the preset time period is not greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is not greater than the preset threshold value, suspending IPv4 domain name resolution and IPv6 domain name resolution in the preset time period and sending an alarm prompt to a user.
The traffic switching unit 400 is further configured to: and under the condition that the value of the IPv4 availability index in the preset time period is greater than a preset threshold value and the value of the IPv6 availability index in the preset time period is greater than the preset threshold value, analyzing all the flow domain names in the preset time period to IPv4 and IPv6 respectively according to a preset proportion.
In summary, it can be detected whether there is a problem in IPv4 according to the IPv4 availability index, and if there is a problem in IPv4, the IPv4 domain name resolution is suspended, and all traffic domain names are resolved to IPv6. Similarly, whether the IPv4 has a problem or not can be detected according to the IPv6 availability index, if the IPv6 has the problem, the IPv6 domain name resolution is suspended, and all the flow domain names are resolved to the IPv4. Therefore, when any one of the IPv4 and the IPv6 has a problem, the domain name of all the traffic can be timely analyzed to the other normal Internet protocol, the continuity of the service is guaranteed, and the user experience is improved. Based on the IPv4 availability index and the IPv6 availability index of the preset time period, the method can ensure that only one Internet protocol switching can be performed in each preset time period, and the Internet protocol switching cannot be performed frequently, so that the user experience is improved.
The present application further provides a computer-readable storage medium, which includes a stored program, where the program executes the dual stack traffic switching method provided in the present application.
The present application further provides a dual stack traffic switching device, including: a processor, memory, and a bus. The processor is connected with the memory through a bus, the memory is used for storing programs, and the processor is used for running the programs, wherein when the programs run, the method for switching the dual stack flow provided by the application comprises the following steps:
in each preset time period, regularly sending a monitoring instruction to each terminal, and receiving monitoring information fed back by each terminal based on the monitoring instruction; the monitoring information comprises a first index set and a second index set;
calculating to obtain a first availability index of each terminal according to each index in a first index set fed back by each terminal, and calculating to obtain a second availability index of each terminal according to each index in a second index set fed back by each terminal;
calculating an IPv4 availability index of the preset time period based on the first availability index of each terminal, and calculating an IPv6 availability index of the preset time period based on the second availability index of each terminal;
and under the condition that the value of the IPv4 availability index in the preset time period is greater than a preset threshold value and the value of the IPv6 availability index in the preset time period is not greater than the preset threshold value, suspending the IPv6 domain name resolution in the preset time period and resolving all flow domain names in the preset time period to IPv4.
Optionally, the method further includes:
and under the condition that the value of the IPv4 availability index in the preset time period is not greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is greater than the preset threshold value, suspending IPv4 domain name resolution in the preset time period and resolving all flow domain names in the preset time period to IPv6.
Optionally, the method further includes:
and under the condition that the value of the IPv4 availability index in the preset time period is not greater than the preset threshold and the value of the IPv6 availability index in the preset time period is not greater than the preset threshold, suspending IPv4 domain name resolution and IPv6 domain name resolution in the preset time period and sending an alarm prompt to a user.
Optionally, the method further includes:
and under the condition that the value of the IPv4 availability index in the preset time period is greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is greater than the preset threshold value, respectively analyzing all the flow domain names in the preset time period to IPv4 and IPv6 according to a preset proportion.
Optionally, the calculating to obtain the first availability index of each terminal according to each index in the first index set fed back by each terminal, and calculating to obtain the second availability index of each terminal according to each index in the second index set fed back by each terminal includes:
normalizing the value of each index in the first index set fed back by each terminal to obtain a scalar corresponding to each index in the first index set fed back by each terminal, and performing weighted summation on the scalars corresponding to each index in the first index set fed back by each terminal according to the preset weight of each index in the first index set fed back by each terminal to obtain a first availability index of each terminal;
and carrying out normalization processing on the value of each index in the second index set fed back by each terminal to obtain a scalar corresponding to each index in the second index set fed back by each terminal, and carrying out weighted summation on the scalars corresponding to each index in the second index set fed back by each terminal according to the preset weight of each index in the second index set fed back by each terminal to obtain a second availability index of each terminal.
Optionally, the calculating an IPv4 availability index of the preset time period based on the first availability index of each terminal, and calculating an IPv6 availability index of the preset time period based on the second availability index of each terminal includes:
counting the number of terminals with the value of the first availability index larger than a preset value to obtain a first value, and calculating the ratio of the first value to a target value to obtain the IPv4 availability index of the preset time period; the target numerical value is used for indicating the total number of the terminals;
and counting the number of the terminals of which the values of the second availability indexes are larger than the preset value to obtain a second value, and calculating the ratio of the second value to the target value to obtain the IPv6 availability index of the preset time period.
The functions described in the method of the embodiment of the present application, if implemented in the form of software functional units and sold or used as independent products, may be stored in a storage medium readable by a computing device. Based on such understanding, part of the contribution to the prior art of the embodiments of the present application or part of the technical solution may be embodied in the form of a software product stored in a storage medium and including several instructions for causing a computing device (which may be a personal computer, a server, a mobile computing device or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the present specification, the embodiments are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts between the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A method for switching dual stack traffic, comprising:
in each preset time period, regularly sending a monitoring instruction to each terminal, and receiving monitoring information fed back by each terminal based on the monitoring instruction; the monitoring information comprises a first index set and a second index set;
calculating to obtain a first availability index of each terminal according to each index in a first index set fed back by each terminal, and calculating to obtain a second availability index of each terminal according to each index in a second index set fed back by each terminal;
counting the number of terminals with the value of the first availability index larger than a preset value to obtain a first value, and calculating the ratio of the first value to a target value to obtain the IPv4 availability index of the preset time period; the target numerical value is used for indicating the total number of the terminals;
counting the number of terminals with the value of the second availability index larger than the preset value to obtain a second value, and calculating the ratio of the second value to the target value to obtain the IPv6 availability index of the preset time period;
and under the condition that the value of the IPv4 availability index in the preset time period is greater than a preset threshold value and the value of the IPv6 availability index in the preset time period is not greater than the preset threshold value, suspending the IPv6 domain name resolution in the preset time period and resolving all flow domain names in the preset time period to IPv4.
2. The method of claim 1, further comprising:
and under the condition that the value of the IPv4 availability index in the preset time period is not greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is greater than the preset threshold value, suspending IPv4 domain name resolution in the preset time period and resolving all flow domain names in the preset time period to IPv6.
3. The method of claim 1, further comprising:
and under the condition that the value of the IPv4 availability index in the preset time period is not greater than the preset threshold and the value of the IPv6 availability index in the preset time period is not greater than the preset threshold, suspending IPv4 domain name resolution and IPv6 domain name resolution in the preset time period and sending an alarm prompt to a user.
4. The method of claim 1, further comprising:
and under the condition that the value of the IPv4 availability index in the preset time period is greater than the preset threshold value and the value of the IPv6 availability index in the preset time period is greater than the preset threshold value, respectively analyzing all the flow domain names in the preset time period to IPv4 and IPv6 according to a preset proportion.
5. The method according to claim 1, wherein the calculating a first availability index of each of the terminals according to each index in a first index set fed back by each of the terminals, and calculating a second availability index of each of the terminals according to each index in a second index set fed back by each of the terminals comprises:
normalizing the value of each index in the first index set fed back by each terminal to obtain a scalar corresponding to each index in the first index set fed back by each terminal, and performing weighted summation on the scalars corresponding to each index in the first index set fed back by each terminal according to the preset weight of each index in the first index set fed back by each terminal to obtain a first availability index of each terminal;
and carrying out normalization processing on the value of each index in the second index set fed back by each terminal to obtain a scalar corresponding to each index in the second index set fed back by each terminal, and carrying out weighted summation on the scalars corresponding to each index in the second index set fed back by each terminal according to the preset weight of each index in the second index set fed back by each terminal to obtain a second availability index of each terminal.
6. A dual stack traffic switching apparatus, comprising:
the monitoring unit is used for regularly sending a monitoring instruction to each terminal in each preset time period and receiving monitoring information fed back by each terminal based on the monitoring instruction; the monitoring information comprises a first index set and a second index set;
the first calculation unit is used for calculating a first availability index of each terminal according to each index in a first index set fed back by each terminal, and calculating a second availability index of each terminal according to each index in a second index set fed back by each terminal;
the second calculating unit is used for counting the number of the terminals of which the value of the first availability index is greater than a preset value to obtain a first value, and calculating the ratio of the first value to a target value to obtain the IPv4 availability index of the preset time period; the target numerical value is used for indicating the total number of the terminals; counting the number of terminals with the value of the second availability index larger than the preset value to obtain a second value, and calculating the ratio of the second value to the target value to obtain the IPv6 availability index of the preset time period;
and the flow switching unit is used for suspending the IPv6 domain name resolution in the preset time period and resolving all flow domain names in the preset time period to IPv4 under the condition that the value of the IPv4 availability index in the preset time period is greater than a preset threshold and the value of the IPv6 availability index in the preset time period is not greater than the preset threshold.
7. The apparatus according to claim 6, wherein the first computing unit is specifically configured to:
normalizing the value of each index in the first index set fed back by each terminal to obtain a scalar corresponding to each index in the first index set fed back by each terminal, and performing weighted summation on the scalars corresponding to each index in the first index set fed back by each terminal according to the preset weight of each index in the first index set fed back by each terminal to obtain a first availability index of each terminal;
normalizing the value of each index in the second index set fed back by each terminal to obtain a scalar corresponding to each index in the second index set fed back by each terminal, and performing weighted summation on the scalars corresponding to each index in the second index set fed back by each terminal according to the preset weight of each index in the second index set fed back by each terminal to obtain a second availability index of each terminal.
8. A computer-readable storage medium, comprising a stored program, wherein the program, when executed by a computer, performs the dual stack traffic switching method of any of claims 1-5.
9. A dual stack traffic switching apparatus, comprising: a processor, memory, and a bus; the processor and the memory are connected through the bus;
the memory is used for storing a program, and the processor is used for executing the program, wherein the program executes the double-stack flow switching method according to any one of claims 1 to 5.
CN202110829942.0A 2021-07-22 2021-07-22 Dual-stack flow switching method, device, storage medium and equipment Active CN113572865B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110829942.0A CN113572865B (en) 2021-07-22 2021-07-22 Dual-stack flow switching method, device, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110829942.0A CN113572865B (en) 2021-07-22 2021-07-22 Dual-stack flow switching method, device, storage medium and equipment

Publications (2)

Publication Number Publication Date
CN113572865A CN113572865A (en) 2021-10-29
CN113572865B true CN113572865B (en) 2022-12-13

Family

ID=78166209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110829942.0A Active CN113572865B (en) 2021-07-22 2021-07-22 Dual-stack flow switching method, device, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN113572865B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685281A (en) * 2013-12-18 2014-03-26 中国联合网络通信集团有限公司 Network address protocol switching method and device
CN103987098A (en) * 2014-04-28 2014-08-13 广州杰赛科技股份有限公司 Method and system for switching between IPV4 network and IPV6 network
WO2020132982A1 (en) * 2018-12-26 2020-07-02 华为技术有限公司 Data transmission method and routing device
CN112165538A (en) * 2020-09-22 2021-01-01 腾讯科技(深圳)有限公司 Network access method, device and equipment of dual-stack terminal and readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100505684C (en) * 2005-03-29 2009-06-24 国际商业机器公司 Network system, flow equalization method, network monitoring device and host machine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685281A (en) * 2013-12-18 2014-03-26 中国联合网络通信集团有限公司 Network address protocol switching method and device
CN103987098A (en) * 2014-04-28 2014-08-13 广州杰赛科技股份有限公司 Method and system for switching between IPV4 network and IPV6 network
WO2020132982A1 (en) * 2018-12-26 2020-07-02 华为技术有限公司 Data transmission method and routing device
CN112165538A (en) * 2020-09-22 2021-01-01 腾讯科技(深圳)有限公司 Network access method, device and equipment of dual-stack terminal and readable storage medium

Also Published As

Publication number Publication date
CN113572865A (en) 2021-10-29

Similar Documents

Publication Publication Date Title
CN108737333B (en) Data detection method and device
CN109936613B (en) Disaster recovery method and device applied to server
US9571588B2 (en) Systems and methods for handling a registration storm
CN112636979B (en) Cluster alarm method and related device
CN113507455B (en) Network security detection method and system based on big data
CN112087468A (en) Message processing method, related equipment and readable storage medium
CN109379757B (en) Single-user fault diagnosis method and device based on narrowband Internet of things service
CN111309562A (en) Server failure prediction method, device, equipment and storage medium
CN110737565B (en) Data monitoring method and device, electronic equipment and storage medium
CN104967632B (en) Webpage abnormal data processing method, data server and system
CN113572865B (en) Dual-stack flow switching method, device, storage medium and equipment
CN107395451A (en) Surfing flow abnormal processing method, device, equipment and storage medium
KR20200007912A (en) Methods, devices, and systems for monitoring data traffic
CN110119334B (en) Page script monitoring method and device
CN111866921A (en) Method, device and equipment for searching service fault of 5G base station and storage medium
CN113612647B (en) Alarm processing method and device
CN112291421B (en) Single-pass detection method and device based on voice communication, storage medium and electronic equipment
US10096029B1 (en) System, method, and computer program for proactively identifying and addressing customer needs
CN111343242B (en) Information collection method, device, equipment, storage medium and distributed system
CN110809064B (en) IP address switching method, device and system
CN113872980A (en) Industrial control equipment information identification method and device, storage medium and equipment
CN103746968A (en) CDN server removal method, CDN control center and system thereof
CN113157048B (en) Behavior data analysis method based on multi-terminal time axis and related components
CN112367324B (en) CDN attack detection method and device, storage medium and electronic equipment
CN110311833B (en) Method and device for detecting provider service, electronic equipment and storage medium

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