CN110708379A - Data acquisition method, concentrator, data acquisition system and readable storage medium - Google Patents
Data acquisition method, concentrator, data acquisition system and readable storage medium Download PDFInfo
- Publication number
- CN110708379A CN110708379A CN201910952002.3A CN201910952002A CN110708379A CN 110708379 A CN110708379 A CN 110708379A CN 201910952002 A CN201910952002 A CN 201910952002A CN 110708379 A CN110708379 A CN 110708379A
- Authority
- CN
- China
- Prior art keywords
- concentrator
- application program
- data
- master station
- current application
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000003860 storage Methods 0.000 title claims abstract description 31
- 238000004891 communication Methods 0.000 claims description 83
- 238000004590 computer program Methods 0.000 claims description 6
- 238000012545 processing Methods 0.000 description 26
- 230000006870 function Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 7
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 5
- 230000005611 electricity Effects 0.000 description 4
- 230000003993 interaction Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000013480 data collection Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L67/025—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
-
- G—PHYSICS
- G08—SIGNALLING
- G08C—TRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
- G08C19/00—Electric signal transmission systems
-
- 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/14—Session management
- H04L67/141—Setup of application sessions
-
- 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/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
本申请提供一种数据获取方法、集中器、数据获取系统及可读存储介质,涉及数据采集技术领域。该方法包括:从与集中器通信连接的主站设备获取当前应用程序,当前应用程序用于驱动集中器采集指定数据;运行当前应用程序,以通过当前应用程序获取指定数据。在本方案中,集中器运行时,从主站设备获取应用程序,有助于集中器直接从主站设备获取到更新后的应用程序,改善集中器更新应用程序的效率低的问题。
The present application provides a data acquisition method, a concentrator, a data acquisition system and a readable storage medium, and relates to the technical field of data acquisition. The method includes: obtaining a current application program from a master station device communicatively connected to the concentrator, where the current application program is used to drive the concentrator to collect specified data; and running the current application program to obtain the specified data through the current application program. In this solution, when the concentrator is running, it obtains the application program from the master station device, which helps the concentrator to directly obtain the updated application program from the master station device, and improves the problem of low efficiency of the concentrator in updating the application program.
Description
技术领域technical field
本发明涉及数据采集技术领域,具体而言,涉及一种数据获取方法、集中器、数据获取系统及可读存储介质。The invention relates to the technical field of data acquisition, and in particular, to a data acquisition method, a concentrator, a data acquisition system and a readable storage medium.
背景技术Background technique
在集中器抄表领域中,集中器可以通过运行自身存储的应用程序来采集表箱(比如电表、电子水表、电子燃气表等)的数据,实现集中抄表。目前,当需要对集中器的应用程序进行更新时(比如应用程序存在漏洞或需要更新应用程序的功能),需要管理人员以人工的方式逐个对集中器的应用程序进行更新,由于集中器的数量多,且位置离散,使得集中器的应用程序更新的效率低。In the field of meter reading of concentrators, the concentrator can collect data from meter boxes (such as electricity meters, electronic water meters, electronic gas meters, etc.) by running its own stored application program to realize centralized meter reading. At present, when the application of the concentrator needs to be updated (for example, the application has loopholes or the function of the application needs to be updated), the administrator needs to manually update the application of the concentrator one by one, due to the number of concentrators. And the location is discrete, which makes the update efficiency of the application program of the concentrator low.
发明内容SUMMARY OF THE INVENTION
本申请提供一种数据获取方法、集中器、数据获取系统及可读存储介质,能够改善集中器更新应用程序的效率低的问题。The present application provides a data acquisition method, a concentrator, a data acquisition system and a readable storage medium, which can improve the problem of low efficiency in updating an application program by the concentrator.
为了实现上述目的,本申请实施例所提供的技术方案如下所示:In order to achieve the above purpose, the technical solutions provided by the embodiments of the present application are as follows:
第一方面,本申请实施例提供一种数据获取方法,应用于集中器,所述方法包括:从与所述集中器通信连接的主站设备获取当前应用程序,所述当前应用程序用于驱动所述集中器采集指定数据;运行所述当前应用程序,以通过所述当前应用程序获取指定数据。In a first aspect, an embodiment of the present application provides a data acquisition method, which is applied to a concentrator, the method comprising: acquiring a current application program from a master station device communicatively connected to the concentrator, where the current application program is used to drive The concentrator collects specified data; runs the current application program to obtain the specified data through the current application program.
在上述的实施方式中,集中器运行时,从主站设备获取应用程序,有助于集中器直接从主站设备获取到更新后的应用程序,改善集中器更新应用程序的效率低的问题。In the above-mentioned embodiment, when the concentrator is running, the application program is obtained from the main station device, which helps the concentrator to directly obtain the updated application program from the main station device, and improves the problem of low efficiency in updating the application program by the concentrator.
结合第一方面,在一些可选的实施方式中,从与所述集中器通信连接的主站设备获取当前应用程序,包括:在所述集中器上电时,识别出与所述集中器连接的第一通信模块的指定虚拟网口;以客户端模式通过所述指定虚拟网口与所述主站设备建立所述通信连接;从所述主站设备获取所述当前应用程序。With reference to the first aspect, in some optional implementation manners, acquiring the current application program from a master station device communicatively connected to the concentrator includes: when the concentrator is powered on, identifying that the concentrator is connected to the concentrator The designated virtual network port of the first communication module; establish the communication connection with the main station device through the designated virtual network port in client mode; obtain the current application program from the main station device.
在上述的实施方式中,通过建立的通信连接以从主站设备获取应用程序,当集中器应用程序需要升级时,可以通过替换主站设备中的应用程序来实现集中器的应用程序的更新,从而有助于简化集中器程序更新的操作步骤。In the above-mentioned embodiment, through the established communication connection to obtain the application program from the master station device, when the concentrator application program needs to be upgraded, the update of the application program of the concentrator can be realized by replacing the application program in the master station device, This helps to simplify the operation steps for updating the concentrator program.
结合第一方面,在一些可选的实施方式中,所述方法还包括:每隔预设时长将所述预设时长内获取的指定数据发送至所述主站设备,或者在获取的所述指定数据的总数据容量大于或等于指定阈值时,将所述指定数据发送至所述主站设备。With reference to the first aspect, in some optional implementation manners, the method further includes: sending the specified data acquired within the preset period to the master station device every preset period, or when the acquired When the total data capacity of the designated data is greater than or equal to the designated threshold, the designated data is sent to the master station device.
在上述的实施方式中,在满足预设时长或指定阈值的条件时,可以自动对所采集的数据进行发送,有助于降低发送数据的频率。In the above-mentioned embodiments, the collected data can be automatically sent when the preset duration or the specified threshold condition is satisfied, which helps to reduce the frequency of sending data.
结合第一方面,在一些可选的实施方式中,在从与所述集中器通信连接的主站设备获取当前应用程序之前,所述方法还包括:初始化所述集中器,以删除所述集中器预先存储的应用程序。With reference to the first aspect, in some optional implementation manners, before acquiring the current application program from the master station device communicatively connected to the concentrator, the method further includes: initializing the concentrator to delete the centralized pre-stored applications.
在上述的实施方式中,通过初始化操作,可以删除集中器已有的应用程序,然后用当前应用程序替换已有的应用程序,便于完成应用程序的更新。In the above-mentioned embodiment, through the initialization operation, the existing application program of the concentrator can be deleted, and then the existing application program can be replaced with the current application program, so as to facilitate the completion of the application program update.
结合第一方面,在一些可选的实施方式中,所述当前应用程序为所述主站设备中版本最新的用于驱动所述集中器采集指定数据的应用程序。With reference to the first aspect, in some optional implementation manners, the current application is an application of the latest version in the master station device and used to drive the concentrator to collect specified data.
在上述的实施方式中,所获取的当前应用程序为最新版本的应用程序,以便于集中器及时使用最新版本的应用程序来采集表箱终端记录的数据。In the above embodiment, the acquired current application program is the latest version of the application program, so that the concentrator can use the latest version of the application program to collect the data recorded by the meter box terminal in time.
第二方面,本申请实施例还提供一种集中器,所述集中器包括第一通信模块及第二通信模块;所述第一通信模块,用于从与所述集中器通信连接的主站设备获取当前应用程序,所述当前应用程序用于驱动所述集中器采集指定数据;在运行所述当前应用程序时,所述当前应用程序用于驱动所述第二通信模块获取所述指定数据。In a second aspect, an embodiment of the present application further provides a concentrator, where the concentrator includes a first communication module and a second communication module; the first communication module is configured to slave a master station communicatively connected to the concentrator The device obtains the current application, which is used to drive the concentrator to collect specified data; when running the current application, the current application is used to drive the second communication module to obtain the specified data .
结合第二方面,在一些可选的实施方式中,所述第一通信模块还用于:每隔预设时长将所述预设时长内获取的指定数据发送至所述主站设备,或者在获取的所述指定数据的总数据容量大于或等于指定阈值时,将所述指定数据发送至所述主站设备。With reference to the second aspect, in some optional implementation manners, the first communication module is further configured to: send the specified data acquired within the preset time period to the master station device every preset time period, or When the acquired total data capacity of the specified data is greater than or equal to a specified threshold, the specified data is sent to the master station device.
结合第二方面,在一些可选的实施方式中,所述集中器的处理器通过USB口与所述第一通信模块连接,和/或,所述处理器通过物理网口与所述第二通信模块连接。With reference to the second aspect, in some optional implementation manners, the processor of the concentrator is connected to the first communication module through a USB port, and/or the processor is connected to the second communication module through a physical network port Communication module connection.
第三方面,本申请实施例还提供一种数据获取系统,包括主站设备及上述的集中器,所述集中器与所述主站设备通信连接。In a third aspect, an embodiment of the present application further provides a data acquisition system, which includes a main station device and the above-mentioned concentrator, where the concentrator is communicatively connected to the main station device.
第四方面,本申请实施例还提供一种计算机可读存储介质,所述可读存储介质中存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行上述的方法。In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the readable storage medium, and when the computer program runs on a computer, the computer is made to execute the above method.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍。应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present application more clearly, the accompanying drawings required in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation of the scope. Other related figures are obtained from these figures.
图1为本申请实施例提供的数据采集系统与表箱终端的连接示意图。FIG. 1 is a schematic diagram of a connection between a data acquisition system and a meter box terminal according to an embodiment of the present application.
图2为本申请实施例提供的集中器的结构示意图。FIG. 2 is a schematic structural diagram of a concentrator provided by an embodiment of the present application.
图3为本申请实施例提供的数据获取方法的流程示意图之一。FIG. 3 is one of the schematic flowcharts of the data acquisition method provided by the embodiment of the present application.
图4为本申请实施例提供的数据获取方法的流程示意图之二。FIG. 4 is the second schematic flowchart of the data acquisition method provided by the embodiment of the present application.
图标:10-数据获取系统;20-集中器;21-第一通信模块;22-第二通信模块;23-处理模块;24-物理网口;25-USB口;30-主站设备;40-表箱终端。Icon: 10-data acquisition system; 20-concentrator; 21-first communication module; 22-second communication module; 23-processing module; 24-physical network port; 25-USB port; 30-master station device; 40 - Table box terminal.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。需要说明的是,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. It should be noted that the terms "first", "second" and the like are only used for distinguishing descriptions, and cannot be understood as indicating or implying relative importance.
请参照图1,本申请实施例提供一种数据获取系统10,可以用于执行或实现下述的数据获取方法,能够对集中器20中的应用程序进行更新。该数据获取系统10可以包括主站设备30及至少一个集中器20。至少一个集中器20通过网络与主站设备30建立通信连接,以进行数据交互。其中,与主站设备30通信连接的集中器20的数量可以为一个也可以为多个,这里不作具体限定。网络可以是,但不限于,有线网络或无线网络。Referring to FIG. 1 , an embodiment of the present application provides a
在本实施例中,集中器20可以与一个或多个表箱终端40建立通信连接,用于从表箱终端40采集表箱终端40记录的数据。表箱终端40可以是但不限于用于采集用电量的电能表、用于采集用水量的电子式水表、用于采集用气量的电子式燃气表。In this embodiment, the
可理解地,表箱终端40可以为数据获取系统10中的其中一种组成设备(数据获取系统10中的其他组成设备可以为集中器20、主站设备30),也可以为独立于数据获取系统10,不属于数据获取系统10的设备。Understandably, the
主站设备30可以是,但不限于个人电脑(Personal Computer,PC)、个人数字助理(Personal Digital Assistant,PDA)、移动上网设备(Mobile Internet Device,MID)、服务器等。The main station device 30 may be, but is not limited to, a personal computer (Personal Computer, PC), a personal digital assistant (Personal Digital Assistant, PDA), a mobile Internet device (Mobile Internet Device, MID), a server, and the like.
请参照图2,本申请实施例还提供一种集中器20。集中器20可以包括第一通信模块21、第二通信模块22、处理模块23,第一通信模块21、第二通信模块22、处理模块23各个元件之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。Referring to FIG. 2 , an embodiment of the present application further provides a
处理模块23可以是一种集成电路芯片,具有信号的处理能力。上述处理模块23可以是通用处理器。例如,该处理器可以是微处理器、中央处理器(Central ProcessingUnit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(DigitalSignal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。The
例如,处理模块23可以为SAM9X25芯片,该芯片具备两路USB口25,两路以太网口(物理网口24),可以满足与第一通信模块21、第二通信模块22的连接。For example, the
第一通信模块21可以是,但不限于4G通信模块、5G通信模块等,用于通过无线网络建立集中器20与主站设备30的通信连接,以进行数据交互。第二通信模块22可以为HPLC(High-SpeedPower line Communication,高速电力载波)模块用于通过网络建立集中器20与表箱终端40的通信连接,并通过网络收发数据。The first communication module 21 may be, but is not limited to, a 4G communication module, a 5G communication module, etc., and is used to establish a communication connection between the
集中器20还可以包括与处理模块23连接的存储模块。可理解地,存储模块可以集成于处理模块23中,使得处理模块23具有存储数据的功能。或者,存储模块为独立于处理模块23的器件。The
存储模块可以是,但不限于,随机存取存储器,只读存储器,可编程只读存储器,可擦除可编程只读存储器,电可擦除可编程只读存储器、Flash(闪存)存储器等。在本实施例中,存储模块可以用于存储从表箱终端40采集的数据。比如,表箱终端40为电能表,存储模块便可以存储集中器20从电能表获取电能表记录的用电量。当然,存储模块还可以用于存储程序,处理模块23在接收到执行指令后,执行该程序。The memory module can be, but is not limited to, random access memory, read only memory, programmable read only memory, erasable programmable read only memory, electrically erasable programmable read only memory, Flash (flash) memory, and the like. In this embodiment, the storage module may be used to store the data collected from the
在本实施例中,集中器20的存储模块中可以存储有固化程序。第一通信模块21可以通过USB口25与处理模块23连接。例如,4G通信模块可以通过USB口25与微处理器连接,通过固化程序,可以通过4G通信模块建立集中器20与主站设备30的通信连接。当连接成功后,集中器20可以通过NFS(Network File System,网络文件系统)通信协议,从主站设备30的固定路径下获取应用程序,然后运行该应用程序。In this embodiment, a firmware program may be stored in the storage module of the
由于处理模块23与第一通信模块21通过USB口25实现信号连接,因此,相比于物理串口的连接方式,通过USB口25实现处理模块23与第一通信模块21的连接(即,建立USB高速数据通道),能够增大处理模块23与第一通信模块21之间传输数据的最大带宽,从而有助于提高集中器20与主站设备30之间数据传输的网速。集中器20在从主站设备30获取应用程序时,便能快速实现应用程序的下载。Since the signal connection between the
第二通信模块22(比如HPLC模块)可以通过物理网口24与处理模块23连接,当第二通信模块22运行时,集中器20运行在服务端模式,第二通信模块22运行在客户端模式,第二通信模块22可以主动与集中器20建立Socket(套接字)连接,使用TCP/IP(TransmissionControl Protocol/Internet Protocol,传输控制协议/互联网协议)协议通信。The second communication module 22 (such as the HPLC module) can be connected to the
当集中器20上电后,第一通信模(比如4G通信模块)块开始运行。在第一通信模块21运行时,集中器20可以自动识别出USB口25下的虚拟网口(比如CDC_ECM虚拟网口),然后集中器20以客户端模式与主站设备30建立socket连接,使用TCP/IP协议进行通信。When the
由于第二通信模块22通过物理网口24与处理模块23连接,相比于物理串口,物理网口24的连接方式能够增大处理模块23与第二通信模块22之间传输数据的最大带宽,从而有助于提高集中器20与表箱终端40之间数据传输的网速。Since the
可理解地,HPLC模块应用层的通信速率可达到3Mbit/s,4G通信模块的通信速率可以达到13Mbps。申请人发现,现有的物理串口通信速率只有115200bps≈112.5Kbit/s,因此,物理串口的连接方式会成为提升集中器20速率的瓶颈,限制了集中器20与主站设备30及表箱终端40的整体通信速率。本申请中,通过采用物理网口24及USB口25,便能够改善集中器20与主站设备30及表箱终端40的整体通信速率。Understandably, the communication rate of the application layer of the HPLC module can reach 3Mbit/s, and the communication rate of the 4G communication module can reach 13Mbps. The applicant found that the communication rate of the existing physical serial port is only 115200bps≈112.5Kbit/s. Therefore, the connection method of the physical serial port will become a bottleneck for improving the rate of the
可以理解的是,图2所示的结构仅为集中器20的一种结构示意图,集中器20还可以包括比图2所示更多或更少的组件。图2中所示的各组件可以采用硬件、软件或其组合实现。It can be understood that the structure shown in FIG. 2 is only a schematic structural diagram of the
请参照图3,本申请实施例还挺一种数据获取方法,该数据获取方法可以应用于上述的集中器20,可以由集中器20执行或实现方法的各个步骤。在本实施例中,数据获取方法可以包括以下步骤:Referring to FIG. 3 , an embodiment of the present application provides a data acquisition method, which can be applied to the above-mentioned
步骤S120,从与所述集中器20通信连接的主站设备30获取当前应用程序,所述当前应用程序用于驱动所述集中器20采集指定数据;Step S120, obtaining a current application program from the main station device 30 communicatively connected to the
步骤S130,运行所述当前应用程序,以通过所述当前应用程序获取指定数据。Step S130, running the current application program to acquire specified data through the current application program.
在上述的实施方式中,集中器20运行时,从主站设备30获取应用程序,有助于集中器20直接从主站设备30获取到更新后的应用程序,改善集中器20的应用程序更新的效率低的问题。In the above-mentioned embodiment, when the
下面将对图3中所示的方法的各步骤进行详细阐述:Each step of the method shown in Figure 3 will be described in detail below:
步骤S120,从与所述集中器20通信连接的主站设备30获取当前应用程序,所述当前应用程序用于驱动所述集中器20采集指定数据。Step S120: Acquire a current application program from the master station device 30 that is communicatively connected to the
在本实施例中,主站设备30中所存储的集中器20的应用程序可以为版本最新的应用程序。当然,主站设备30中也可以存储集中器20的其他版本的应用程序。若主站设备30中没有存储有集中器20最新版本的应用程序,则可以由管理人员将最新版本的应用程序录入主站设备30中,以便于主站设备30对各个集中器20的应用程序进行更新。In this embodiment, the application program of the
当集中器20从主站设备30获取应用程序时,主站设备30可以基于集中器20上次使用的应用程序的版本与该主站设备30当前存储的应用程序的版本进行比较。若上次使用的应用程序的版本(可以称为第一版本)等级小于主站设备30当前存储的应用程序的版本(第二版本),则表示第一版本老于第二版本。此时,主站设备30可以将第二版本的应用程序发送至集中器20以更新集中器20的应用程序。When the
若第一版本与第二版本的版本相同,主站设备30可以继续将第二版本的应用程序发送至集中器20,以使集中器20获取到应用程序,以便于集中器20通过获取到的应用程序来采集表箱终端40记录的指定数据。其中,指定数据可以根据实际情况进行设定,比如,指定数据包括但不限于电能表的用电量、电子式水表的用水量、电子式燃气表的燃气用量等数据。If the version of the first version is the same as the version of the second version, the master station device 30 can continue to send the application program of the second version to the
可理解地,集中器20所获取的当前应用程序通常为主站设备30中版本最新的用于驱动所述集中器20采集指定数据的应用程序,以便于集中器20及时使用最新版本的应用程序来采集表箱终端40记录的数据。新版本的应用程序通常为修复了旧版本应用程序中的部分漏洞的程序,或者为更新了新功能的程序。因此,基于此,可以改善因旧版本的应用程序的漏洞导致数据采集存在安全风险的问题,或者增加集中器20的功能。其中,新增的功能可以根据更新的应用程序新增的功能而定,该功能可以根据实际情况进行设置(比如变更集中器20上传数据至主站设备30的时长),这里不作具体限定。Understandably, the current application program acquired by the
在本实施例中,步骤S120可以包括:在所述集中器20上电时,识别出与所述集中器20连接的第一通信模块21的指定虚拟网口;以客户端模式通过所述指定虚拟网口与所述主站设备30建立所述通信连接;从所述主站设备30获取所述当前应用程序。In this embodiment, step S120 may include: when the
例如,第一通信模块21为4G通信模块(当然第一通信模块21也可以为其他的用于远程通信的高速通信模块,比如5G通信模块),处理模块23可以识别与4G通信模块连接的指定虚拟网口(该虚拟网口可以根据实际情况进行设定,比如为CDC_ECM虚拟网口,这里不作限定);然后,集中器20以客户端模式通过所述指定虚拟网口与所述主站设备30建立Socket连接。在建立连接后,集中器20可以通过4G通信模块,并利用NFS通信协议,从主站设备30的固定路径下获取集中器20最新版本的应用程序,所获取的应用程序便为集中器20的当前应用程序。For example, the first communication module 21 is a 4G communication module (of course, the first communication module 21 can also be other high-speed communication modules used for long-distance communication, such as a 5G communication module), and the
基于此,当集中器20应用程序需要升级时,可以通过替换主站设备30中的应用程序便可以实现程序的更新,从而有助于简化集中器20程序更新的操作步骤。另外,由于4G通信模块通过USB口25与处理模块23连接,因此,有助于提高集中器20与主站设备30通信的最大网速,从而提高程序更新的效率,缩短应用程序的传输时长。Based on this, when the application program of the
步骤S130,运行所述当前应用程序,以通过所述当前应用程序获取指定数据。Step S130, running the current application program to acquire specified data through the current application program.
在本实施例中,当前应用程序可以根据实际情况进行创建,例如,可以由开发人员根据采集表箱终端40的数据需求而设定。当集中器20获取到当前应用程序后,配合集中器20已有的固件程序,便可以对于集中器20连接的一个或多个表箱终端40记录的数据进行采集,实现数据的集中抄表。In this embodiment, the current application program can be created according to the actual situation, for example, it can be set by the developer according to the data requirements of the terminal 40 of the collection table box. After the
作为一种可选的实施方式,方法还可以包括:每隔预设时长将所述预设时长内获取的指定数据发送至所述主站设备30。As an optional implementation manner, the method may further include: sending the specified data acquired within the preset time period to the master station device 30 every preset time period.
在本实施例中,预设时长(可以称为第一预设时长)可以根据实际情况进行设置,可以为1小时、24小时、一周、一个月等,这里对预设时长不作具体限定。集中器20在采集到数据后,可以将采集到的数据每隔预设时长(比如为1小时、24小时、一周、一个月等时长)将数据发送至主站设备30。在将数据发送至主站设备30后,集中器20可以将缓存中的数据进行删除,以为缓存腾出存储空间,以便于缓存新的从表箱终端40采集的数据。In this embodiment, the preset duration (which may be referred to as the first preset duration) may be set according to actual conditions, and may be 1 hour, 24 hours, one week, one month, etc. The preset duration is not specifically limited here. After the
作为一种可选的实施方式,方法还可以包括:集中器20可以每隔一段时长(该时长可以称为第二预设时长,可以根据实际情况进行设置,比如,可以为24小时,一个月等时长)从表箱终端40采集数据,在采集到数据后,集中器20可以直接将采集的数据发送至终端设备。基于此,集中器20无需设置较大存储容量的存储模块。可理解地,较大容量(比如,大于64MB)的存储模块的硬件成本通常高于小容量(比如小于64MB)的存储模块,基于此,有助于降低集中器20的硬件制作成本。As an optional implementation manner, the method may further include: the
作为一种可选的实施方式,方法还可以包括:在获取的所述指定数据的总数据容量大于或等于指定阈值时,将所述指定数据发送至所述主站设备30。As an optional implementation manner, the method may further include: when the acquired total data capacity of the specified data is greater than or equal to a specified threshold, sending the specified data to the master station device 30 .
在本实施例中,指定阈值可以根据实际情况继续设置,例如可以为100KB,1M等。当集中器20从表箱终端40采集的指定数据的总数据容量大于或等于指定阈值时,集中器20便可以将截止当前所采集的总的指定数据全部发送至主站设备30。In this embodiment, the specified threshold can be continuously set according to the actual situation, for example, it can be 100KB, 1M and so on. When the total data capacity of the designated data collected by the concentrator 20 from the
在将数据发送至主站设备30后,集中器20可以删除本地中的已发送的数据,然后再对从表箱终端40采集的新的数据的容量进行记录,当采集的新的数据的总数据容量大于或等于指定阈值时,可以再次将所采集的所有数据发送至主站设备30,并以此方式循环采集、发送数据,使得集中器20能够持续(或长期)地从表箱终端40采集数据,并将采集的数据发送至主站设备30。After sending the data to the main station device 30, the
作为一种可选的实施方式,方法还可以包括:在预设时长内,判断从表箱终端40采集的指定数据的总数据容量是否大于或等于指定阈值;在该总数据容量大于或等于指定阈值时,将截止当前所获取的指定数据发送至所述主站设备30。此时,集中器20可以重新计时,然后继续对新采集的数据(指定数据)进行检测,若新采集的数据在预设时长内总数据容量大于或等于指定阈值,则将新采集到的数据发送至主站设备30;若在重新计时后的预设时长内,采集的数据的总数据容量小于指定阈值,则在时长为重新计时后的预设时长时,将所采集的指定数据发送至主站设备30,然后再重新计时。As an optional embodiment, the method may further include: within a preset time period, judging whether the total data capacity of the specified data collected from the
当然,在该总数据容量大于或等于指定阈值时,将截止当前所获取的指定数据发送至所述主站设备30之后,集中器20也可以在发送数据的时刻后继续计时(也就是此时不重新计时),然后对新采集的数据(不包括已经发送的数据)继续进行检测;在该预设时长内,若还存在所采集的新的数据的总数据容量大于或等于指定阈值,则继续新采集到的数据发送至主站设备30。当时长为预设时长时,会将预设时长前最后一次向主站设备30发送的数据的时刻(第一时刻)到预设时长这一时刻(第二时刻),期间(第一时刻至第二时刻期间)采集到的指定数据发送至主站设备30。Of course, when the total data capacity is greater than or equal to the specified threshold, after the specified data obtained up to now is sent to the master station device 30, the
请参照图4,在步骤S120之前,方法还可以包括对集中器20进行初始化的步骤。例如,方法在步骤S120之前,还可以包括步骤S110。步骤S110,初始化所述集中器20,以删除所述集中器20预先存储的应用程序。Referring to FIG. 4 , before step S120 , the method may further include a step of initializing the
在本实施例中,集中器20在上电时,通过固件程序,可以对存储模块进行初始化。可理解地,针对集中器20的存储模块中用于存储应用程序的存储区域,在初始化时,无论该存储区域是否存储有应用程序,在初始化的过程中,可以通过固件程序对该存储区域进行数据格式化,以清空该存储区域。当然,若存储区域中没有应用程序,则可以无需初始化操作;或者,在初始化时,无需再对存储区域执行格式化(或清空)的操作。In this embodiment, when the
请再次参照图2,在本申请实施例提供的集中器20中,所述第一通信模块21,用于从与所述集中器20通信连接的主站设备30获取当前应用程序,所述当前应用程序用于驱动所述集中器20采集指定数据。Referring to FIG. 2 again, in the
在运行所述当前应用程序时,所述当前应用程序用于驱动所述第二通信模块22获取所述指定数据。When the current application is running, the current application is used to drive the
第一通信模块21还可以用于:每隔预设时长将所述预设时长内获取的指定数据发送至所述主站设备30;或者,在获取的所述指定数据的总数据容量大于或等于指定阈值时,将所述指定数据发送至所述主站设备30。The first communication module 21 can also be used to: send the specified data acquired within the preset duration to the master station device 30 every preset duration; or, when the total data capacity of the acquired specified data is greater than or When equal to the specified threshold, the specified data is sent to the master station device 30 .
可选地,第二通信模块22在处理模块23的控制下,还可以用于:在所述集中器20上电时,识别出与所述集中器20连接的第一通信模块21的指定虚拟网口;以客户端模式通过所述指定虚拟网口与所述主站设备30建立所述通信连接;从所述主站设备30获取所述当前应用程序。Optionally, under the control of the
可选地,处理模块23还可以用于:初始化所述集中器20,以删除所述集中器20预先存储的应用程序。Optionally, the
需要说明的是,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的集中器20的具体工作过程,可以参考前述方法中的各步骤对应过程,在此不再过多赘述。It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the
本申请实施例还提供一种计算机可读存储介质。可读存储介质中存储有计算机程序,当计算机程序在计算机上运行时,使得计算机执行如上述实施例中所述的数据获取方法。Embodiments of the present application further provide a computer-readable storage medium. A computer program is stored in the readable storage medium, and when the computer program runs on the computer, the computer executes the data acquisition method described in the above-mentioned embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本申请可以通过硬件实现,也可以借助软件加必要的通用硬件平台的方式来实现,基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施场景所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by hardware or by means of software plus a necessary general hardware platform. Based on this understanding, the technical solutions of the present application It can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, U disk, mobile hard disk, etc.), and includes several instructions to make a computer device (which can be It is a personal computer, a server, or a network device, etc.) to execute the methods described in various implementation scenarios of this application.
综上所述,本申请提供一种数据获取方法、集中器、数据获取系统及可读存储介质。该方法包括:从与集中器通信连接的主站设备获取当前应用程序,当前应用程序用于驱动集中器采集指定数据;运行当前应用程序,以通过当前应用程序获取指定数据。在本方案中,集中器运行时,从主站设备获取应用程序,有助于集中器直接从主站设备获取到更新后的应用程序,改善集中器更新应用程序的效率低的问题。In summary, the present application provides a data acquisition method, a concentrator, a data acquisition system and a readable storage medium. The method includes: acquiring a current application program from a master station device communicatively connected to the concentrator, where the current application program is used to drive the concentrator to collect specified data; and running the current application program to obtain the specified data through the current application program. In this solution, when the concentrator is running, it obtains the application program from the master station device, which helps the concentrator to directly obtain the updated application program from the master station device, and improves the problem of low efficiency of the concentrator in updating the application program.
在本申请所提供的实施例中,应该理解到,所揭露的装置、系统和方法,也可以通过其它的方式实现。以上所描述的装置、系统和方法实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本申请的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In the embodiments provided in this application, it should be understood that the disclosed apparatus, system and method may also be implemented in other manners. The apparatus, system and method embodiments described above are merely schematic, for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture of possible implementations of systems, methods and computer program products according to various embodiments of the present application Architecture, functionality and operation. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions. In addition, each functional module in each embodiment of the present application may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only preferred embodiments of the present application, and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910952002.3A CN110708379A (en) | 2019-10-09 | 2019-10-09 | Data acquisition method, concentrator, data acquisition system and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910952002.3A CN110708379A (en) | 2019-10-09 | 2019-10-09 | Data acquisition method, concentrator, data acquisition system and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110708379A true CN110708379A (en) | 2020-01-17 |
Family
ID=69198285
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910952002.3A Pending CN110708379A (en) | 2019-10-09 | 2019-10-09 | Data acquisition method, concentrator, data acquisition system and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110708379A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113965821A (en) * | 2021-09-10 | 2022-01-21 | 江苏方天电力技术有限公司 | Digital district multi-source heterogeneous communication routing system and method |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102194309A (en) * | 2010-07-30 | 2011-09-21 | 北京航空航天大学 | Low-voltage power line broadband carrier concentrator |
CN102376153A (en) * | 2011-11-15 | 2012-03-14 | 深圳市科陆电子科技股份有限公司 | Method for remotely updating carrier sheet and acquirer in concentrated meter reading system |
CN102790805A (en) * | 2012-08-09 | 2012-11-21 | 宁夏隆基宁光仪表有限公司 | Power consumer electricity consumption information acquisition system based on cloud service |
US20130241746A1 (en) * | 2011-08-15 | 2013-09-19 | Digimarc Corporation | A/b/c phase determination and synchrophasor measurement using common electric smart meters and wireless communications |
CN103413426A (en) * | 2013-08-19 | 2013-11-27 | 孙蕾 | Multi-analog-acquisition intelligent power concentrator |
CN105139623A (en) * | 2015-09-29 | 2015-12-09 | 光一科技股份有限公司 | File Compression Remote Upgrading Method Based on Multi-stage Transmission of Collectors Based on Broadband Carrier |
CN108039041A (en) * | 2018-01-30 | 2018-05-15 | 北京博望华科科技有限公司 | A kind of high speed 4G concentrators communication module, power information acquisition system and method |
CN108320483A (en) * | 2018-02-09 | 2018-07-24 | 上海均易信息科技有限公司 | concentrator remote communication module and concentrator |
CN108345460A (en) * | 2017-12-28 | 2018-07-31 | 三维通信股份有限公司 | A kind of method that more equipment synchronize burning Linux firmwares and application program |
-
2019
- 2019-10-09 CN CN201910952002.3A patent/CN110708379A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102194309A (en) * | 2010-07-30 | 2011-09-21 | 北京航空航天大学 | Low-voltage power line broadband carrier concentrator |
US20130241746A1 (en) * | 2011-08-15 | 2013-09-19 | Digimarc Corporation | A/b/c phase determination and synchrophasor measurement using common electric smart meters and wireless communications |
CN102376153A (en) * | 2011-11-15 | 2012-03-14 | 深圳市科陆电子科技股份有限公司 | Method for remotely updating carrier sheet and acquirer in concentrated meter reading system |
CN102790805A (en) * | 2012-08-09 | 2012-11-21 | 宁夏隆基宁光仪表有限公司 | Power consumer electricity consumption information acquisition system based on cloud service |
CN103413426A (en) * | 2013-08-19 | 2013-11-27 | 孙蕾 | Multi-analog-acquisition intelligent power concentrator |
CN105139623A (en) * | 2015-09-29 | 2015-12-09 | 光一科技股份有限公司 | File Compression Remote Upgrading Method Based on Multi-stage Transmission of Collectors Based on Broadband Carrier |
CN108345460A (en) * | 2017-12-28 | 2018-07-31 | 三维通信股份有限公司 | A kind of method that more equipment synchronize burning Linux firmwares and application program |
CN108039041A (en) * | 2018-01-30 | 2018-05-15 | 北京博望华科科技有限公司 | A kind of high speed 4G concentrators communication module, power information acquisition system and method |
CN108320483A (en) * | 2018-02-09 | 2018-07-24 | 上海均易信息科技有限公司 | concentrator remote communication module and concentrator |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113965821A (en) * | 2021-09-10 | 2022-01-21 | 江苏方天电力技术有限公司 | Digital district multi-source heterogeneous communication routing system and method |
CN113965821B (en) * | 2021-09-10 | 2024-01-26 | 江苏方天电力技术有限公司 | Digital district multi-source heterogeneous communication routing system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109688207B (en) | Log transmission method and device and server | |
US10560350B2 (en) | Systems and methods for monitoring globally distributed remote storage devices | |
WO2018076755A1 (en) | Method and apparatus for issuing upgrade package | |
EP3200072A1 (en) | Method for updating terminal system, terminal and system | |
US20170206079A1 (en) | Method and Device for Upgrading Software | |
KR101745456B1 (en) | Ecu for transmitting large data in hil test environment, system including the same and method thereof | |
CN103518191A (en) | Upgrade method, intelligent terminal and upgrade system | |
CN103124275A (en) | Method and device of obtaining files | |
CN103685489A (en) | File transmitting method in wireless network | |
WO2015176468A1 (en) | Method and apparatus for recovering system software of intelligent terminal | |
US8793402B2 (en) | Synchronizing time across a plurality of devices connected to a network | |
CN110708379A (en) | Data acquisition method, concentrator, data acquisition system and readable storage medium | |
CN102724305A (en) | Method for remotely accessing to terminal U (universal serial bus) flash disk | |
CN106470114B (en) | A configuration method and device for an OTA upgrade package | |
CN104701982B (en) | A kind of method for carrying out automatic upgrading to distribution line monitoring terminal | |
WO2016058188A1 (en) | Software upgrading method and apparatus applied to terminal and terminal | |
CN114265601A (en) | Method, apparatus and program product for managing artificial intelligence applications | |
US9501128B2 (en) | Cooperative reduced power mode suspension for high input/output (‘I/O’) workloads | |
CN112130986A (en) | Method for cleaning application memory, server and terminal | |
CN107592340B (en) | Method and apparatus for remotely operating management server | |
CN111143899A (en) | Method and device for storing data, storage medium and electronic device | |
CN102752365A (en) | Method and device for processing information | |
CN102169439A (en) | Data transmission system | |
CN206039494U (en) | A vehicle communication terminal upgrade and debugging system based on WIFI interconnection | |
CN101345925A (en) | Document downloading method and device |
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: 20200117 |
|
RJ01 | Rejection of invention patent application after publication |