CN111988411B - Method and device for automatically resuming client data after network break and computer readable storage medium - Google Patents
Method and device for automatically resuming client data after network break and computer readable storage medium Download PDFInfo
- Publication number
- CN111988411B CN111988411B CN202010852870.7A CN202010852870A CN111988411B CN 111988411 B CN111988411 B CN 111988411B CN 202010852870 A CN202010852870 A CN 202010852870A CN 111988411 B CN111988411 B CN 111988411B
- Authority
- CN
- China
- Prior art keywords
- data
- server
- client
- structured data
- uploaded
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- 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/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
-
- 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/104—Peer-to-peer [P2P] networks
- H04L67/1074—Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
- H04L67/1078—Resource delivery mechanisms
- H04L67/1085—Resource delivery mechanisms involving dynamic management of active down- or uploading connections
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method, a device and a computer readable storage medium for client data automatic continuous transmission after network disconnection, wherein data collected by a client is stored in a local disk; establishing a database for storing structured data corresponding to the data; scanning the database by starting a thread in real time, and judging whether structured data are not uploaded to a server; if structured data are not uploaded to a server, searching the data corresponding to the structured data, and starting to upload the server operation; and after the data are uploaded to a server, deleting the data stored in a local disk and the structured data corresponding to the data. The method solves the problem of service continuity when the network between the client and the server fails, can automatically upload data which is not transmitted when the network fails when the network is connected again, and realizes the full-automatic method for storing data when the network is disconnected and automatically continuously transmitting data after the network is recovered.
Description
Technical Field
The invention belongs to the technical field of data transmission, and particularly relates to a method and a device for automatically continuing to transmit client data after a network is disconnected, and a computer-readable storage medium.
Background
Because the internet has certain uncertainty, in the normal working process of the terminal device, data collected by the client cannot be uploaded to the server within a certain period of time due to some external irresistible reasons, such as cable interruption, server crash or restart, network failure and the like, and if data collected by the client for a long time are stored in a local disk, the problem that the space of the local disk occupies too much space occurs, so that the computer runs slowly. After the client is connected to the server network, if the original data is to be transmitted continuously, the data transmission interface needs to be configured manually, which brings trouble to the user. In the process of acquiring real-time data in the prior art, when the network is detected again after the network is interrupted, the automatic transmission of the continuous data cannot be realized.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a method, a device and a computer readable storage medium for automatically resuming the data of a client after the network is disconnected, which effectively solve the problem of the continuity of the service when the network between the client and a server fails, can automatically upload the data which is not transmitted when the network fails when the network is connected again, and realize the full-automatic method for saving the data after the network is disconnected and automatically resuming the data after the network is recovered.
In a first aspect of an embodiment of the present invention, a method for automatically resuming client data after a network outage is provided, including:
the data collected by the client is stored in a local disk;
establishing a database for storing structured data corresponding to the data;
scanning the database by starting a thread in real time, and judging whether structured data are not uploaded to a server or not;
if structured data are not uploaded to a server, searching the data corresponding to the structured data, and starting to upload the server;
and after the data are uploaded to a server, deleting the data stored in a local disk and the structured data corresponding to the data.
In one embodiment of the invention, the structured data is associated with the data by recording a storage path of the data, and the structured data is associated with the data from both the storage path for storing the data and the data transmission state.
In one embodiment of the present invention, the database comprises at least SQLite database, oracle database, DB2 database, mySQL database, microsoft SQL Server, microsoft Access database.
In an embodiment of the present invention, the method for automatically resuming the client data after the network outage at least includes:
scanning the database by starting a thread in real time, and judging whether structured data are not uploaded to a server;
meanwhile, monitoring the network connection state of the client and the server by a thread;
if the client and the server are in a connection state and structured data are not uploaded to the server, searching the data corresponding to the structured data according to a path associated with the structured data, and starting to upload the server;
and after the data are uploaded to a server, deleting the data stored in a local disk and the structured data corresponding to the data.
In an embodiment of the present invention, the method for automatically resuming the client data after the network outage at least includes:
scanning the database by starting a thread in real time, and judging whether structured data are not uploaded to a server or not;
meanwhile, the thread monitors the network connection state of the client and the server;
and if the client and the server are in a disconnected state, not starting to upload the server operation, and repeating the operation of monitoring the network connection state of the client and the server by the thread.
In an embodiment of the present invention, the method for automatically resuming the client data after the network outage at least includes:
scanning the database by starting a thread in real time, and judging whether structured data are not uploaded to a server;
meanwhile, monitoring the network connection state of the client and the server by a thread;
and if the client and the server are in a connection state and no structured data is uploaded to the server, the operation of uploading the server is not started, and the operation of repeatedly starting a thread to scan the database is repeated.
In a second aspect of the embodiments of the present invention, there is provided a post-outage client data automatic resuming device, including:
the data storage module is used for storing data acquired by a client and structured data corresponding to the data;
the judging module is used for scanning the structured data in real time by starting a thread and judging whether the structured data is not uploaded to the server;
the data transmission module is used for searching the corresponding data according to the structured data and starting to upload the server operation;
and the data deleting module is used for executing deleting the data stored in the local disk and the structured data corresponding to the data after the data are uploaded to the server.
In one embodiment of the invention, the structured data is associated with the data by recording a storage path of the data, and the structured data is associated with the data from both the storage path for storing the data and the data transmission state.
In a third aspect of the embodiments of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program is executed by a processor to perform the above method for automatically resuming client data after network outage.
The invention provides a method, a device and a computer readable storage medium for automatically continuing to transmit data of a client after a network is disconnected. The method effectively solves the problem of service continuity when the network between the client and the server fails, can automatically upload data which is not transmitted when the network fails when the network is connected again, and realizes the full-automatic method for storing data when the network is disconnected and automatically continuously transmitting data after the network is recovered. In addition, data transmission is completed, data stored in the local disk and structured data corresponding to the data are deleted in time, and the problem that the local disk is occupied too much is solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a method for automatically resuming client data after a network outage, according to the present invention;
fig. 2 is a structural diagram of a structured database of a method for automatically resuming client data after a network is disconnected according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for automatically resuming transmission of client data after a network outage, according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of an apparatus for automatically resuming client data after a network is disconnected according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating an automatic resuming of data of a client after a network is disconnected according to an embodiment of the present invention.
Detailed Description
Features of various aspects and exemplary embodiments of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
One skilled in the art will appreciate that embodiments of the present invention can be implemented as an apparatus, method, computer-readable storage medium. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
According to the embodiment of the invention, a method, a device and a computer-readable storage medium for automatically resuming client data after network outage are provided.
Moreover, any number of elements in the drawings are by way of example and not by way of limitation, and any nomenclature is used solely for differentiation and not by way of limitation.
The essence of the invention will be explained in detail below with reference to several representative embodiments of the invention, in particular, taking as an example the application of the method in the field of automatic follow-up of images after an interruption of a network of endoscopic image workstations.
Exemplary applications
As shown in fig. 1, an embodiment of the present invention provides a method for automatically resuming transmission of client data after a network outage, specifically a method for automatically resuming transmission of an image after a network outage of an endoscope image workstation, including:
the data collected by the endoscope image workstation are stored in a local disk;
an SQLite database is established and used for storing structured data corresponding to the data, the structured data is shown in figure 2, and the structured data and the data of the local disk for storing the cancer establish a corresponding relation through a storage path;
the SQLite database is scanned through a real-time starting thread, and whether structured data are not uploaded to a server is judged;
if structured data are not uploaded to the server, searching data stored in a local disk corresponding to the SQLite structured data, and starting the operation of uploading the server;
and after the data are uploaded to the server, deleting the data stored in the local disk and the structured data corresponding to the data.
As shown in fig. 3, in this process, the network connection status of the endoscope image workstation and the server can be monitored simultaneously by threads, and there are three cases: in the first situation, if the endoscope image workstation is connected with the server and structured data are not uploaded to the server, searching the data corresponding to the structured data according to a path associated with the structured data and starting the operation of the uploading server; in the second situation, if the endoscope image workstation and the server are in a disconnected state, the uploading server operation is not started, and the network connection state operation of the endoscope image workstation and the server is monitored by repeated threads; and in the third situation, if the endoscope image workstation is connected with the server, structured data are not uploaded to the server, and structured data are not uploaded to the server, the uploading server operation is not started, and the SQLite database operation is repeatedly started.
Another possibility exists, the thread monitors the network connection state of the endoscope image workstation and the server, the thread only automatically starts the operation of the scanning SQLite database, under the condition that the network connection state of the endoscope image workstation and the server is not known, the thread starts the operation of the scanning SQLite database, finds that structured data is not uploaded to the server, searches for stored data corresponding to the structured data according to a path related to the structured data, starts the operation of the uploading server, and deletes the data stored in a local disk and the structured data corresponding to the data after the data is uploaded to the server if the endoscope image workstation and the server are in the network connection state; if the endoscope image workstation and the server are in a network disconnection state, the data are not uploaded to the server, the situation that the server is excessively occupied can occur, and resource waste is caused.
As shown in fig. 2, in this embodiment, the structured data is associated with the data by recording a storage path of the data, and the structured data is associated with the data from both the storage path for storing the data and the data transmission state.
In this embodiment, the database at least includes an SQLite database, an Oracle database, a DB2 database, a MySQL database, a Microsoft SQL Server, and a Microsoft Access database.
Exemplary devices
Having described the method of the exemplary embodiment of the present invention, the client data automatic resuming device after the network outage of the exemplary embodiment of the present invention is next described with reference to fig. 4.
A client data automatic continuous transmission device after network interruption comprises:
the data storage module is used for storing data acquired by a client and structured data corresponding to the data;
the judging module is used for scanning the structured data in real time by starting a thread and judging whether the structured data is not uploaded to the server;
the data transmission module is used for searching the corresponding data according to the structured data and starting the operation of uploading the server;
and the data deleting module is used for deleting the data stored in the local disk and the structured data corresponding to the data after the data is uploaded to the server.
In a specific implementation process, the structured data is associated with the data by recording a storage path of the data, and the structured data is associated with the data from two aspects, namely the storage path for storing the data and the data transmission state.
Exemplary Medium
Having described the method according to the exemplary embodiment of the present invention, next, a computer-readable storage medium according to the exemplary embodiment of the present invention is described with reference to fig. 5, please refer to fig. 5, which illustrates a computer-readable storage medium being an optical disc having a computer program (i.e., a program product) stored thereon, where the computer program, when executed by a processor, implements the steps described in the above method embodiment, for example, data collected by a client is stored in a local magnetic disc; establishing a database for storing structured data corresponding to the data; scanning the database by starting a thread in real time, and judging whether structured data are not uploaded to a server; if structured data are not uploaded to a server, searching the data corresponding to the structured data, and starting to upload the server operation; after the data are uploaded to a server, deleting the data stored in a local disk and the structured data corresponding to the data; the specific implementation of each step is not repeated here.
It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, a phase change memory (PRAM), a Static Random Access Memory (SRAM), a Dynamic Random Access Memory (DRAM), other types of Random Access Memories (RAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash memory, or other optical and magnetic storage media, which are not described in detail herein.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.
Claims (7)
1. The method for automatically resuming the client data after the network is disconnected is characterized in that,
the data collected by the client is stored in a local disk;
establishing a database for storing structured data corresponding to the data;
scanning the structured data by starting a thread in real time, and judging whether the structured data is not uploaded to a server or not;
if structured data are not uploaded to a server, searching the data corresponding to the structured data, and starting to upload the server operation;
after the data are uploaded to a server, deleting the data stored in a local disk and the structured data corresponding to the data;
the structured data is associated with the data by recording a storage path of the data.
2. The method for automatic resuming of client data after a network outage of claim 1, wherein the database includes but is not limited to SQLite database, oracle database, DB2 database, mySQL database, microsoft SQL Server, microsoft access.
3. The method for automatically resuming client data after a network outage as claimed in claim 1, wherein the method comprises scanning the database by a real-time start thread to determine whether there is structured data that is not uploaded to the server;
meanwhile, monitoring the network connection state of the client and the server by a thread;
if the client and the server are in a connection state and structured data are not uploaded to the server, searching the data corresponding to the structured data according to a path associated with the structured data, and starting to upload the server;
and after the data are uploaded to a server, deleting the data stored in a local disk and the structured data corresponding to the data.
4. The method for automatically resuming the transmission of the client data after the network outage, as claimed in claim 1, wherein the real-time thread is started to scan the database, so as to determine whether there is a structured data that is not uploaded to the server;
meanwhile, the thread monitors the network connection state of the client and the server;
and if the client and the server are in a disconnected state, the operation of uploading the server is not started, and the operation of monitoring the network connection state of the client and the server by the thread is repeated.
5. The method for automatically resuming client data after a network outage as claimed in claim 1, wherein the method comprises scanning the database by a real-time start thread to determine whether there is structured data that is not uploaded to the server;
meanwhile, monitoring the network connection state of the client and the server by a thread;
and if the client and the server are in a connection state and no structured data is uploaded to the server, the operation of uploading the server is not started, and the operation of repeatedly starting a thread to scan the database is repeated.
6. Automatic continuous transmission device of client data after disconnected network, its characterized in that includes:
the data storage module is used for storing data acquired by a client and structured data corresponding to the data; the judging module is used for scanning the structured data in real time by starting a thread and judging whether the structured data is not uploaded to the server;
the data transmission module is used for searching the corresponding data according to the structured data and starting the operation of uploading the server;
the data deleting module is used for deleting the data stored in the local disk and the structured data corresponding to the data after the data are uploaded to the server;
the structured data is associated with the data by recording a storage path of the data.
7. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements the method for automatic resuming of client data after a network outage according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010852870.7A CN111988411B (en) | 2020-08-22 | 2020-08-22 | Method and device for automatically resuming client data after network break and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010852870.7A CN111988411B (en) | 2020-08-22 | 2020-08-22 | Method and device for automatically resuming client data after network break and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111988411A CN111988411A (en) | 2020-11-24 |
CN111988411B true CN111988411B (en) | 2023-01-10 |
Family
ID=73443007
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010852870.7A Active CN111988411B (en) | 2020-08-22 | 2020-08-22 | Method and device for automatically resuming client data after network break and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111988411B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112702427A (en) * | 2020-12-23 | 2021-04-23 | 武汉湖江科技有限公司 | Industrial internet data synchronization system |
CN112968815B (en) * | 2021-03-11 | 2022-08-09 | 福州大学 | Method for realizing continuous transmission in broken network |
CN115037786B (en) * | 2022-08-09 | 2022-11-01 | 北京航天驭星科技有限公司 | Method for improving data transmission efficiency and related equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101534212A (en) * | 2009-04-15 | 2009-09-16 | 吕江 | Method for realizing service continuity of medical image storage and communication system |
CN103067527A (en) * | 2013-01-28 | 2013-04-24 | 王周辉 | Intelligent transmission and distributed storage and dispensing method |
CN104809214A (en) * | 2015-04-23 | 2015-07-29 | 中国电子科技集团公司第四十一研究所 | Test-data breakpoint continuous transmission method applied to microwave automatic test system |
CN106503191A (en) * | 2016-10-26 | 2017-03-15 | 冯村 | A kind of data management apparatus and method |
CN109548060A (en) * | 2018-12-29 | 2019-03-29 | 广州敬信药草园信息科技有限公司 | Processing method for abnormal disconnection of recorded broadcast network |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9128946B2 (en) * | 2007-12-31 | 2015-09-08 | Mastercard International Incorporated | Systems and methods for platform-independent data file transfers |
-
2020
- 2020-08-22 CN CN202010852870.7A patent/CN111988411B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101534212A (en) * | 2009-04-15 | 2009-09-16 | 吕江 | Method for realizing service continuity of medical image storage and communication system |
CN103067527A (en) * | 2013-01-28 | 2013-04-24 | 王周辉 | Intelligent transmission and distributed storage and dispensing method |
CN104809214A (en) * | 2015-04-23 | 2015-07-29 | 中国电子科技集团公司第四十一研究所 | Test-data breakpoint continuous transmission method applied to microwave automatic test system |
CN106503191A (en) * | 2016-10-26 | 2017-03-15 | 冯村 | A kind of data management apparatus and method |
CN109548060A (en) * | 2018-12-29 | 2019-03-29 | 广州敬信药草园信息科技有限公司 | Processing method for abnormal disconnection of recorded broadcast network |
Also Published As
Publication number | Publication date |
---|---|
CN111988411A (en) | 2020-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111988411B (en) | Method and device for automatically resuming client data after network break and computer readable storage medium | |
CN109522287B (en) | Monitoring method, system, equipment and medium for distributed file storage cluster | |
US20200348849A1 (en) | Replica processing method and node, storage system, server, and readable medium | |
CN114764380A (en) | Distributed cluster control method and device based on ETCD | |
CN110311975B (en) | Data request processing method and device | |
CN112104727A (en) | Method and system for deploying simplified high-availability Zookeeper cluster | |
CN108733808B (en) | Big data software system switching method, system, terminal equipment and storage medium | |
CN115729164B (en) | Industrial communication system management method and device and industrial communication system | |
CN110515757B (en) | Information processing method, device, server and medium of distributed storage system | |
CN115314361A (en) | Server cluster management method and related components thereof | |
CN111092956A (en) | Resource synchronization method, device, storage medium and equipment | |
CN113452726B (en) | Data transmission method, terminal and computer readable storage medium | |
CN112612653A (en) | Service recovery method, device, arbitration server and storage system | |
CN109144788B (en) | Method, device and system for reconstructing OSD | |
CN110647298B (en) | Data storage control method and device | |
CN110502460B (en) | Data processing method and node | |
CN114528350A (en) | Cluster split brain processing method, device and equipment and readable storage medium | |
CN109039770B (en) | Server CMC refreshing method and device and related equipment | |
CN110830281B (en) | Hot standby method and system based on mesh network structure | |
CN110932941B (en) | Cloud screen connection state detection method, server and storage medium | |
CN111273933A (en) | BIOS FW refreshing method and device | |
CN114900654B (en) | Real-time monitoring video transmission system for automatic driving vehicle | |
CN115292314B (en) | Sequence number generation method, device, computer equipment and storage medium | |
CN112801769B (en) | Accounting data processing method, device and system | |
CN108377670A (en) | A kind of method of processing business, service node, control node and distributed system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |