CN109819044A - Remote data acquisition method, apparatus, equipment and storage medium - Google Patents

Remote data acquisition method, apparatus, equipment and storage medium Download PDF

Info

Publication number
CN109819044A
CN109819044A CN201910125598.XA CN201910125598A CN109819044A CN 109819044 A CN109819044 A CN 109819044A CN 201910125598 A CN201910125598 A CN 201910125598A CN 109819044 A CN109819044 A CN 109819044A
Authority
CN
China
Prior art keywords
data
queue
record
data record
cloud platform
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910125598.XA
Other languages
Chinese (zh)
Inventor
宋斌
张箫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xiankong Technology Co Ltd
Original Assignee
Shenzhen Xiankong Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xiankong Technology Co Ltd filed Critical Shenzhen Xiankong Technology Co Ltd
Priority to CN201910125598.XA priority Critical patent/CN109819044A/en
Publication of CN109819044A publication Critical patent/CN109819044A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a kind of remote data acquisition method, apparatus, equipment and storage medium, which includes: data generation step, is periodically generated data record;The data record is compared comparing step with upper data record, and if the comparison results are inconsistent, then the corresponding storage of corresponding timestamp is into the data queue when storing the data record into data queue, while the data record being generated;Conversely, then abandoning the data record;Data upload step, whether detection is normal with the network communication of cloud platform, if communication is normal, the data in the data queue are uploaded to one by one in the cloud platform;Conversely, then being transmitted without data.The present invention overcomes traditional Timing Data Acquisition mode cloud platform in network communication failure that can not acquire data and the high technical problem of resource occupying.The present invention is widely used in remote data acquisition.

Description

Remote data acquisition method, apparatus, equipment and storage medium
Technical field
The present invention relates to fields of communication technology, more particularly, to a kind of remote data acquisition method, apparatus, equipment and storage Medium.
Background technique
Cloud platform: refering in particular to Internet of Things cloud platform herein, provides equipment access, long-range control, data acquisition, alarm logging etc. The internet platform of function.
FIFO: a kind of data storage method, the english abbreviation of First In First Out, Chinese are " first in first out ".
In industrial stokehold, data collection station uploads data to cloud platform by the way of periodically reporting, that is, counts The data are simultaneously uploaded into cloud platform simultaneously according to acquisition terminal taken at regular intervals data, if network is normal, data are successfully transferred to Cloud platform, and store data into cloud platform;If network transmission fails, cancel the transmission of this record.
Above-mentioned data acquisition modes have following two points shortcoming:
(1) after equipment off-line, cloud platform can not collect data;
(2) equipment timing uploads data, leads to resource occupying height.
Summary of the invention
For this purpose, the present invention provides a kind of remote data acquisition method, apparatus, equipment and storage medium, it is traditional to solve Timing Data Acquisition mode cloud platform when network communication fails can not acquire data and the high technical problem of resource occupying.
The technical scheme adopted by the invention is that:
In a first aspect, the present invention provides a kind of remote data acquisition method, which includes: that data are raw At step, it is periodically generated data record;Comparing step compares the data record and upper data record Right, if the comparison results are inconsistent, then by data record storage into data queue, while by when data record generation pairs The corresponding storage of the timestamp answered is into the data queue;Conversely, then abandoning the data record;Data upload step, detection and cloud Whether the network communication of platform is normal, if communication is normal, the data in the data queue are uploaded to the cloud platform one by one On;Conversely, then being transmitted without data.
Wherein, in the comparing step, which is stored in fifo fashion in the data queue.
Wherein, the data generation step, comparing step and the data upload step are carried out with multithreading.
Wherein, after the data upload step further include: the data in the data queue is successfully uploaded to this After cloud platform, a data is locally being deleted.
Second aspect, the present invention provide a kind of teledata acquisition device, which includes: that data are raw At module, for being periodically generated data record;Data comparing module, for recording the data record and a upper data It is compared, if the comparison results are inconsistent, then by data record storage into data queue, and meanwhile the data record is raw At when the corresponding storage of corresponding timestamp into the data queue;Conversely, then abandoning the data record;And data upload mould Block, it is whether normal for detecting network communication with cloud platform, if communication is normal, one by one by the data in the data queue It uploads in the cloud platform;Conversely, then being transmitted without data.
Wherein, which is also used to store the data record in the data queue in fifo fashion.
Wherein, the data generation module, the data comparing module and the data uploading module are run with multithreading.
Wherein, which further includes that data delete unit, which deletes unit and be used in the data queue In a data successfully uploaded to after the cloud platform, locally deleting a data.
The third aspect, the present invention provide a kind of remote data acquisition equipment, which includes: at least one A processor;And the memory being connect at least one processor communication;Wherein, be stored with can be by this at least for the memory The instruction that one processor executes, which is executed by least one processor, so that at least one processor can be held Row such as above-mentioned method.
Fourth aspect, the present invention provide a kind of computer readable storage medium, wherein the computer readable storage medium is deposited Computer executable instructions are contained, the computer executable instructions are for making computer execute such as above-mentioned method.
The technical solution of the embodiment of the present invention is recorded by using by the data record of timing acquiring and a upper data It is compared, if the comparison results are inconsistent, then stores the data record of the acquisition into data queue, while by the generation The timestamp and data record of data record are saved in data queue in pairs, then in the successful situation of data communication Data in the data queue are uploaded in cloud platform one by one.Traditional Timing Data Acquisition mode is overcome to lose in network communication Cloud platform can not acquire data and the high technical problem of resource occupying when losing, and realize the continuous of the data of cloud platform acquisition Property, facilitate and carries out data analysis, malfunction elimination using the data of cloud platform.
The present invention is widely used in remote data acquisition.
Detailed description of the invention
Fig. 1 is the flow diagram of an embodiment of remote data acquisition method of the present invention;
Fig. 2 is the schematic diagram data of an Application Example of remote data acquisition method of the present invention;
Fig. 3 is the structural schematic diagram of an embodiment of teledata acquisition device of the present invention.
Specific embodiment
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.
Embodiment one:
Referring to Fig. 1, Fig. 1 is the flow diagram of an embodiment of remote data acquisition method of the present invention.Such as Fig. 1 institute Show, the remote data acquisition method comprising steps of
S11: data generation step is periodically generated data record;
In step s 11, which is decided according to the actual requirements, for example applies in power grid, can be ammeter Electric energy data, power data etc..It periodically i.e. at regular intervals, for example is 1 minute, 5 minutes, 30 minutes.
S12: comparing step the data record is compared with upper data record, if comparison result is not Unanimously, then corresponding timestamp correspondence is deposited when storing the data record into data queue, while the data record being generated It stores up in the data queue;Conversely, then abandoning the data record;
In step s 12, by string comparison method or other data comparing methods by the data record and upper one Data record is compared.If the comparison results are inconsistent, then by data record storage into data queue.
Preferably, which is stored in fifo fashion in the data queue, guarantees that subsequent transmission is flat to cloud Data on platform upload sequentially in time.
Meanwhile timestamp when also generating the data record stores in data queue in pairs with data record.
Wherein, data queue can be stored using customized database mode.
S13: data upload step, whether detection is normal with the network communication of cloud platform, if communication is normal, by the number It is uploaded in the cloud platform one by one according to the data in queue;Conversely, then being transmitted without data.
In step s 13, communication mode can be wirelessly or non-wirelessly mode.
Preferably, step S11, step S12 and step S13 are carried out with multithreading, to improve data acquisition efficiency.
Preferably, the data in the data queue is successfully uploaded to after the cloud platform, should locally deleting One data, to guarantee the memory space of local data.
Referring to Fig. 2, Fig. 2 is the structural schematic diagram of an Application Example of remote data acquisition method of the present invention.Such as Fig. 2 Shown, this programme was recorded every 1 second one data of generation, and the data value generated is 10 within the 1st second and the 2nd second, in the 3rd, the 4th And the 5th second data value generated is 20, is 2 times according to the number that the principle of comparing needs to record and transmit, record Time is respectively 0:01 time and 0:03 time, and the number of required upload is 2 times, compared to the mode that the fixed cycle uploads need into 5 data of row upload, and save 60% network flow.
When equipment is in the case where the 0:01 time is initially located in off-line state, fifo queue will increase above-mentioned two datas record, net After network restores, the data of fifo queue are uploaded one by one, the data compared to timing storing data can effectively reduce offline cache Data volume, and solve the problems, such as off-line data upload.
Embodiment two:
Referring to Fig. 3, Fig. 3 is the structural schematic diagram of an embodiment of teledata acquisition device of the present invention.Such as Fig. 3 institute Show, which includes data generation module 31, data comparing module 32 and data uploading module 33.
Data generation module 31, for being periodically generated data record.
Data comparing module 32, for the data record to be compared with upper data record, if comparison result It is inconsistent, then by data record storage into data queue, and meanwhile corresponding timestamp when data record generation is corresponding It stores in the data queue;Conversely, then abandoning the data record.
Data uploading module 33, it is whether normal for detecting network communication with cloud platform, it, should if communication is normal Data in data queue are uploaded to one by one in the cloud platform;Conversely, then being transmitted without data.
Wherein, data uploading module further includes that data delete unit 331, and data are deleted unit 331 and are used in the data team A data in column is successfully uploaded to after the cloud platform, locally a data is being deleted, to guarantee local data Memory space.
Data generation module 31, the working method of data comparing module 32 and data uploading module 33 and process are the same as implementation The method of example one, details are not described herein.
Embodiment three:
The present invention also provides a kind of remote data acquisition equipment, which includes: at least one processing Device;And the memory being connect at least one processor communication;Wherein, the memory be stored with can by this at least one Processor execute instruction, the instruction by least one processor execute so that at least one processor be able to carry out as Method described in embodiment one.
Example IV:
The present invention also provides a kind of computer readable storage medium, which has computer can It executes instruction, the method which is used to that computer to be made to execute as described in embodiment one.
It is to be illustrated to preferable implementation of the invention, but the invention is not limited to the implementation above Example, those skilled in the art can also make various equivalent variations on the premise of without prejudice to spirit of the invention or replace It changes, these equivalent deformations or replacement are all included in the scope defined by the claims of the present application.

Claims (10)

1. a kind of remote data acquisition method characterized by comprising
Data generation step is periodically generated data record;
The data record is compared comparing step with upper data record, and if the comparison results are inconsistent, then By data record storage into data queue, while corresponding timestamp corresponding store when data record generation being arrived In the data queue;Conversely, then abandoning the data record;
Data upload step, whether detection is normal with the network communication of cloud platform, if communication is normal, by the data queue In data uploaded in the cloud platform one by one;Conversely, then being transmitted without data.
2. collecting method according to claim 1, which is characterized in that, will be described in the comparing step Data record is stored in the data queue in a manner of FIFO (first in first out).
3. collecting method according to claim 1, which is characterized in that the data generation step, comparing step The rapid and described data upload step is carried out with multithreading.
4. according to claim 1 to collecting method described in 3 any one, which is characterized in that the data upload step Later further include:
A data in the data queue is successfully uploaded to after the cloud platform, and a number is locally being deleted According to.
5. a kind of teledata acquisition device characterized by comprising
Data generation module, for being periodically generated data record;
Data comparing module, for the data record to be compared with upper data record, if comparison result is different It causes, then by data record storage into data queue, and meanwhile corresponding timestamp when data record generation is corresponding It stores in the data queue;Conversely, then abandoning the data record;
Data uploading module, it is whether normal for detecting network communication with cloud platform, if communication is normal, by the data Data in queue are uploaded to one by one in the cloud platform;Conversely, then being transmitted without data.
6. data acquisition device according to claim 5, which is characterized in that the data comparing module is also used to will be described Data record is stored in fifo fashion in the data queue.
7. data acquisition device according to claim 5, which is characterized in that the data generation module, data ratio Module and the data uploading module are run with multithreading.
8. according to data acquisition device described in claim 5 to 7 any one, which is characterized in that the data uploading module Further include:
Data delete unit, and the data delete a data of the unit in the data queue and successfully uploaded to institute After stating cloud platform, a data is locally being deleted.
9. a kind of remote data acquisition equipment characterized by comprising
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one It manages device to execute, so that at least one described processor is able to carry out such as the described in any item methods of Claims 1-4.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer can It executes instruction, the computer executable instructions are for making computer execute such as the described in any item methods of Claims 1-4.
CN201910125598.XA 2019-02-20 2019-02-20 Remote data acquisition method, apparatus, equipment and storage medium Pending CN109819044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910125598.XA CN109819044A (en) 2019-02-20 2019-02-20 Remote data acquisition method, apparatus, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910125598.XA CN109819044A (en) 2019-02-20 2019-02-20 Remote data acquisition method, apparatus, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109819044A true CN109819044A (en) 2019-05-28

Family

ID=66606954

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910125598.XA Pending CN109819044A (en) 2019-02-20 2019-02-20 Remote data acquisition method, apparatus, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109819044A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069166A (en) * 2020-07-09 2020-12-11 浙江南都电源动力股份有限公司 Power station equipment data acquisition method and system
CN113098958A (en) * 2021-03-31 2021-07-09 广东博力威科技股份有限公司 Electric vehicle operation data recording method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125252A (en) * 2013-04-27 2014-10-29 博雅网络游戏开发(深圳)有限公司 Data storage system and method
CN105227671A (en) * 2015-10-16 2016-01-06 北京恒华伟业科技股份有限公司 Off-line data caching method and system
CN106549864A (en) * 2016-12-06 2017-03-29 上海电器科学研究院 A kind of cloud gateway and its communication means
CN107608865A (en) * 2017-07-31 2018-01-19 珠海格力电器股份有限公司 Date storage method and device
US20180188037A1 (en) * 2016-12-30 2018-07-05 DeepMap Inc. Occupancy Map Updates Based on Sensor Data Collected by Autonomous Vehicles
CN108881380A (en) * 2018-05-04 2018-11-23 青岛海尔空调电子有限公司 data transmission system and method based on cloud service

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125252A (en) * 2013-04-27 2014-10-29 博雅网络游戏开发(深圳)有限公司 Data storage system and method
CN105227671A (en) * 2015-10-16 2016-01-06 北京恒华伟业科技股份有限公司 Off-line data caching method and system
CN106549864A (en) * 2016-12-06 2017-03-29 上海电器科学研究院 A kind of cloud gateway and its communication means
US20180188037A1 (en) * 2016-12-30 2018-07-05 DeepMap Inc. Occupancy Map Updates Based on Sensor Data Collected by Autonomous Vehicles
CN107608865A (en) * 2017-07-31 2018-01-19 珠海格力电器股份有限公司 Date storage method and device
CN108881380A (en) * 2018-05-04 2018-11-23 青岛海尔空调电子有限公司 data transmission system and method based on cloud service

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069166A (en) * 2020-07-09 2020-12-11 浙江南都电源动力股份有限公司 Power station equipment data acquisition method and system
CN113098958A (en) * 2021-03-31 2021-07-09 广东博力威科技股份有限公司 Electric vehicle operation data recording method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111177095B (en) Log analysis method, device, computer equipment and storage medium
CN105912703A (en) Data storage method and data query method and device
CN105069703B (en) A kind of electrical network mass data management method
CN109819044A (en) Remote data acquisition method, apparatus, equipment and storage medium
CN107818120A (en) Data processing method and device based on big data
CN103517405B (en) A kind of method and system of network positions, mobile terminal and network side equipment
CN111142049B (en) Intelligent transformer fault diagnosis method based on edge cloud cooperation mechanism
CN107807860B (en) Power failure analysis method and system based on matrix decomposition
CN103702053A (en) Video storage and search method and system as well as monitoring system
CN102866942B (en) A kind of software service quality control method based on Bayesian inference and system
CN108153789A (en) A kind of transaction platform data processing method
CN108153793A (en) A kind of original data processing method
CN105450445A (en) High-performance alarm processing system under large capacity packet transmission system and method thereof
CN108551490A (en) A kind of industry flow data coding/decoding system and method
CN114201540A (en) Industrial multi-source data acquisition and storage system
CN105162414A (en) Photovoltaic power station power prediction system based on time sequence database platform
CN103117878A (en) Design method of Nagios-based distribution monitoring system
CN104899249B (en) Reliable index upgrade system and method under a kind of mass data
CN111680027A (en) Method and system for realizing intelligent cloud management based on knowledge drive
CN108090186A (en) A kind of electric power data De-weight method on big data platform
CN116231860A (en) Cloud edge end cooperation-based intelligent power load identification system, method and equipment
CN103744901B (en) The system and device of intelligent substation double-host history data synchronously-storinsystem
CN114510526A (en) Online numerical control exhibition method
CN107463487B (en) Distributed host performance acquisition system and performance acquisition method
CN204790999U (en) Big data acquisition of industry and processing 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190528

RJ01 Rejection of invention patent application after publication