CN100440144C - Method and device for implementing compatibility between the old and new editions of system - Google Patents
Method and device for implementing compatibility between the old and new editions of system Download PDFInfo
- Publication number
- CN100440144C CN100440144C CNB2007100731350A CN200710073135A CN100440144C CN 100440144 C CN100440144 C CN 100440144C CN B2007100731350 A CNB2007100731350 A CN B2007100731350A CN 200710073135 A CN200710073135 A CN 200710073135A CN 100440144 C CN100440144 C CN 100440144C
- Authority
- CN
- China
- Prior art keywords
- data
- described system
- data dictionary
- dictionary collection
- collection
- 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.)
- Expired - Fee Related
Links
Images
Abstract
This invention provides one method and device to realize system new and old edits compatible process, which comprises the following steps: a, system B receive system A data flow D; its adapter module analyzes data flow D according to data dictionary set into form data flow D'; b, the said system B adapter module analyzes the self data dictionary set into self identification data flow. This invention also realizes edit update data adapting and detail data flow.
Description
Technical field
The invention belongs to software technology field, relate in particular to the technology of software release upgrade.
Background technology
Software systems, the system that comprises software and hardware combining, the frequency of its edition upgrading is more and more higher, the data structure and the interface between the module of different editions exist different, the problem of edition upgrading key is the change of data structure and intermodule interface, and its essence of compatibility between different editions or the system's disparate modules is exactly the compatibility of data structure and intermodule interface.
The data and the interface compatibility problem that solve different editions or disparate modules mainly adopt following scheme in the prior art:
Backup Data before version change, carrying out the go forward side by side conversion of line data form of data load by redaction after changing, this scheme needs Backup Data before version change, have problems such as backup efficient is low, real-time is poor, the realization difficulty is big if data volume is huge; Simultaneously, because this scheme is to carry out format conversion at concrete data, redaction need be carried out a large amount of format conversion for a plurality of rudimentary edition datas when upgrading on different versions, can't support to reduce to early version from redaction;
Perhaps, the adaptation scheme of employing hard coded in software, in new version, directly define the form of data in redaction in the legacy version, when adopting this scheme, if the very big then adaptive workload of the old and new's difference in version is huge, in addition, this scheme is not supported to reduce to early version from redaction owing to can only carry out hard coded in redaction yet.
Summary of the invention
The purpose of the embodiment of the invention is to provide a kind of method and device of realizing system's new and old edition compatibility, is intended to solve the bigger problem of software systems edition upgrading difficulty that exists in the prior art.
For achieving the above object, the embodiment of the invention adopts following technical scheme:
A kind of method that realizes system's new and old edition compatibility, described method comprises following step:
Behind the data stream D that a, system B receiving system A send, the adaptation module of described system B resolves to formative data stream D ' according to the data dictionary collection of the A of system with described data stream D;
The adaptation module of b, described system B resolves to self according to the data dictionary collection of described system B self with described data stream D ' can recognition data stream.
The embodiment of the invention also provides a kind of data adaptive device of realizing system's new and old edition compatibility, described device comprises storage unit and adaptive control module, store data dictionary collection and the adaptation, logic of the A of system in the described storage unit, described adaptive control module is used for being stored in the storage unit to the data dictionary collection of the B of system Request System B and with the data dictionary collection that the B of system sends, and be used in adaptation procedure, data stream being resolved, and control the process of described parsing of the data stream according to described adaptation, logic according to the data dictionary collection of described system A and the B of system.
The embodiment of the invention also provides a kind of data adaptive device of realizing system's new and old edition compatibility, described device comprises storage unit and adaptive control module, store the data dictionary collection of the B of system in the described storage unit, described adaptive control module sends to described system A after being used for reading the data dictionary collection of described system B according to the request of obtaining the data dictionary collection that the A of system sends from described storage unit, be used for described system A and in adaptation procedure the data stream that described system B sends resolved, and control the process of the parsing of the data stream of described system B transmission according to the adaptation, logic of described system A according to the data dictionary collection of described system B and the data dictionary collection of described system A.
The embodiment of the invention overcomes the deficiencies in the prior art, the description standard of interaction data structure and interface between the employing system, system resolves the other side's data according to the structure of the other side and self and the description standard of interface, with the data parsing of legacy version become self can recognition data technical scheme, realized that the data stream that data are adaptive and concrete in the edition upgrading process is irrelevant, make new and old edition to coexist, and can change mutually between the new and old edition.
Description of drawings
Fig. 1 is the described adaptation module theory diagram of the embodiment of the invention;
Fig. 2 is the synoptic diagram of interaction data wordbook between described entity A of the embodiment of the invention and the entity B;
The synoptic diagram of interaction data between described entity A of Fig. 3 embodiment of the invention and the entity B;
Fig. 4 is an embodiment of the invention process flow diagram.
Embodiment
The ultimate principle of the embodiment of the invention is at the data structure body in the new and old edition (interface of new and old module) separate provision one cover standard (data dictionary collection), this standard all is suitable at all structures, this standard comprises argument sequence number, parameter type, start offset in the structure, length in the structure, start offset in the storage, element such as length in the storage, these elements are used for the data structure of description scheme body, the software systems of redaction and legacy version (software module) are at first obtained the other side's data dictionary collection, after the software systems of redaction are received the software system data stream D of legacy version, the new version software system resolves to D ' according to the structure standard of legacy version software systems with data stream D, the new version software system resolves to self discernible data D according to the structure standard of self with data D ' again " be sent to the upper strata and handle; finish data adaptation procedure to legacy version; otherwise, redaction is reduced to the reverse process that legacy version can adopt said process.
For the purpose, technical scheme and the advantage that make the embodiment of the invention is clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
At first the structure at the software systems (to call entity B in the following text) of the software systems (to call entity A in the following text) of legacy version and redaction defines a cover standard respectively, standard at some structures of entity A or entity B is called data dictionary, the standard of all structures of entity A or entity B is called the data dictionary collection, all comprised in argument sequence number, parameter type, the structure in start offset, the structure in length, the storage in start offset, the storage elements such as length in each data dictionary, these elements have been described the data structure of structure.
The described entity A of the embodiment of the invention comprises adaptation module, the theory diagram of adaptation module as shown in Figure 1, comprise storage unit and adaptive control module, wherein, store the data dictionary collection of entity A self and the data dictionary collection and the adaptation, logic of entity B in the deposit receipt unit, wherein, general prior being stored in its storage unit of the data dictionary collection of entity A self, the data dictionary collection of entity B obtains alternately by entity A and entity B, the adaptive control module of entity A is to entity B request msg wordbook, the adaptive control module of entity B sends it to entity A read himself data dictionary collection from its storage unit after, entity A also is stored in the data dictionary collection of entity B in the storage unit, the adaptive control module of entity A is used in the data adaptation procedure, at first from storage unit, read the data dictionary collection of entity B, the data stream D that at first will receive from entity B according to adaptation, logic resolves to formative data stream D ' according to the data dictionary collection of entity B, and concrete resolving can be with reference to hereinafter in the flow process data stream " 0x86135301 0x05 0x46 " being resolved to " parameter 1=0x86135301
Parameter 2=0x46 " process; and then read the data dictionary collection of self from storage unit; the data dictionary collection according to self is resolved the data stream that meets its data physique formula with data stream D ', concrete resolving can be with reference to hereinafter in the flow process data stream " parameter 1=0x86135301 parameter 2=0x46 " being resolved to:
Struct D”
{
int iMember1=0x86135301;
Char D " _ 2=the unknown;
char cMember3=0x46;
};
Process, before data are adaptive, entity A need be obtained the data dictionary collection of entity B, entity B also includes adaptation module, the adaptation module of entity B also comprises storage unit and adaptive control module, adaptive control module in the adaptation module of entity B has following function: after the request of obtaining the data dictionary collection that the adaptive control module of receiving entity A sends, reading of data dictionary collection and send to entity A from its storage unit, the adaptation module of entity A also has similar function, and other function class that the adaptation module of entity B is finished is like the adaptation module of entity A.
Adopt following adaptation, logic to finish the adaptive process of data between entity A and the entity B:
Step 1: as shown in Figure 2, entity A and entity B find that version is inconsistent each other, then separately its data wordbook is sent to the other side, therefore final entity A and B preserve self (the general prior curing of the data dictionary of self) and the other side's data dictionary collection respectively, form an adaptation module, data at first are sent to the upper strata through the adaptation module of entity again after adaptive and handle in the data exchange process afterwards, entity A or entity B also can adopt other modes to collect the other side's data dictionary collection, as the mode by data load.
Step 2: as shown in Figure 3, entity B receives data stream D of entity A, the adaptation module of entity B resolves to formative data stream D ' according to the data dictionary of entity A with data stream D, and entity B resolves to self discernible data stream D according to the data dictionary of self with data stream D ' again " be sent to the upper strata and handle.
Below be the adaptive processes of example explanation data with the structure SampleStruct of program design C language definition, suppose that there is following structure in entity A:
Struct SampleStruct
{
int iMember1;
Char cMember2; // need in external interface, not transmit
char cMember3;
};
Adaptive flow process specifically comprises the steps: as shown in Figure 4
1, it is as follows at first to define the structure SampleStruct data dictionary of entity A:
The parameter sequence number | Parameter name | Parameter type | Start offset in the structure | Length in the structure | Start offset in the storage | Length in the storage |
0 | sampleStruct | 1 (structure or pointer) | 0 | 0 | 0 | 0 |
1 | iMember1 | 0 (integer) | 0 | 4 | 0 | 4 |
2 | cMember3 | 0 (integer) | 5 | 1 | 4 | 1 |
The structure SampleStruct data dictionary of definition entity B is as follows:
The parameter sequence number | Parameter name | Parameter type | Start offset in the structure | Length in the structure | Start offset in the storage | Length in the storage |
0 | sampleStruct | 1 (structure or pointer) | 0 | 0 | 0 | 0 |
1 | iMember1 | 0 (integer) | 0 | 4 | 0 | 4 |
2 | cMember3 | 0 (integer) | 5 | 1 | 4 | 1 |
2, the adaptation module of entity A and entity B is obtained the other side's data dictionary collection respectively, comprising structure SampleStruct data dictionary;
3, suppose that entity A to the concrete message that entity B sends is:
Struct SampleStruct
{
int iMember1=0x86135301;
char cMember2=0x05;
char cMember3=0x46;
};
Then entity A sends out data stream D and is: 0x86135301 0x05 0x46
4, after entity B is received the message of entity A transmission, its adaptation module is analyzed data stream D according to this structure data dictionary of entity A, take out 4 byte length assignment from " start offset in the structure " 0 byte and give parameter 1, deposit " start offset in the storage " 0 byte place in; Take out 1 byte length assignment from " start offset in the structure " 5 bytes and give parameter 2, deposit " start offset in the storage " 4 byte places in, the data stream that parses is D ', is specially:
Parameter 1=0x86135301
Parameter 2=0x46
Wherein data stream D ' is the formative data that the data structure body according to entity A parses, and entity B can parse the data stream that meets its data physique formula according to the data structure body of himself.
5, the adaptation module of entity B re-uses the structure SampleStruct data dictionary analysis data stream D ' of itself, and entity B is taken out 4 byte length assignment from " start offset in the storage " 0 byte and given parameter 1, inserts " start offset in the structure " 0 byte place; Take out 1 byte assignment from " start offset in the storage " 4 bytes and give parameter 2, insert " start offset in the structure " 5 byte places, the data stream D that parses " be:
Struct D”
{
int iMember1=0x86135301;
Char D " _ 2=the unknown;
char cMember3=0x46;
};
By above adaptation procedure, realized that the version that entity A and entity B do not need to know the opposite end just can realize message intercommunication.
Data dictionary is a flexible customization as required, by modification to the data wordbook, add with deletion can corresponding different data adaptation ability.Adaptation module is and the module of concrete data independence that whole adaptation procedure is fully transparent to upper layer application.
Be that example describes with two software systems in the present embodiment, in concrete the application, can be plural software systems, it also can be two or more software module, if two different software modules, then respectively at its interface definition data dictionary collection, the adaptive process of data is the same with above-mentioned process.
As mentioned above, the description standard of the structure of interaction data and interface between the embodiment of the invention employing system, system resolves the other side's data according to the structure of the other side and self and the description standard of interface, with the data parsing of legacy version become self can recognition data technical scheme, realized that the data stream that data are adaptive and concrete in the edition upgrading process is irrelevant, make new and old edition to coexist, and can change mutually between the new and old edition.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.
Claims (11)
1, a kind of method that realizes system's new and old edition compatibility is characterized in that, described method comprises following step:
Behind the data stream D that a, system B receiving system A send, the adaptation module of described system B resolves to formative data stream D ' according to the data dictionary collection of the A of system with described data stream D;
The adaptation module of b, described system B resolves to self according to the data dictionary collection of described system B self with described data stream D ' can recognition data stream.
2, method according to claim 1 is characterized in that, wherein also comprises before the step a:
A0, in the adaptation module of described system B the data dictionary collection of storage described system B self, and obtain the data dictionary collection of described system A.
3, method according to claim 1, it is characterized in that, described system A is different software systems with the B of system, the data dictionary collection of described system A is the standard of the structure data structure of the described system A of description, and the data dictionary collection of described system B is the standard of the structure data structure of the described system B of description.
4, method according to claim 1, it is characterized in that, described system A and the B of system are the disparate modules of same software systems, the data dictionary collection of described system A is the standard of the data structure of the interface of the described system A of description, and the data dictionary collection of described system B is the standard of the data structure of the interface of the described system B of description.
5, according to claim 3 or 4 described methods, it is characterized in that described standard specifically comprises following element: length in start offset and the storage in length, the storage in start offset, the structure in argument sequence number, parameter type, the structure.
6, method according to claim 1 is characterized in that, described data dictionary energy collecting is enough in the demand of data adaptation ability is made amendment, added or deletes.
7, a kind of data adaptive device of realizing system's new and old edition compatibility, it is characterized in that, described device comprises storage unit and adaptive control module, store data dictionary collection and the adaptation, logic of the A of system in the described storage unit, described adaptive control module is used for being stored in the storage unit to the data dictionary collection of the B of system Request System B and with the data dictionary collection that the B of system sends, and be used in adaptation procedure, data stream being resolved, and control the process of described parsing of the data stream according to described adaptation, logic according to the data dictionary collection of described system A and the B of system.
8, device according to claim 7, it is characterized in that, described system A is different software systems with the B of system, the data dictionary collection of described system A is the standard of the structure data structure of the described system A of description, and the data dictionary collection of described system B is the standard of the data structure of the structure of the described system B of description.
9, device according to claim 7, it is characterized in that, described system A and the B of system are the disparate modules of same software systems, the data dictionary collection of described system A is the standard of the data structure of the interface of the described system A of description, and the data dictionary collection of described system B is the standard of the data structure of the interface of the described system B of description.
10, according to Claim 8 or 9 described devices, it is characterized in that described standard specifically comprises following element: length in start offset and the storage in length, the storage in start offset, the structure in argument sequence number, parameter type, the structure.
11, a kind of data adaptive device of realizing system's new and old edition compatibility, it is characterized in that, described device comprises storage unit and adaptive control module, store the data dictionary collection of the B of system in the described storage unit, described adaptive control module sends to described system A after being used for reading the data dictionary collection of described system B according to the request of obtaining the data dictionary collection that the A of system sends from described storage unit, be used for described system A and in adaptation procedure the data stream that described system B sends resolved, and control the process of the parsing of the data stream of described system B transmission according to the adaptation, logic of described system A according to the data dictionary collection of described system B and the data dictionary collection of described system A.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007100731350A CN100440144C (en) | 2007-01-26 | 2007-01-26 | Method and device for implementing compatibility between the old and new editions of system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007100731350A CN100440144C (en) | 2007-01-26 | 2007-01-26 | Method and device for implementing compatibility between the old and new editions of system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101008894A CN101008894A (en) | 2007-08-01 |
CN100440144C true CN100440144C (en) | 2008-12-03 |
Family
ID=38697338
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2007100731350A Expired - Fee Related CN100440144C (en) | 2007-01-26 | 2007-01-26 | Method and device for implementing compatibility between the old and new editions of system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100440144C (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102195895A (en) * | 2011-03-23 | 2011-09-21 | 中兴通讯股份有限公司 | Message sending and receiving processing method and device |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102081596B (en) * | 2009-11-30 | 2012-09-05 | 英业达股份有限公司 | Conversion method for file format of circuit board view program |
CN102378293B (en) * | 2010-08-11 | 2015-06-10 | 中兴通讯股份有限公司 | Code division multiple access system and A17 interface compatibility realization method |
CN102722540B (en) * | 2012-05-23 | 2018-08-17 | 南京中兴新软件有限责任公司 | Data processing method and device in real-time memory database system |
CN102902707B (en) * | 2012-08-01 | 2016-03-30 | 杭州华三通信技术有限公司 | The method of different editions binary data compatibility and versions of data converting system |
CN104753874B (en) * | 2013-12-25 | 2019-07-30 | 腾讯数码(天津)有限公司 | The method and apparatus for realizing Hadoop compatibility |
CN104317817B (en) * | 2014-09-26 | 2018-05-18 | 浙江中控技术股份有限公司 | The version compatibility method and device of a kind of configuration file |
CN105487884B (en) * | 2015-10-20 | 2019-02-01 | 华为技术有限公司 | Upgrade processing method and relevant device |
CN105677402B (en) * | 2015-12-31 | 2019-06-11 | 华为技术有限公司 | A kind of message conversion method and device |
CN108288135B (en) * | 2017-01-10 | 2022-02-01 | 北京京东尚科信息技术有限公司 | System compatibility method and device, computer readable storage medium and electronic equipment |
CN107066294B (en) * | 2017-03-17 | 2020-12-29 | 深圳市邦华电子有限公司 | Application installation method and device and intelligent terminal |
TWI650978B (en) * | 2018-03-21 | 2019-02-11 | 和碩聯合科技股份有限公司 | Packet identification method and packet identification device |
CN109783119B (en) * | 2018-12-07 | 2022-01-28 | 上海七印信息科技有限公司 | Data multi-version compatible upgrade management system and management method thereof |
CN112905226A (en) * | 2020-12-25 | 2021-06-04 | 广州朗国电子科技有限公司 | Data packaging method and device, electronic equipment and storage medium |
CN113805961B (en) * | 2021-08-27 | 2023-09-15 | 中国航空无线电电子研究所 | Product software and hardware compatibility management method based on compatibility list file |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0836487A (en) * | 1994-07-21 | 1996-02-06 | Hitachi Ltd | Data processing system |
US5740405A (en) * | 1992-12-17 | 1998-04-14 | Microsoft Corporation | Method and system for providing data compatibility between different versions of a software program |
US5778350A (en) * | 1995-11-30 | 1998-07-07 | Electronic Data Systems Corporation | Data collection, processing, and reporting system |
US20030158724A1 (en) * | 2000-05-15 | 2003-08-21 | Rie Uchida | Agent system supporting building of electronic mail service system |
US20040225696A1 (en) * | 2003-05-08 | 2004-11-11 | Lik Wong | On-demand multi-version data dictionary to support distributed applications |
CN1722137A (en) * | 2004-07-15 | 2006-01-18 | 微软公司 | External metadata processing |
US20060253540A1 (en) * | 1999-06-10 | 2006-11-09 | Ec Enabler, Ltd. (A New York Corporation) | Method and system for transferring information |
-
2007
- 2007-01-26 CN CNB2007100731350A patent/CN100440144C/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5740405A (en) * | 1992-12-17 | 1998-04-14 | Microsoft Corporation | Method and system for providing data compatibility between different versions of a software program |
JPH0836487A (en) * | 1994-07-21 | 1996-02-06 | Hitachi Ltd | Data processing system |
US5778350A (en) * | 1995-11-30 | 1998-07-07 | Electronic Data Systems Corporation | Data collection, processing, and reporting system |
US20060253540A1 (en) * | 1999-06-10 | 2006-11-09 | Ec Enabler, Ltd. (A New York Corporation) | Method and system for transferring information |
US20030158724A1 (en) * | 2000-05-15 | 2003-08-21 | Rie Uchida | Agent system supporting building of electronic mail service system |
US20040225696A1 (en) * | 2003-05-08 | 2004-11-11 | Lik Wong | On-demand multi-version data dictionary to support distributed applications |
CN1722137A (en) * | 2004-07-15 | 2006-01-18 | 微软公司 | External metadata processing |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102195895A (en) * | 2011-03-23 | 2011-09-21 | 中兴通讯股份有限公司 | Message sending and receiving processing method and device |
CN102195895B (en) * | 2011-03-23 | 2014-12-17 | 中兴通讯股份有限公司 | Message sending and receiving processing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN101008894A (en) | 2007-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN100440144C (en) | Method and device for implementing compatibility between the old and new editions of system | |
CN101499069B (en) | Internal memory database file updating method and apparatus | |
CN101841515B (en) | Target variable protocol data unit codec code automatic generation implementation method | |
CN100489774C (en) | Structured code automatic configuration method and device | |
CN101594355B (en) | Method and device for realizing cross-version software interaction | |
BR0305401A (en) | Managed File System Filter Model and Architecture | |
CN102195895A (en) | Message sending and receiving processing method and device | |
WO2005043327A3 (en) | Method and apparatus for schema-driven xml parsing optimization | |
CN101188566A (en) | A method and system data buffering and synchronization under cluster environment | |
CN103294652A (en) | Data conversion method and system | |
CN102722540A (en) | Method and device for processing data in real-time memory database system | |
CN102495739A (en) | Data compatible method and system as well as inter-plate message method and system | |
CN109861998A (en) | A kind of plug-in type dynamic analysis system and method based on Big Dipper short message agreement | |
CN101483552A (en) | Method and system for terminal configuration upgrading | |
CN101583204B (en) | Method and system for realizing managing universal combined circuit card multiple application files | |
CN101930362B (en) | Method for integrating TTCN language and data description language | |
CN102254046A (en) | Webpage data acquiring method and system | |
CN102541923A (en) | Database read-write separating method and device | |
CN104636327A (en) | Distributed type stream data system based on incremental computation | |
CN101179444B (en) | Configuration take-effective method, configuration system and configuration gateway | |
CN112883118A (en) | Method and system for synchronously acquiring incremental data based on sql | |
CN104734722A (en) | Data compression method and data decompression device | |
CN102752238A (en) | General gateway equipment and Internet of things system | |
US20080175268A1 (en) | method and system for providing interoperability of different version protocols without access to protocol specific code | |
CN1480359A (en) | Method for intelligent navigation 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 | ||
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: 20081203 Termination date: 20130126 |
|
CF01 | Termination of patent right due to non-payment of annual fee |