CN113407621A - Method, device and medium for synchronizing chart data of terminal equipment and server - Google Patents

Method, device and medium for synchronizing chart data of terminal equipment and server Download PDF

Info

Publication number
CN113407621A
CN113407621A CN202110527618.3A CN202110527618A CN113407621A CN 113407621 A CN113407621 A CN 113407621A CN 202110527618 A CN202110527618 A CN 202110527618A CN 113407621 A CN113407621 A CN 113407621A
Authority
CN
China
Prior art keywords
data
server
database
differential data
background server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110527618.3A
Other languages
Chinese (zh)
Inventor
吴志敏
余卫平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Yaoguang Intelligent Technology Co ltd
Original Assignee
Fujian Yaoguang Intelligent Technology 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 Fujian Yaoguang Intelligent Technology Co ltd filed Critical Fujian Yaoguang Intelligent Technology Co ltd
Priority to CN202110527618.3A priority Critical patent/CN113407621A/en
Publication of CN113407621A publication Critical patent/CN113407621A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses a method for synchronizing terminal equipment chart data and a server, which comprises the following steps: step 10, building a client server on the terminal equipment and appointing a first database, and building a background server on the shipborne equipment and appointing a second database; step 20, the client server establishes connection with the background server; step 30, when the data of the first database changes, acquiring differential data, encrypting the differential data, transmitting the encrypted differential data to a background server, decrypting the encrypted differential data by the background server, and storing the decrypted differential data in a second database; and when the data of the second database changes, acquiring differential data, encrypting the differential data, transmitting the encrypted data to the client server, decrypting the encrypted differential data by the terminal equipment, and storing the decrypted differential data in the first database. The embodiment of the invention provides a method, a device and a medium for synchronizing terminal equipment chart data and a server, which are used for realizing synchronous interaction between the terminal chart data and a background server.

Description

Method, device and medium for synchronizing chart data of terminal equipment and server
Technical Field
The invention relates to the technical field of navigation data synchronization, in particular to a method, a device and a medium for synchronizing terminal equipment chart data and a server.
Background
Android is a Linux-based operating system with free and open source codes, is mainly used for mobile devices such as smart phones and tablet computers, and is led and developed by Google corporation and the open mobile alliance. The platform consists of an operating system, middleware, a user interface and application software. The embedded type computer system is widely used in embedded type products due to the fact that source codes are open, hardware is rich and development is easy.
With the development of science and technology, more and more Android terminal devices are applied to navigation. However, in the current terminal devices used for navigation, navigation-related data are stored in the terminal devices. When data needs to be checked, copying the data from the terminal equipment by using a U disk or other mobile disk equipment; when the chart needs to be updated, the chart source is copied to the terminal equipment by using equipment such as a U disk. Such a method is rather cumbersome and inefficient.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method, a device and a medium for synchronizing terminal equipment chart data and a server, so as to realize synchronous interaction between the terminal chart data and a background server.
In a first aspect, the present invention provides a method for synchronizing a terminal device chart data with a server, including:
step 10, building a client server on the terminal equipment and appointing a first database, and building a background server on the shipborne equipment and appointing a second database;
step 20, the client server establishes connection with the background server;
step 30, when the data of the first database changes, acquiring differential data, encrypting the differential data, transmitting the encrypted differential data to a background server, decrypting the encrypted differential data by the background server, and storing the decrypted differential data in a second database;
and when the data of the second database changes, acquiring differential data, encrypting the differential data, transmitting the encrypted data to the client server, decrypting the encrypted differential data by the terminal equipment, and storing the decrypted differential data in the first database.
Further, in the step 10, the client server is built by using ServerSocket.
Further, the step 20 specifically includes:
the method comprises the steps that a client server of the terminal device is started, after the client server is started, a request is sent to a background server through TCP connection, a client service starting completion notice is sent to the background server after connection is successful, an IP address and a port required by connection are sent to the background server, and the background server is connected with the terminal device through the IP and the port, so that connection establishment is achieved.
Further, the encryption operation and the decryption operation are both performed by an encryption library.
Further, the first database is data _ syn, and the second database is s _ data _ syn.
In a second aspect, the present invention provides an apparatus for synchronizing a terminal device with a server, including: the system comprises a construction module, a connection module and a synchronization module;
the building module is used for building a client server on the terminal equipment and appointing a first database, and building a background server on the shipborne equipment and appointing a second database;
the connection module is used for establishing connection between the client server and the background server;
the synchronization module is used for acquiring differential data when the data of the first database changes, transmitting the differential data to the background server after encryption, decrypting the encrypted differential data by the background server, and then storing the decrypted differential data in the second database;
and when the data of the second database changes, acquiring differential data, encrypting the differential data, transmitting the encrypted data to the client server, decrypting the encrypted differential data by the terminal equipment, and storing the decrypted differential data in the first database.
Further, in the building module, the client server is built by using a ServerSocket.
Further, the connection module is specifically configured to:
the method comprises the steps that a client server of the terminal device is started, after the client server is started, a request is sent to a background server through TCP connection, a client service starting completion notice is sent to the background server after connection is successful, an IP address and a port required by connection are sent to the background server, and the background server is connected with the terminal device through the IP and the port, so that connection establishment is achieved.
Further, the encryption operation and the decryption operation are both performed by an encryption library.
Further, the first database is data _ syn, and the second database is s _ data _ syn.
In a third aspect, the invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the method of the first aspect.
The invention has the following advantages:
by the method, the terminal equipment and the background server can synchronously process specific data, the terminal data are changed, the background can acquire information in time, and the background needs to give the terminal data and can give the terminal data in time and conveniently; differential data updating is applied, retransmission of the same data is avoided, synchronization efficiency is greatly improved, and burden is relieved for a network;
the synchronized information can be utilized, the navigation state of the ship is monitored in real time in a background system, and the navigation information is updated and responded in time by combining with multi-party resources, so that the navigation is safer and more guaranteed, and the chart information is particularly convenient to update; if the rescue needs to be carried out in time in case of accidents and the like, the information can be mastered more quickly and accurately, and the rescue action can be carried out in time, so that the peace and the worry are brought to navigation;
with the development of science and technology, the network security awareness of people is higher and higher, the encryption library is supported, complete data can be obtained only by transmitting simple encrypted texts and decrypting the encrypted texts through the encryption library, so that even if the transmitted content is stolen by a person, the opposite side cannot know the real content in the transmitted content, the network security is well guaranteed, the purpose of absolute security is realized, and the leakage of commercial secrets is prevented.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
FIG. 1 is a flow chart of a method performed by an embodiment of the present invention;
FIG. 2 is a system framework diagram according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a second apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a medium according to a third embodiment of the present invention.
Detailed Description
Example one
The embodiment provides a method for synchronizing a terminal device chart data and a server, as shown in fig. 1, the method includes:
step 10, building a client server on the terminal equipment and appointing a first database, and building a background server on the shipborne equipment and appointing a second database;
step 20, the client server establishes connection with the background server;
step 30, when the data of the first database changes, acquiring differential data, encrypting the differential data, transmitting the encrypted differential data to a background server, decrypting the encrypted differential data by the background server, and storing the decrypted differential data in a second database;
and when the data of the second database changes, acquiring differential data, encrypting the differential data, transmitting the encrypted data to the client server, decrypting the encrypted differential data by the terminal equipment, and storing the decrypted differential data in the first database.
By the method, the terminal equipment and the background server can synchronously process specific data, the terminal data are changed, the background can acquire information in time, and the background needs to give the terminal data in time and conveniently; differential data updating is applied, retransmission of the same data is avoided, synchronization efficiency is greatly improved, and burden is relieved for a network; the synchronized information can be utilized, the navigation state of the ship is monitored in real time in a background system, and the navigation information is updated and responded in time by combining with multi-party resources, so that the navigation is safer and more guaranteed, and the chart information is particularly convenient to update; if the rescue needs to be carried out in time in case of accidents and the like, the information can be mastered more quickly and accurately, the rescue action can be carried out in time, and the safety and the worry are brought to navigation.
In a possible implementation manner, in the step 10, the client server is built by using ServerSocket.
The step 20 specifically includes:
the method comprises the steps that a client server of the terminal device is started, after the client server is started, a request is sent to a background server through TCP connection, a client service starting completion notice is sent to the background server after connection is successful, an IP address and a port required by connection are sent to the background server, and the background server is connected with the terminal device through the IP and the port, so that connection establishment is achieved.
And the encryption operation and the decryption operation are both carried out through an encryption library.
With the development of science and technology, the network security awareness of people is higher and higher, the encryption library is supported, complete data can be obtained only by transmitting simple encrypted texts and decrypting the encrypted texts through the encryption library, so that even if the transmitted content is stolen by a person, the opposite side cannot know the real content in the transmitted content, the network security is well guaranteed, the purpose of absolute security is realized, and the leakage of commercial secrets is prevented.
The first database is data _ syn and the second database is s _ data _ syn.
In a specific implementation manner, the embodiment of the invention mainly develops an application related to a chart on an Android system, and related data on the chart can be synchronously interacted with a background server, so that safe driving of a ship can be monitored in real time at the background, and the server can also directly transmit the related data to a terminal.
The realization of the synchronization function mainly comprises the following two parts:
1. a background server is set up for the terminal equipment to transmit data;
2. and a client server is established on the terminal equipment and is used for the background server to transmit data.
The realization process is as follows:
1) after the terminal equipment starts the application, a server is started in the application to be connected with the background service, so that data are sent;
2) after the terminal equipment starts the server, the terminal equipment starts to be connected with the background server, so that the purpose of transmitting data is achieved; and sending a notification to the platform server after the connection is successful, and notifying the background that the connection terminal can start to send data.
In a system consisting of a ship-borne device and a terminal device as shown in fig. 2, the foundation is built as follows:
1. the terminal device designates a specific database data _ syn (i.e. the first database);
2. building a Client Server (CS) by using a Serversocket in an APP of the terminal equipment;
3. building a background server (SS) on the shipborne equipment;
4. the background server (SS) designates a specific database s _ data _ syn (i.e. the second database);
the method comprises the steps that when the APP is started, the CS is started immediately, after the CS is started, a TCP connection is used for initiating a request to the SS, after the connection is successful, a CS starting completion notification is sent to the SS, an IP address and a port required by the connection are sent to the SS, and the SS is connected with a terminal through the IP and the port, so that connection intercommunication is achieved. Carrying out differential processing on the change of the data through a special encryption library, and carrying out synchronous processing on the processed differential data; when the content in the data _ syn changes, the terminal sends differential data to the SS; similarly, when s _ data _ syn changes, the SS sends differential data to the terminal. Therefore, the data synchronization of the terminal and the server is realized.
Based on the same inventive concept, the application also provides a device corresponding to the method in the first embodiment, which is detailed in the second embodiment.
Example two
In this embodiment, an apparatus for synchronizing a terminal device chart data with a server is provided, as shown in fig. 3, including: the system comprises a construction module, a connection module and a synchronization module;
the building module is used for building a client server on the terminal equipment and appointing a first database, and building a background server on the shipborne equipment and appointing a second database;
the connection module is used for establishing connection between the client server and the background server;
the synchronization module is used for acquiring differential data when the data of the first database changes, transmitting the differential data to the background server after encryption, decrypting the encrypted differential data by the background server, and then storing the decrypted differential data in the second database;
and when the data of the second database changes, acquiring differential data, encrypting the differential data, transmitting the encrypted data to the client server, decrypting the encrypted differential data by the terminal equipment, and storing the decrypted differential data in the first database.
In a possible implementation manner, in the building module, the client server is built by using a ServerSocket.
The connection module is specifically configured to:
the method comprises the steps that a client server of the terminal device is started, after the client server is started, a request is sent to a background server through TCP connection, a client service starting completion notice is sent to the background server after connection is successful, an IP address and a port required by connection are sent to the background server, and the background server is connected with the terminal device through the IP and the port, so that connection establishment is achieved.
And the encryption operation and the decryption operation are both carried out through an encryption library.
Since the apparatus described in the second embodiment of the present invention is an apparatus used for implementing the method of the first embodiment of the present invention, based on the method described in the first embodiment of the present invention, a person skilled in the art can understand the specific structure and the deformation of the apparatus, and thus the details are not described herein. All the devices adopted in the method of the first embodiment of the present invention belong to the protection scope of the present invention.
Based on the same inventive concept, the application provides a storage medium corresponding to the third embodiment.
EXAMPLE III
The present embodiment provides a computer-readable storage medium, as shown in fig. 4, on which a computer program is stored, and when the computer program is executed by a processor, any one of the embodiments can be implemented.
Since the computer-readable storage medium described in this embodiment is a computer-readable storage medium used for implementing the method in the first embodiment of the present application, a person skilled in the art can understand a specific implementation manner of the computer-readable storage medium and various modifications thereof based on the method described in the first embodiment of the present application, and therefore, how to implement the method in the embodiment of the present application by using the computer-readable storage medium is not described in detail herein. Computer-readable storage media that can be used by those skilled in the art to implement the methods of the embodiments of the present application are all within the scope of the present application.
Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.

Claims (10)

1. A method for synchronizing terminal equipment chart data and a server is characterized by comprising the following steps:
step 10, building a client server on the terminal equipment and appointing a first database, and building a background server on the shipborne equipment and appointing a second database;
step 20, the client server establishes connection with the background server;
step 30, when the data of the first database changes, acquiring differential data, encrypting the differential data, transmitting the encrypted differential data to a background server, decrypting the encrypted differential data by the background server, and storing the decrypted differential data in a second database;
and when the data of the second database changes, acquiring differential data, encrypting the differential data, transmitting the encrypted data to the client server, decrypting the encrypted differential data by the terminal equipment, and storing the decrypted differential data in the first database.
2. The method of claim 1, wherein: in the step 10, the client server is built by using ServerSocket.
3. The method of claim 1, wherein: the step 20 specifically includes:
the method comprises the steps that a client server of the terminal device is started, after the client server is started, a request is sent to a background server through TCP connection, a client service starting completion notice is sent to the background server after connection is successful, an IP address and a port required by connection are sent to the background server, and the background server is connected with the terminal device through the IP and the port, so that connection establishment is achieved.
4. The method of claim 1, wherein: and the encryption operation and the decryption operation are both carried out through an encryption library.
5. The method of claim 1, wherein: the first database is data _ syn and the second database is s _ data _ syn.
6. A device for synchronizing terminal equipment chart data and a server is characterized by comprising: the system comprises a construction module, a connection module and a synchronization module;
the building module is used for building a client server on the terminal equipment and appointing a first database, and building a background server on the shipborne equipment and appointing a second database;
the connection module is used for establishing connection between the client server and the background server;
the synchronization module is used for acquiring differential data when the data of the first database changes, transmitting the differential data to the background server after encryption, decrypting the encrypted differential data by the background server, and then storing the decrypted differential data in the second database;
and when the data of the second database changes, acquiring differential data, encrypting the differential data, transmitting the encrypted data to the client server, decrypting the encrypted differential data by the terminal equipment, and storing the decrypted differential data in the first database.
7. The apparatus of claim 6, wherein: in the building module, the client server is built by using a Serversocket.
8. The apparatus of claim 6, wherein: the connection module is specifically configured to:
the method comprises the steps that a client server of the terminal device is started, after the client server is started, a request is sent to a background server through TCP connection, a client service starting completion notice is sent to the background server after connection is successful, an IP address and a port required by connection are sent to the background server, and the background server is connected with the terminal device through the IP and the port, so that connection establishment is achieved.
9. The apparatus of claim 6, wherein: and the encryption operation and the decryption operation are both carried out through an encryption library.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
CN202110527618.3A 2021-05-14 2021-05-14 Method, device and medium for synchronizing chart data of terminal equipment and server Pending CN113407621A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110527618.3A CN113407621A (en) 2021-05-14 2021-05-14 Method, device and medium for synchronizing chart data of terminal equipment and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110527618.3A CN113407621A (en) 2021-05-14 2021-05-14 Method, device and medium for synchronizing chart data of terminal equipment and server

Publications (1)

Publication Number Publication Date
CN113407621A true CN113407621A (en) 2021-09-17

Family

ID=77678565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110527618.3A Pending CN113407621A (en) 2021-05-14 2021-05-14 Method, device and medium for synchronizing chart data of terminal equipment and server

Country Status (1)

Country Link
CN (1) CN113407621A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404322A (en) * 2011-11-18 2012-04-04 深圳市中兴移动通信有限公司 Method and system for implementing data encryption synchronization
CN103685543A (en) * 2013-12-23 2014-03-26 中国电子科技集团公司第三十研究所 Method and system for data synchronism between heterogeneous databases
CN107040390A (en) * 2017-06-01 2017-08-11 上海埃威航空电子有限公司 The marine wireless chart update system and method for intermediate frequency
CN110825761A (en) * 2019-11-14 2020-02-21 中国船舶重工集团公司第七0七研究所 Ship-shore distributed electronic chart system-oriented chart data arrangement and updating method
US20200067633A1 (en) * 2018-08-23 2020-02-27 Sr Technologies, Inc. Blind detection and synchronization of data packets

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102404322A (en) * 2011-11-18 2012-04-04 深圳市中兴移动通信有限公司 Method and system for implementing data encryption synchronization
CN103685543A (en) * 2013-12-23 2014-03-26 中国电子科技集团公司第三十研究所 Method and system for data synchronism between heterogeneous databases
CN107040390A (en) * 2017-06-01 2017-08-11 上海埃威航空电子有限公司 The marine wireless chart update system and method for intermediate frequency
US20200067633A1 (en) * 2018-08-23 2020-02-27 Sr Technologies, Inc. Blind detection and synchronization of data packets
CN110825761A (en) * 2019-11-14 2020-02-21 中国船舶重工集团公司第七0七研究所 Ship-shore distributed electronic chart system-oriented chart data arrangement and updating method

Similar Documents

Publication Publication Date Title
TWI672648B (en) Business process method and device, data share system, and storage medium
CN108762791B (en) Firmware upgrading method and device
CN113364760A (en) Data encryption processing method and device, computer equipment and storage medium
CN112019541B (en) Data transmission method and device, computer equipment and storage medium
CN112788012B (en) Log file encryption method and device, storage medium and electronic equipment
TW201901473A (en) Data backup method, device, storage medium and server
JP2018533864A (en) Remote control method, device and portable terminal
CN112291364A (en) Message pushing processing method and device
CN111030827A (en) Information interaction method and device, electronic equipment and storage medium
CN110351225B (en) Hardware device networking method and system, computing device and readable storage medium
US20140038650A1 (en) Short message backup method, mobile terminal, and server
WO2018014785A1 (en) System, method, and device for processing sub-account information
WO2022108525A1 (en) Method, apparatus and system for deploying federated learning application, and electronic device
CN104639973B (en) Information pushing method and device
KR102616751B1 (en) Communications security systems and methods
CN115296807B (en) Key generation method, device and equipment for preventing industrial control network viruses
CN115174558B (en) Cloud network end integrated identity authentication method, device, equipment and storage medium
CN113407621A (en) Method, device and medium for synchronizing chart data of terminal equipment and server
CN116232880A (en) Virtual private network establishment method and system based on security isolation
CN112995322B (en) Information transmission channel establishment method, device, storage medium and terminal
CN114676451B (en) Electronic document signing method and device, storage medium and electronic equipment
CN114679287B (en) Data processing method, system, electronic device and storage medium
CN113852624A (en) Data cross-network transmission method, device and computer medium thereof
WO2018082237A1 (en) Password input method and apparatus
CN112492549A (en) Data transmission method, device, terminal equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210917