CN107203392B - Multi-protocol implementation method of small system terminal product - Google Patents

Multi-protocol implementation method of small system terminal product Download PDF

Info

Publication number
CN107203392B
CN107203392B CN201710211564.3A CN201710211564A CN107203392B CN 107203392 B CN107203392 B CN 107203392B CN 201710211564 A CN201710211564 A CN 201710211564A CN 107203392 B CN107203392 B CN 107203392B
Authority
CN
China
Prior art keywords
terminal
upgrading
application program
area
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710211564.3A
Other languages
Chinese (zh)
Other versions
CN107203392A (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.)
Ningbo Sanxing Electric Co Ltd
Original Assignee
Ningbo Sanxing Electric 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 Ningbo Sanxing Electric Co Ltd filed Critical Ningbo Sanxing Electric Co Ltd
Priority to CN201710211564.3A priority Critical patent/CN107203392B/en
Publication of CN107203392A publication Critical patent/CN107203392A/en
Application granted granted Critical
Publication of CN107203392B publication Critical patent/CN107203392B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44573Execute-in-place [XIP]

Abstract

The invention relates to a multi-protocol implementation method of a small system terminal product, namely storing application programs with different protocols in a flash reserved area of a terminal according to a fixed sequence, and then the terminal performs the following two conditions: (1) when a protocol change command is issued to the terminal by the master station, if the issued protocol type is different from the current operation of the terminal, copying a corresponding backup program in an application program backup area of the terminal flash to an upgrading exchange area of the terminal; (2) when the master station sends an application program upgrading command to the terminal, the terminal receives an upgrading file and puts the upgrading file into an upgrading exchange area to start program upgrading; the master station can realize terminal multi-protocol switching by issuing a protocol change command to the terminal, and can also realize terminal multi-protocol switching by issuing a program upgrade command to the terminal to upgrade the program, so that the condition that a hardware platform of the acquisition terminal is upgraded is avoided.

Description

Multi-protocol implementation method of small system terminal product
Technical Field
The invention relates to the technical field of power utilization information acquisition systems, in particular to a multi-protocol implementation method of a small system terminal product.
Background
Regarding the electricity information acquisition system of the new standard power user of the network in China, the network in 2009 issues 376 and 2009 series acquisition system enterprise standards, the network in 2013 issues 1376 and 2013 series acquisition system enterprise standards, the network in 2016 issues a D L/T698-45 protocol, the Fujian issues the Fujian supplement specification (the specification is raised to the group standard, and more provinces and companies are used in the later period), some provinces and provinces propose immediately, and require the user terminal to realize the support of multiple protocols, so that the protocols can be switched according to the field requirements, along with the popularization of the new protocols, the terminal product supporting multiple protocols will be a future development trend.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a multi-protocol implementation method of a small-system terminal product, which can meet multi-protocol switching and does not need to upgrade a hardware platform of an acquisition terminal.
The technical scheme adopted by the invention is that the multi-protocol implementation method of the small system terminal product is characterized in that the terminal is firstly set, namely, application programs with different protocol types are stored in a flash reserved area of the terminal according to a fixed sequence, numbering management is carried out by using a dictionary type mode, and then the terminal is carried out according to the following two conditions:
(1) when the master station issues a protocol change command to the terminal, the steps are as follows:
firstly, a protocol change command is issued to a terminal by a main station, the terminal judges whether the protocol type issued by the main station is the same as the current running protocol type of the terminal after receiving the change command, if the protocol type issued by the main station is different from the current running protocol type of the terminal, the terminal determines the internal number of an application program corresponding to the flash in the flash according to the protocol type issued by the main station, stores the internal number, and then sends a confirmation response to the main station, at the moment, the terminal stores the current communication parameter backup in a parameter backup area, and copies the corresponding backup program in the application program backup area of the flash of the terminal to an upgrading exchange area of the terminal according to the determined internal number of the application program;
secondly, the upgrade switching area receives the copied backup program, after the backup program is received, the terminal resets and restarts, arranges or initializes the parameter area and the data area according to the requirement, reads and sets the communication parameters of the parameter backup area, and logs in the master station to complete the switching of the terminal protocols;
(2) when the master station issues an application program upgrading command to the terminal, the steps are as follows:
firstly, a master station issues an application program upgrading command to a terminal, the terminal receives the upgrading command and prepares for upgrading, meanwhile, the master station sends an upgrading file to the terminal, the terminal receives the upgrading file and places the upgrading file in an upgrading exchange area, after receiving, the terminal automatically backs up and stores current communication parameters in a parameter backup area, then resets and restarts, and the terminal program upgrading is started;
secondly, the application program corresponding to the upgrade file received by the terminal is normally started, the terminal finds the corresponding backup program position in the terminal program backup area according to the operating protocol type of the upgrade file, then the terminal performs program comparison on the upgrade file in the upgrade switching area and the backup application program at the position in the application program backup area, and if the upgrade file in the upgrade switching area and the backup application program at the position in the application program backup area are not consistent, the terminal backups the upgrade file in the upgrade switching area to the position to cover the original backup program; if the backup area is found to be empty, directly backing up the upgrade file of the upgrade switching area to the program backup area;
and thirdly, after the terminal is upgraded, the terminal firstly arranges or initializes the parameter area and the data area according to the requirement, then reads and sets the communication parameters of the parameter backup area, logs in the main station and finishes the upgrading of the application program.
The invention has the beneficial effects that: the flash of the terminal is used for storing application programs with different protocol types, the main station can realize the multi-protocol switching of the terminal by issuing protocol change commands to the terminal, so that the terminal product can respond to the command of the master station for switching the protocol and automatically switch to the protocol appointed by the master station for operation, meanwhile, the communication parameters can be ensured not to be lost, the terminal can normally log in the master station after protocol switching, the master station can also realize multi-protocol switching of the terminal by issuing a program upgrading command to the terminal for program upgrading, thus, the volume of a single application program is reduced, different protocols can be independently issued and independently upgraded, the phenomena of mutual doping and mutual influence of codes realized by different protocols are avoided, the hardware platform of the acquisition terminal is prevented from being upgraded, the technical effect that the terminal product supports switching of various protocols under the condition of limited system resources is achieved.
Preferably, when the master station issues an application program upgrading command to the terminal, in the first step, if the upgrading file issued by the master station is interrupted, the terminal retains the received upgrading content to support breakpoint transmission, and if the master station changes the upgrading file, the terminal discards the received upgrading file content and receives the upgrading file again, so that the upgrading file can be ensured to be normally and efficiently sent to the terminal.
Preferably, when an application program upgrading command is issued to the terminal by the master station, in the first step, after the upgrade file is received, if the received upgrade file does not carry protocol type information and file check codes, or if the check codes of the upgrade file calculated by the program are not consistent with the check codes carried by the upgrade file, the terminal responds to the master station error information, and actively discards the upgrade file without upgrading, so as to ensure that the correct upgrade file is received and improve the efficiency of the terminal upgrade protocol.
Preferably, when the master station issues an application program upgrading command to the terminal, in the first step and the second step, if the application program upgrading of the terminal is abnormal, the terminal continues to use the original application program to execute without loading any newly upgraded content, so that the phenomenon of system breakdown can be avoided under the condition that the protocol upgrading is abnormal.
Drawings
Fig. 1 is a flowchart of the present invention when switching terminal protocols;
fig. 2 is a flowchart of the present invention when upgrading a terminal application.
Detailed Description
The invention is further described below with reference to the accompanying drawings in combination with specific embodiments so that those skilled in the art can practice the invention with reference to the description, and the scope of the invention is not limited to the specific embodiments.
The invention relates to a multi-protocol implementation method of a small system terminal product, which comprises the following steps: the method comprises the following steps of firstly setting a terminal, namely storing application programs with different protocols in a Flash reserved area of the terminal according to a fixed sequence, and performing numbering management by using a dictionary type mode, wherein the specific Flash space allocation is as follows:
numbering Distribution length (K) Description of the invention
0 1024 Program backup 1(1376-2013)
1 1024 Program backup 2 (Fujian supplement)
2 1024 Program backup 3(D L/T698.45-2016)
3 1024 Program backup 4 (for spare, 376 + 2009 is not realized for the moment)
According to the client requirements, in the terminal production process, in the stage of programming a word library, the process needs to make clear the information, namely synchronously programming application programs with different protocols into a program backup area of the terminal flash.
Then the terminal proceeds according to the following two situations:
(1) when the master station issues a protocol change command to the terminal, the steps are as follows:
firstly, a protocol change command is issued to a terminal by a main station, the terminal judges whether the protocol type issued by the main station is the same as the current running protocol type of the terminal after receiving the change command, if the protocol type issued by the main station is different from the current running protocol type of the terminal, the terminal determines the internal number of an application program corresponding to the flash in the flash according to the protocol type issued by the main station, stores the internal number, and then sends a confirmation response to the main station, at the moment, the terminal stores the current communication parameter backup in a parameter backup area, and copies the corresponding backup program in the application program backup area of the flash of the terminal to an upgrading exchange area of the terminal according to the determined internal number of the application program;
secondly, the upgrade switching area receives the copied backup program, after the backup program is received, the terminal resets and restarts, arranges or initializes the parameter area and the data area according to the requirement, reads and sets the communication parameters of the parameter backup area, and logs in the master station to complete the switching of the terminal protocols;
(2) when the master station issues an application program upgrading command to the terminal, the steps are as follows:
firstly, a master station issues an application program upgrading command to a terminal, the terminal receives the upgrading command and prepares for upgrading, meanwhile, the master station sends an upgrading file to the terminal, the terminal receives the upgrading file and places the upgrading file in an upgrading exchange area, after receiving, the terminal automatically backs up and stores current communication parameters in a parameter backup area, then resets and restarts, and the terminal program upgrading is started;
secondly, the application program corresponding to the upgrade file received by the terminal is normally started, the terminal finds the corresponding backup program position in the terminal program backup area according to the operating protocol type of the upgrade file, then the terminal performs program comparison on the upgrade file in the upgrade switching area and the backup application program at the position in the application program backup area, and if the upgrade file in the upgrade switching area and the backup application program at the position in the application program backup area are not consistent, the terminal backups the upgrade file in the upgrade switching area to the position to cover the original backup program; if the backup area is found to be empty, directly backing up the upgrade file of the upgrade switching area to the program backup area;
and thirdly, after the terminal is upgraded, the terminal firstly arranges or initializes the parameter area and the data area according to the requirement, then reads and sets the communication parameters of the parameter backup area, logs in the main station and finishes the upgrading of the application program.
Preferably, when the master station issues an application program upgrading command to the terminal, in the first step, if the upgrading file issued by the master station is interrupted, the terminal retains the received upgrading content to support breakpoint transmission, and if the master station changes the upgrading file, the terminal discards the received upgrading file content and receives the upgrading file again.
Preferably, when the master station issues an application program upgrading command to the terminal, in the first step, after the upgrade file is received, if the received upgrade file does not carry protocol type information and file check codes, or if the check codes of the upgrade file calculated by the program are not consistent with the check codes carried by the upgrade file, the terminal responds to the master station error information, and actively discards the upgrade file without upgrading.
Preferably, when the master station issues an application program upgrading command to the terminal, in the first step and the second step, if the application program upgrading of the terminal is abnormal, the terminal continues to use the original application program for execution, and no new upgraded content is loaded.

Claims (4)

1. A multi-protocol implementation method for small system terminal products is characterized in that: the method comprises the following steps of firstly setting a terminal, namely storing application programs with different protocols in a flash reserved area of the terminal according to a fixed sequence, carrying out numbering management by using a dictionary type mode, and then carrying out the numbering management by the terminal according to the following two conditions:
(1) when the master station issues a protocol change command to the terminal, the steps are as follows:
firstly, a protocol change command is issued to a terminal by a main station, the terminal judges whether the protocol type issued by the main station is the same as the current running protocol type of the terminal after receiving the change command, if the protocol type issued by the main station is different from the current running protocol type of the terminal, the terminal determines the internal number of an application program corresponding to the flash in the flash according to the protocol type issued by the main station, stores the internal number, and then sends a confirmation response to the main station, at the moment, the terminal stores the current communication parameter backup in a parameter backup area, and copies the corresponding backup program in the application program backup area of the flash of the terminal to an upgrading exchange area of the terminal according to the determined internal number of the application program;
secondly, the upgrade switching area receives the copied backup program, after the backup program is received, the terminal resets and restarts, arranges or initializes the parameter area and the data area according to the requirement, reads and sets the communication parameters of the parameter backup area, and logs in the master station to complete the switching of the terminal protocols;
(2) when the master station issues an application program upgrading command to the terminal, the steps are as follows:
firstly, a master station issues an application program upgrading command to a terminal, the terminal receives the upgrading command and prepares for upgrading, meanwhile, the master station sends an upgrading file to the terminal, the terminal receives the upgrading file and places the upgrading file in an upgrading exchange area, after receiving, the terminal automatically backs up and stores current communication parameters in a parameter backup area, then resets and restarts, and the terminal program upgrading is started;
secondly, the application program corresponding to the upgrade file received by the terminal is normally started, the terminal finds the corresponding backup program position in the terminal program backup area according to the operating protocol type of the upgrade file, then the terminal performs program comparison on the upgrade file in the upgrade switching area and the backup application program at the position in the application program backup area, and if the upgrade file in the upgrade switching area and the backup application program at the position in the application program backup area are not consistent, the terminal backups the upgrade file in the upgrade switching area to the position to cover the original backup program; if the backup area is found to be empty, directly backing up the upgrade file of the upgrade switching area to the program backup area;
and thirdly, after the terminal is upgraded, the terminal firstly arranges or initializes the parameter area and the data area according to the requirement, then reads and sets the communication parameters of the parameter backup area, logs in the main station and finishes the upgrading of the application program.
2. The multi-protocol implementation method of a small system end product according to claim 1, characterized in that: when the master station issues an application program upgrading command to the terminal, in the first step, if the upgrading file issued by the master station is interrupted, the terminal retains the received upgrading content to support breakpoint transmission, and if the master station changes the upgrading file, the terminal discards the received upgrading file content and receives the upgrading file again.
3. A multi-protocol implementation method of a small system end product according to claim 1 or claim 2, characterized in that: when an application program upgrading command is issued to the terminal by the master station, in the first step, after the upgrading file is received, if the received upgrading file does not carry protocol type information and file check codes, or if the check codes of the upgrading file calculated by the program are inconsistent with the check codes carried by the upgrading file, the terminal responds to the error information of the master station, and initiatively discards the upgrading file without upgrading.
4. The multi-protocol implementation method of a small system end product according to claim 3, characterized in that: when the master station issues an application program upgrading command to the terminal, in the first step and the second step, if the application program upgrading of the terminal is abnormal, the terminal continues to use the original application program to execute without loading any newly upgraded content, so that the phenomenon of system breakdown under the condition of abnormal protocol upgrading can be avoided.
CN201710211564.3A 2017-04-01 2017-04-01 Multi-protocol implementation method of small system terminal product Active CN107203392B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710211564.3A CN107203392B (en) 2017-04-01 2017-04-01 Multi-protocol implementation method of small system terminal product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710211564.3A CN107203392B (en) 2017-04-01 2017-04-01 Multi-protocol implementation method of small system terminal product

Publications (2)

Publication Number Publication Date
CN107203392A CN107203392A (en) 2017-09-26
CN107203392B true CN107203392B (en) 2020-07-14

Family

ID=59905689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710211564.3A Active CN107203392B (en) 2017-04-01 2017-04-01 Multi-protocol implementation method of small system terminal product

Country Status (1)

Country Link
CN (1) CN107203392B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656598A (en) * 2018-12-24 2019-04-19 天津凯发电气股份有限公司 A kind of application program online upgrading method based on MQX real time operating system
CN113848829A (en) * 2021-09-09 2021-12-28 许昌许继软件技术有限公司 Main station and substation integrated operation and maintenance method and system for factory and mine power grid regulation and control system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314369A (en) * 2011-10-09 2012-01-11 杭州先锋电子技术股份有限公司 Self-upgrade method for equipment in remote online monitoring system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001035243A1 (en) * 1999-11-08 2001-05-17 Megaxess, Inc. QUALITY OF SERVICE (QoS) NEGOTIATION PROCEDURE FOR MULTI-TRANSPORT PROTOCOL ACCESS FOR SUPPORTING MULTI-MEDIA APPLICATIONS WITH QoS ASSURANCE
US8775572B2 (en) * 2006-06-23 2014-07-08 Microsoft Corporation Public network distribution of software updates
US20080107039A1 (en) * 2006-11-02 2008-05-08 Marios Hadjieleftheriou Method and Apparatus for Estimating Dominance Norms of a Plurality of Signals
CN102227122B (en) * 2011-06-22 2013-11-06 北京四方继保自动化股份有限公司 Platform-independent protocol modularized system
US20130223302A1 (en) * 2012-02-23 2013-08-29 Chien-Chih Kuo Multi-protocol switching control system suitable for controlling different electronic devices of different protocols
CN104113541A (en) * 2014-07-16 2014-10-22 云南电力试验研究院(集团)有限公司电力研究院 Power communication protocol conversion integrated device system
CN105227402B (en) * 2015-09-29 2019-04-26 国网福建省电力有限公司 A kind of integrated test method of the more specification communications of intelligent substation
CN105472021A (en) * 2015-12-24 2016-04-06 安徽立卓智能电网科技有限公司 Configurable flexible collection method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102314369A (en) * 2011-10-09 2012-01-11 杭州先锋电子技术股份有限公司 Self-upgrade method for equipment in remote online monitoring system

Also Published As

Publication number Publication date
CN107203392A (en) 2017-09-26

Similar Documents

Publication Publication Date Title
CN104714811A (en) Method and device for manufacturing difference upgrade package and system difference upgrade method and device
CN105553741A (en) Automatic deployment method for application system based on cloud computing
CN107203392B (en) Multi-protocol implementation method of small system terminal product
CN101593119A (en) A kind of aerial firmware upgrade method of flash memory unit equipment and device monopolized
CN103024782A (en) Base station software version management method and system
CN102271057B (en) Parameter updating method and equipment
CN102195798A (en) Method for upgrading optical network unit
CN103077061A (en) Installing method of application software in Android equipment and system
CN104318091A (en) Moonlet ground testing method based on virtualization computer system
CN110737670A (en) cluster data consistency guarantee method, device and system
CN103079108A (en) Set top box and starting method thereof
CN107844566B (en) Dump control method and system
CN107623705B (en) Storage mode upgrading method, device and system based on video cloud storage system
CN111917588A (en) Edge device management method, device, edge gateway device and storage medium
CN116028084A (en) Cross-version hot upgrading method, system and terminal based on OpenStack cloud platform
CN106850262B (en) Server network management method
CN111881063B (en) Multi-platform adaptive Internet of things module based on Flash cutting and control method thereof
CN101447997A (en) Data processing method, server and data processing system
CN103914339A (en) Server management system and server management method
CN112350837B (en) Cloud platform-based power application cluster management method and device
CN102810067A (en) Virtual machine template updating system and method
CN111857761A (en) Method and equipment for upgrading container cluster service application program
CN111124451A (en) Distributed backup upgrading method
CN116112499B (en) Construction method of data acquisition system and data acquisition method
CN116009925B (en) Sub-battery management unit program refreshing method of battery management 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
GR01 Patent grant
GR01 Patent grant