CN110557435A - data synchronization method and device - Google Patents
data synchronization method and device Download PDFInfo
- Publication number
- CN110557435A CN110557435A CN201910697185.9A CN201910697185A CN110557435A CN 110557435 A CN110557435 A CN 110557435A CN 201910697185 A CN201910697185 A CN 201910697185A CN 110557435 A CN110557435 A CN 110557435A
- Authority
- CN
- China
- Prior art keywords
- data
- platform
- conversion server
- video networking
- protocol conversion
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Computer Security & Cryptography (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
When a first platform generates incremental data of video networking data, the first platform sends the incremental data to a first protocol conversion server based on an internet protocol; the first protocol conversion server converts the incremental data into video networking incremental data based on a video networking protocol and sends the video networking incremental data to a second protocol conversion server; the second protocol conversion server converts the video networking incremental data into incremental data based on an internet protocol and sends the incremental data to the second platform; and the second platform adopts the local video networking data and the incremental data to obtain incremental video networking data so as to synchronize with the first platform data. By applying the embodiment of the invention, the first platform and the second platform can realize data synchronization.
Description
Technical Field
the present invention relates to the field of data processing technologies, and in particular, to a data synchronization method and apparatus, and a computer-readable storage medium.
background
The video networking is an important milestone for network development, is a higher-level form of the Internet, is a real-time network, can realize the real-time transmission of full-network high-definition videos which cannot be realized by the Internet at present, pushes a plurality of Internet applications to high-definition video, and finally realizes no distance in the world and realizes that the distance between people in the world is only the distance of one screen.
in order to better serve users, data transmission is needed among the video networking servers, however, the current data transmission has insufficient real-time performance and low efficiency, and cannot meet the requirements of users.
Disclosure of Invention
in view of the above problems, embodiments of the present invention are proposed to provide a data synchronization method, a data synchronization apparatus, an electronic device, and a computer-readable storage medium that overcome or at least partially solve the above problems.
In order to solve the above problem, an embodiment of the present invention discloses a data synchronization method, where the method is applied to a video network, where the video network includes a first platform and a first protocol conversion server in the same local area network, and a second platform and a second protocol conversion server in the same local area network, the first platform and the first protocol conversion server, the second platform and the second protocol conversion server perform data transmission based on an internet protocol, and the first protocol conversion server and the second protocol conversion server perform data transmission based on a video network protocol, and the method includes:
When the first platform generates incremental data of video networking data, the first platform sends the incremental data to the first protocol conversion server based on an internet protocol;
The first protocol conversion server converts the incremental data into video networking incremental data based on a video networking protocol and sends the video networking incremental data to a second protocol conversion server;
The second protocol conversion server converts the video networking incremental data into incremental data based on an internet protocol and sends the incremental data to the second platform;
and the second platform adopts the local video networking data and the incremental data to obtain incremental video networking data so as to synchronize with the first platform data.
preferably, the first protocol conversion server and the second protocol conversion server are respectively provided with at least two network cards, and the at least two network cards are used for respectively accessing a local area network and a video network.
preferably, before the step of the first platform sending the incremental data to the first protocol conversion server based on the internet protocol when the first platform generates the incremental data of the internet-of-view data, the method further includes:
the first platform sends video networking data to the second platform based on a video networking protocol;
the second platform locally saves the video networking data.
preferably, after the step of the first platform sending the video networking data to the second platform based on the video networking protocol, the method further comprises the following steps;
The first platform monitors in real time whether incremental data of the video networking data is generated.
preferably, after the step of the second platform obtaining incremental video networking data by using the local video networking data and the incremental data to synchronize with the first platform data, the method further comprises:
and after the data of the second platform and the first platform are synchronized, the second platform sends a synchronization completion message to the first platform.
The embodiment of the invention also discloses a data synchronization device, the method is applied to a video network, the video network comprises a first platform and a first protocol conversion server which are positioned in the same local area network, and a second platform and a second protocol conversion server which are positioned in the same local area network, the first platform and the first protocol conversion server, the second platform and the second protocol conversion server are used for carrying out data transmission based on the internet protocol, the first protocol conversion server and the second protocol conversion server are used for carrying out data transmission based on the video network protocol, and the device comprises:
The incremental data sending module is used for sending the incremental data to the first protocol conversion server by the first platform based on an internet protocol when the first platform generates the incremental data of the video networking data;
The incremental data conversion module is used for converting the incremental data into the video networking incremental data based on the video networking protocol by the first protocol conversion server and sending the video networking incremental data to the second protocol conversion server;
the second protocol conversion server is used for converting the video networking incremental data into incremental data based on an Internet protocol and sending the incremental data to the second platform;
And the data synchronization module is used for the second platform to obtain incremental video networking data by adopting local video networking data and the incremental data so as to synchronize with the first platform data.
Preferably, the first protocol conversion server and the second protocol conversion server are respectively provided with at least two network cards, and the at least two network cards are used for respectively accessing a local area network and a video network.
preferably, the method further comprises the following steps:
the video networking data sending module is used for the first platform to send video networking data to the second platform based on a video networking protocol;
And the video networking data storage module is used for locally storing the video networking data by the second platform.
the embodiment of the invention also discloses an electronic device, which comprises:
One or more processors; and
One or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the electronic device to perform one or more data synchronization methods as described in embodiments of the invention.
The embodiment of the invention also discloses a computer readable storage medium, and a stored computer program enables a processor to execute the data synchronization method.
the embodiment of the invention has the following advantages:
In the embodiment of the invention, for a first platform and a second platform which are in a video network but in different local area networks, when the first platform generates incremental data of video network data, the first platform sends the incremental data to a first protocol conversion server based on an internet protocol, the first protocol conversion server converts the incremental data into the video network incremental data based on the video network protocol and sends the video network incremental data to a second protocol conversion server, the second protocol conversion server converts the video network incremental data into the incremental data based on the internet protocol and sends the incremental data to the second platform, and the second platform adopts the local video network data and the incremental data to obtain the incremental video network data so as to synchronize with the first platform data. By applying the embodiment of the invention, when the first platform detects the incremental data generating the video networking data, the incremental data can be sent to the second platform in real time, so that the first platform and the second platform can realize data synchronization.
Drawings
FIG. 1 is a schematic networking diagram of a video network of the present invention;
FIG. 2 is a schematic diagram of a hardware architecture of a node server according to the present invention;
Fig. 3 is a schematic diagram of a hardware structure of an access switch of the present invention;
Fig. 4 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to the present invention;
FIG. 5 is a flow chart of steps of an embodiment of a method for data synchronization in accordance with the present invention;
FIG. 6 is a block diagram of a data synchronization architecture according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of data synchronization according to an embodiment of the present invention;
Fig. 8 is a schematic structural diagram of an embodiment of a data synchronization apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The video networking is an important milestone for network development, is a real-time network, can realize high-definition video real-time transmission, and pushes a plurality of internet applications to high-definition video, and high-definition faces each other.
The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services of video, voice, pictures, characters, communication, data and the like on a system platform on a network platform, such as high-definition video conference, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mail, Personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like, and realizes high-definition quality video broadcast through a television or a computer.
To better understand the embodiments of the present invention, the following description refers to the internet of view:
Some of the technologies applied in the video networking are as follows:
Network Technology (Network Technology)
network technology innovation in video networking has improved the traditional Ethernet (Ethernet) to face the potentially huge first video traffic on the network. Unlike pure network Packet Switching (Packet Switching) or network Circuit Switching (Circuit Switching), the Packet Switching is adopted by the technology of the video networking to meet the Streaming requirement. The video networking technology has the advantages of flexibility, simplicity and low price of packet switching, and simultaneously has the quality and safety guarantee of circuit switching, thereby realizing the seamless connection of the whole network switching type virtual circuit and the data format.
switching Technology (Switching Technology)
The video network adopts two advantages of asynchronism and packet switching of the Ethernet, eliminates the defects of the Ethernet on the premise of full compatibility, has end-to-end seamless connection of the whole network, is directly communicated with a user terminal, and directly bears an IP data packet. The user data does not require any format conversion across the entire network. The video networking is a higher-level form of the Ethernet, is a real-time exchange platform, can realize the real-time transmission of the whole-network large-scale high-definition video which cannot be realized by the existing Internet, and pushes a plurality of network video applications to high-definition and unification.
Server Technology (Server Technology)
the server technology on the video networking and unified video platform is different from the traditional server, the streaming media transmission of the video networking and unified video platform is established on the basis of connection orientation, the data processing capacity of the video networking and unified video platform is independent of flow and communication time, and a single network layer can contain signaling and data transmission. For voice and video services, the complexity of video networking and unified video platform streaming media processing is much simpler than that of data processing, and the efficiency is greatly improved by more than one hundred times compared with that of a traditional server.
Storage Technology (Storage Technology)
The super-high speed storage technology of the unified video platform adopts the most advanced real-time operating system in order to adapt to the media content with super-large capacity and super-large flow, the program information in the server instruction is mapped to the specific hard disk space, the media content is not passed through the server any more, and is directly sent to the user terminal instantly, and the general waiting time of the user is less than 0.2 second. The optimized sector distribution greatly reduces the mechanical motion of the magnetic head track seeking of the hard disk, the resource consumption only accounts for 20% of that of the IP internet of the same grade, but concurrent flow which is 3 times larger than that of the traditional hard disk array is generated, and the comprehensive efficiency is improved by more than 10 times.
Network Security Technology (Network Security Technology)
The structural design of the video network completely eliminates the network security problem troubling the internet structurally by the modes of independent service permission control each time, complete isolation of equipment and user data and the like, generally does not need antivirus programs and firewalls, avoids the attack of hackers and viruses, and provides a structural carefree security network for users.
service Innovation Technology (Service Innovation Technology)
The unified video platform integrates services and transmission, and is not only automatically connected once whether a single user, a private network user or a network aggregate. The user terminal, the set-top box or the PC are directly connected to the unified video platform to obtain various multimedia video services in various forms. The unified video platform adopts a menu type configuration table mode to replace the traditional complex application programming, can realize complex application by using very few codes, and realizes infinite new service innovation.
Networking of the video network is as follows:
The video network is a centralized control network structure, and the network can be a tree network, a star network, a ring network and the like, but on the basis of the centralized control node, the whole network is controlled by the centralized control node in the network.
As shown in fig. 1, the video network is divided into an access network and a metropolitan network.
The devices of the access network part can be mainly classified into 3 types: node server, access switch, terminal (including various set-top boxes, coding boards, memories, etc.). The node server is connected to an access switch, which may be connected to a plurality of terminals and may be connected to an ethernet network.
the node server is a node which plays a centralized control function in the access network and can control the access switch and the terminal. The node server can be directly connected with the access switch or directly connected with the terminal.
Similarly, devices of the metropolitan network portion may also be classified into 3 types: a metropolitan area server, a node switch and a node server. The metro server is connected to a node switch, which may be connected to a plurality of node servers.
The node server is a node server of the access network part, namely the node server belongs to both the access network part and the metropolitan area network part.
the metropolitan area server is a node which plays a centralized control function in the metropolitan area network and can control a node switch and a node server. The metropolitan area server can be directly connected with the node switch or directly connected with the node server.
Therefore, the whole video network is a network structure with layered centralized control, and the network controlled by the node server and the metropolitan area server can be in various structures such as tree, star and ring.
The access network part can form a unified video platform (the part in the dotted circle), and a plurality of unified video platforms can form a video network; each unified video platform may be interconnected via metropolitan area and wide area video networking.
Video networking device classification
1.1 devices in the video network of the embodiment of the present invention can be mainly classified into 3 types: server, exchanger (including Ethernet protocol conversion gateway), terminal (including various set-top boxes, code board, memory, etc.). The video network as a whole can be divided into a metropolitan area network (or national network, global network, etc.) and an access network.
1.2 wherein the devices of the access network part can be mainly classified into 3 types: node server, access exchanger (including Ethernet protocol conversion gateway), terminal (including various set-top boxes, coding board, memory, etc.).
the specific hardware structure of each access network device is as follows:
A node server:
As shown in fig. 2, the system mainly includes a network interface module 201, a switching engine module 202, a CPU module 203, and a disk array module 204;
The network interface module 201, the CPU module 203, and the disk array module 204 all enter the switching engine module 202; the switching engine module 202 performs an operation of looking up the address table 205 on the incoming packet, thereby obtaining the direction information of the packet; and stores the packet in a queue of the corresponding packet buffer 206 based on the packet's steering information; if the queue of the packet buffer 206 is nearly full, it is discarded; the switching engine module 202 polls all packet buffer queues for forwarding if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero. The disk array module 204 mainly implements control over the hard disk, including initialization, read-write, and other operations on the hard disk; the CPU module 203 is mainly responsible for protocol processing with an access switch and a terminal (not shown in the figure), configuring an address table 205 (including a downlink protocol packet address table, an uplink protocol packet address table, and a data packet address table), and configuring the disk array module 204.
The access switch:
as shown in fig. 3, the network interface module mainly includes a network interface module (a downlink network interface module 301 and an uplink network interface module 302), a switching engine module 303 and a CPU module 304;
Wherein, the packet (uplink data) coming from the downlink network interface module 301 enters the packet detection module 305; the packet detection module 305 detects whether the Destination Address (DA), the Source Address (SA), the packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id) and enters the switching engine module 303, otherwise, discards the stream identifier; the packet (downstream data) coming from the upstream network interface module 302 enters the switching engine module 303; the incoming data packet of the CPU module 304 enters the switching engine module 303; the switching engine module 303 performs an operation of looking up the address table 306 on the incoming packet, thereby obtaining the direction information of the packet; if the packet entering the switching engine module 303 is from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 307 in association with the stream-id; if the queue of the packet buffer 307 is nearly full, it is discarded; if the packet entering the switching engine module 303 is not from the downlink network interface to the uplink network interface, the data packet is stored in the queue of the corresponding packet buffer 307 according to the guiding information of the packet; if the queue of the packet buffer 307 is nearly full, it is discarded.
The switching engine module 303 polls all packet buffer queues and may include two cases:
if the queue is from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queued packet counter is greater than zero; 3) obtaining a token generated by a code rate control module;
If the queue is not from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero.
the rate control module 308 is configured by the CPU module 304, and generates tokens for packet buffer queues from all downstream network interfaces to upstream network interfaces at programmable intervals to control the rate of upstream forwarding.
the CPU module 304 is mainly responsible for protocol processing with the node server, configuration of the address table 306, and configuration of the code rate control module 308.
Ethernet protocol conversion gateway:
as shown in fig. 4, the apparatus mainly includes a network interface module (a downlink network interface module 401 and an uplink network interface module 402), a switching engine module 403, a CPU module 404, a packet detection module 405, a rate control module 408, an address table 406, a packet buffer 407, a MAC adding module 409, and a MAC deleting module 410.
wherein, the data packet coming from the downlink network interface module 401 enters the packet detection module 405; the packet detection module 405 detects whether the ethernet MAC DA, the ethernet MAC SA, the ethernet length or frame type, the video network destination address DA, the video network source address SA, the video network packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id); then, the MAC deletion module 410 subtracts MAC DA, MAC SA, length or frame type (2byte) and enters the corresponding receiving buffer, otherwise, discards it;
The downlink network interface module 401 detects the sending buffer of the port, and if there is a packet, obtains the ethernet MAC DA of the corresponding terminal according to the destination address DA of the packet, adds the ethernet MAC DA of the terminal, the MACSA of the ethernet coordination gateway, and the ethernet length or frame type, and sends the packet.
The other modules in the ethernet protocol gateway function similarly to the access switch.
A terminal:
The system mainly comprises a network interface module, a service processing module and a CPU module; for example, the set-top box mainly comprises a network interface module, a video and audio coding and decoding engine module and a CPU module; the coding board mainly comprises a network interface module, a video and audio coding engine module and a CPU module; the memory mainly comprises a network interface module, a CPU module and a disk array module.
1.3 devices of the metropolitan area network part can be mainly classified into 2 types: node server, node exchanger, metropolitan area server. The node switch mainly comprises a network interface module, a switching engine module and a CPU module; the metropolitan area server mainly comprises a network interface module, a switching engine module and a CPU module.
2. Video networking packet definition
2.1 Access network packet definition
The data packet of the access network mainly comprises the following parts: destination Address (DA), Source Address (SA), reserved bytes, payload (pdu), CRC.
As shown in the following table, the data packet of the access network mainly includes the following parts:
DA | SA | Reserved | Payload | CRC |
wherein:
The Destination Address (DA) is composed of 8 bytes (byte), the first byte represents the type of the data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), there are 256 possibilities at most, the second byte to the sixth byte are metropolitan area network addresses, and the seventh byte and the eighth byte are access network addresses;
The Source Address (SA) is also composed of 8 bytes (byte), defined as the same as the Destination Address (DA);
the reserved byte consists of 2 bytes;
The payload part has different lengths according to different types of datagrams, and is 64 bytes if the datagram is various types of protocol packets, and is 32+1024 or 1056 bytes if the datagram is a unicast packet, of course, the length is not limited to the above 2 types;
The CRC consists of 4 bytes and is calculated in accordance with the standard ethernet CRC algorithm.
2.2 metropolitan area network packet definition
The topology of a metropolitan area network is a graph and there may be 2, or even more than 2, connections between two devices, i.e., there may be more than 2 connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the metro network address of the metro network device is unique, and in order to accurately describe the connection relationship between the metro network devices, parameters are introduced in the embodiment of the present invention: a label to uniquely describe a metropolitan area network device.
in this specification, the definition of the Label is similar to that of the Label of MPLS (Multi-Protocol Label Switch), and assuming that there are two connections between the device a and the device B, there are 2 labels for the packet from the device a to the device B, and 2 labels for the packet from the device B to the device a. The label is classified into an incoming label and an outgoing label, and assuming that the label (incoming label) of the packet entering the device a is 0x0000, the label (outgoing label) of the packet leaving the device a may become 0x 0001. The network access process of the metro network is a network access process under centralized control, that is, address allocation and label allocation of the metro network are both dominated by the metro server, and the node switch and the node server are both passively executed, which is different from label allocation of MPLS, and label allocation of MPLS is a result of mutual negotiation between the switch and the server.
As shown in the following table, the data packet of the metro network mainly includes the following parts:
DA | SA | Reserved | label (R) | Payload | CRC |
namely Destination Address (DA), Source Address (SA), Reserved byte (Reserved), tag, payload (pdu), CRC. The format of the tag may be defined by reference to the following: the tag is 32 bits with the upper 16 bits reserved and only the lower 16 bits used, and its position is between the reserved bytes and payload of the packet.
the video network has a file cascading function. The functions mainly completed by the file cascade function are as follows: after the full data (for example, full monitoring resources) of the lower platform is acquired in a cascading manner, the change information (also called incremental data) of the full data in the lower platform needs to be acquired at regular time, and can be updated to the upper platform at regular time and synchronously, and the file cascading function is used in the process.
Specifically, all incremental data generated on the basis of full data in a lower platform are written into a file and stored in a local disk, then a higher platform acquires the full monitoring resources and then acquires the incremental data regularly, namely, a file cascading command is initiated to the lower platform, the period is a time interval of every 1 minute, after receiving the file cascading command of the incremental data sent by the higher platform, the lower platform immediately reads the incremental cascaded file containing the incremental data and stored in the local disk, then compresses the file and sends the compressed file to the higher platform, and after receiving the file, the higher platform decompresses and analyzes the incremental data in the file and then synchronously updates the incremental data into a database. Therefore, the synchronization of the incremental data changed by the lower platform to the upper platform is completed, and the consistency of the monitoring resources and other related database information between the upper platform and the lower platform is maintained.
The file cascade function has a problem in the existing video network, firstly, the higher platform obtains the incremental data of the full monitoring resources of the lower platform at regular intervals of 1 minute, so that the real-time performance is poor, and after the incremental data of the lower platform needs 1 minute, the incremental data can be synchronously updated to the higher platform through the file cascade function, so that the real-time performance is poor. In addition, the lower platform selects a file-using mode to store each time of incremental data, so that the disk operation is very frequent, the incremental data must be synchronously written into the file every time the monitoring resource is changed, the performance of the program is influenced, and the stored cascaded file is easy to lose, damage or delete and is unsafe.
in order to solve the problems of poor instantaneity and low efficiency of the cascaded files, the embodiment of the invention provides a new data synchronization scheme, which can ensure that incremental data of monitoring resources in a lower-level platform can be quickly and synchronously updated into a higher-level platform, and ensure the consistency of monitoring resource information in databases of the higher-level platform and the lower-level platform.
The data synchronization scheme of the embodiment of the invention is realized based on the mysql master-slave synchronization function, the mysql master-slave synchronization function can update and synchronize the data in the master database to the slave database in real time, the consistency of the data in the master database and the slave database is ensured, the real-time performance is very high, and the changed data in the master database can be immediately updated to the slave database synchronously.
based on the mysql master-slave synchronization function, the database of the lower platform can be used as a master database, the database of the upper platform can be used as a slave database, and then incremental data of the internet-of-view data in the lower platform can be synchronously updated to the upper platform in real time. The invention provides a method for transmitting data, which is characterized in that a channel for transmitting data is cut off by a video network, the video network can also transmit data, but only can transmit video network protocol data. This completes the master-slave synchronization function of mysql across the video network.
The method has the advantages that the mysql database has the master-slave synchronization function, so that the real-time performance, the performance and the stability are very high, and the accuracy and the real-time performance of the data acquired by the superior platform can be greatly improved by replacing the original file cascade mode through the data synchronization scheme of the embodiment of the invention.
The following describes embodiments of the present invention in detail.
Referring to fig. 5, a flowchart illustrating steps of an embodiment of a method for data synchronization according to an embodiment of the present invention is shown, where the method is applied to a video network, where the video network includes a first platform and a first protocol conversion server in a same lan, and a second platform and a second protocol conversion server in the same lan, the first platform and the first protocol conversion server, the second platform and the second protocol conversion server perform data transmission based on an internet protocol, and the first protocol conversion server and the second protocol conversion server perform data transmission based on a video network protocol.
in the embodiment of the present invention, the first protocol conversion server and the second protocol conversion server respectively have at least two network cards. The Network Card is a Network adapter, and is called Network Interface Card in English, which is one of the most basic components in a local area Network, and the Network Card is generally divided into two categories, namely a wired Network Card and a wireless Network Card, and is indispensable hardware equipment for connecting a computer and a Network. The protocol conversion server of the embodiment of the invention can be respectively accessed to the local area network and the video network through at least two network cards. That is to say, the protocol conversion server has double network cards, so that the protocol conversion server can be accessed to a local area network and a video network.
In a preferred embodiment of the embodiments of the present invention, the method may further include the steps of:
the first platform sends video networking data to the second platform based on a video networking protocol;
The second platform locally saves the video networking data.
The first platform is a lower platform, the second platform is an upper platform, and the upper platform can acquire data of each lower platform, such as monitoring data. In a specific implementation, the higher-level platform can store the full amount of video networking data of the lower-level platform in the higher-level platform after acquiring the full amount of video networking data of the lower-level platform.
Specifically, the data synchronization method according to the embodiment of the present invention may specifically include the following steps:
Step 501, when the first platform generates incremental data of video networking data, the first platform sends the incremental data to the first protocol conversion server based on an internet protocol;
For the second platform, after acquiring the full amount of the video networking data, it is further required to acquire change information (also referred to as incremental data) of the full amount of the video networking data in the first platform, so as to implement data synchronization of the first platform and the second platform. Specifically, the incremental data refers to the networking data of the first platform after being added, deleted or modified.
in a preferred embodiment of the present invention, the method may further comprise the steps of: the first platform monitors in real time whether incremental data of the video networking data is generated.
the first platform of the embodiment of the invention detects whether incremental data of the video networking data is generated in real time, and immediately sends the incremental data to the first protocol conversion server based on the Internet protocol after detecting that the incremental data is generated.
step 502, the first protocol conversion server converts the incremental data into the incremental data of the video network based on the video network protocol, and sends the incremental data of the video network to a second protocol conversion server;
in the embodiment of the invention, the first protocol conversion server receives the incremental data sent by the first platform, converts the incremental data into the incremental data of the video network based on the video network protocol, and then sends the incremental data of the video network to the second protocol conversion server.
Step 503, the second protocol conversion server converts the incremental data of the video network into incremental data based on an internet protocol, and sends the incremental data to the second platform;
In the embodiment of the invention, the second protocol conversion server converts the incremental data of the video network into the incremental data based on the internet protocol, and then sends the converted incremental data to the second platform based on the internet protocol.
And step 504, the second platform obtains incremental video networking data by using the local video networking data and the incremental data so as to synchronize with the first platform data.
After the incremental data is obtained, the second platform can realize data synchronization with the first platform based on the previously stored video networking data and the incremental data.
In a preferred embodiment of the present invention, the method may further comprise the steps of:
and after the data of the second platform and the first platform are synchronized, the second platform sends a synchronization completion message to the first platform.
In the embodiment of the present invention, after the second platform implements data synchronization with the first platform based on the incremental data, a synchronization completion message may be sent to the first platform to notify the first platform that the data synchronization is completed.
in the embodiment of the invention, for a first platform and a second platform which are in a video network but in different local area networks, when the first platform generates incremental data of video network data, the first platform sends the incremental data to a first protocol conversion server based on an internet protocol, the first protocol conversion server converts the incremental data into the video network incremental data based on the video network protocol and sends the video network incremental data to a second protocol conversion server, the second protocol conversion server converts the video network incremental data into the incremental data based on the internet protocol and sends the incremental data to the second platform, and the second platform adopts the local video network data and the incremental data to obtain the incremental video network data so as to synchronize with the first platform data. By applying the embodiment of the invention, when the first platform detects the incremental data generating the video networking data, the incremental data can be sent to the second platform in real time, so that the first platform and the second platform can realize data synchronization.
in order that those skilled in the art will better understand the embodiments of the present invention, specific examples are given below. Referring to fig. 6, which is a schematic diagram of a data synchronization architecture of the present invention, in the embodiment of the present invention, protocol conversion servers are built at two ends of a video network, and the protocol conversion servers have dual network cards, so that the local area network and the video network can be accessed.
Firstly, a master database (a first platform) and a protocol conversion server 1 are positioned in a local area network 1, the master database initiates tcp connection to the protocol conversion server 1, so that the protocol conversion server 1 is equivalent to a slave database in the view of the master database, the protocol conversion server 1 converts the received tcp protocol data into internet protocol data and sends the internet protocol data to a protocol conversion server 2 through the internet, the protocol conversion server 2 converts the internet protocol data into tcp protocol data and sends the tcp protocol data to a slave database (a second platform), and the protocol conversion server 2 is equivalent to a master database in the view of the slave database, so that the master database can carry out data transmission across the internet and the slave database through the tcp.
Referring to fig. 7, a schematic diagram of data synchronization according to the present invention is shown, in which databases of 16 tangula platforms in all regions of the world are used as master databases, a provincial tangula platform is used as a slave database, and data synchronization from each region of the state tangula databases to the provincial tangula databases is completed, where the data mainly includes incremental data of monitoring resources newly added, deleted, or modified in each region of the state databases, and a cross-view networking data synchronization scheme based on mysql master-slave synchronization.
by applying the embodiment of the invention, the problem that files do not need to be written when monitoring resource changes in each state is overcome, the pressure of a disk is reduced, and meanwhile, the master-slave synchronization scheme of mysql is used for synchronizing data, so that the real-time performance and the stability of data synchronization are improved.
When the data change of the monitoring resource occurs in the local state tangula mysql database, for example, the operation of adding, deleting or modifying the monitoring resource, the local state tangula mysql database immediately transmits the changed incremental data to the protocol conversion server through the tcp protocol, the protocol conversion server transmits the tcp protocol to the protocol conversion server 3 after converting the tcp protocol into the internet of view protocol, the protocol conversion server 3 converts the internet of view protocol into the tcp protocol and transmits the tcp protocol to the provincial level tangula mysql database, so that the changed monitoring resource (i.e., the incremental data) in the state database is transmitted to the provincial level database through the internet of view, and the changed monitoring resource can be accurately seen on the provincial level tangula platform in real time.
various problems can occur in the previous file cascading scheme, so that the cost of operation and maintenance personnel and the cost of problem troubleshooting of research personnel are increased, in addition, the real-time performance of file cascading is very low, the user experience of a superior platform and the working efficiency of working personnel are greatly influenced, through the mysql master-slave synchronization data synchronization scheme, the real-time performance of data is close to the second level, after the data of a subordinate platform changes, the superior platform can immediately see the monitoring resources changed by the subordinate platform, and the real-time performance is very high.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
referring to fig. 8, a data synchronization apparatus according to an embodiment of the present invention is shown, where the apparatus is applied to a video network, where the video network includes a first platform and a first protocol conversion server in a same lan, and a second platform and a second protocol conversion server in the same lan, the first platform and the first protocol conversion server, the second platform and the second protocol conversion server are for data transmission based on an internet protocol, and the first protocol conversion server and the second protocol conversion server are for data transmission based on a video network protocol, and the apparatus may include the following modules:
an incremental data sending module 601, configured to, when the first platform generates incremental data of video networking data, send the incremental data to the first protocol conversion server by the first platform based on an internet protocol;
An incremental data conversion module 602, configured to convert, by the first protocol conversion server, the incremental data into internet-of-view incremental data based on an internet-of-view protocol, and send the internet-of-view incremental data to a second protocol conversion server;
The video networking incremental data conversion module 603 is configured to convert, by the second protocol conversion server, the video networking incremental data into incremental data based on an internet protocol, and send the incremental data to the second platform;
and a data synchronization module 604, configured to obtain incremental video networking data by the second platform using the local video networking data and the incremental data, so as to synchronize with the first platform data.
In a preferred embodiment of the present invention, the first protocol conversion server and the second protocol conversion server respectively have at least two network cards, and the at least two network cards are used for accessing the local area network and the video network respectively.
In a preferred embodiment of the present invention, the apparatus further comprises:
the video networking data sending module is used for the first platform to send video networking data to the second platform based on a video networking protocol;
and the video networking data storage module is used for locally storing the video networking data by the second platform.
In a preferred embodiment of the present invention, the apparatus further comprises:
And the incremental data monitoring module is used for monitoring whether incremental data of the video networking data are generated or not by the first platform in real time.
In a preferred embodiment of the present invention, the apparatus further comprises:
And the data synchronization message sending module is used for sending a synchronization completion message to the first platform after the second platform synchronizes the data with the first platform.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, including:
One or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the electronic device to perform one or more data synchronization methods as described in embodiments of the invention.
embodiments of the present invention further provide a computer-readable storage medium, which stores a computer program for enabling a processor to execute the data synchronization method according to the embodiments of the present invention.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
as will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
while preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
the data synchronization method, the data synchronization apparatus, the electronic device and the computer-readable storage medium provided by the present invention are described in detail above, and specific examples are applied herein to illustrate the principles and embodiments of the present invention, and the above descriptions of the embodiments are only used to help understand the method and the core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
Claims (10)
1. a data synchronization method is applied to a video network, wherein the video network comprises a first platform and a first protocol conversion server in the same local area network, and a second platform and a second protocol conversion server in the same local area network, the first platform and the first protocol conversion server, the second platform and the second protocol conversion server are used for data transmission based on an Internet protocol, and the first protocol conversion server and the second protocol conversion server are used for data transmission based on a video network protocol, and the method comprises the following steps:
When the first platform generates incremental data of video networking data, the first platform sends the incremental data to the first protocol conversion server based on an internet protocol;
The first protocol conversion server converts the incremental data into video networking incremental data based on a video networking protocol and sends the video networking incremental data to a second protocol conversion server;
The second protocol conversion server converts the video networking incremental data into incremental data based on an internet protocol and sends the incremental data to the second platform;
and the second platform adopts the local video networking data and the incremental data to obtain incremental video networking data so as to synchronize with the first platform data.
2. the method of claim 1, wherein the first protocol conversion server and the second protocol conversion server each have at least two network cards for accessing a local area network and a video network, respectively.
3. the method of claim 1, wherein prior to the step of the first platform sending the incremental data to the first protocol conversion server based on an internet protocol when the first platform generates the incremental data for the video networking data, further comprising:
the first platform sends video networking data to the second platform based on a video networking protocol;
the second platform locally saves the video networking data.
4. The method of claim 3, further comprising, after the step of the first platform sending video networking data to the second platform based on a video networking protocol:
The first platform monitors in real time whether incremental data of the video networking data is generated.
5. The method of claim 1, further comprising, after the step of the second platform using the local video networking data and the delta data to derive delta video networking data to synchronize with the first platform data:
And after the data of the second platform and the first platform are synchronized, the second platform sends a synchronization completion message to the first platform.
6. A data synchronization device is applied to a video network, the video network comprises a first platform and a first protocol conversion server in the same local area network, and a second platform and a second protocol conversion server in the same local area network, the first platform and the first protocol conversion server, the second platform and the second protocol conversion server are used for data transmission based on an Internet protocol, the first protocol conversion server and the second protocol conversion server are used for data transmission based on a video network protocol, the device comprises:
The incremental data sending module is used for sending the incremental data to the first protocol conversion server by the first platform based on an internet protocol when the first platform generates the incremental data of the video networking data;
The incremental data conversion module is used for converting the incremental data into the video networking incremental data based on the video networking protocol by the first protocol conversion server and sending the video networking incremental data to the second protocol conversion server;
The second protocol conversion server is used for converting the video networking incremental data into incremental data based on an Internet protocol and sending the incremental data to the second platform;
And the data synchronization module is used for the second platform to obtain incremental video networking data by adopting local video networking data and the incremental data so as to synchronize with the first platform data.
7. the apparatus of claim 6, wherein the first protocol conversion server and the second protocol conversion server each have at least two network cards for accessing a local area network and a video network, respectively.
8. The apparatus of claim 6, further comprising:
The video networking data sending module is used for the first platform to send video networking data to the second platform based on a video networking protocol;
and the video networking data storage module is used for locally storing the video networking data by the second platform.
9. An electronic device, comprising:
One or more processors; and
one or more machine-readable media having instructions stored thereon that, when executed by the one or more processors, cause the electronic device to perform the data synchronization method of one or more of claims 1-5.
10. A computer-readable storage medium storing a computer program for causing a processor to execute the data synchronization method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910697185.9A CN110557435A (en) | 2019-07-30 | 2019-07-30 | data synchronization method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910697185.9A CN110557435A (en) | 2019-07-30 | 2019-07-30 | data synchronization method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110557435A true CN110557435A (en) | 2019-12-10 |
Family
ID=68736984
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910697185.9A Pending CN110557435A (en) | 2019-07-30 | 2019-07-30 | data synchronization method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110557435A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150019486A1 (en) * | 2010-11-18 | 2015-01-15 | Zensar Technologies Ltd. | System and Method for Delta Change Synchronization of Data Changes across a Plurality of Nodes |
CN108881141A (en) * | 2017-11-23 | 2018-11-23 | 北京视联动力国际信息技术有限公司 | A kind of data processing method and device based on view networking |
CN109660753A (en) * | 2018-11-05 | 2019-04-19 | 视联动力信息技术股份有限公司 | Resource synchronization method and device |
CN109714568A (en) * | 2018-12-12 | 2019-05-03 | 视联动力信息技术股份有限公司 | A kind of synchronous method and device of video monitoring data |
CN109743595A (en) * | 2018-12-28 | 2019-05-10 | 视联动力信息技术股份有限公司 | Terminal data synchronous method and device |
CN109802952A (en) * | 2018-12-28 | 2019-05-24 | 视联动力信息技术股份有限公司 | Monitoring data synchronous method and device |
CN109889780A (en) * | 2019-01-31 | 2019-06-14 | 视联动力信息技术股份有限公司 | Method of data synchronization and device |
-
2019
- 2019-07-30 CN CN201910697185.9A patent/CN110557435A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150019486A1 (en) * | 2010-11-18 | 2015-01-15 | Zensar Technologies Ltd. | System and Method for Delta Change Synchronization of Data Changes across a Plurality of Nodes |
CN108881141A (en) * | 2017-11-23 | 2018-11-23 | 北京视联动力国际信息技术有限公司 | A kind of data processing method and device based on view networking |
CN109660753A (en) * | 2018-11-05 | 2019-04-19 | 视联动力信息技术股份有限公司 | Resource synchronization method and device |
CN109714568A (en) * | 2018-12-12 | 2019-05-03 | 视联动力信息技术股份有限公司 | A kind of synchronous method and device of video monitoring data |
CN109743595A (en) * | 2018-12-28 | 2019-05-10 | 视联动力信息技术股份有限公司 | Terminal data synchronous method and device |
CN109802952A (en) * | 2018-12-28 | 2019-05-24 | 视联动力信息技术股份有限公司 | Monitoring data synchronous method and device |
CN109889780A (en) * | 2019-01-31 | 2019-06-14 | 视联动力信息技术股份有限公司 | Method of data synchronization and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110149262B (en) | Method and device for processing signaling message and storage medium | |
CN109379254B (en) | Network connection detection method and system based on video conference | |
CN109246135B (en) | Method and system for acquiring streaming media data | |
CN109660753B (en) | Resource synchronization method and device | |
CN108574816B (en) | Video networking terminal and communication method and device based on video networking terminal | |
CN109802952B (en) | Monitoring data synchronization method and device | |
CN109714568B (en) | Video monitoring data synchronization method and device | |
CN109302384B (en) | Data processing method and system | |
CN110557608B (en) | Resource monitoring method, device and computer readable storage medium | |
CN110769297A (en) | Audio and video data processing method and system | |
CN110493319B (en) | Data synchronization method, system and device | |
CN110557370B (en) | Method, system, electronic equipment and storage medium for pamir synchronization of terminal information | |
CN110289974B (en) | Data stream processing method, system and device and storage medium | |
CN109587524B (en) | Method and device for synchronizing video networking resources to Internet terminal | |
CN109743360B (en) | Information processing method and device | |
CN109361891B (en) | Data synchronization method and system in hierarchical conference | |
CN110784683B (en) | Management method, device and storage medium for monitoring resources | |
CN110557611B (en) | Information synchronization method, device and storage medium | |
CN109379553B (en) | Audio and video data display method and system | |
CN110381029B (en) | Monitoring resource synchronization method and device | |
CN110808896B (en) | Data transmission method and device, electronic equipment and storage medium | |
CN110536148B (en) | Live broadcasting method and equipment based on video networking | |
CN110557687B (en) | Multicast data packet processing method, device and storage medium | |
CN110012064B (en) | Data synchronization method and system | |
CN110098993B (en) | Method and device for processing signaling message |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191210 |
|
RJ01 | Rejection of invention patent application after publication |