[go: up one dir, main page]

CN102426518A - Method for realizing soft version compatibility - Google Patents

Method for realizing soft version compatibility Download PDF

Info

Publication number
CN102426518A
CN102426518A CN2011100999996A CN201110099999A CN102426518A CN 102426518 A CN102426518 A CN 102426518A CN 2011100999996 A CN2011100999996 A CN 2011100999996A CN 201110099999 A CN201110099999 A CN 201110099999A CN 102426518 A CN102426518 A CN 102426518A
Authority
CN
China
Prior art keywords
information
information structure
size
read
current version
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011100999996A
Other languages
Chinese (zh)
Inventor
姜杰
唐昆明
黄选发
孙小江
黄炼
黎帮凤
张太勤
陶志坚
肖新华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CHONGQING NEW SHIJIE ELECTRIC Co Ltd
Original Assignee
CHONGQING NEW SHIJIE 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 CHONGQING NEW SHIJIE ELECTRIC Co Ltd filed Critical CHONGQING NEW SHIJIE ELECTRIC Co Ltd
Priority to CN2011100999996A priority Critical patent/CN102426518A/en
Publication of CN102426518A publication Critical patent/CN102426518A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a method for realizing soft version compatibility. The method comprises the following steps of: storing a first structure, wherein the first structure defines the size and type of the first structure, the type of the first structure comprises size information of one or more than one second information structure, and each second information structure defines the size and concrete information of the second information structure; and reading the first structure and acquiring the size information of one second information structure; and comparing whether the size of the second information structure is equal to that of an information structure corresponding to the current version. The method for realizing soft version compatibility provided by the invention does not need any special configuration conversion tool and has high speed and efficiency.

Description

A kind of method that realizes software version compatibility
Technical field
The present invention relates to a kind of method of different editions software, refer in particular to a kind of method that realizes software version compatibility.
Background technology
For the software that uses the self-defining data storehouse, because in the software life-cycle process, function upgrading is unavoidable; Tend to cause the increase of configuration information structure size, general designer all considers backward compatible; And do not consider upwards compatiblely yet, therefore the software processing method The software adopted configuration crossover tool that is generally highest version was changed the configuration information of lowest version software in the past, to continue to use lowest version configuration information configuration; Process result generally can only accomplish to be changed to highest version by lowest version like this, even some crossover tool can be accomplished the mutual conversion of lowest version and highest version configuration information, also often because engineering site is used increase; The conversion work amount is still very big; And when system version upgraded, configuration tool still need increase the conversion support to the configuration information structure of redaction; Thereby supporting renewal crossover tool, time-consuming effort again.
Summary of the invention
The present invention provides a kind of need not to use special configuration crossover tool, and speed is fast, the method for the realization software version compatibility that efficient is high.
A kind of method that realizes software version compatibility of the present invention,
Step 1: store first structure, said first structure defines the size of said first structure and the type of said first structure; The type of said first structure comprises the size information of one or more second information structure, and each said second information structure defines the size of said second information structure and the specifying information of said second information structure;
Step 2: read first structure, obtain the size information of one second information structure; Whether the size of the information structure that the size of comparison second information structure is corresponding with current version equates;
Step 3: when both are equal, read the specifying information of said second information structure, read the size information of next second information structure again, and judge whether said next second information structure is last, if then finish; , then do not return step 2;
When said second information structure during, read the specifying information of the corresponding information structure of current version greater than the corresponding information structure of current version big or small; Read the size information of next second information structure again, and judge whether said next second information structure is last, if then finish; , then do not return step 2;
When said second information structure during, the information structure that the initialization current version is corresponding, read the specifying information of said second information structure again less than the corresponding information structure of current version big or small; Read the size information of next second information structure then, and judge whether said next second information structure is last, if then finish; , then do not return step 2.
The present invention is through storage first structure, and said first structure defines the size of said first structure and the type of said first structure; The type of said first structure comprises one or more second information structure; Each said second information structure defines the size of said second information structure and the specifying information of said second information structure, thereby accomplishes configuration structure self-described information; Again through reading the size of one second information structure; And the size of the information structure of current version correspondence, and both sizes of comparison, according to different comparable situation; Accomplish second information structure that increases what's new, perhaps the specifying information to existing second information structure increases; Thereby realize the compatibility of software version.
Description of drawings
Fig. 1 is the process flow diagram of the method for realization software version compatibility provided by the invention.
Embodiment
For making technical characterictic of the present invention and the effect reached there are further understanding and understanding, cooperate detailed explanation, explain as follows in order to preferred embodiment and accompanying drawing:
Preferably, a kind of method that realizes software version compatibility of the present invention,
Step 1: store first structure, said first structure defines the size of said first structure and the type of said first structure; The type of said first structure comprises the size information of one or more second information structure, and each said second information structure defines the size of said second information structure and the specifying information of said second information structure;
Step 2: read first structure, obtain the size information of one second information structure; Whether the size of the information structure that the size of comparison second information structure is corresponding with current version equates;
Step 3: when both are equal, read the specifying information of said second information structure, read the size information of next second information structure again, and judge whether said next second information structure is last, if then finish; , then do not return step 2;
When said second information structure during, read the specifying information of the corresponding information structure of current version greater than the corresponding information structure of current version big or small; Read the size information of next second information structure again, and judge whether said next second information structure is last, if then finish; , then do not return step 2;
When said second information structure during, the information structure that the initialization current version is corresponding, read the specifying information of said second information structure again less than the corresponding information structure of current version big or small; Read the size information of next second information structure then, and judge whether said next second information structure is last, if then finish; , then do not return step 2.
Preferably, in the step 1, first structure definition is used for describing each information structure, and first structure defined the size of first structure and the type of said first structure, and fixing first attribute field of first structure is its size; And the type of first structure comprises the size information of one or more second information structure, shown in the following structure,
Figure BSA00000478047200031
Struct is a structure, and tagSizeInfo is the first structure type name, and int nSelfSize then is the size information of first structure, is himself size, A; B; C; D is the member of first structure, the second corresponding dissimilar respectively information structure size information; Int nStructASize is the size information of A information structure, and int nStructBSize is the size information of B information structure ...; Such as one first structure of definition; This first structure is the brand and the different brands automobile descriptor size of all automobiles of record * * city; Then int nSelfSize is the size of first structure self, and int nStructASize then can be regarded as the descriptor size of the automobile of A brand; Int nStructB then can be regarded as the descriptor size of the automobile of B brand, and int nStructCSize then can be regarded as the descriptor size of the automobile of C brand ....In addition, preferred, each said second information structure defines the size of said second information structure and the specifying information of said second information structure, shown in the following structure, is the information structure of A;
Figure BSA00000478047200042
Figure BSA00000478047200051
Be directed to second information structure, int nStructASize is the size of A information structure, is himself size; More specifically; Like the A brand is Cherry, and in the last information structure that shows, int nSelfSize is for describing the size of Cherry's automobile information structure; Be that it is self size; Int nAttrA, int nAttrB, int nAttrC describe the specifying information of Cherry's automobile information structure, describe the engine performance of Cherry's automobile like int nAttrA, and int nAttrB describes Cherry's vehicle glass performance or the like; It has described the specifying information of each information structure.
Preferably, when execution in step 2, read first structure, obtain the size information of one second information structure; Whether the size of the information structure that the size of comparison second information structure is corresponding with current version equates; Because first information structure has generally all comprised the size information of a plurality of second information structures, and the size of each second information structure is all different, and defined specifying information also possibly distinguished to some extent; Therefore relatively the time, the size of the information structure that at first relatively second information structure of deposit is corresponding with current version has three kinds of situation this moment; Be step 3, relatively judge link.
Preferably, step 3 when both are equal, reads the specifying information of said second information structure, reads the size information of next second information structure again, and judges whether said next second information structure is last, if then finish; , then do not return step 2; In this step, compare both sizes, promptly compare the size of intnSelfSize; When equating, directly read the specifying information of back, such as, more all be to describe Cherry's automobile, and equal and opposite in direction, then read specifying information wherein, like the engine performance of Cherry's automobile, Cherry's vehicle glass performance or the like.
Therefore and because second information structure has a plurality ofly, before opening software, need all second information structure information are once compared; Be equivalent to initialized process, therefore, will continue more next second information structure at relatively intacter first second information structure; Simultaneously will judge also whether all second information structures read and finish, if; Then end operation is opened software; If not, then continue to return step 2 and compare again, up to relatively intacter last second information structure, complete operation.
When both are unequal, situation about promptly being greater than or less than, same, when said second information structure during, read the specifying information of the corresponding information structure of current version greater than the corresponding information structure of current version big or small; Read the size information of next second information structure again, and judge whether said next second information structure is last, if then finish; , then do not return step 2.
When said second information structure during, the information structure that the initialization current version is corresponding, read the specifying information of said second information structure again less than the corresponding information structure of current version big or small; Read the size information of next second information structure then, and judge whether said next second information structure is last, if then finish; , then do not return step 2.
Preferably, aforesaid way can pass through example description, as original; The software version of user's deposit is 2003 editions a office software, and the version of the current use of user in later stage is 2007 editions a office software, because both versions are different; When therefore using, multiple newly-increased function need not to use; Therefore original, the software version of user's deposit is equivalent to the storing process in the step 1; And the user in later stage when the software that uses redaction is opened, is equivalent to the comparison and the deterministic process of step 2 and step 3 in the process flow diagram; Through second information structure in first structure is compared, when both equal and opposite in directions, the version that uses before and after explaining is identical; And in the present embodiment, because prototype version is lower than current version, be equivalent in the step 3; When said second information structure during less than the corresponding information structure of current version big or small; Therefore, the information structure that the initialization current version is corresponding, this process is equivalent to use second information structure of new function to carry out initialization with need not; Initialization agreement default value 0 is in state for this function; Again through reading the specifying information of said second information structure, promptly be equivalent to read the specifying information of second information structure of deposit, use the function that needs in the version of deposit; Promptly only need to open 2003 editions office softwares the function that will open, and 2007 editions office software functions more newly-increased than 2003 editions office softwares will be initialised.In this process; Second information structure for what's new; The agreement default value is 0 for this function is in disabled status, and when second information structure of deposit during less than the corresponding information structure of current version big or small, the part assignment that the information structure that current version is corresponding surpasses second information structure of depositing is 0; Perhaps that current version is the corresponding equal assignment of information structure be 0 all can, promptly be defaulted as and do not start functional status; And when deposit second information structure during greater than the corresponding information structure of current version big or small; Then only read the part that needs; To increase second information structure of corresponding increase function in first structure newly, but this part will can not reflect in first structure of deposit.
The method of realization software version compatibility provided by the invention can be opened the configure packet of any one version in the software life-cycle; And can guarantee all functions of operational system software release phase of living in accurately; It still is the product operation maintenance stage no matter for product development stage; The change of internal data structure can both guarantee that original configuration comes into force, and has greatly improved efficient, and speed is fast.
In sum; Be merely preferred embodiment of the present invention; Be not to be used for limiting the scope that the present invention implements, all equalizations of doing according to the described shape of claim scope of the present invention, structure, characteristic and spirit change and modify, and all should be included in the claim scope of the present invention.

Claims (1)

1. method that realizes software version compatibility is characterized in that:
Step 1: store first structure, said first structure defines the size of said first structure and the type of said first structure; The type of said first structure comprises the size information of one or more second information structure, and each said second information structure defines the size of said second information structure and the specifying information of said second information structure;
Step 2: read first structure, obtain the size information of one second information structure; Whether the size of the information structure that the size of more said second information structure is corresponding with current version equates;
Step 3: when both are equal, read the specifying information of said second information structure, read the size information of next second information structure again, and judge whether said next second information structure is last, if then finish; , then do not return step 2;
When said second information structure during, read the specifying information of the corresponding information structure of current version greater than the corresponding information structure of current version big or small; Read the size information of next second information structure again, and judge whether said next second information structure is last, if then finish; , then do not return step 2;
When said second information structure during, the information structure that the initialization current version is corresponding, read the specifying information of said second information structure again less than the corresponding information structure of current version big or small; Read the size information of next second information structure then, and judge whether said next second information structure is last, if then finish; , then do not return step 2.
CN2011100999996A 2011-04-20 2011-04-20 Method for realizing soft version compatibility Pending CN102426518A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011100999996A CN102426518A (en) 2011-04-20 2011-04-20 Method for realizing soft version compatibility

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011100999996A CN102426518A (en) 2011-04-20 2011-04-20 Method for realizing soft version compatibility

Publications (1)

Publication Number Publication Date
CN102426518A true CN102426518A (en) 2012-04-25

Family

ID=45960508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011100999996A Pending CN102426518A (en) 2011-04-20 2011-04-20 Method for realizing soft version compatibility

Country Status (1)

Country Link
CN (1) CN102426518A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902707A (en) * 2012-08-01 2013-01-30 杭州华三通信技术有限公司 Method for realizing compatibility of binary data with different versions and data version converting system
CN104317817A (en) * 2014-09-26 2015-01-28 浙江中控技术股份有限公司 Version compatible method and device of configuration files
CN106933546A (en) * 2015-12-29 2017-07-07 施耐德电器工业公司 Device, method and apparatus for supporting the power system file of at least two versions
CN107368321A (en) * 2017-07-27 2017-11-21 郑州云海信息技术有限公司 A kind of software version evolution method and system
CN109902078A (en) * 2019-01-10 2019-06-18 杭州迪普科技股份有限公司 Database upgrade compatible method, apparatus, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1555556A (en) * 2001-09-18 2004-12-15 汤姆森许可贸易公司 Method for processing information parts of recorded data
CN1571978A (en) * 2001-10-18 2005-01-26 微软公司 Extensible file format
US20070277168A1 (en) * 2003-12-24 2007-11-29 Trusted Logic Method for updating chip card applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1555556A (en) * 2001-09-18 2004-12-15 汤姆森许可贸易公司 Method for processing information parts of recorded data
CN1571978A (en) * 2001-10-18 2005-01-26 微软公司 Extensible file format
US20070277168A1 (en) * 2003-12-24 2007-11-29 Trusted Logic Method for updating chip card applications

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902707A (en) * 2012-08-01 2013-01-30 杭州华三通信技术有限公司 Method for realizing compatibility of binary data with different versions and data version converting system
CN102902707B (en) * 2012-08-01 2016-03-30 杭州华三通信技术有限公司 The method of different editions binary data compatibility and versions of data converting system
CN104317817A (en) * 2014-09-26 2015-01-28 浙江中控技术股份有限公司 Version compatible method and device of configuration files
CN104317817B (en) * 2014-09-26 2018-05-18 浙江中控技术股份有限公司 The version compatibility method and device of a kind of configuration file
CN106933546A (en) * 2015-12-29 2017-07-07 施耐德电器工业公司 Device, method and apparatus for supporting the power system file of at least two versions
CN107368321A (en) * 2017-07-27 2017-11-21 郑州云海信息技术有限公司 A kind of software version evolution method and system
CN107368321B (en) * 2017-07-27 2020-09-18 苏州浪潮智能科技有限公司 Software version evolution method and system
CN109902078A (en) * 2019-01-10 2019-06-18 杭州迪普科技股份有限公司 Database upgrade compatible method, apparatus, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN102426518A (en) Method for realizing soft version compatibility
US8078357B1 (en) Application-independent and component-isolated system and system of systems framework
CN1969280A (en) Remote system administration using command line environment
US20110258620A1 (en) Method and Apparatus for Making a BPM Application Available to Multiple Tenants
CN102165416A (en) Metadata driven mobile business objects
CN101421711A (en) The virtual execution system that is used for resource-constrained devices
CN102147809B (en) Parallel file system and management method thereof
CN107179903B (en) System and method for developing mobile-based applications using model-driven development
CN103176802B (en) Realize the method that the user interface UI of system separates with widget library by control pond
EP2842044A1 (en) Platform runtime abstraction
CN102375743B (en) SOA(Service-Oriented Architecture) system development method based on model and template
US7882232B2 (en) Rapid resource provisioning with automated throttling
CN109710235B (en) Transaction implementation system and method based on Java intelligent contract service logic
CN104268346A (en) Implementation method for simulation application of visual integrated environment on basis of object class interaction diagrams
CN111163149A (en) Intelligent contract platform method based on block chain
CN102436501A (en) Parallel file management system based on web
CN107894886B (en) A kind of method, apparatus and terminal device running code
CN112966833B (en) Machine learning model platform based on Kubernetes cluster
CN106484435A (en) A kind of Integrated Software research and development management system based on Flex
US9235437B2 (en) Method and integration component for integrating OSGi environments into a Service-oriented Architecture
CN103186386A (en) Application loading method and system
CN111400281B (en) GIS data quality inspection and storage method for OSS object storage
Jolly Usage of pd in spore and darkspore
CN115577279A (en) Punching clustering method and device, and stamping process design and processing method of stamping parts
CN109298851B (en) An extension mechanism adaptation method of OSGi heterogeneous software framework

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120425