CN112968815B - Method for realizing continuous transmission in broken network - Google Patents
Method for realizing continuous transmission in broken network Download PDFInfo
- Publication number
- CN112968815B CN112968815B CN202110263224.1A CN202110263224A CN112968815B CN 112968815 B CN112968815 B CN 112968815B CN 202110263224 A CN202110263224 A CN 202110263224A CN 112968815 B CN112968815 B CN 112968815B
- Authority
- CN
- China
- Prior art keywords
- network
- continuous transmission
- file
- data
- disconnected
- 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/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
- H04L43/0882—Utilisation of link capacity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/16—Threshold monitoring
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Abstract
The invention relates to a method for realizing continuous transmission in a broken network. On the basis of data transmission, records of breakpoints of transmission data are added to ensure continuity and correctness of data transmission when the network is reconnected. When the network is reconnected, the integrity of the data file needs to be verified, and then the data of the part which is not transmitted is continuously transmitted, so that the reliability, the stability and the safety of data sharing are improved. The method can automatically identify the normal state of the network under the condition of network abnormality, cache the data in the period of network interruption, and continuously transmit the cached data orderly, efficiently and reliably after the network is recovered.
Description
Technical Field
The invention belongs to the technical field of industrial automation control, and particularly relates to a method for realizing continuous transmission of a disconnected network.
Background
With the rapid development of information science and technology, sensor technology and internet of things technology have also been rapidly improved. Under the requirements of the existing equipment joint control and intelligent factories, information interaction among the PLC, the upper computer, the sensor and other intelligent equipment becomes more important. However, due to the complexity of the entire network of the industrial control system, it often causes the interruption of network communication within a certain local area for a certain period of time, and data loss occurs if the network communication is not processed properly. Among various resources concerned by enterprises, production process information is an important resource, and if the problem of real-time and effective uploading of the production process information cannot be solved, the investment of a manufacturing enterprise production process execution management system MES and an enterprise resource planning management system ERP cannot be fully utilized and guaranteed.
Disclosure of Invention
The invention aims to provide a method for realizing continuous transmission of a broken network, which can automatically identify the normal state of the network under the condition of network abnormity, buffer the data in the broken network period, and continuously transmit the buffered data in order, high efficiency and reliability after the network is recovered.
In order to achieve the purpose, the technical scheme of the invention is as follows: a method for realizing continuous transmission of broken network is characterized by that on the basis of data transmission the record of breakpoint of transmission data is added so as to ensure the continuity and correctness of data transmission when the network is reconnected.
In an embodiment of the present invention, when the network is reconnected, the integrity of the data file needs to be verified first, and then the data file is transmitted continuously without transmission completion, so as to improve the reliability, stability and security of data sharing.
In an embodiment of the present invention, data cache regions are set at both the server side, and when the server side downloads data, the data cache region at the server side stores part of the downloaded data when the network is disconnected.
In an embodiment of the present invention, when the network is reconnected, a specific implementation flow of downloading data by the server is as follows:
when the network is reconnected, the server reads the file pointer and the byte number in the data cache region, judges whether the byte number is consistent with the target file to be downloaded, if so, sets the pointer position of file breakpoint retransmission, and continues downloading the file; if not, downloading the file again; each thread in the server is responsible for a disconnected network continuous transmission task.
In an embodiment of the present invention, when the network is reconnected, the client needs to determine whether the file is completely uploaded, and continue to transmit the file from the file breakpoint.
In an embodiment of the present invention, the specific way of increasing the record of the transmission data breakpoint is as follows: when the server side can not ping the client side, a disconnected network continuous transmission file is created, the disconnected network continuous transmission file records the time record of the disconnected network continuous transmission file, when the server side ping the client side, the time record of the disconnected network continuous transmission file recorded in the disconnected network continuous transmission file is deleted, and the unfinished transmission part data is continuously transmitted.
In an embodiment of the present invention, the method is specifically implemented as follows:
1) when a data transmission task, namely a relocation task, at the server end fails to read a client value and the specified times of continuous ping still fail, the server end considers that the network is disconnected;
2) once the offline is determined, and the offline continuous transmission function is started by the corresponding relocation task, an offline continuous transmission file is created, the file name exists in the form of a task name, a new offline continuous transmission task node information is inserted into the offline continuous transmission file, before the offline is recovered, the local time of the offline completion is updated every 1s until the client value is successfully read again, the timestamp of the successful reading moment is obtained, and the offline continuous transmission task record of this time is completed;
3) when the network is disconnected and the network is recovered, a continuous transmission request instruction corresponding to the corresponding relocation task is initiated to the main thread;
4) after receiving the continuous transmission request instruction, the main thread traverses the continuous transmission configuration file, starts the disconnected network continuous transmission task thread, maintains a time interval list in the disconnected network continuous transmission task thread, and records a plurality of disconnected network time intervals of corresponding relocation tasks;
5) continuously updating the content of the continuous transmission configuration file in the continuous transmission process, namely updating the starting time of the disconnected network time interval, and removing the starting time record of the corresponding disconnected network time interval after completing the disconnected network continuous transmission task of the disconnected network time interval;
6) and deleting the continuous transmission configuration file after the network interruption continuous transmission tasks of all the network interruption time intervals are completed, and terminating the network interruption continuous transmission task thread.
Compared with the prior art, the invention has the following beneficial effects: the method for realizing the continuous transmission of the broken network can sequentially store the data in the cache space in time under the condition of abnormal communication network, and can simultaneously transmit the broken point data after the communication is recovered to be normal, thereby providing reliable and complete real-time data information service for the final user, greatly improving the safety and the reliability of the real-time data in the production process, simultaneously improving the monitoring capability of managers on the field production process, and enhancing the safety and the reliability of the data in the production process.
Drawings
Fig. 1 is an execution flow of the disconnected network continuous transmission server according to the present invention.
Fig. 2 is an execution flow of the disconnected network continuous transmission client according to the present invention.
Detailed Description
The technical scheme of the invention is specifically explained below with reference to the accompanying drawings.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
The invention provides a method for realizing continuous transmission of a broken network, which is characterized in that on the basis of data transmission, records of transmission data breakpoints are added so as to ensure the continuity and the correctness of data transmission when the network is reconnected. When the network is reconnected, the integrity of the data file needs to be verified, and then the data of the part which is not transmitted is continuously transmitted, so that the reliability, the stability and the safety of data sharing are improved.
The following is a specific implementation process of the present invention.
As shown in fig. 1 and 2, the method for implementing network interruption and continuous transmission provided by the present invention adds a record of transmission data breakpoints on the basis of data transmission, so as to ensure the continuity and correctness of data transmission when the network is reconnected. Compared with a common transmission mechanism, the method has higher timeliness, flexibility and stability.
In addition, after the network communication is recovered to be normal, the integrity of the data file is automatically verified, and the unfinished partial data content is continuously transmitted, so that the real-time monitoring of the operating condition of the control system by a worker is ensured, the operating condition of the control system at the abnormal communication stage is reproduced, the reliability and stability of data sharing of the control system are improved, and the safety of the system is also improved.
In order to realize the functions, the invention is realized by the following technical means and measures:
in the network-off continuous transmission module, a server end sets a corresponding cache region and provides service for supporting breakpoint continuous transmission process. The specific working process is as follows:
receiving a target file, reading a file pointer and the number of bytes, judging whether the number of bytes is consistent with the downloaded target file, if so, setting the position of the pointer for breakpoint continuous transmission of the file, and continuously downloading the file.
Wherein, one thread is responsible for one off-network continuous transmission task. The resume task configuration template is created by a user, and the specified resume task template can be associated in the relocation task.
Generally, the task execution period for executing the continuous transfer is a time period configured for the task template, and the data collected in each period is the time of the execution period of the original task.
The client needs to judge whether the file is completely uploaded and continuously transmit the file from the breakpoint position of the file.
The method specifically comprises the following steps of:
1) starting a disconnected network continuous transmission function;
2) when the numerical value reading fails and the host cannot be ping (ping once every 11 seconds), a disconnected continuous transmission file is created;
3) after the ping succeeds in the host and the reading value is recovered, the time record of the file which is continuously transmitted in the disconnected network is ended, and meanwhile, the task which is continuously transmitted in the disconnected network is started;
the processing flow in the moving task running state comprises the following aspects:
1) and when one relocation task fails to read the control station value and the specified times of continuous ping still fail, determining that the network breaking is generated. (ping times and time intervals can be customized to better correspond to different network environments, the default ping times is 3 times, and the timeout time is 2000);
2) once determined to be offline, and the task has the offline resume function enabled, an offline resume file (. xml) is created, with the file name existing as the task name (if already existing, not created). Simultaneously inserting a new continuous transmission task node information into the file, updating local time of the end of the network interruption every 1s before the network interruption is recovered until the data is successfully read again, acquiring a timestamp of the successful reading moment, and ending the record of the current network interruption continuous transmission task;
3) when the disconnected network is recovered, initiating a continuous transmission request instruction corresponding to the task to the main thread;
4) after receiving the continuous transmission instruction, the main thread traverses the continuous transmission configuration file, starts the disconnected network continuous transmission task thread (if the disconnected network continuous transmission task thread is started, the disconnected network continuous transmission task thread is not started), and maintains a time interval list (records a plurality of disconnected network time intervals of the task name to be moved) in the thread;
5) continuously updating the content of the continuously-transmitted configuration file in the continuous transmission process, mainly updating the StartRemoteTime at the start time of the network interruption, and removing the record after the execution of a certain time interval;
6) and deleting the continuous transmission configuration file after the continuous transmission tasks of all time intervals are completed, and terminating the task thread.
The processing flow of the incomplete disconnected network continuous transmission task when the software is started is as follows:
1) when the software is just started, if the fact that the network interruption continuous transmission task is not executed is found, the user selects the continuous transmission task to be executed.
2) And after the selection is determined, sequentially sending the continuous transmission tasks to the main thread, and starting to execute according to the fifth step. The task list information shows the name of the disconnected network task, the time period of the disconnected network, the data sending period in the interval and the number of the data expected to be continuously transmitted (time period/period).
3) When the resume task is terminated, the gateway removes the task (including the tasks for its respective time intervals) from the outage resume task queue.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. 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 apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, 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 apparatus 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 apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention. However, any simple modification, equivalent change and modification of the above embodiments according to the technical essence of the present invention are within the protection scope of the technical solution of the present invention.
Claims (6)
1. A method for realizing continuous transmission of a broken network is characterized in that on the basis of data transmission, records of transmission data breakpoints are added to ensure the continuity and correctness of data transmission when the network is reconnected; the method is concretely implemented as follows:
1) when a data transmission task at the server end, namely a relocation task fails to read a client value and the specified times of continuous ping still fail, the server end considers that the network is disconnected;
2) once the offline is determined, and the offline continuous transmission function is started by the corresponding relocation task, an offline continuous transmission file is created, the file name exists in the form of a task name, a new offline continuous transmission task node information is inserted into the offline continuous transmission file, before the offline is recovered, the local time of the offline completion is updated every 1s until the client value is successfully read again, the timestamp of the successful reading moment is obtained, and the offline continuous transmission task record of this time is completed;
3) when the network is disconnected and the network is recovered, a continuous transmission request instruction corresponding to the corresponding relocation task is initiated to the main thread;
4) after receiving the continuous transmission request instruction, the main thread traverses the continuous transmission configuration file, starts the disconnected network continuous transmission task thread, maintains a time interval list in the disconnected network continuous transmission task thread, and records a plurality of disconnected network time intervals of corresponding relocation tasks;
5) continuously updating the content of the continuous transmission configuration file in the continuous transmission process, namely updating the starting time of the disconnected network time interval, and removing the starting time record of the corresponding disconnected network time interval after completing the disconnected network continuous transmission task of the disconnected network time interval;
6) and deleting the continuous transmission configuration file after the network interruption continuous transmission tasks of all the network interruption time intervals are completed, and terminating the network interruption continuous transmission task thread.
2. The method as claimed in claim 1, wherein when the network is reconnected, the integrity of the data file needs to be verified, and then the data of the part that has not been transmitted is continuously transmitted, so as to improve the reliability, stability and security of data sharing.
3. The method for realizing network interruption and continuous transmission according to claim 1 or 2, wherein the server side is provided with a data cache region, and when the server side downloads data, the data cache region of the server side stores partial data which is downloaded when the network interruption is performed.
4. The method for realizing network interruption and continuous transmission according to claim 3, wherein when the network is reconnected, the specific implementation flow of downloading data by the server side is as follows:
when the network is reconnected, the server reads the file pointer and the byte number in the data cache region, judges whether the byte number is consistent with the target file to be downloaded, if so, sets the pointer position of file breakpoint retransmission, and continues downloading the file; if not, downloading the file again; each thread in the server is responsible for a disconnected network continuous transmission task.
5. The method as claimed in claim 3, wherein when the network is reconnected, the client needs to determine whether the file is completely uploaded, and continue to transmit the file from the breakpoint of the file.
6. The method for realizing network interruption and continuous transmission according to claim 1, wherein the specific way of increasing the record of the transmission data breakpoint is as follows: when the server side can not ping the client side, a disconnected network continuous transmission file is created, the disconnected network continuous transmission file records the time record of the disconnected network continuous transmission file, when the server side ping the client side, the time record of the disconnected network continuous transmission file recorded in the disconnected network continuous transmission file is deleted, and the unfinished transmission part data is continuously transmitted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110263224.1A CN112968815B (en) | 2021-03-11 | 2021-03-11 | Method for realizing continuous transmission in broken network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110263224.1A CN112968815B (en) | 2021-03-11 | 2021-03-11 | Method for realizing continuous transmission in broken network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112968815A CN112968815A (en) | 2021-06-15 |
CN112968815B true CN112968815B (en) | 2022-08-09 |
Family
ID=76277148
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110263224.1A Active CN112968815B (en) | 2021-03-11 | 2021-03-11 | Method for realizing continuous transmission in broken network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112968815B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114666322A (en) * | 2022-03-22 | 2022-06-24 | 通号智慧城市研究设计院有限公司 | Breakpoint resume method and device and electronic equipment |
CN115083034A (en) * | 2022-05-31 | 2022-09-20 | 北京北方华创微电子装备有限公司 | Message reporting method and device of semiconductor equipment and semiconductor equipment |
CN115550345A (en) * | 2022-08-18 | 2022-12-30 | 贵州多彩宝互联网服务有限公司 | Method for mobile equipment offline data acquisition and continuous transmission in disconnected network |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111988411A (en) * | 2020-08-22 | 2020-11-24 | 上海萱闱医疗科技有限公司 | Method and device for automatically resuming client data after network break and computer readable storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9495377B2 (en) * | 2012-09-12 | 2016-11-15 | International Business Machines Corporation | Secure deletion operations in a wide area network |
CN107451268B (en) * | 2017-08-03 | 2020-12-15 | 爱普(福建)科技有限公司 | Real-time database-oriented method for continuous transmission in disconnected network |
-
2021
- 2021-03-11 CN CN202110263224.1A patent/CN112968815B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111988411A (en) * | 2020-08-22 | 2020-11-24 | 上海萱闱医疗科技有限公司 | Method and device for automatically resuming client data after network break and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112968815A (en) | 2021-06-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112968815B (en) | Method for realizing continuous transmission in broken network | |
CN110928774B (en) | Automatic test system based on node type | |
US6304982B1 (en) | Network distributed automated testing system | |
US8020044B2 (en) | Distributed batch runner | |
CN112000355B (en) | Method and device for firmware upgrading and household appliance | |
CN111416821A (en) | Internet of things equipment information acquisition method, system and device | |
CN111726420A (en) | Communication method, device, equipment and storage medium based on RPA | |
CN110895488B (en) | Task scheduling method and device | |
CN110162334B (en) | Code management method, device and storage medium | |
CN103544095A (en) | Server program monitoring method and system of server program | |
CN112953983A (en) | SFTP transmission method and device | |
CN109684130B (en) | Method and device for backing up data of computer room | |
CN111405215A (en) | Video storage method and device, cloud server and storage medium | |
CN102761432A (en) | CGI (Common Gateway Interface) monitoring method, device and system thereof | |
CN112600703A (en) | Network equipment remote access fault positioning method and device | |
CN111400276A (en) | Real-time synchronous database migration device and method | |
JPH10133916A (en) | Problem analysis system of computer system and medium wherein problem analyzing tool of computer system is recorded | |
CN112486656B (en) | Method for realizing wireless ionization wire task scheduling and data downloading | |
CN112434044A (en) | Industrial internet platform monitoring data transmission and exchange method and system | |
Rodrigues et al. | Multi-approach debugging of industrial IoT workflows | |
KR101265768B1 (en) | Automated machine and method for install program, system device thereof | |
US20050108727A1 (en) | Application binding in a network environment | |
CN110569047A (en) | method for remotely updating human-computer interface based on detachable communication module | |
CN115017235B (en) | Data synchronization method, electronic device and storage medium | |
CN113721577B (en) | Data interaction method and system, equipment and storage medium for multitask cycle |
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 |