CN102591687A - Application system of switching and metering protocol for meter reading terminal and method - Google Patents
Application system of switching and metering protocol for meter reading terminal and method Download PDFInfo
- Publication number
- CN102591687A CN102591687A CN2011104544468A CN201110454446A CN102591687A CN 102591687 A CN102591687 A CN 102591687A CN 2011104544468 A CN2011104544468 A CN 2011104544468A CN 201110454446 A CN201110454446 A CN 201110454446A CN 102591687 A CN102591687 A CN 102591687A
- Authority
- CN
- China
- Prior art keywords
- meter reading
- analysis program
- protocol
- reading terminal
- meter
- 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
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
技术领域 technical field
本发明涉及一种程序更新的应用系统以及方法,尤其是一种抄表终端切换表计规约的应用系统以及方法。 The invention relates to an application system and method for program updating, in particular to an application system and method for meter reading terminals to switch meter protocols.
背景技术 Background technique
随着信息化管理水平的提高以及数据传输的高速发展,我国供电系统、供水系统、供热系统以及供气系统的抄表方式都发生了很大的改变,从以前的人工抄表转变成采用手持抄表器抄表,甚至逐渐发展成全自动化的智能远程抄表系统。然而在这个发展过程中,各种表计仪器因地区性差异和表计用途差异,因此订立了各种不同的抄表协议规约,同时,各个表计仪器的生产厂家也会自定义自身的协议规约,而且也会产生用于完善已有规约的新规约,因此,表计仪器中存在各种各样不同的规约。 With the improvement of information management level and the rapid development of data transmission, the meter reading methods of my country's power supply system, water supply system, heating system and gas supply system have undergone great changes, from the previous manual meter reading to the use of Hand-held meter reading devices have even gradually developed into a fully automated intelligent remote meter reading system. However, in this development process, due to regional differences and differences in meter usage, various meter reading instruments have concluded various meter reading agreements and regulations. At the same time, the manufacturers of each meter instrument will also customize their own protocols. statutes, and will also produce new statutes to improve existing statutes, so there are various different statutes in metering instruments.
由于抄表设备不可能完全满足各种表计规约以及未来新增的表计规约,通常,抄表设备只支持当前需要使用到的表计规约以及经常使用到的表计规约,因此,当需要使用当前抄表设备不支持的规约时,就应该升级抄表设备。当前的抄表设备在升级程序更换规约时,不只是增加或删除某个或几个表计规约,而是将程序中的所有表计规约一起更新,甚至整个程序更新。而且,随着抄表设备支持的规约数越多,升级文件就越大,而相应的升级时间也相对延长。另外,由于现场情况不同,表计仪器就有不同,如果使用统一的程序,则不能很好地适应现场情况,而且由于一个程序支持多种规约,包括现场不使用的规约,因此会浪费程序储存的空间。 Because the meter reading device cannot fully meet various meter protocols and new meter protocols in the future, usually, the meter reading device only supports the meter protocol that needs to be used currently and the meter protocol that is frequently used. Therefore, when it is required When using a protocol that is not supported by the current meter reading device, the meter reading device should be upgraded. When the current meter reading equipment upgrades the program and replaces the protocol, it does not just add or delete one or several meter protocols, but updates all the meter protocols in the program together, or even updates the entire program. Moreover, as the number of protocols supported by the meter reading device increases, the upgrade file becomes larger, and the corresponding upgrade time is relatively prolonged. In addition, due to different site conditions, metering instruments are different. If a unified program is used, it cannot be well adapted to site conditions. Moreover, since one program supports multiple protocols, including protocols that are not used on site, program storage will be wasted Space. the
发明内容 Contents of the invention
为了解决上述存在的技术问题是,本发明的目的是提供一种高效率更新以及节省内存存储空间的抄表终端切换表计规约的应用系统。 In order to solve the above-mentioned existing technical problems, the object of the present invention is to provide an application system for meter reading terminal switching meter protocols with high efficiency updating and saving memory storage space.
本发明的另一个目的是提供一种高效率更新以及节省内存存储空间的抄表终端切换表计规约的应用方法。 Another object of the present invention is to provide an application method of meter reading terminal switching meter protocols with high efficiency updating and saving memory storage space.
本发明采用的技术方案是:一种抄表终端切换表计规约的应用系统,该系统包括抄表终端,所述抄表终端包括: The technical solution adopted by the present invention is: an application system for meter reading terminals to switch meter protocols, the system includes a meter reading terminal, and the meter reading terminal includes:
获取单元,用于获取规约数据; an acquisition unit, configured to acquire specification data;
数据处理单元,用于判断是否存在用于解析规约数据的匹配规约解析程序,若否,发送更新信号,进行ELF文件下载更新,然后发送启动信号;若是,发送启动信号; The data processing unit is used to judge whether there is a matching protocol analysis program for parsing the protocol data, if not, send an update signal, download and update the ELF file, and then send a start signal; if so, send a start signal;
启动加载单元,用于对启动信号进行接收,根据接收的启动信号,启动匹配规约解析程序,采用ELF文件实现动态链接的方式,对匹配规约解析程序进行加载。 The startup loading unit is used to receive the startup signal, start the matching protocol analysis program according to the received startup signal, and load the matching protocol analysis program by using the ELF file to realize the dynamic link.
进一步,所述ELF文件的虚函数接口设置同一个名称。 Further, the same name is set for the virtual function interface of the ELF file.
本发明采用的另一个技术方案是:一种抄表终端切换表计规约的应用方法,该方法步骤包括: Another technical solution adopted by the present invention is: an application method for meter reading terminal switching meter protocol, the method steps comprising:
A、获取规约数据; A. Obtain protocol data;
B、判断是否存在用于解析规约数据的匹配规约解析程序,若否,发送更新信号,进行ELF文件下载更新,然后发送启动信号;若是,发送启动信号; B, judge whether there is a matching protocol analysis program for parsing the protocol data, if not, send an update signal, carry out ELF file download update, then send a start signal; if so, send a start signal;
C、对启动信号进行接收,根据接收的启动信号,启动匹配规约解析程序,采用ELF文件方式实现动态链接的方式,对匹配规约解析程序进行加载。 C. Receive the start signal, start the matching protocol analysis program according to the received start signal, and load the matching protocol analysis program by using the ELF file to realize dynamic linking.
进一步,所述步骤C中采用ELF文件方式实现动态链接的方式,对匹配规约解析程序进行加载,具体为,首先对ELF文件进行函数以及变量重定位,然后根据已重定位的函数和变量的位置进行动态链接并加载重定位后的匹配规约解析程序。 Further, in the step C, the ELF file is used to realize the dynamic link, and the matching protocol analysis program is loaded, specifically, firstly, the ELF file is relocated to the function and the variable, and then according to the position of the relocated function and the variable Perform dynamic linking and load the relocated matching protocol parser.
进一步,所述ELF文件的虚函数接口设置同一个名称。 Further, the same name is set for the virtual function interface of the ELF file.
本发明的有益效果是:本发明的应用系统灵活性强,能够有效直接针对现场某款型号的表计设备,而且由于抄表终端升级时只需要更新ELF文件,因此,升级简单,省时省力省成本,另外,采用ELF文件实现动态链接的方式对程序进行加载,这样能够节省内存储存程序的空间。 The beneficial effects of the present invention are: the application system of the present invention has strong flexibility, and can effectively and directly target a certain type of meter equipment on site, and because only the ELF file needs to be updated when the meter reading terminal is upgraded, the upgrade is simple, time-saving and labor-saving Cost saving. In addition, the ELF file is used to realize dynamic linking to load the program, which can save the memory space for storing the program.
本发明的另一个有益效果是:本发明的应用方法灵活性强,能够有效直接针对现场某款型号的表计设备,而且由于抄表终端升级时只需要更新ELF文件,因此,升级简单,省时省力省成本,另外,采用ELF文件实现动态链接的方式对程序进行加载,这样能够节省内存储存程序的空间。 Another beneficial effect of the present invention is: the application method of the present invention has strong flexibility and can effectively directly target a certain type of meter equipment on site, and because only the ELF file needs to be updated when the meter reading terminal is upgraded, the upgrade is simple and saves time. It saves time, labor and cost. In addition, the program is loaded by using ELF files to realize dynamic linking, which can save the memory space for storing programs.
附图说明 Description of drawings
下面结合附图对本发明的具体实施方式作进一步说明: The specific embodiment of the present invention will be further described below in conjunction with accompanying drawing:
图1是本发明一种抄表终端切换表计规约的应用系统的系统框图; Fig. 1 is the system block diagram of the application system of a kind of meter reading terminal switching meter agreement of the present invention;
图2是本发明一种抄表终端切换表计规约的应用方法的步骤流程图。 Fig. 2 is a flow chart of steps of an application method of meter reading terminal switching meter protocol in the present invention.
具体实施方式 Detailed ways
由图1所示,一种抄表终端切换表计规约的应用系统,该系统包括抄表终端,所述抄表终端包括: As shown in Figure 1, an application system for meter reading terminals to switch meter protocols, the system includes a meter reading terminal, and the meter reading terminal includes:
获取单元,用于获取规约数据; an acquisition unit, configured to acquire specification data;
数据处理单元,用于判断是否存在用于解析规约数据的匹配规约解析程序,若否,发送更新信号,进行ELF文件下载更新,然后发送启动信号;若是,发送启动信号; The data processing unit is used to judge whether there is a matching protocol analysis program for parsing the protocol data, if not, send an update signal, download and update the ELF file, and then send a start signal; if so, send a start signal;
启动加载单元,用于对启动信号进行接收,根据接收的启动信号,启动匹配规约解析程序,采用ELF文件实现动态链接的方式,对匹配规约解析程序进行加载。 The startup loading unit is used to receive the startup signal, start the matching protocol analysis program according to the received startup signal, and load the matching protocol analysis program by using the ELF file to realize the dynamic link.
进一步作为优选的实施方式,所述ELF文件的虚函数接口设置同一个名称。所述ELF文件存储在硬盘中。 Further as a preferred implementation manner, the virtual function interface of the ELF file is set with the same name. The ELF file is stored in the hard disk.
由图2所示,一种抄表终端切换表计规约的应用方法,该方法步骤包括: As shown in Fig. 2, a kind of application method of meter reading terminal switching meter protocol, the method steps include:
A、获取规约数据; A. Obtain protocol data;
B、判断是否存在用于解析规约数据的匹配规约解析程序,若否,发送更新信号,进行ELF文件下载更新,然后发送启动信号;若是,发送启动信号; B, judge whether there is a matching protocol analysis program for parsing the protocol data, if not, send an update signal, carry out ELF file download update, then send a start signal; if so, send a start signal;
C、对启动信号进行接收,根据接收的启动信号,启动匹配规约解析程序,采用ELF文件方式实现动态链接的方式,对匹配规约解析程序进行加载。 C. Receive the start signal, start the matching protocol analysis program according to the received start signal, and load the matching protocol analysis program by using the ELF file to realize dynamic linking.
进一步作为优选的实施方式,所述步骤C中采用ELF文件方式实现动态链接的方式,对匹配规约解析程序进行加载,具体为,首先对ELF文件进行函数以及变量重定位,然后根据已重定位的函数和变量的位置进行动态链接并加载重定位后的匹配规约解析程序。 Further as a preferred embodiment, in the step C, the ELF file mode is adopted to realize dynamic linking, and the matching protocol parsing program is loaded, specifically, at first the ELF file is carried out to function and variable relocation, and then according to the relocated Dynamically link the positions of functions and variables and load the relocated matching protocol parser.
进一步作为优选实施方式,所述ELF文件的虚函数接口设置同一个名称。所述ELF文件存储在硬盘中。 Further as a preferred implementation manner, the virtual function interface of the ELF file is set with the same name. The ELF file is stored in the hard disk.
ELF文件加载过程如下: The ELF file loading process is as follows:
(1)内核首先读取ELF文件头部,再读取各种数据结构,从这些数据结构中可知各段或节的地址以及标识,然后找到可加载的匹配规约解析程序内容并将其加载到内存中。同时读取段标志,以标识该段在内存中是否可读、可写或是可执行的。其中,文本段是程序代码,其只读且可执行,而数据段是可读且可写的。 (1) The kernel first reads the header of the ELF file, and then reads various data structures. From these data structures, the address and identification of each segment or section can be known, and then find the loadable content of the matching protocol parser and load it into in memory. At the same time, the segment flag is read to identify whether the segment is readable, writable, or executable in memory. Wherein, the text segment is program code, which is read-only and executable, and the data segment is readable and writable.
(2)从PT_INTERP的段中找到所对应的动态链接器名称,并加载动态链接器。通常是/lib/ld-linux.so.2。 (2) Find the corresponding dynamic linker name from the PT_INTERP segment, and load the dynamic linker. Usually /lib/ld-linux.so.2.
(3)内核把新进程的堆栈中设置一些标记对,以指示动态链接器的相关操作。 (3) The kernel sets some flag pairs in the stack of the new process to indicate the relevant operations of the dynamic linker.
(4)内核把控制权传递给动态链接器。 (4) The kernel passes control to the dynamic linker.
(5)动态链接器检查程序对共享库的依赖性,并对其进行加载。 (5) The dynamic linker checks the program's dependencies on the shared library and loads it.
(6)程序开始执行。 (6) The program starts to execute.
以上是对本发明的较佳实施进行了具体说明,但本发明创造并不限于所述实施例,熟悉本领域的技术人员在不违背本发明精神的前提下还可做作出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。 The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the described embodiments, and those skilled in the art can also make various equivalent deformations or replacements without violating the spirit of the present invention. , these equivalent modifications or replacements are all within the scope defined by the claims of the present application.
Claims (5)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2011104544468A CN102591687A (en) | 2011-12-30 | 2011-12-30 | Application system of switching and metering protocol for meter reading terminal and method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN2011104544468A CN102591687A (en) | 2011-12-30 | 2011-12-30 | Application system of switching and metering protocol for meter reading terminal and method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN102591687A true CN102591687A (en) | 2012-07-18 |
Family
ID=46480399
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN2011104544468A Pending CN102591687A (en) | 2011-12-30 | 2011-12-30 | Application system of switching and metering protocol for meter reading terminal and method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN102591687A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106681967A (en) * | 2016-12-13 | 2017-05-17 | 南京林洋电力科技有限公司 | Meter changing operation method based on data backtracking mechanism |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101441566A (en) * | 2008-11-18 | 2009-05-27 | 腾讯科技(深圳)有限公司 | Embedded type platform and method for dynamically linking program on the same |
| CN101562600A (en) * | 2008-04-18 | 2009-10-21 | 东莞市腾华电子技术有限公司 | Electric power automation communication protocol self-adaption method based on feature codes |
| CN101697131A (en) * | 2009-11-04 | 2010-04-21 | 中兴通讯股份有限公司 | Method and device for dynamically loading relocatable file |
-
2011
- 2011-12-30 CN CN2011104544468A patent/CN102591687A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101562600A (en) * | 2008-04-18 | 2009-10-21 | 东莞市腾华电子技术有限公司 | Electric power automation communication protocol self-adaption method based on feature codes |
| CN101441566A (en) * | 2008-11-18 | 2009-05-27 | 腾讯科技(深圳)有限公司 | Embedded type platform and method for dynamically linking program on the same |
| CN101697131A (en) * | 2009-11-04 | 2010-04-21 | 中兴通讯股份有限公司 | Method and device for dynamically loading relocatable file |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106681967A (en) * | 2016-12-13 | 2017-05-17 | 南京林洋电力科技有限公司 | Meter changing operation method based on data backtracking mechanism |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8032865B2 (en) | System and method for field diagnosis of wireless communications device system software | |
| CN100378661C (en) | Systems and methods for bi-directional communication and execution of dynamic instruction sets | |
| CN102426531B (en) | A kind of intelligent terminal, application program update system and update method thereof | |
| JP5838527B2 (en) | Method, apparatus and communication device for updating firmware | |
| CN106293849B (en) | application updating method and terminal | |
| US20030023964A1 (en) | System and method for compacting field upgradeable wireless communication device software code sections | |
| KR101541112B1 (en) | FOTA system and the method | |
| WO2020124958A1 (en) | Firmware upgrading method and apparatus, and computer readable storage medium | |
| CN102567053A (en) | Method and device for downgrading software version | |
| CN102541596A (en) | Operating system upgrading method and device | |
| CN107402776A (en) | Bluetooth 4-based method for wirelessly upgrading stm32 singlechip controller firmware of mobile phone | |
| CN104216719A (en) | Method and device for updating android system | |
| WO2021115177A1 (en) | Application installation method and apparatus, terminal device, server and storage medium | |
| CN110389773A (en) | Software release and deployment method, device and system | |
| CN106354536A (en) | Method and device of loading ELF file of Linux system in Windows system | |
| CN108762761A (en) | Generation method, device, server and the storage medium of target channel packet | |
| CN109885332A (en) | Image quality chip software upgrade method, device, display device and storage medium | |
| CN104216390B (en) | Device and method for calibrating electronic control units of automobiles on basis of CCP [CAN (controller area network) calibration protocol] | |
| CN110851151B (en) | Method, device, terminal, server and storage medium for preinstalling applications | |
| CN109710287A (en) | A kind of hot update method, device and computer storage medium | |
| CN114675860A (en) | Software upgrade method, server, processor and communication system | |
| CN112015452B (en) | Firmware upgrading method and device for gate system and gate system | |
| CN104267993A (en) | Software updating method, device and mobile terminal | |
| CN103336699A (en) | Upgrade method and device for embedded system software | |
| CN105468420B (en) | operating system upgrading method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C53 | Correction of patent of invention or patent application | ||
| CB02 | Change of applicant information |
Address after: A street in Guangdong city of Guangzhou province Panyu District 511495 cliff Street Xinghong Applicant after: GUANGDONG ZHONGYU TECHNOLOGY CO., LTD. Address before: A street in Guangdong city of Guangzhou province Panyu District 511495 cliff Street Xinghong Applicant before: Zhongyu Science & Technology Co., Ltd., Guangdong |
|
| COR | Change of bibliographic data |
Free format text: CORRECT: APPLICANT; FROM: ZHONGYU SCIENCE + TECHNOLOGY CO., LTD., GUANGDONG TO: GUANGDONG ZHONGYU TECHNOLOGY CO., LTD. |
|
| C12 | Rejection of a patent application after its publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20120718 |