CN107819591B - Data synchronization method, device, system and network equipment - Google Patents

Data synchronization method, device, system and network equipment Download PDF

Info

Publication number
CN107819591B
CN107819591B CN201711018020.1A CN201711018020A CN107819591B CN 107819591 B CN107819591 B CN 107819591B CN 201711018020 A CN201711018020 A CN 201711018020A CN 107819591 B CN107819591 B CN 107819591B
Authority
CN
China
Prior art keywords
charging reference
information
reference information
charging
network equipment
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
CN201711018020.1A
Other languages
Chinese (zh)
Other versions
CN107819591A (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201711018020.1A priority Critical patent/CN107819591B/en
Publication of CN107819591A publication Critical patent/CN107819591A/en
Application granted granted Critical
Publication of CN107819591B publication Critical patent/CN107819591B/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
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/141Indication of costs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The present disclosure provides a data synchronization method, apparatus, system and network device, the method is applied to a first network device, the first network device and a second network device are mutually a master device and a standby device; the method comprises the following steps: if the first network equipment is switched from the main equipment to the standby equipment, recording the charging reference information of the user; the charging reference information comprises internet surfing time information and/or internet surfing flow information; synchronizing the charging reference information with the second network device. The method and the device can obtain more accurate user charging information before the main equipment and the standby equipment are switched, and reduce charging errors.

Description

Data synchronization method, device, system and network equipment
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a data synchronization method, apparatus, system, and network device.
Background
A BRAS (Broadband Remote Access Server) is an Access gateway facing Broadband network application; the BRAS is located at an edge layer of a backbone network, can complete data access of an IP (Internet Protocol, Protocol for interconnection between networks)/ATM (Asynchronous Transfer Mode) network of a user bandwidth, and can realize applications such as broadband Internet access of commercial buildings and residential quarters.
In order to keep the service uninterrupted when the network equipment such as BRAS fails, a plurality of routing devices are usually arranged at the core service node of the network; for example, a service node in the dual-machine backup form includes a primary device and a standby device; the main equipment is used for providing service support, forwarding service flow, and sending service backup information to the standby equipment when a set flow threshold value or a set time threshold value is reached; the standby device is used for receiving the service backup information sent by the main device, and when the main device has a link failure, the standby device is switched to the main device to replace the original main device to provide service support and forward service traffic.
Disclosure of Invention
In view of this, the present disclosure is directed to provide a method, an apparatus, a system and a network device for data synchronization, so as to obtain more accurate user charging information before switching between a primary device and a secondary device, and reduce charging errors.
In order to achieve the above purpose, the technical scheme adopted by the disclosure is as follows:
in a first aspect, the present disclosure provides a data synchronization method, which is applied to a first network device, where the first network device and a second network device are active and standby devices; the method comprises the following steps: if the first network equipment is switched from the main equipment to the standby equipment, recording the charging reference information of the user; the charging reference information comprises internet surfing time information and/or internet surfing flow information; synchronizing the charging reference information with the second network device.
In a second aspect, the present disclosure provides a data synchronization method, where the method is applied to a first network device, and the first network device and a second network device are active and standby devices; the method comprises the following steps: if the first network equipment is switched from the standby equipment to the main equipment, acquiring the charging reference information of the user from the second network equipment; the charging reference information comprises internet surfing time information and/or internet surfing flow information; and monitoring the online service of the user according to the charging reference information.
In a third aspect, the present disclosure provides a data synchronization apparatus, where the apparatus is disposed in a first network device, and the first network device and a second network device are active and standby devices; the device includes: the information recording module is used for recording the charging reference information of the user if the first network equipment is switched from the main equipment to the standby equipment; the charging reference information comprises internet surfing time information and/or internet surfing flow information; and the synchronization module is used for synchronizing the charging reference information with the second network equipment.
In a fourth aspect, the present disclosure provides a data synchronization apparatus, where the apparatus is disposed in a first network device, and the first network device and a second network device are active and standby devices; the device includes: the information acquisition module is used for acquiring the charging reference information of the user from the second network equipment if the first network equipment is switched from the standby equipment to the main equipment; the charging reference information comprises internet surfing time information and/or internet surfing flow information; and the monitoring module is used for monitoring the online service of the user according to the charging reference information.
In a fifth aspect, the present disclosure provides a data synchronization system, which includes a first network device and a second network device; the first network equipment and the second network equipment are mutually master-standby equipment; the first network device comprises the apparatus of the third aspect; the second network device comprises the apparatus of the fourth aspect.
In a sixth aspect, the present disclosure provides a network device comprising a memory and a processor; wherein the memory is configured to store one or more computer instructions that are executed by the processor to implement the method of the first or second aspect.
In a seventh aspect, the present disclosure provides a machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to carry out the method of the first or second aspect.
The present disclosure brings the following beneficial effects:
according to the data synchronization method, the data synchronization device, the data synchronization system, the network equipment and the machine readable storage medium, if the first network equipment is switched from the main equipment to the standby equipment, the charging reference information of the user is recorded, and then the charging reference information is synchronized with the second network equipment. In this way, the second network device can obtain more accurate user charging information before the switching of the primary and secondary devices, and reduce charging errors, compared with the service backup information sent when the set flow threshold or the set time threshold is met, thereby reducing the economic loss of network operators.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure, or may be learned by practice of the disclosure.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic application environment diagram of a data synchronization method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a data synchronization method according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of another data synchronization method provided by the embodiments of the present disclosure;
FIG. 4 is a flow chart of another data synchronization method provided by the embodiments of the present disclosure;
FIG. 5 is a flow chart of another data synchronization method provided by the embodiments of the present disclosure;
FIG. 6 is a flow chart of another data synchronization method provided by the embodiments of the present disclosure;
fig. 7 is a schematic structural diagram of a data synchronization apparatus according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of another data synchronization apparatus provided in the embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a data synchronization system according to an embodiment of the present disclosure;
fig. 10 is a schematic structural diagram of a network device according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the embodiments of the present disclosure will be described clearly and completely with reference to the accompanying drawings, and it is to be understood that the described embodiments are only a part of the embodiments of the present disclosure, but not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
Referring to fig. 1, an application environment diagram of a data synchronization method is shown; in order to ensure that the service is not interrupted when the network equipment fails and ensure the reliability of network transmission, a plurality of routing devices are usually arranged at the core service node of the network; fig. 1 illustrates two devices as an example, that is, a dual-device backup mode includes a primary device and a standby device; the main equipment is used for providing service support, forwarding service flow, and sending service backup information to the standby equipment when a set flow threshold value or a set time threshold value is reached; the standby device is used for receiving the service backup information sent by the main device, and when the main device has a link failure, the standby device is switched to the main device to replace the original main device to provide service support, forward service flow and ensure that the service is not interrupted.
In the process of researching data synchronization, the inventor finds that when the primary equipment breaks down suddenly and the standby equipment is switched to the primary equipment, charging can only be started on the basis of the service backup information of the last backup, and service flow or service time generated between the last backup time and the time of occurrence of the fault cannot be counted, so that service charging errors occur during switching, and the accuracy is low.
Specifically, when the primary device fails, for example, a link failure between the primary device and a user service host, a link failure between the primary device and a core device, some failures of the primary device itself, and the like, the standby device is switched to the primary device; because the backup service information is stored in the standby equipment, the user does not need to dial again, the related charging and authorization information is not lost, the user service is not interrupted, and the network reliability is higher.
However, the backup process usually triggers the backup operation after the network traffic reaches a set traffic threshold or a set time threshold, for example: taking a set time threshold of 5 minutes as an example, the backup operation is assumed to be performed once at 10: 10, the time when the primary device suddenly fails is 10: 12, the time duration from 10: 10 to 10: 12 is 2 minutes, and the time threshold of 5 minutes is not reached, so that the service in the time duration of 2 minutes is not synchronized into the backup device, when the backup device is switched to the primary device, charging can only be started on the basis of the service backup information backed up at the last time (i.e. 10: 10), and the service traffic or service time generated between the last backup time and the failure occurrence time cannot be counted, so that service charging errors occur during switching, and the accuracy is low.
In view of the above problem that when a master device and a slave device in a network node are switched, the service charging accuracy is low, the embodiments of the present disclosure provide a data synchronization method, apparatus, system, network device, and machine-readable storage medium; the technology can be universally applied to network equipment such as switches, routers and gateways, for example: the method is applied to relevant equipment in the BRAS network; the techniques may be implemented in associated software or hardware, as described below by way of example.
In one embodiment, refer to a flow chart of a data synchronization method shown in fig. 2; the method is applied to a first network device, and the first network device and a second network device are mutually a master device and a standby device; the method comprises the following steps:
step S202, if the first network equipment is switched from the main equipment to the standby equipment, recording the charging reference information of the user; the charging reference information includes internet time information and/or internet traffic information, for example, the charging reference information includes only internet time information, or the charging reference information includes only internet traffic information, or the charging reference information includes both internet time information and internet traffic information, which can be specifically selected according to the charging mode of the user service in the actual network.
Step S204, synchronizing the charging reference information with the second network device.
In the method for synchronizing the charging reference information in the embodiment of the present disclosure, triggering of a flow threshold and a time threshold is not required, and after the active/standby switching is performed, an active issuing method, a request-based issuing method, or a method for storing information for an opposite side to read the information by itself may be adopted.
For example, the first network device and the second network device are connected to a plurality of user service hosts, and at time a, the first network device serving as the active device sends service backup information to the second network device serving as the standby device; the service backup information may include the charging reference information, and may also include service data of each user; at time B, the first network equipment is in link failure, the first network equipment is switched to be standby equipment, and the second network equipment is switched to be main equipment; at this time, the first network device records the time when the fault occurs, namely the time B, and the time is used as the charging reference information of each user; and then, synchronizing the charging reference information with the current main equipment, namely the second network equipment, so that the second network equipment carries out service charging statistics on the basis of the charging reference information of each user at the moment B.
By the above manner, the charging reference information between the time a of sending the service backup information and the time B of the occurrence of the fault can be counted; when the user quantity in the network is large, the service flow or the service time sum generated between the time A and the time B is also large, and further a certain economic loss can be saved for a network operator.
In the data synchronization method provided by the embodiment of the present disclosure, if the first network device is switched from the active device to the standby device, the charging reference information of the user is recorded, and then the charging reference information is synchronized with the second network device. In this way, the second network device can obtain more accurate user charging information before the switching of the primary and secondary devices, and reduce charging errors, compared with the service backup information sent when the set flow threshold or the set time threshold is met, thereby reducing the economic loss of network operators.
In another embodiment, a description is given by taking an example where a link failure occurs in an active device; the step of recording the charging reference information of the user if the first network device is switched from the active device to the standby device specifically includes: if the first network equipment is switched to the standby equipment due to the link failure, acquiring a charging reference moment, wherein the charging reference moment is the last charging updating moment and/or the last service data synchronization moment; and recording the charging reference information between the charging reference time and the fault occurrence time.
The last charging update time or the last service data synchronization time can be understood as the latest charging update time or the last service data synchronization time until the fault occurrence time; during specific implementation, the last charging updating time and the last service data synchronization time can be obtained simultaneously, or only one of the last charging updating time and the last service data synchronization time can be obtained; the charging update time or the service data synchronization time may be the same or different. For example, the system may set to perform charging update when the service data is synchronized, where the charging update time is the same as the service data synchronization time; the system can also set the triggering condition of charging update and the triggering condition of service data synchronization to be independent, and at the moment, the charging update time is different from the service data synchronization time.
The step of recording the charging reference information between the charging reference time and the occurrence time of the fault may be implemented in various ways, see a flowchart of another data synchronization method shown in fig. 3; in this embodiment, the step of recording the charging reference information between the charging reference time and the occurrence time of the fault specifically includes: recording the charging reference time and the occurrence time of the link fault as internet access time information in the charging reference information; and/or recording the flow value at the charging reference moment and the flow value at the fault occurrence moment as the internet traffic information in the charging reference information.
As shown in fig. 3, the method comprises the steps of:
step S302, if the first network device is switched to the standby device due to the link failure, obtaining a charging reference time, where the charging reference time is a last charging update time and/or a last service data synchronization time.
Step S304, recording the charging reference time and the occurrence time of the link fault as the internet surfing time information in the charging reference information; and/or recording the flow value at the charging reference moment and the flow value at the fault occurrence moment as the internet traffic information in the charging reference information.
In step S304, the internet access time information and the internet access traffic information may be recorded at the same time, or only the internet access time information is recorded, or only the internet access traffic information is recorded; the internet surfing time information and the internet surfing flow information can be recorded in a form of a table; for example, a table is set for recording the charging reference time and the flow value of the charging reference time, as shown in table 1 below; another table is provided for recording the occurrence time of the link failure and the flow value of the occurrence time of the failure, as shown in table 2 below.
TABLE 1
Figure BDA0001445277440000081
TABLE 2
Figure BDA0001445277440000082
Step S306, if receiving the synchronous request of the second network device, sending the charging reference information to the second network device; in the above tables 1 and 2, the internet access time information and the internet access traffic information of two users, user PPPoE1 and user IPoE1, are recorded respectively, and in actual implementation, the above tables 1 and 2 may be sent to the second network device, so that the second network device may calculate the time difference between the occurrence time of the link failure and the charging reference time, and the traffic difference between the occurrence time of the link failure and the charging reference time, and according to the time difference and/or the traffic difference, the charging error between the charging reference time and the occurrence time of the link failure in the second network device is compensated.
In the data synchronization method provided by the embodiment of the present disclosure, if the first network device is switched from the active device to the standby device due to a link failure, the time value and the flow value of the charging reference time and the occurrence time of the link failure are recorded as the internet time information and the internet flow information, and if a synchronization request of the second network device is received, the internet time information and the internet flow information are sent to the second network device. In this way, the second network device can obtain more accurate user charging information before the switching of the primary and secondary devices, and reduce charging errors, compared with the service backup information sent when the set flow threshold or the set time threshold is met, thereby reducing the economic loss of network operators.
See FIG. 4 for a flow chart of another data synchronization method; in this embodiment, the step of recording the charging reference information between the charging reference time and the occurrence time of the fault specifically includes: recording the time difference between the occurrence time of the fault and the charging reference time as the internet surfing time information in the charging reference information; and/or recording the flow difference between the occurrence moment of the fault and the charging reference moment as the internet flow information in the charging reference information. In addition, the step of recording the charging reference information between the charging reference time and the occurrence time of the fault may further include: and recording service data between the charging reference time and the fault occurrence time.
As shown in fig. 4, the method includes the steps of:
step S402, if the first network device is switched to the standby device due to the link failure, acquiring a charging reference time, wherein the charging reference time is a last charging updating time and/or a last service data synchronization time.
Step S404, recording the time difference between the occurrence time of the fault and the charging reference time as the internet surfing time information in the charging reference information; and/or recording the flow difference between the occurrence moment of the fault and the charging reference moment as the internet flow information in the charging reference information.
In step S404, the internet access time information and the internet access traffic information may be recorded at the same time, or only the internet access time information is recorded, or only the internet access traffic information is recorded; the internet surfing time information and the internet surfing flow information can be recorded in a form of a table; for example, a table is set for recording the charging reference time and the flow value of the charging reference time, as shown in table 1 above; another table is provided for recording a time difference between the occurrence time of the fault and the charging reference time and a flow rate difference between the occurrence time of the fault and the charging reference time, as shown in table 3 below.
TABLE 3
Figure BDA0001445277440000101
The table 1 and the table 3 record the internet access time information and the internet access traffic information of two users, namely the user PPPoE1 and the user IPoE1, respectively, and in actual implementation, the table 1 and the table 3 may be sent to the second network device, so that the second network device directly compensates the charging error between the charging reference time and the occurrence time of the link fault in the second network device according to the time difference and/or the traffic difference.
Step S406, if it is detected that the link with the second network device is normal, pushing the charging reference information to the second network device.
In order to improve the flexibility of the synchronization method of the charging reference information, in practical implementation, the step of synchronizing the charging reference information with the second network device may be implemented by at least one of the following methods:
(1) if a synchronization request of the second network equipment is received, sending the charging reference information to the second network equipment; step S306 described above; the method can be applied to the situation that the link between the first network device and the user service host fails and the link between the first network device and the core device is normal.
(2) If the link between the first network equipment and the second network equipment is detected to be normal, the charging reference information is pushed to the second network equipment; step S406 as above; the method can be applied to a scenario that a link between first network equipment and core equipment fails, when the link between the first network equipment and the core equipment fails, the second network equipment cannot send a synchronization request to the first network equipment, at this time, the first network equipment can detect whether the link between the first network equipment and the core equipment is recovered to be normal or not in a polling mode, and when the link between the first network equipment and the core equipment is recovered to be normal, the charging reference information is pushed to the second network equipment.
In addition, the second network device may further detect the active device through a VRRP (Virtual Router Redundancy Protocol), determine whether a VSRP (Virtual Service Redundancy Protocol) link between the first network device and the second network device is normal, and if the VSRP channel is not passed, periodically poll whether the link is normal; when the link is normal, the charging reference information of the first network device is acquired through a Transmission Control Protocol (TCP) channel.
(3) And storing the charging reference information according to a preset storage mode so that the second network equipment can read the charging reference information. For example, the first network device may store the charging reference information in a set storage interval, and the second network device may read the charging reference information at any time.
In the data synchronization method provided by the embodiment of the present disclosure, if the first network device is switched from the primary device to the standby device due to the link failure, a time difference and a flow difference between a charging reference time and an occurrence time of the link failure are recorded as the internet time information and the internet flow information; the charging reference information can be flexibly synchronized with the second network equipment in various ways; in this way, the second network device can obtain more accurate user charging information before the switching of the primary and secondary devices, and reduce charging errors, compared with the service backup information sent when the set flow threshold or the set time threshold is met, thereby reducing the economic loss of network operators.
In one embodiment, refer to a flow chart of another data synchronization method shown in fig. 5; the method is applied to a first network device, and the first network device and a second network device are mutually a master device and a standby device; the method comprises the following steps:
step S502, if the first network equipment is switched from standby equipment to main equipment, the charging reference information of the user is acquired from the second network equipment; the charging reference information comprises internet surfing time information and/or internet surfing flow information.
In the above embodiment, the first network device corresponds to the second network device to synchronize the charging reference information in multiple ways, and in step S502, the step of obtaining the charging reference information of the user from the second network device may be implemented in one of the following ways, so as to improve the flexibility of the synchronization way:
(1) if the link between the second network equipment and the second network equipment is detected to be normal, sending a synchronization request to the second network equipment, and receiving charging reference information sent by the second network equipment according to the synchronization request;
(2) receiving charging reference information pushed by second network equipment;
(3) and accessing the second network equipment, and reading the charging reference information according to a preset storage mode.
Step S504, the online service of the user is monitored according to the charging reference information.
Users in a network typically purchase online services in a prepaid manner, for example, prepaid according to internet time or prepaid according to internet traffic; when the first network device switched from the standby device to the main device acquires the charging reference information of the user from the second network device, the first network device can acquire the latest charging data of the user, and the first network device can compare the charging data with the prepaid internet time or internet traffic of the user according to the charging data so as to monitor whether the user has the right to enjoy the online service.
In the data synchronization method provided by the embodiment of the present disclosure, if the first network device is switched from the standby device to the active device, the charging reference information of the user is obtained from the second network device, and the online service of the user is monitored according to the charging reference information. In this way, the first network device can obtain more accurate user charging information before the switching of the primary and secondary devices, and reduce charging errors, compared with the service backup information sent when the set traffic threshold or the set time threshold is met, thereby reducing the economic loss of network operators.
In one embodiment, refer to a flow chart of another data synchronization method shown in fig. 6;
step S602, if the link failure of the second network device triggers the first network device to switch from the standby device to the active device, the charging reference information of the user is obtained from the second network device; the charging reference information comprises internet surfing time information and/or internet surfing flow information.
Step S604, obtaining a difference value between the charging reference time and the occurrence time of the fault, where the difference value includes: time difference and/or flow difference; and the charging reference time is the last charging updating time of the second network equipment and/or the last service data synchronization time.
The difference may include a time difference and a flow difference, or only a time difference, or only a flow difference; the last charging updating time or the last service data synchronization time in the charging reference time can be understood as the latest charging updating time or the last service data synchronization time until the fault occurrence time; the step S604 may obtain the last charging update time and the last service data synchronization time at the same time, or obtain only the last charging update time, or obtain only the last service data synchronization time.
After the time difference and/or the flow difference are obtained, the online service of the user can be monitored according to the difference, and the method can be specifically realized by the following steps:
step S606, if the user is in the online state, judging whether the residual charge of the user is larger than the difference value, wherein the residual charge comprises the residual time quantum or the residual flow corresponding to the difference value; if yes, go to step S608; if not, step S610 is performed.
Step S608, the user is kept online.
Step S610, the user is switched to the offline state or the overdraft service state.
Generally, after a user purchases an online service in a prepaid manner, the remaining time amount or the remaining flow of the user may be continuously reduced along with the process of using the online service by the user, and when the remaining time amount or the remaining flow of the user is smaller than the difference, it indicates that the user has completed using the purchased online service before switching the primary device and the secondary device, and at this time, the user is switched to an offline state or an overdraft service state.
In the data synchronization method provided by the embodiment of the present disclosure, if the first network device is switched from the standby device to the active device, the charging reference information of the user is obtained from the second network device, and the service state of the user is maintained or switched according to the charging reference information. In this way, the first network device can obtain more accurate user charging information before the switching of the primary and secondary devices, and reduce charging errors, compared with the service backup information sent when the set traffic threshold or the set time threshold is met, thereby reducing the economic loss of network operators.
In another embodiment, the method embodiment is referred to a schematic structural diagram of a data synchronization apparatus shown in fig. 7; the device is arranged on a first network device, and the first network device and a second network device are mutually a master device and a standby device; the device comprises the following parts:
an information recording module 70, configured to record charging reference information of a user if the first network device is switched from the primary device to the standby device; the charging reference information comprises internet surfing time information and/or internet surfing flow information.
A synchronization module 71, configured to synchronize the charging reference information with the second network device.
In the data synchronization apparatus provided in the embodiment of the present disclosure, if the first network device is switched from the active device to the standby device, the charging reference information of the user is recorded, and then the charging reference information is synchronized with the second network device. In this way, the second network device can obtain more accurate user charging information before the switching of the primary and secondary devices, and reduce charging errors, compared with the service backup information sent when the set flow threshold or the set time threshold is met, thereby reducing the economic loss of network operators.
The information recording module is further configured to: if the first network equipment is switched to the standby equipment due to the link failure, acquiring a charging reference moment, wherein the charging reference moment is the last charging updating moment and/or the last service data synchronization moment; and recording the charging reference information between the charging reference time and the fault occurrence time.
The information recording module further includes at least one of the following functions: recording the charging reference time and the occurrence time of the link fault as internet access time information in the charging reference information; recording the flow value at the charging reference moment and the flow value at the fault occurrence moment as internet flow information in the charging reference information; recording the time difference between the occurrence time of the fault and the charging reference time as the internet surfing time information in the charging reference information; and recording the flow difference between the occurrence time of the fault and the charging reference time as the internet flow information in the charging reference information.
The synchronization module is further configured to perform at least one of: if a synchronization request of the second network equipment is received, sending the charging reference information to the second network equipment; if the link between the first network equipment and the second network equipment is detected to be normal, the charging reference information is pushed to the second network equipment; and the preset storage mode stores the charging reference information so that the second network equipment can read the charging reference information.
In another embodiment, a schematic structural diagram of another data synchronization apparatus shown in fig. 8 is shown, corresponding to the above method embodiment; the device is arranged on first network equipment, and the first network equipment and second network equipment are mutually master and standby equipment; the device comprises the following parts:
an information obtaining module 80, configured to obtain charging reference information of a user from a second network device if the first network device is switched from the standby device to the active device; the charging reference information comprises internet surfing time information and/or internet surfing flow information.
And the monitoring module 81 is used for monitoring the online service of the user according to the charging reference information.
In the data synchronization apparatus provided in the embodiment of the present disclosure, if the first network device is switched from the standby device to the active device, the charging reference information of the user is obtained from the second network device, and the online service of the user is monitored according to the charging reference information. In this way, the first network device can obtain more accurate user charging information before the switching of the primary and secondary devices, and reduce charging errors, compared with the service backup information sent when the set traffic threshold or the set time threshold is met, thereby reducing the economic loss of network operators.
The information obtaining module 80 is further configured to perform at least one of the following: if the link between the second network equipment and the second network equipment is detected to be normal, sending a synchronization request to the second network equipment, and receiving charging reference information sent by the second network equipment according to the synchronization request; receiving charging reference information pushed by second network equipment; and accessing the second network equipment, and reading the charging reference information according to a preset storage mode.
The monitoring module 81 is further configured to: if the first network device is triggered by the link failure that the standby device is switched to the main device as the second network device, obtaining a difference value between the charging reference time and the occurrence time of the failure, wherein the difference value comprises: time difference and/or flow difference; the charging reference moment is the last charging updating moment and/or the last service data synchronization moment of the second network equipment; and monitoring the online service of the user according to the difference.
The monitoring module 81 is further configured to: if the user is in an online state, judging whether the residual cost of the user is greater than the difference value or not, wherein the residual cost comprises residual time amount or residual flow corresponding to the difference value; if not, switching the user to be in the offline state or the overdraft service state.
In another embodiment, referring to a schematic structural diagram of a data synchronization system shown in fig. 9, corresponding to the method embodiment and the apparatus embodiment; the system comprises a first network device 90 and a second network device 91; the first network device 90 and the second network device 91 are master devices and standby devices;
in this embodiment, the first network device 90 includes the data synchronization apparatus 90a shown in fig. 7, and the second network device 91 includes the data synchronization apparatus 91a shown in fig. 8, for example, and in a specific implementation, the first network device 90 and the second network device 91 may also be implemented by using other structures in the above embodiment;
the data synchronization system provided by the embodiment of the present disclosure has the same technical features as the data synchronization method and apparatus provided by the above embodiments, so that the same technical problems can be solved, and the same technical effects can be achieved.
Referring to fig. 10, a schematic diagram of a network device is shown; the device comprises a memory 100 and a processor 101; the memory 100 is used to store one or more computer instructions, which are executed by the processor to implement the above-described data synchronization method, which may include one or more of the above synchronization methods.
Further, the network management device shown in fig. 10 further includes a bus 102 and a communication interface 103, and the processor 101, the communication interface 103 and the memory 100 are connected through the bus 102.
The Memory 100 may include a high-speed Random Access Memory (RAM) and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used. The bus 102 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 10, but this does not indicate only one bus or one type of bus.
The processor 101 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 101. The Processor 101 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100, and completes the steps of the method of the foregoing embodiment in combination with the hardware thereof.
Further, embodiments of the present invention also provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the above-described data synchronization method, which may include one or more of the above synchronization methods.
The data synchronization method, apparatus, system and computer program product of the network device provided in the embodiments of the present disclosure include a computer-readable storage medium storing program codes, where instructions included in the program codes may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. 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.
While the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (13)

1. A data synchronization method is characterized in that the method is applied to a first network device, and the first network device and a second network device are mutually master devices and standby devices; the method comprises the following steps:
if the first network equipment is switched from the main equipment to the standby equipment, recording the charging reference information of the user; the charging reference information comprises internet surfing time information and/or internet surfing flow information; the charging reference information is corresponding information from a charging reference moment to a fault occurrence moment of the first network equipment; the charging reference time is the last charging updating time and/or the last service data synchronization time;
synchronizing the charging reference information with the second network device.
2. The method of claim 1, wherein if the first network device is switched from the active device to the standby device, the step of recording the charging reference information of the user comprises:
if the first network equipment is switched to the standby equipment due to the link failure, acquiring a charging reference moment, wherein the charging reference moment is a last charging updating moment and/or a last service data synchronization moment;
and recording the charging reference information between the charging reference time and the fault occurrence time.
3. The method of claim 1, wherein the step of synchronizing the charging reference information with the second network device comprises at least one of:
if a synchronization request of the second network equipment is received, sending the charging reference information to the second network equipment;
if the link between the charging reference information and the second network equipment is detected to be normal, the charging reference information is pushed to the second network equipment;
and storing the charging reference information according to a preset storage mode so that the second network equipment can read the charging reference information.
4. A data synchronization method is characterized in that the method is applied to a first network device, and the first network device and a second network device are mutually master devices and standby devices; the method comprises the following steps:
if the first network equipment is switched from standby equipment to main equipment, acquiring charging reference information of a user from the second network equipment; the charging reference information comprises internet surfing time information and/or internet surfing flow information; the charging reference information is corresponding information from a charging reference moment to a fault occurrence moment of the first network equipment; the charging reference time is the last charging updating time and/or the last service data synchronization time;
and monitoring the online service of the user according to the charging reference information.
5. The method of claim 4, wherein the step of obtaining the charging reference information of the user from the second network device comprises at least one of:
if the link between the second network equipment and the second network equipment is detected to be normal, sending a synchronization request to the second network equipment, and receiving the charging reference information sent by the second network equipment according to the synchronization request;
receiving the charging reference information pushed by the second network equipment;
and accessing the second network equipment, and reading the charging reference information according to a preset storage mode.
6. A data synchronization device is characterized in that the device is arranged on a first network device, and the first network device and a second network device are mutually a master device and a standby device; the device comprises:
the information recording module is used for recording the charging reference information of the user if the first network equipment is switched from the main equipment to the standby equipment; the charging reference information comprises internet surfing time information and/or internet surfing flow information; the charging reference information is corresponding information from a charging reference moment to a fault occurrence moment of the first network equipment; the charging reference time is the last charging updating time and/or the last service data synchronization time;
and the synchronization module is used for synchronizing the charging reference information with the second network equipment.
7. The apparatus of claim 6, wherein the information recording module is further configured to:
if the first network equipment is switched to the standby equipment due to the link failure, acquiring a charging reference moment, wherein the charging reference moment is a last charging updating moment and/or a last service data synchronization moment;
and recording the charging reference information between the charging reference time and the fault occurrence time.
8. The apparatus of claim 6, wherein the synchronization module is further configured to perform at least one of:
if a synchronization request of the second network equipment is received, sending the charging reference information to the second network equipment;
if the link between the charging reference information and the second network equipment is detected to be normal, the charging reference information is pushed to the second network equipment;
and storing the charging reference information according to a preset storage mode so that the second network equipment can read the charging reference information.
9. A data synchronization device is characterized in that the device is arranged on a first network device, and the first network device and a second network device are mutually a master device and a standby device; the device comprises:
an information obtaining module, configured to obtain charging reference information of a user from the second network device if the first network device is switched from a standby device to a main device; the charging reference information comprises internet surfing time information and/or internet surfing flow information; the charging reference information is corresponding information from a charging reference moment to a fault occurrence moment of the first network equipment; the charging reference time is the last charging updating time and/or the last service data synchronization time;
and the monitoring module is used for monitoring the online service of the user according to the charging reference information.
10. The apparatus of claim 9, wherein the information obtaining module is further configured to perform at least one of:
if the link between the second network equipment and the second network equipment is detected to be normal, sending a synchronization request to the second network equipment, and receiving the charging reference information sent by the second network equipment according to the synchronization request;
receiving the charging reference information pushed by the second network equipment;
and accessing the second network equipment, and reading the charging reference information according to a preset storage mode.
11. A data synchronization system, characterized in that the system comprises a first network device and a second network device; the first network equipment and the second network equipment are mutually master/standby equipment;
the first network device comprises the apparatus of any of claims 6-8;
the second network device comprises the apparatus of claim 9 or 10.
12. A network device comprising a memory and a processor; wherein the memory is to store one or more computer instructions that are executed by the processor to implement the method of any one of claims 1 to 5.
13. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement the method of any of claims 1 to 5.
CN201711018020.1A 2017-10-25 2017-10-25 Data synchronization method, device, system and network equipment Active CN107819591B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711018020.1A CN107819591B (en) 2017-10-25 2017-10-25 Data synchronization method, device, system and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711018020.1A CN107819591B (en) 2017-10-25 2017-10-25 Data synchronization method, device, system and network equipment

Publications (2)

Publication Number Publication Date
CN107819591A CN107819591A (en) 2018-03-20
CN107819591B true CN107819591B (en) 2021-10-12

Family

ID=61604267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711018020.1A Active CN107819591B (en) 2017-10-25 2017-10-25 Data synchronization method, device, system and network equipment

Country Status (1)

Country Link
CN (1) CN107819591B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108933873B (en) * 2018-06-08 2021-02-05 新华三技术有限公司 User data synchronization method and device
CN112270495B (en) * 2020-11-13 2023-05-02 中盈优创资讯科技有限公司 Charging circuit flow acquisition guarantee and auditing method and device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020046296A (en) * 2000-12-12 2002-06-21 구자홍 Method for accounting data management in duplexed AAA server
CN100596160C (en) * 2006-01-10 2010-03-24 华为技术有限公司 Method for processing switch metering in WiMAX network
CN101699783B (en) * 2009-10-29 2012-07-18 广州从兴电子开发有限公司 On-line charging data backing-up method, system and charging platforms
CN103078748B (en) * 2013-01-11 2015-08-19 华为技术有限公司 Double machine switching method in charge system and relevant device, system
US9838214B2 (en) * 2014-05-01 2017-12-05 Oracle International Corporation Wi-Fi offload of cellular data
CN105824824B (en) * 2015-01-06 2020-01-14 ***通信集团河南有限公司 Standby call ticket collection equipment and call ticket file collection method thereof

Also Published As

Publication number Publication date
CN107819591A (en) 2018-03-20

Similar Documents

Publication Publication Date Title
TWI642282B (en) Fail recovery method and internet of things system and charging system using the same
CN108880917B (en) Switching method and device of control plane equipment and transfer control separation system
US8761001B2 (en) Method and network system for implementing user port orientation in multi-machine backup scenario of broadband remote access server
EP2245472A2 (en) System and method for network recovery from multiple link failures
CN113727464B (en) Method and device for establishing high concurrent call of SIP streaming media server
CN110674096B (en) Node troubleshooting method, device and equipment and computer readable storage medium
CN106685817B (en) Method and device for switching flow of box end equipment
CN107819591B (en) Data synchronization method, device, system and network equipment
CN101729426A (en) Method and system for quickly switching between master device and standby device of virtual router redundancy protocol (VRRP)
US20020029266A1 (en) Parallel processing architecture for alarm management network entities
CN113794597A (en) Alarm information processing method, system, electronic device and storage medium
CN109302328B (en) Hot standby switching method and system for VXLAN (virtual extensible local area network)
US8775617B2 (en) Method for optimizing network performance after a temporary loss of connection
CN108234358B (en) Multicast message transmission method, device and machine readable storage medium
CN111679925A (en) Database fault processing method and device, computing equipment and storage medium
CN110601786B (en) Time synchronization method, relay equipment and device
CN108599984B (en) Method for sharing port state, access equipment and system for supporting dual-homing protection
CN110932878A (en) Management method, equipment and system of distributed network
CN111432151B (en) Video data storage method, device, equipment and storage medium
CN114500632A (en) Communication method and communication device
CN114301763A (en) Distributed cluster fault processing method and system, electronic device and storage medium
CN113890817A (en) Communication optimization method and device
CN111162967A (en) Offline court-opening processing method, device, terminal, server and storage medium
CN115277379B (en) Distributed lock disaster recovery processing method and device, electronic equipment and storage medium
JP2005033360A (en) Bridge apparatus and method for processing bridge thereof

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