CN1916852A - Method for modifying single data through online - Google Patents

Method for modifying single data through online Download PDF

Info

Publication number
CN1916852A
CN1916852A CN 200610127207 CN200610127207A CN1916852A CN 1916852 A CN1916852 A CN 1916852A CN 200610127207 CN200610127207 CN 200610127207 CN 200610127207 A CN200610127207 A CN 200610127207A CN 1916852 A CN1916852 A CN 1916852A
Authority
CN
China
Prior art keywords
data
download
object logic
zone
online
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200610127207
Other languages
Chinese (zh)
Other versions
CN100401256C (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.)
ZHONGKONG SCIENCE AND TECHNOLOGY GROUP Co Ltd
Zhejiang University ZJU
Original Assignee
ZHONGKONG SCIENCE AND TECHNOLOGY GROUP Co Ltd
Zhejiang University ZJU
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 ZHONGKONG SCIENCE AND TECHNOLOGY GROUP Co Ltd, Zhejiang University ZJU filed Critical ZHONGKONG SCIENCE AND TECHNOLOGY GROUP Co Ltd
Priority to CNB2006101272070A priority Critical patent/CN100401256C/en
Publication of CN1916852A publication Critical patent/CN1916852A/en
Application granted granted Critical
Publication of CN100401256C publication Critical patent/CN100401256C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

A method for revising on-line single point data includes setting storage mode of logic object in storage, recording revised content and confirming data requiring to be revised, downloading said data in relevant download buffer region of data, updating data in download buffer region to relevant data storage region according to operation flag in said download buffer region. The said method can be used to update data from man-machine interface into controller.

Description

The amending method of online one point data
Technical field
The present invention relates to a kind of amending method of online one point data.
Background technology
In the control field, particularly in the process control field, require control system not interrupt continuously, stablize, move reliably.Because the change of field condition and the change of technology, control system also will be transformed and be upgraded accordingly.This just requires to influence on-the-spot production process in the process of the upgrading of control system and transformation, keep the continuity and the stability of production run.Therefore the online data renewal is the technical issues that need to address in control system upgrading and the transformation process in the control system.
Application number is the Chinese invention patent of " 200410074140.X " denomination of invention for " realizing the method for online updating data based on control system ", a kind of method that realizes the online updating data based on control system is disclosed, be used for described data are downloaded to controller from man-machine interface, described controller comprises microprocessor and storer, described storer comprises data download buffer and data storage area, may further comprise the steps: step is set: the fixing memory address of described each The data is stored; Download step: the reference mark data that will need to upgrade are downloaded to described data download buffer; Step of updating: behind the algorithm routine end of run of current control system, described microprocessor is forbidden program run, and the data that will be downloaded to described data download buffer are write in the data storage area of corresponding stored address; Recovering step: described microprocessor continues the next algorithm routine before operation is forbidden, and lifts a ban all algorithm routines of described system.
The described method of this patent can be applied to the renewal of single-point online data in the multitask system, and this method has used the fixing method of memory address to realize the Data Update of single-point.The mode that the memory address that adopts is fixing, the memory address of object logic and actual hardware physical address are corresponding one by one, and this just makes range of application narrower and small.Because in control system, there is the object logic of different types, an actual physical address can correspondence wherein any one.The hardware of the supposing the system maximum of counting can be configured to the K point, each hardware point all must consider the object logic type that might be assigned with, and come the storage allocation space thus.The object logic type has the N kind in the supposing the system, and for i kind object logic, the needed storage size in each unit is M i(0<i≤N).The memory address of so above-mentioned employing hardware physical address and object logic storage mode one to one can be by the method for two kinds of storage allocations:
First kind: for each object logic type is all distributed the storage space of K unit, i corresponding i hardware point of storage unit.When i hardware point is configured to the type data, just use i unit of this data type to go to store real time data.Above-mentioned first kind of distribution method storage space of required distribution altogether is ∑ I=1 NNKM i
Second kind: distribute a maximum space Max (M for each hardware point i) (0<i≤N).When the object logic type configuration of certain hardware point is the i kind, just store real time data according to i kind object logic type.The above-mentioned second method storage space of required distribution altogether is KMax (Mi).
For above-mentioned first method, under the smaller situation of the required storage space of single object logic, it implements more convenient.But under the bigger situation of the required storage space of single object logic, its storage space that needs is too big, has the waste of a large amount of internal memories in the practical application, implements the comparison difficulty.For above-mentioned second method, the expense of its storage space is minimum, but extendability and maintainability are too poor.Need increase by one type new object logic during the supposing the system upgrading, and the required storage space of newtype object logic is greater than the storage space of existing all types object logic, so just need to revise hardware point corresponding memory space, this will cause the rearrangement of memory address, carries out so this modification must be an off-line.Simultaneously, situation about occurring probably during the online modification data is for the data different object logic type of correspondence before and after data modification with a slice memory block, so just need to adopt different object logic type structures to go to resolve these data, implement the comparison difficulty, cause data and the inconsistent problem of pairing structure easily, influence the security of system.
Therefore, it is too big how to solve in the background technology one point data online updating required memory space, and the problem of system's expansivity and maintainable difference is the present technical issues that need to address.
Summary of the invention
The purpose of this invention is to provide one point data method for updating in a kind of control system, need upgrade the The whole control system data, the technical matters that update time is long when upgrading one point data in the prior art to solve; And the needed memory headroom expense of one point data online updating is big in the prior art, the technical matters of system's expansivity and maintainable difference.
In order to address the above problem, the present invention discloses the method that a kind of online one point data is revised, and is applied in the control system, is used for described data from the man-machine interface down loading updating to controller; Described controller comprises microprocessor and storer, and described storer comprises data storage area and data download buffer; May further comprise the steps:
Step is set: the storage mode of object logic in described storer is set;
Recording step: the content of record modification, need to determine data updated;
Download step: the described data updated that needs is downloaded in the corresponding data download buffer;
Step of updating: the operation flag in the data based described download buffer in the described download buffer is updated in the corresponding data storage area.
The described step that is provided with is specially storer is divided into several regions, and each zone is provided with an assignment flag; The corresponding respectively different zone that has assignment flag of each object logic is set.
The assignment flag in described zone exists distribution state and unallocated state, corresponds respectively to this zone and is assigned with and is not assigned with.
Described object logic and described memory area are set up by the logic sequence number and are got in touch, and described region of memory is corresponding one by one with described logic sequence number.
When adding object logic, with the allocations of storage addresses of the object logic that the adds zone to unallocated state, any change does not take place in the zone of distribution state in;
When revising the object logic data, the pairing memory area of this object logic is made amendment, do not change other zone;
When deletion during object logic, the assignment flag in the zone of the distribution state of object logic correspondence is changed to unallocated state.
Described recording step also comprises:
Each object logic is provided with one and downloads zone bit;
The object logic corresponding download zone bit of having downloaded is set to download state;
When the data modification of certain object logic, the download zone bit of this object logic changed into revise not download state;
When data are downloaded, by detect downloading zone bit, be to revise not the data of download state to download to data and download to buffer zone with zone bit.
Preferably, comprise also in the described download step that two are detected step:
1) to judge whether that before data download can carry out one point data downloads: when this that preserved in data in the controller and the server revised preceding data consistent, just allow one point data to download; Otherwise need overall data to download;
2) after in downloading data to the data download buffer, carry out verification,, then need to download again corresponding data if verification is not passed through to data downloaded.
Preferably, further comprise in the described download step:
Generate the operation flag of the object logic that needs download, the needs data updated is downloaded in the corresponding data download buffer according to described operation flag.
Preferably, further comprise in the described step of updating:
Need judge the action type of new data more; If when operation flag was update mode, corresponding data storage area then write direct the data of this object logic; If when operation flag was the deletion state, then the data storage area Status Flag with correspondence was changed to disarmed state.
Compare with background technology, the present invention has the following advantages:
One, said method is owing to adopted object logic fixed storage address, and the mode of fixed storage address is that memory address is corresponding one by one with the logic sequence number of object logic simultaneously, and as above-mentioned hypothesis, (0<i≤N) number of kind object logic correspondence is L to establish i i(0<L i<K), the needed data space of this method is a ∑ I=1 NM iL i, reduced the demand of internal memory so greatly, and the required storage size of single object logic do not have much affect to realizing this method, application in extensive range.
Two, the required storage space of said method is not minimum, but it has taken all factors into consideration the factors such as security of extensibility, maintainability and the online download of system, both avoid the expense of too much storage space, had extensibility and very high security flexibly again.
Description of drawings
Fig. 1 is a process flow diagram of the present invention;
Fig. 2 is a controller of the present invention memory block synoptic diagram;
Fig. 3 is a download process flow of the present invention;
Fig. 4 is the process flow diagram of one point data downloading process of the present invention;
Fig. 5 is the process flow diagram of one point data renewal process of the present invention.
Embodiment
The invention provides one point data method for updating in a kind of control system, solve when upgrading one point data in the prior art and need upgrade the The whole control system data, the technical matters that update time is long; The needed memory headroom expense of one point data online updating is big in the solution prior art, the technical matters of system's expansivity and maintainable difference.
Below in conjunction with accompanying drawing the specific embodiment of the present invention is described further.
See also Fig. 1, this figure is an one point data method for updating process flow diagram of the present invention.This method is used for the needs data downloaded is downloaded to controller from man-machine interface, specifically may further comprise the steps:
S1, step is set: the storage mode of each logic of class object in storer is set.
Storer is divided into several regions, and each zone is provided with an assignment flag.The corresponding respectively different zone that has assignment flag of each object logic is set.In step is set, because the object logic of each class has all adopted the fixing mode of memory address to store, so in Data Update, do not need to download all system datas.Only needing to download needs data updated, has so just reduced the data updated amount, has shortened and has upgraded the required time, has also improved the security of upgrading simultaneously.
S2, recording step: the content of record modification, determining needs data updated.
Each object logic is provided with one and downloads zone bit;
The object logic corresponding download zone bit of having downloaded is set to download state;
When the data modification of certain object logic, the download zone bit of this object logic changed into revise not download state;
When data are downloaded, by detect downloading zone bit, be to revise not the data of download state to download to data and download to buffer zone with zone bit.
S3, download step: will need data updated to download to corresponding data download buffer.
The amending method of online one point data of the present invention is finished the downloading process of data from the man-machine interface to the corresponding controllers earlier, carries out Data Update then.
S4, step of updating: with the data based action type information updating in the download buffer in the data storage area of corresponding stored address.
The action type of new data is more judged; If when operation flag was update mode, corresponding data storage area then write direct the data of this object logic.If when operation flag was the deletion state, then the data storage area Status Flag with correspondence was changed to disarmed state.
Referring to Fig. 2, this figure is a controller of the present invention memory block synoptic diagram.
Controller of the present invention comprises a microprocessor 1 and a storer at least.Microprocessor 1 is used to control the process of whole Data Update.Storer is used to store the later data of download.Storer comprises data storage area 3 and data download buffer 2.
Based on the ingredient of above-mentioned controller, mainly be to finish Data Update in control system by following steps.Specify the allocation scheme of the memory address of data field below.
The data field comprises all system datas, is divided into several small datas zone, for each logic of class object a corresponding data area is arranged all.At first for each object logic is provided with a unique logic sequence number, the number according to data logic sequence number is divided into corresponding storage area then.Each sheet storage area is provided with an assignment flag.If this zone distributes, assignment flag that then should the zone is set to distribution state, otherwise assignment flag is set to unallocated state.Simultaneously, object logic and storage area are set up by the logic sequence number and are got in touch.There are relation one to one in each sheet storage area and logic sequence number.When adding object logic, only with the allocations of storage addresses of the object logic that added to the zone that is not assigned with, other assigned region any change does not take place.When revising the object logic data, only made amendment in this object logic corresponding storage territory, do not change other zone.When the deletion object logic, the assignment flag in only that it is the corresponding storage area is changed to unallocated state.
Step is set, sets up the corresponding relation of storer and all kinds of object logics, promptly store data in fixing memory location according to described logic sequence number.Equally, adopt the memory allocation mode identical for the data download buffer with above-mentioned memory block.
Recording step carries out record to the data that were modified, and the information of passing through to be write down just need can determine data downloaded.
Before entering downloading process, need the data in the controller are tested, judge whether to carry out one point data and download.If the data consistent before the modification of being preserved in data in the controller and the server then can carry out one point data and download, download otherwise can only carry out overall data.
After in downloading data to the data download buffer, carry out verification,, then need to download again corresponding data if verification is not passed through to data downloaded.
Referring to Fig. 3, this figure is a download process flow of the present invention.
S31, enter downloading process after, downloading needs data updated in corresponding download buffer.
S32, judge whether downloading task is finished, finish, then enter step S33 if all download; Do not finish if all download, then repeating step S31.
S33, be provided with and download the complement mark position, characterize to download and finish.
S34, system detect and download the complement mark position, begin more new data.
More new data is according to the operation information in the data download corresponding data to be updated to corresponding data storage area from download buffer.
Whether S35, judgement renewal are finished, and all finish if upgrade, and then enter step S36; All do not finish if upgrade, then repeating step S34.
S36, whole online data down loading updating finish.
The renewal process that above step has been finished data comprises that data download and renewal process, below the detailed download S31 that introduces following data and upgrade the S34 process.
Earlier introduce step S31 in detail, illustrate how to finish download step.
See also Fig. 4, Fig. 4 is the process flow diagram of one point data downloading process of the present invention.
Concrete steps are as follows:
S310: the data of downloading a unit are to corresponding download buffer.
S311: the data to this unit of downloading are carried out verification.
Verification be in order to ensure data correct download to corresponding download buffer.The algorithm of data check has a lot, and these algorithms can be applied among the present invention, do not repeat them here.
S312: judge data downloaded whether pass through by verification; If pass through, then enter step S313; If do not pass through, repeating step S310 then;
S313: one point data is downloaded and is finished.
Step through above just can download to the data of a single-point corresponding download buffer.A so ensuing step is exactly the data storage area that the Data Update of download buffer is arrived correspondence.Step S34 just.
See also Fig. 5, this figure is that the present invention realizes the process flow diagram that one point data upgrades.Concrete step is as follows:
S340: the action type of judging this unit data.Action type is to determine according to the operation flag information in the data download.
Operation flag information is divided into four classes: normal, invalid, upgrade or deletion.Comprised in the renewal and increased data and legacy data modification newly.If when detected operation flag is renewal, enter step S341; If when detected operation flag is deletion, enter step S342; When if detected operation flag is normal or invalid, finish.
S341: action type is when upgrading, and in corresponding data storage area, and the data manipulation type that it is corresponding is changed to normal condition, enters step S343 then with the data update all in the download buffer;
S342: action type is when deletion, and operation flag is set to invalid flag in the respective data storage district, forbids the data that later routine access should the zone.
S343: one point data upgrades and finishes.
Used the data manipulation type information in the above-mentioned data updating process, obtaining before Data Update of action type information finished.
Obtain action type information two kinds of methods specifically arranged:
First method:, then download in the controller by man machine interface software generating run sign.Detailed process is as follows: carry out in man machine interface software in the data modification, also need generate the data manipulation sign except sign downloaded in record.That the data manipulation sign is divided into is normal, invalid, upgrade and deletion.For data downloaded, has only two states: normal or invalid.That is to say that the data in the data storage area have only two states.And be that data in the data buffer exist four kinds of states for not downloading or be not updated to data in the data storage area.Man machine interface software can download to operation flag in the controller in data download, the operation that controller just is correlated with according to operation flag.
Second method: by controller generating run sign.Process is as follows: the data that controller issues according to man machine interface software are judged the action type that it is corresponding, and action type is noted.
Because the method for the invention has adopted object logic fixed storage address, the mode of fixed storage address is that memory address is corresponding one by one with the logic sequence number of object logic simultaneously.(0<i≤N) number of kind object logic correspondence is L as i i(0<L i<K), the needed data space of this method is a ∑ I=1 NM iL i, reduced the demand of internal memory so greatly, and the required storage size of single object logic do not have much affect to realizing this method, application in extensive range.
Though the required storage space of the method for the invention is not minimum, but the factors such as security of extensibility, maintainability and the online download of system have been taken all factors into consideration, both avoid the expense of too much storage space, had extensibility and very high security flexibly again.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (9)

1, the method revised of a kind of online one point data is applied in the control system, is used for described data from the man-machine interface down loading updating to controller; Described controller comprises microprocessor and storer, and described storer comprises data storage area and data download buffer; It is characterized in that, may further comprise the steps:
Step is set: the storage mode of object logic in described storer is set;
Recording step: the content of record modification, need to determine data updated;
Download step: the described data updated that needs is downloaded in the corresponding data download buffer;
Step of updating: the operation flag in the data based described download buffer in the described download buffer is updated in the corresponding data storage area.
2, the method revised of online one point data according to claim 1 is characterized in that, the described step that is provided with is specially storer is divided into several regions, and each zone is provided with an assignment flag; The corresponding respectively different zone that has assignment flag of each object logic is set.
3, the method for online one point data modification according to claim 2 is characterized in that the assignment flag in described zone exists distribution state and unallocated state, corresponds respectively to this zone and is assigned with and is not assigned with.
According to the method for claim 2 or 3 described online one point datas modifications, it is characterized in that 4, described object logic and described memory area are set up by the logic sequence number and got in touch, described region of memory is corresponding one by one with described logic sequence number.
5, the method revised of online one point data according to claim 4 is characterized in that, when adding object logic, with the allocations of storage addresses of the object logic that the adds zone to unallocated state, other any change does not take place zone of distribution state;
When revising the object logic data, the pairing memory area of this object logic is made amendment, do not change other zone;
When deletion during object logic, the assignment flag in the zone of the distribution state of object logic correspondence is changed to unallocated state.
6, the method for online one point data modification according to claim 1 is characterized in that described recording step also comprises:
Each object logic is provided with one and downloads zone bit;
The object logic corresponding download zone bit of having downloaded is set to download state;
When the data modification of certain object logic, the download zone bit of this object logic changed into revise not download state;
When data are downloaded, by detect downloading zone bit, be to revise not the data of download state to download to data and download to buffer zone with zone bit.
7, the method for online one point data modification according to claim 1 is characterized in that, comprises also in the described download step that two are detected steps:
1) to judge whether that before data download can carry out one point data downloads: when this that preserved in data in the controller and the server revised preceding data consistent, just allow one point data to download; Otherwise need overall data to download;
2) after in downloading data to the data download buffer, carry out verification,, then need to download again corresponding data if verification is not passed through to data downloaded.
8, the method for online one point data modification according to claim 1 is characterized in that, further comprises in the described download step:
Generate the operation flag of the object logic that needs download, the needs data updated is downloaded in the corresponding data download buffer according to described operation flag.
9, the method for online one point data modification according to claim 1 is characterized in that, further comprises in the described step of updating:
Need judge the action type of new data more; If when operation flag was update mode, corresponding data storage area then write direct the data of this object logic; If when operation flag was the deletion state, then the data storage area Status Flag with correspondence was changed to disarmed state.
CNB2006101272070A 2006-09-07 2006-09-07 Method for modifying single data through online Expired - Fee Related CN100401256C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006101272070A CN100401256C (en) 2006-09-07 2006-09-07 Method for modifying single data through online

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006101272070A CN100401256C (en) 2006-09-07 2006-09-07 Method for modifying single data through online

Publications (2)

Publication Number Publication Date
CN1916852A true CN1916852A (en) 2007-02-21
CN100401256C CN100401256C (en) 2008-07-09

Family

ID=37737853

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006101272070A Expired - Fee Related CN100401256C (en) 2006-09-07 2006-09-07 Method for modifying single data through online

Country Status (1)

Country Link
CN (1) CN100401256C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102611688A (en) * 2011-12-15 2012-07-25 天津市通卡公用网络***有限公司 Long-distance updating method of blacklist data of terminal POS (Point-Of-Sale) device
CN102930220A (en) * 2012-10-31 2013-02-13 浙江报喜鸟服饰股份有限公司 System and method for modifying parameters of customized products
CN111176222A (en) * 2019-10-12 2020-05-19 浙江中控技术股份有限公司 DCS controller configuration updating system and method based on configuration difference identification

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08202626A (en) * 1995-01-31 1996-08-09 Isuzu Motors Ltd Memory controller
CN1287287C (en) * 2004-08-31 2006-11-29 浙江中控技术有限公司 Method for realizing on-line renewing data based on control system
CN1622038A (en) * 2005-01-07 2005-06-01 北京北大方正电子有限公司 Process for printing apparatus automatic upgrading through internet

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102611688A (en) * 2011-12-15 2012-07-25 天津市通卡公用网络***有限公司 Long-distance updating method of blacklist data of terminal POS (Point-Of-Sale) device
CN102611688B (en) * 2011-12-15 2014-09-17 天津市通卡公用网络***有限公司 Long-distance updating method of blacklist data of terminal POS (Point-Of-Sale) device
CN102930220A (en) * 2012-10-31 2013-02-13 浙江报喜鸟服饰股份有限公司 System and method for modifying parameters of customized products
CN102930220B (en) * 2012-10-31 2015-12-02 浙江报喜鸟服饰股份有限公司 A kind of system and method for the parameter for revising tailor-made product
CN111176222A (en) * 2019-10-12 2020-05-19 浙江中控技术股份有限公司 DCS controller configuration updating system and method based on configuration difference identification

Also Published As

Publication number Publication date
CN100401256C (en) 2008-07-09

Similar Documents

Publication Publication Date Title
CN1313923C (en) A software distribution method and system
CN1232912C (en) Non volatile memory control method
CN1517903A (en) Map data processing device and centring system
CN1668010A (en) Tag-based schema for distributing update metadata in an update distribution system
CN101079003A (en) System and method for carrying out safety risk check to computer BIOS firmware
CN1701307A (en) Method and apparatus for managing an erase count block
CN1201231C (en) Data storage, data processing system and method
CN100338589C (en) Method and IC card for controlling storage logic partition access authority
CN1652253A (en) Memory card and semiconductor device
CN1701308A (en) Maintaining erase counts in non-volatile storage systems
CN1702776A (en) Memory card, semiconductor device, and method of controlling semiconductor memory
CN1296790C (en) Memory management unit code verifying device and code decoder
CN1103083C (en) Distributed software development management system
CN101038611A (en) Software protection method
CN1249463A (en) Microcomputer provided with flash memory and its program store method
CN100346298C (en) System and method for remotely loading or upgrading program
CN100340983C (en) Method and device for on-line upgrading of programmable logic device
CN100346290C (en) Programmable controller, programmable controller system, CPU unit and method of starting duplexed operation
CN101047670A (en) MAC address table ageing, operation method and process system thereof
CN1916852A (en) Method for modifying single data through online
CN1435755A (en) Command converting device and method
CN1758253A (en) File management system and method
CN1945478A (en) Simulation apparatus
CN1749908A (en) Information process device
CN1841329A (en) Method and apparatus for positioning target file

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080709

Termination date: 20200907

CF01 Termination of patent right due to non-payment of annual fee