CN109194744A - A kind of data transmission method, device, storage medium and monitoring device - Google Patents

A kind of data transmission method, device, storage medium and monitoring device Download PDF

Info

Publication number
CN109194744A
CN109194744A CN201811032021.6A CN201811032021A CN109194744A CN 109194744 A CN109194744 A CN 109194744A CN 201811032021 A CN201811032021 A CN 201811032021A CN 109194744 A CN109194744 A CN 109194744A
Authority
CN
China
Prior art keywords
data
destination server
data transmission
monitoring
monitoring device
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.)
Granted
Application number
CN201811032021.6A
Other languages
Chinese (zh)
Other versions
CN109194744B (en
Inventor
庄昊
李永军
刘冬华
杨凤明
姜文杰
吴彬
叶芳飞
张冠晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Huace Navigation Technology Ltd
Original Assignee
Shanghai Huace Navigation Technology 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 Shanghai Huace Navigation Technology Ltd filed Critical Shanghai Huace Navigation Technology Ltd
Priority to CN201811032021.6A priority Critical patent/CN109194744B/en
Publication of CN109194744A publication Critical patent/CN109194744A/en
Application granted granted Critical
Publication of CN109194744B publication Critical patent/CN109194744B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching

Abstract

The embodiment of the invention discloses a kind of data transmission method, device, storage medium and monitoring devices.This method comprises: disconnecting the connection between the monitoring device and destination server when detecting that data transmission event is triggered;The connection between the monitoring device and the destination server is re-established, and judges whether to be successfully established;When being successfully established, monitoring data are sent to the destination server.The technical solution provided through the embodiment of the present invention, monitoring device can be effectively ensured, monitoring data are transmitted to destination server, and can be improved the stability of data transmission, while can reduce the maintenance cost that data are effectively transmitted, it can further ensure the safety of maintenance personnel.

Description

A kind of data transmission method, device, storage medium and monitoring device
Technical field
The present embodiments relate to field of communication technology more particularly to a kind of data transmission method, device, storage medium and Monitoring device.
Background technique
Monitoring device is generally used for meagrely-populated or not convenient for safeguarding place, such as remote mountains or big pars basilaris pontis place.Currently, Monitoring device usually passes through GPRS (General Packet Radio Service, General Packet Radio Service) module and is counted According to transmission, monitoring data are transmitted to destination server.However, often because of the connection between monitoring device and destination server For virtual connections state (substantial off-state), it can not be effectively ensured and monitoring data are successfully transmitted to destination server.
Summary of the invention
The embodiment of the present invention provides a kind of data transmission method, device, storage medium and monitoring device, can be effectively ensured Monitoring data are transmitted to destination server by monitoring device, and can be improved the stability of data transmission.
In a first aspect, the embodiment of the invention provides a kind of data transmission methods, comprising:
When detecting that data transmission event is triggered, the connection between the monitoring device and destination server is disconnected;
The connection between the monitoring device and the destination server is re-established, and judges whether to be successfully established;
When being successfully established, monitoring data are sent to the destination server.
Further, the method also includes:
When establishing failure, the monitoring data are cached, and returns to execute to work as and detects data transmission event quilt When triggering, the operation connecting between monitoring device and destination server is disconnected.
Further, after sending monitoring data to the destination server, further includes:
Whether judgement receives the data answering message that the destination server is sent within a preset period of time;
If not receiving the data answering message that the destination server is sent within a preset period of time, will initially send Number is accumulative plus 1 to update the initial transmission times, and judges whether updated initial transmission times is greater than preset times Threshold value;
If it is not, then returning to the operation for executing and sending monitoring data to the destination server.
Further, the method also includes:
If updated initial transmission times is greater than the preset times threshold value, the monitoring data are cached, And execution is returned when detecting that data transmission event is triggered, disconnect the behaviour connecting between monitoring device and destination server Make.
Further, detect that data transmission event is triggered, comprising:
Using set time period as the trigger condition of data transmission event, when a upper triggering moment passes through the setting time When the period, detect that data transmission event is triggered;Or
When reaching the Preset Transfer time of transmission data, detect that data transmission event is triggered.
Second aspect, the embodiment of the invention also provides a kind of data transmission devices, comprising:
Module is disconnected, for when detecting that data transmission event is triggered, disconnecting the monitoring device and target Connection between server;
Link block is established, for re-establishing the connection between the monitoring device and the destination server, and is sentenced It is disconnected whether to be successfully established;
First data transmission blocks, for sending monitoring data to the destination server when being successfully established.
Further, described device further include:
First data cache module, for the monitoring data being cached, and return to execution and work as when establishing failure When detecting that data transmission event is triggered, the operation connecting between monitoring device and destination server is disconnected.
Further, described device further include:
Response message judgment module, for judging when default after sending monitoring data to the destination server Between the data answering message that the destination server is sent whether is received in section;
Transmission times update module, if the data sent for not receiving the destination server within a preset period of time Initial transmission times is then added up plus 1 to update the initial transmission times, and judges updated initial transmission by response message Whether number is greater than preset times threshold value;
Second data transmission blocks, if being less than or equal to the preset times threshold for updated initial transmission times Value then returns to the operation for executing and sending the monitoring data to the destination server.
Further, described device further include:
Second data cache module will if being greater than the preset times threshold value for updated initial transmission times The monitoring data are cached, and return to execution when detecting that data transmission event is triggered, and disconnect monitoring device and mesh Mark the operation of the connection between server.
Further, detect that data transmission event is triggered, comprising:
Using set time period as the trigger condition of data transmission event, when a upper triggering moment passes through the setting time When the period, detect that data transmission event is triggered;Or
When reaching the Preset Transfer time of transmission data, detect that data transmission event is triggered.
The third aspect, the embodiment of the invention provides a kind of computer readable storage mediums, are stored thereon with computer journey Sequence realizes the data transmission method as described in first aspect of the embodiment of the present invention when program is executed by processor.
Fourth aspect, the embodiment of the invention provides a kind of monitoring devices, comprising:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the method that the data as described in first aspect of the embodiment of the present invention are transmitted.
Data transmission scheme provided in an embodiment of the present invention, when detecting that data transmission event is triggered, described in disconnection Connection between monitoring device and destination server, and re-establish the company between the monitoring device and the destination server It connects, and judges whether to be successfully established, when being successfully established, send monitoring data to the destination server.By using above-mentioned Technical solution can be effectively ensured monitoring device for monitoring data and be transmitted to destination server, and can be improved data transmission Stability, while can reduce the maintenance cost that data are effectively transmitted, it can further ensure the safety of maintenance personnel.
Detailed description of the invention
Fig. 1 is a kind of flow diagram for data transmission method that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow diagram of data transmission method provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of flow diagram of preferred data transmission method provided by Embodiment 2 of the present invention;
Fig. 4 is a kind of flow diagram for data transmission method that the embodiment of the present invention three provides;
Fig. 5 is a kind of flow diagram for preferred data transmission method that the embodiment of the present invention three provides;
Fig. 6 is a kind of structural schematic diagram for data transmission device that the embodiment of the present invention four provides;
Fig. 7 is a kind of structural schematic diagram for monitoring device that the embodiment of the present invention six provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing or method described as flow chart.Although each step is described as the processing of sequence by flow chart, many of these Step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of each step can be rearranged.When its operation The processing can be terminated when completion, it is also possible to have the additional step being not included in attached drawing.The processing can be with Corresponding to method, function, regulation, subroutine, subprogram etc..
Currently, after monitoring data are sent to destination server by monitoring device, for the logic of application layer, including service Device has response and the unresponsive two kinds of situations of server.There is the case where response for server, in the prior art, monitoring device can determine Phase sends heartbeat packet to destination server, and judges whether to receive the response heartbeat packet that server is directed to heartbeat packet feedback, If being not received by the response heartbeat packet of server feedback, illustrate that monitoring device has been disconnected with destination server, needs Again connection is established with destination server.There can be a drawback in this way:, can wave if heartbeat packet transmission frequency is more intensive Take flow;If heartbeat packet is sent, frequency is not intensive enough, and the monitoring data that not can guarantee in monitoring device are efficiently transmitted to target Server leads to the loss of effective monitoring data.In the case of server is unresponsive, monitoring device is only periodically by monitoring data It is sent to destination server, in the case where no destination server response monitors, cannot be effectively ensured and whether constantly will Effective monitoring data are sent to destination server.Such deficiency is caused, mainly includes following several respects: the first, usually monitoring Equipment is only established with destination server at the beginning of most and is communicated to connect, at this point, data transmission is relatively stable.But with The growth of transmission time, carrier network can kick the equipment for connecting its network off automatically, every 55 minutes 3 hours such as connection operator All communication equipments for connecting its network can periodically be kicked off, such monitoring device will be disconnected with destination server.The second, Monitoring device establishes connection with destination server usually in such a way that protocol stack establishes socket, but destination server is usual It will limit the number of socket connection, can periodically clear up socket, the connection be easy to causeing between monitoring device and destination server It disconnects.Third, the reboot operation of destination server, also will disconnect the connection between monitoring device and destination server.In order to guarantee Monitoring data are effectively transmitted to destination server, maintenance personnel is needed to go on-site maintenance, human cost can be greatly increased, and The safety of maintenance personnel can not be effectively ensured.Based on the above reasons, the embodiment of the present invention provides following data transmission method.
Embodiment one
Fig. 1 is the flow diagram of data transmission method provided in an embodiment of the present invention, and this method is applicable to monitoring and sets Standby the case where monitoring data are effectively transmitted, can be executed by data transmission device, wherein the device can by software and/or Hardware realization can be generally integrated in monitoring device.As shown in Figure 1, this method comprises:
S101, when detecting that data transmission event is triggered, disconnect between the monitoring device and destination server Connection.
Illustratively, the monitoring device in the embodiment of the present invention may include water level monitoring equipment, deformation monitoring equipment, meteorology The monitoring devices such as monitoring device, Geological Hazards Monitoring equipment and bridge safety supervision equipment.The embodiment of the present invention is to monitoring device Type without limitation.In embodiments of the present invention, monitoring device can be acquired according to preset rules by built-in sensor and be passed Feel data.Wherein, preset rules may include acquiring a sensing data every preset duration, or acquire once in predetermined time Sensing data.Illustratively, the trigger condition of data transmission event can be arranged according to the actual situation, and the embodiment of the present application is not made It is specific to limit.For example, can be built-in in detecting monitoring device a sensor timing acquiring complete sensing data when, trigger number According to transmission event.Optionally, detect that data transmission event is triggered, comprising: using set time period as data transmission event Trigger condition, when a upper triggering moment pass through the set time period when, detect that data transmission event is triggered;Or When reaching the Preset Transfer time of transmission data, detect that data transmission event is triggered.For example, being set inside monitoring device Timer is set, triggers a data transmission event every preset duration, namely every the preset duration period, trigger a data and pass Defeated event triggers a data transmission event such as every 5 minutes.In another example setting data transmission period, when current time arrives When up to the setting data transmission period, namely when reaching the Preset Transfer time of transmission data, trigger data transmits event, Such as the daily integral point time, trigger data transmits event.
In embodiments of the present invention, when detecting that data transmission event is triggered, monitoring device and destination service are disconnected Connection between device.Before disconnecting the connection between monitoring device and destination server, between monitoring device and destination server Connection status include two kinds: is in true connection status one is monitoring device and destination server;Another kind is that monitoring is set Standby to be in virtual connections state with destination server, i.e. monitoring device is in an off state with destination server.In general, monitoring device It can not detect whether to establish connection with destination server, therefore, really be connect if monitoring device is in destination server State then disconnects the connection of the two;If monitoring device has been in an off state with destination server, primary disconnect is executed again The operation of the connection of the two, the opening operation can be considered invalid operation at this time.
S102, connection between the monitoring device and the destination server is re-established, and judges whether to be created as Function.
Both in embodiments of the present invention, after disconnecting the connection between monitoring device and destination server, re-establish Between connection.Illustratively, monitoring device sends AT by built-in GPRS module and instructs to destination server, with target Server establishes connection.Alternatively, monitoring device establishes socket by protocol stack, to establish connection with destination server.And sentence It connects and whether is successfully established between disconnected monitoring device and destination server, wherein sent when monitoring device receives destination server AT feedback command when, indicate that the connection between monitoring device and destination server is successfully established, otherwise, the connection of the two, which is established, loses It loses, wherein AT feedback command is the feedback information for the AT instruction that destination server is sent for monitoring device;Alternatively, when monitoring When equipment receives the socket feedback information of destination server transmission, indicate that the connection between monitoring device and destination server connects It connects and is successfully established, otherwise, failure is established in the connection of the two, wherein socket feedback information is that destination server is set for monitoring The feedback information for the protocol stack that preparation is sent.
S103, when being successfully established, to the destination server send monitoring data.
Illustratively, when the connection between monitoring device and destination server is successfully established, monitoring device takes to target Device of being engaged in sends monitoring data, analyzes destination server to the monitoring data, to judge that the monitoring object of monitoring device is It is no to meet the requirements.Wherein, to may include monitoring device acquire sensing number according to preset rules by built-in sensor to monitoring data According to.
Data transmission method provided in an embodiment of the present invention, when detecting that data transmission event is triggered, described in disconnection Connection between monitoring device and destination server, and re-establish the company between the monitoring device and the destination server It connects, and judges whether to be successfully established, when being successfully established, send monitoring data to the destination server.By using above-mentioned Technical solution can be effectively ensured monitoring device for monitoring data and be transmitted to destination server, and can be improved data transmission Stability, while can reduce the maintenance cost that data are effectively transmitted, it can further ensure the safety of maintenance personnel.
Embodiment two
Fig. 2 is a kind of flow chart of data transmission method provided by Embodiment 2 of the present invention.The present embodiment is with above-mentioned implementation It is optimized based on example, in the present embodiment, the data transmission method further include: when establishing failure, by the monitoring number According to being cached, and return to execution when detecting that data transmission event is triggered, disconnect monitoring device and destination server it Between connection operation.Correspondingly, the method for the present embodiment specifically includes:
S201, when detecting that data transmission event is triggered, disconnect between the monitoring device and destination server Connection.
S202, connection between the monitoring device and the destination server is re-established, and judges whether to be created as Otherwise function, executes S204 if so, executing S203.
S203, monitoring data are sent to the destination server.
S204, the monitoring data are cached, and returns to execution when detecting that data transmission event is triggered, broken Open the operation connecting between monitoring device and destination server.
In embodiments of the present invention, when failure is established in the connection between monitoring device and destination server, by monitoring data Be buffered in local, and when detecting that data transmission event is triggered again, execute disconnect monitoring device and destination server it Between connection operation.
Fig. 3 is a kind of flow diagram of preference data transmission method provided in an embodiment of the present invention, and this method is mainly fitted The situation unresponsive for destination server.As shown in figure 3, monitoring device acquire monitoring data, judge current time whether be The step of whether current time is data transmission time judged if it is not, then repeating for data transmission time, until current time Until data transmission time;If so, disconnecting the connection between monitoring device and destination server, and re-establishes monitoring and set The standby connection between destination server.When the connection between monitoring device and destination server is successfully established, monitoring device will Monitoring data are sent to destination server, analyze destination server to the monitoring data;When monitoring device and target take When failure is established in connection between business device, monitoring data are buffered in local, and judge whether current time reaches next data Otherwise transmission time repeats the operation until under current time arrival if so, illustrating that current time is data transmission time Until one data transmission time.
Data transmission method provided in an embodiment of the present invention, when failure is established in the connection between monitoring device and destination server When, monitoring data are cached, and return to execution when detecting that data transmission event is triggered, disconnects monitoring device and target takes The operation of connection between business device, may further ensure that monitoring data are transmitted to destination server by monitoring device, and can The stability of improve data transfer.
Embodiment three
Fig. 4 is a kind of flow chart for data transmission method that the embodiment of the present invention three provides.The present embodiment is with above-mentioned implementation It is optimized based on example, in the present embodiment, the data transmission method further include: monitored being sent to the destination server After data, further includes: whether judgement receives the data answering message that the destination server is sent within a preset period of time; If not receiving the data answering message that the destination server is sent within a preset period of time, initial transmission times is added up Add 1 to update the initial transmission times, and judges whether updated initial transmission times is greater than preset times threshold value;If It is no, then return to the operation for executing and sending monitoring data to the destination server.Optionally, this method further include: if after updating Initial transmission times be greater than the preset times threshold value, then the monitoring data are cached, and return execution when detection When being triggered to data transmission event, the operation connecting between monitoring device and destination server is disconnected.Correspondingly, this implementation The method of example specifically includes:
S401, when detecting that data transmission event is triggered, disconnect between the monitoring device and destination server Connection.
S402, connection between the monitoring device and the destination server is re-established, and judges whether to be created as Otherwise function, executes S406 if so, executing S403.
S403, monitoring data are sent to the destination server.
Whether S404, judgement receive the data answering message that the destination server is sent within a preset period of time, if It is to execute S407, otherwise, executes S405.
In embodiments of the present invention, after monitoring device sends monitoring data to destination server, judge in preset time Whether the data answering message of destination server side is received in section, wherein data answering message is directed to for destination server and connects The feedback information for the monitoring data that the monitoring device received is sent.When the data answering message for receiving destination server transmission Afterwards, illustrate that monitoring data are successfully sent to destination server by monitoring device, illustrate that the monitoring data send task and terminate.When When not receiving the data answering message of destination server transmission, S405 is executed.
S405, accumulative by initial transmission times plus 1 to update the initial transmission times, and judges updated just to originate It send whether number is greater than preset times threshold value, if so, executing S406, otherwise, returns and execute S403.
In embodiments of the present invention, initial transmission times may be configured as 0, supervise when monitoring device is sent to destination server After measured data, if not receiving the data answering message of destination server transmission within a preset period of time, illustrate the monitoring number Fail according to sending, at this point, initial transmission times is added up to add 1, and it is default to judge whether updated initial transmission times is greater than Threshold value, such as n, wherein n is the integer more than or equal to 1.When updated initial transmission times is less than or equal to preset threshold, Monitoring device sends monitoring data to destination server again, and executes subsequent operation, when updated initial transmission times is big When preset threshold, monitoring data are buffered in local by monitoring device, and when detecting that data transmission event is triggered again, Execute the operation for disconnecting and connecting between monitoring device and destination server.
S406, the monitoring data are cached, and returns to S401.
Monitoring data when S406, data transmission event triggering, which send task, to be terminated.
Fig. 5 is a kind of flow diagram of preference data transmission method provided in an embodiment of the present invention, and this method is mainly fitted There is the case where response for destination server.As shown in figure 5, monitoring device acquire monitoring data, judge current time whether be The step of whether current time is data transmission time judged if it is not, then repeating for data transmission time, until current time Until data transmission time;If so, disconnecting the connection between monitoring device and destination server, and re-establishes monitoring and set The standby connection between destination server.When the connection between monitoring device and destination server is successfully established, monitoring device will Monitoring data are sent to destination server, analyze destination server to the monitoring data;When monitoring device and target take When failure is established in connection between business device, monitoring data are buffered in local, and judge whether current time reaches next data Otherwise transmission time repeats the operation until under current time arrival if so, illustrating that current time is data transmission time Until one data transmission time.Also, after monitoring device sends monitoring data to destination server, judge when default Between whether receive the data answering message of destination server side in section, if so, indicating to monitor number in the set time period According to transmission task terminate, otherwise, initial transmission times is added 1, and judge whether the updated initial transmission times is greater than Monitoring data are buffered in local operation if so, returning and executing by preset times threshold value n, otherwise, are returned and are executed to target clothes The operation for device transmission monitoring data of being engaged in.
Data transmission method provided in an embodiment of the present invention judges after sending monitoring data to destination server Whether the data answering message of destination server transmission is received in preset time period;If not receiving mesh within a preset period of time The data answering message that server is sent is marked, then initial transmission times is added up plus 1 to update initial transmission times, and judged more Whether the initial transmission times after new is greater than preset times threshold value;Monitoring number is sent to destination server if it is not, then returning to execution According to operation.If updated initial transmission times is greater than preset times threshold value, monitoring data are cached, and returns and holds When the trade detects that data transmission event is triggered, the operation connecting between monitoring device and destination server is disconnected.Pass through Above-mentioned technical proposal can effectively solve that in the prior art flow can be wasted if heartbeat packet transmission frequency is more intensive;Such as core Jump packet transmission frequency is not intensive enough, and the monitoring data that not can guarantee in monitoring device are efficiently transmitted to destination server, cause to have The technical issues of imitating the loss of monitoring data, can effectively evade the transmission of heartbeat packet, reduce the waste of flow, greatly reduce The cost of data transmission.
Example IV
Fig. 6 is a kind of structural schematic diagram for data transmission device that the embodiment of the present invention four provides.As shown in fig. 6, described Device includes: to disconnect module 601, establish link block 602 and the first data transmission blocks 603, in which:
Module 601 is disconnected, for when detecting that data transmission event is triggered, disconnecting the monitoring device and mesh Mark the connection between server;
Link block 602 is established, for re-establishing the connection between the monitoring device and the destination server, and Judge whether to be successfully established;
First data transmission blocks 603, for sending monitoring data to the destination server when being successfully established.
Data transmission device provided in an embodiment of the present invention, when detecting that data transmission event is triggered, described in disconnection Connection between monitoring device and destination server, and re-establish the company between the monitoring device and the destination server It connects, and judges whether to be successfully established, when being successfully established, send monitoring data to the destination server.By using above-mentioned Technical solution can be effectively ensured monitoring device for monitoring data and be transmitted to destination server, and can be improved data transmission Stability, while can reduce the maintenance cost that data are effectively transmitted, it can further ensure the safety of maintenance personnel.
Optionally, described device further include:
First data cache module, for the monitoring data being cached, and return to execution and work as when establishing failure When detecting that data transmission event is triggered, the operation connecting between monitoring device and destination server is disconnected.
Optionally, described device further include:
Response message judgment module, for judging when default after sending monitoring data to the destination server Between the data answering message that the destination server is sent whether is received in section;
Transmission times update module, if the data sent for not receiving the destination server within a preset period of time Initial transmission times is then added up plus 1 to update the initial transmission times, and judges updated initial transmission by response message Whether number is greater than preset times threshold value;
Second data transmission blocks, if being less than or equal to the preset times threshold for updated initial transmission times Value then returns to the operation for executing and sending the monitoring data to the destination server.
Optionally, described device further include:
Second data cache module will if being greater than the preset times threshold value for updated initial transmission times The monitoring data are cached, and return to execution when detecting that data transmission event is triggered, and disconnect monitoring device and mesh Mark the operation of the connection between server.
Optionally, detect that data transmission event is triggered, comprising:
Using set time period as the trigger condition of data transmission event, when a upper triggering moment passes through the setting time When the period, detect that data transmission event is triggered;Or
When reaching the Preset Transfer time of transmission data, detect that data transmission event is triggered.
Embodiment five
The embodiment of the present invention five provides a kind of storage medium comprising computer executable instructions, and the computer is executable Instruction is used for data transmission method when being executed by computer processor, this method comprises:
When detecting that data transmission event is triggered, the connection between the monitoring device and destination server is disconnected;
The connection between the monitoring device and the destination server is re-established, and judges whether to be successfully established;
When being successfully established, monitoring data are sent to the destination server.
Storage medium --- any various types of memory devices or storage equipment.Term " storage medium " is intended to wrap It includes: install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDORAM, blue Bath (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetic medium (example Such as hard disk or optical storage);Register or the memory component of other similar types etc..Storage medium can further include other types Memory or combinations thereof.In addition, storage medium can be located at program in the first computer system being wherein performed, or It can be located in different second computer systems, second computer system is connected to the first meter by network (such as internet) Calculation machine system.Second computer system can provide program instruction to the first computer for executing.Term " storage medium " can To include two or more that may reside in different location (such as in the different computer systems by network connection) Storage medium.Storage medium can store the program instruction that can be performed by one or more processors and (such as be implemented as counting Calculation machine program).
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present invention Data provided by any embodiment of the invention can also be performed in the data transfer operation that executable instruction is not limited to the described above Relevant operation in transmission method.
Embodiment six
Fig. 7 is a kind of structural schematic diagram for monitoring device that the embodiment of the present invention six provides.The monitoring device that Fig. 7 is shown is only Only an example, should not function to the embodiment of the present invention and use scope bring any restrictions.As shown in fig. 7, of the invention The monitoring device that embodiment six provides, including processor 71, memory 72, input unit 73 and output device 74;Monitoring device The quantity of middle processor 71 can be one or more, in Fig. 7 by taking a processor 71 as an example;Processor in monitoring device 71, memory 72, input unit 73 and output device 74 can be connected by bus or other modes, to pass through bus in Fig. 7 For connection.
Memory 72 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer Sequence and module, such as the corresponding program instruction of the operating mode configuration method based on bluetooth/module (example in the embodiment of the present invention Such as, disconnecting module 601, establishing link block 602 and the first data transmission blocks 603 in data transmission device).Processing Device 71 by the operation software program, instruction and the module that are stored in memory 72, thereby executing various function application and Data transmission, such as realize the data transmission method for being applied to monitoring device provided by the embodiment of the present invention.
Memory 72 can mainly include storing program area and storage data area, wherein storing program area can store operation system Application program needed for system, at least one function;Storage data area, which can be stored, uses created data according to monitoring device Deng.In addition, memory 72 may include high-speed random access memory, it can also include nonvolatile memory, for example, at least One disk memory, flush memory device or other non-volatile solid state memory parts.In some instances, memory 72 can It further comprise the memory remotely located relative to processor 71, these remote memories can pass through network connection to monitoring Equipment.The example of above-mentioned network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Input unit 73 can be used for receiving the number or character information of user's input, be set with generation and the user of monitoring device It sets and the related key signals of function control inputs.Output device 74 may include that display screen etc. shows equipment.
Institute of the embodiment of the present invention can be performed in data transmission device, storage medium and the monitoring device provided in above-described embodiment The corresponding data transmission method provided has and executes the corresponding functional module of this method and beneficial effect.Not in above-mentioned implementation The technical detail of detailed description in example, reference can be made to data transmission method provided by any embodiment of the invention.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of data transmission method, which is characterized in that be applied to monitoring device, comprising:
When detecting that data transmission event is triggered, the connection between the monitoring device and destination server is disconnected;
The connection between the monitoring device and the destination server is re-established, and judges whether to be successfully established;
When being successfully established, monitoring data are sent to the destination server.
2. the method according to claim 1, wherein further include:
When establishing failure, the monitoring data are cached, and returns to execute to work as and detects that data transmission event is triggered When, disconnect the operation connecting between monitoring device and destination server.
3. the method according to claim 1, wherein to the destination server send monitoring data after, Further include:
Whether judgement receives the data answering message that the destination server is sent within a preset period of time;
If the data answering message that the destination server is sent is not received within a preset period of time, by initial transmission times Add up plus 1 to update the initial transmission times, and judges whether updated initial transmission times is greater than preset times threshold value;
If it is not, then returning to the operation for executing and sending monitoring data to the destination server.
4. according to the method described in claim 3, it is characterized by further comprising:
If updated initial transmission times is greater than the preset times threshold value, the monitoring data are cached, and returns When the receipt trade detects that data transmission event is triggered, the operation connecting between monitoring device and destination server is disconnected.
5. method according to claim 1 to 4, which is characterized in that detect that data transmission event is triggered, comprising:
Using set time period as the trigger condition of data transmission event, when a upper triggering moment passes through the set time period When, detect that data transmission event is triggered;Or
When reaching the Preset Transfer time of transmission data, detect that data transmission event is triggered.
6. a kind of data transmission device, which is characterized in that be applied to monitoring device, comprising:
Module is disconnected, for when detecting that data transmission event is triggered, disconnecting the monitoring device and destination service Connection between device;
Link block is established, for re-establishing the connection between the monitoring device and the destination server, and judgement is It is no to be successfully established;
First data transmission blocks, for sending monitoring data to the destination server when being successfully established.
7. device according to claim 6, which is characterized in that further include:
First data cache module for when establishing failure, the monitoring data to be cached, and returns to execution when detection When being triggered to data transmission event, the operation connecting between monitoring device and destination server is disconnected.
8. device according to claim 6, which is characterized in that further include:
Response message judgment module, for judging in preset time period after sending monitoring data to the destination server Inside whether receive the data answering message that the destination server is sent;
Transmission times update module, if the data answering sent for not receiving the destination server within a preset period of time Initial transmission times is then added up plus 1 to update the initial transmission times, and judges updated initial transmission times by message Whether preset times threshold value is greater than;
Second data transmission blocks, if being less than or equal to the preset times threshold value for updated initial transmission times, Return to the operation for executing and sending the monitoring data to the destination server.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor Such as data transmission method as claimed in any one of claims 1 to 5 is realized when row.
10. a kind of monitoring device characterized by comprising
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Existing data transmission method a method as claimed in any one of claims 1 to 5.
CN201811032021.6A 2018-09-05 2018-09-05 Data transmission method and device, storage medium and monitoring equipment Active CN109194744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811032021.6A CN109194744B (en) 2018-09-05 2018-09-05 Data transmission method and device, storage medium and monitoring equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811032021.6A CN109194744B (en) 2018-09-05 2018-09-05 Data transmission method and device, storage medium and monitoring equipment

Publications (2)

Publication Number Publication Date
CN109194744A true CN109194744A (en) 2019-01-11
CN109194744B CN109194744B (en) 2020-11-10

Family

ID=64914652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811032021.6A Active CN109194744B (en) 2018-09-05 2018-09-05 Data transmission method and device, storage medium and monitoring equipment

Country Status (1)

Country Link
CN (1) CN109194744B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110636481A (en) * 2019-08-31 2019-12-31 广州海达安控智能科技有限公司 Data interaction method and device applied to server and low-power-consumption equipment
CN111354154A (en) * 2020-03-11 2020-06-30 杭州涂鸦信息技术有限公司 AI detection method based on cloud algorithm
CN112198818A (en) * 2019-07-08 2021-01-08 浙江宇视科技有限公司 Control method, device and equipment of stepping type driving structure and storage medium
CN113965482A (en) * 2021-10-19 2022-01-21 北京天融信网络安全技术有限公司 Data transmission method and device based on gRPC and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101630993A (en) * 2008-07-18 2010-01-20 深圳市维信联合科技有限公司 Unidirectional transmission control method and unidirectional transmission system without feedback signal wire
CN101799751A (en) * 2009-12-02 2010-08-11 山东浪潮齐鲁软件产业股份有限公司 Method for building monitoring agent software of host machine
CN103036904A (en) * 2012-12-27 2013-04-10 东方通信股份有限公司 Method of data reliable transmission with user datagram protocol (UDP) in communication network
CN103338118A (en) * 2013-06-04 2013-10-02 北京搜狐新媒体信息技术有限公司 A communication network connection method and an apparatus thereof
CN103368814A (en) * 2012-03-27 2013-10-23 北京百度网讯科技有限公司 Data push method, data push system and mobile terminal
US20180198857A1 (en) * 2014-11-13 2018-07-12 Kabushiki Kaisha Toshiba Connection control device, connection control system, and non-transitory computer readable medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101630993A (en) * 2008-07-18 2010-01-20 深圳市维信联合科技有限公司 Unidirectional transmission control method and unidirectional transmission system without feedback signal wire
CN101799751A (en) * 2009-12-02 2010-08-11 山东浪潮齐鲁软件产业股份有限公司 Method for building monitoring agent software of host machine
CN103368814A (en) * 2012-03-27 2013-10-23 北京百度网讯科技有限公司 Data push method, data push system and mobile terminal
CN103036904A (en) * 2012-12-27 2013-04-10 东方通信股份有限公司 Method of data reliable transmission with user datagram protocol (UDP) in communication network
CN103338118A (en) * 2013-06-04 2013-10-02 北京搜狐新媒体信息技术有限公司 A communication network connection method and an apparatus thereof
US20180198857A1 (en) * 2014-11-13 2018-07-12 Kabushiki Kaisha Toshiba Connection control device, connection control system, and non-transitory computer readable medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112198818A (en) * 2019-07-08 2021-01-08 浙江宇视科技有限公司 Control method, device and equipment of stepping type driving structure and storage medium
CN112198818B (en) * 2019-07-08 2022-05-13 浙江宇视科技有限公司 Control method, device and equipment of stepping type driving structure and storage medium
CN110636481A (en) * 2019-08-31 2019-12-31 广州海达安控智能科技有限公司 Data interaction method and device applied to server and low-power-consumption equipment
CN110636481B (en) * 2019-08-31 2024-02-09 广州市中海达测绘仪器有限公司 Data interaction method and device applied to server and low-power-consumption equipment
CN111354154A (en) * 2020-03-11 2020-06-30 杭州涂鸦信息技术有限公司 AI detection method based on cloud algorithm
CN113965482A (en) * 2021-10-19 2022-01-21 北京天融信网络安全技术有限公司 Data transmission method and device based on gRPC and storage medium

Also Published As

Publication number Publication date
CN109194744B (en) 2020-11-10

Similar Documents

Publication Publication Date Title
CN109194744A (en) A kind of data transmission method, device, storage medium and monitoring device
CN103199972B (en) The two-node cluster hot backup changing method realized based on SOA, RS485 bus and hot backup system
WO2016095344A1 (en) Link switching method and device, and line card
CN107508693A (en) Router control method, device and power supply adaptor, router
CN104898435B (en) Home services system and its fault handling method, household appliance, server
CN106533736A (en) Network device reboot method and apparatus
CN106603261A (en) Hot backup method, first master device, backup device and communication system
CN109040295A (en) Determination method and device, terminal and the storage medium of abnormal broken line
CN101820359A (en) Fault processing method and equipment for network equipment
CN104038390A (en) Linux server cluster unified peripheral event monitoring method based on netlink
CN103024058A (en) Method and system for invoking web services
CN105516658A (en) Monitoring equipment control method and device
US20200136912A1 (en) Method, Device, and System for Implementing MUX Machine
WO2016065751A1 (en) Method for recovering link communication, service line card and system
CN101945083B (en) Authentication method and counterfeit judgment method for virtual router redundancy protocol
CN102638369B (en) Method, device and system for arbitrating main/standby switch
CN103001832B (en) The detection method of distributed file system interior joint and device
CN112822039B (en) Main and standby mode switching method for dual-machine hot standby system
CN107070676A (en) The virtualized management method of the network equipment
CN113760459A (en) Virtual machine fault detection method, storage medium and virtualization cluster
KR101977953B1 (en) Remote fault recovery system
CN108650101A (en) A kind of method and apparatus of data transmission
JPH11177550A (en) Monitor system for network
JP3465637B2 (en) Server and control method thereof
CN111984376B (en) Protocol processing method, device, equipment and computer readable 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
GR01 Patent grant
GR01 Patent grant