CN101594355B - Method and device for realizing cross-version software interaction - Google Patents
Method and device for realizing cross-version software interaction Download PDFInfo
- Publication number
- CN101594355B CN101594355B CN2009100866747A CN200910086674A CN101594355B CN 101594355 B CN101594355 B CN 101594355B CN 2009100866747 A CN2009100866747 A CN 2009100866747A CN 200910086674 A CN200910086674 A CN 200910086674A CN 101594355 B CN101594355 B CN 101594355B
- Authority
- CN
- China
- Prior art keywords
- version
- information
- data
- redaction
- business datum
- 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
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention relates to a method for realizing cross-version software interaction in the field of communication, which comprises a the following steps: receiving a data packet in a VLA(version, length and augmenter) format, wherein the data packet in VLA format comprises a before-update old version data field as well as version information, length information and change augmenter information on at least one updated new version, and the before-update old version data field comprises old version service data and corresponding version and length information on the old version service data; and processing a data field, matched with the version of software used by a receiving terminal, in the new version according to the old version service data and the version information, the length information and the change augmenter information on the new version. The embodiment of the invention also discloses a device for realizing the cross-version software interaction. The method and the device solve the problem of communication compatibility among different software versions and reduce resource waste and improve communication efficiency at the same time.
Description
Technical field
The present invention relates to communication technical field, relate in particular to a kind of method and device of realizing cross-version software interaction.
Background technology
Now, be accompanied by the high speed development of information industry, the renewal speed of software and hardware is more and more faster, tends to constantly software upgraded to release redaction in order to improve performance or to increase function.And, tending to move the equipment in each period in network for communication network, the communication protocol between applied software and the equipment is constantly being upgraded upgrading.Therefore, the inconsistent problem of communicating pair version usually can occur, promptly both sides there are differences read-write, the processing of communication data packet.Handle if having no idea or mask these difference, will cause the both sides can't proper communication, just have the communication compatibling problem between the different editions.
For example, certain communication protocol of moving above the device A is 1.0 versions, and the agreement of the B equipment operation of communicating by letter with it is 2.0 versions, and the communication data packet format of 1.0 versions is following:
message?header | data_M | data_N | data_O |
And the packet of 2.0 versions for some reason, made original data_O field data into the data_P data, and the content of data representation is different fully.If do not consider the compatibling problem of communicating by letter during design, the packet of 2.0 versions possibly directly is designed to following form so:
message?header | data_M | data_N | data_P |
Because device A still goes to extract data according to the method for 1.0 release protocol, therefore after receiving 2.0 edition data bags, it will go data_P to handle as data_O, and such processing obviously is incorrect.
For solving above-mentioned communication compatibling problem, the technical scheme that prior art one provides is following:
Type of service length value (TLV, Type Length Value) promptly adds type and length mark in packet, can effectively indicate the data structure of packet.According to the TLV method, generally can the packet of two versions be designed to following form:
1.0 the packet of version:
message?header | T(V1.0) | L(12) | data_M | data_N | data_O |
2.0 the packet of version
message header | T(V1.0) | ?L(12) | data_M | data_N | data_O | T(V2.0) | ?L(12) | data_M | data_N | data_P |
As implied above, the TLV packet has increased several fields on the basis of general data bag.Before each data that will transmit, increased T and two fields of L, T is type, and its numerical value is used for identifying the release type of back data, and L is length, is used for representing the business datum length under the corresponding types, and the field of L back is a business datum.T+L+ business datum (like data_M, data_N, the date_O of back, i.e. value) is called a TLV field altogether.
Through said method, the communication data packet of any version all is expressed as being formed by a plurality of TLV field combination.When the Data Receiving side is extracted data, at first find the T data of first TLV field, mate according to the next software of the version number of T Data Identification with this side, data matching is taken out, thereby realized the compatibility of communicating by letter.
For example, use TLV, equipment B has been sent the packet of one 2.0 version to device A; Device A is receiving that the processing procedure behind this packet is as shown in Figure 1, comprising: at first find the T data of first TLV field, according to T (V1.0) data; Device A confirms that this TLV is the TLV of one 1.0 version, so device A is according to the value of L; Promptly the length of 12 bytes has been taken out data_M and data_N, data_O, and carries out correct handling; According to the value of L 12 bytes that squint backward; Device A has found next TLV field, still needs to judge earlier the value of T, according to T (V2.0); Device A confirms that this TLV field is 2.0 versions; Because device A itself do not support the processing to other edition datas, so device A can select the data of the TLV field that T (V2.0) is corresponding to abandon, and do not process.
And for equipment B; If receive the packet of 2.0 versions of above-mentioned same form, according to the T field among the TLV, equipment B finds that first TLV field and version own do not match; Therefore do not process; The version of second TLV field is 2.0 versions, with the version information coupling of self, therefore from second TLV field, extracts data and handles.
The inventor finds that in practice there is following shortcoming at least in prior art one:
Because the packet of TLV scheme must comprise the total data of a plurality of versions, therefore cause message data long, and had data redundancy, efficiency of transmission is low, causes the wasting of resources, and is particularly evident for bigger packet wasting of resources problem.
Summary of the invention
The embodiment of the invention provides a kind of method and device of realizing cross-version software interaction, when realizing software version compatibility, reduces the long wasting of resources problem that causes of message data.
The embodiment of the invention realizes through following technical scheme:
The embodiment of the invention provides a kind of method that realizes cross-version software interaction, comprising:
Receive the packet of version, length, increment VLA form; The packet of said VLA form comprises version information, length information and the change increment information of the preceding legacy data field of a upgrading and at least one upgrading back redaction; The legacy data field comprises before the said upgrading: version information and length information that legacy version business datum and this legacy version business datum are corresponding;
Version information, length information and change increment information according to said legacy version business datum and redaction are handled the software version data matching field of using with receiving terminal in the redaction.
The embodiment of the invention provides a kind of device of realizing cross-version software interaction, comprising:
Receiving element is used to receive the packet of version, length, increment VLA form; The packet of said VLA form comprises version information, length information and the change increment information of the preceding legacy data field of a upgrading and at least one upgrading back redaction; The legacy data field comprises before the said upgrading: version information and length information that legacy version business datum and this legacy version business datum are corresponding;
Data processing unit is used for according to version information, length information and the change increment information of said legacy version business datum and redaction redaction and the software version data matching field that receiving terminal uses being handled.
Technical scheme by the invention described above embodiment provides can find out that the embodiment of the invention has solved the compatible problem of communication of different software versions, has reduced the wasting of resources simultaneously, has improved communication efficiency.
Description of drawings
Fig. 1 receives the processing sketch map of the edition data bag after the upgrading for equipment before the prior art software upgrading;
Fig. 2 realizes the method flow diagram of cross-version software interaction for the embodiment of the invention;
Fig. 3 is instance one a redaction data packet format of the present invention;
Fig. 4 is instance two redaction data packet formats of the present invention;
Fig. 5 realizes the apparatus structure sketch map of cross-version software interaction for the embodiment of the invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, and it is understandable that, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
The embodiment of the invention provides a kind of method that realizes cross-version software interaction, comprising:
Receive the packet of version, length, increment (VLA, Version Length Addition) form; The packet of said VLA form comprises version information, length information and the change increment information of the preceding legacy data field of a upgrading and at least one upgrading back redaction; The legacy data field comprises before the said upgrading: version information and length information that legacy version business datum and this legacy version business datum are corresponding;
Version information, length information and change increment information according to said legacy version business datum and redaction are handled the software version data matching field of using with receiving terminal in the redaction.
The embodiment of the invention has solved the compatible problem of communication of different software versions, has reduced the wasting of resources simultaneously, has improved communication efficiency.
Further embodiment of this invention provides a kind of method that realizes software version compatibility, to be example shown in Fig. 2, comprises the steps:
Step 20: the packet that receives the VLA form; The packet of said VLA form comprises version information, length information and the change increment information of the preceding legacy data field of a upgrading and at least one upgrading back redaction;
The legacy data field comprises before the said upgrading: version information and length information that legacy version business datum and this legacy version business datum are corresponding;
The change increment information of said redaction comprises the data after the change, can further include: data change type and data change position.Said data change type includes but not limited to: increase, deletion or modification etc.
Step 21: version information, length information and change increment information according to said legacy data and redaction are handled the software version data matching field of using with receiving terminal in the redaction.
Before handling with the data field of version match own; Can the packet of said VLA form be converted into the form with version match own, that is, be the basis with the legacy data field; The change increment information that comprises in conjunction with data field with version match own; Obtain the complete data packet with the VLA form of version match own, can pay close attention to the compatible problem of communication between version for the main program of the equipment after the upgrading like this, simplified handling process.Concrete transfer process comprises:
The software version coupling of whether using with receiving terminal according to the version information specified data field of said redaction;
If coupling then finds the change increment information according to length information, confirm the changed information of redaction business datum to the legacy version business datum according to the change increment information;
According to said legacy version business datum and redaction business datum the changed information of legacy version business datum is obtained the redaction business datum, this redaction business datum is handled.
To not handling with the unmatched data field of software version of receiving terminal use.
The embodiment of the invention has solved the compatible problem of communication of different software versions through the VLA scheme; Because total data that will each version is all sent; But send the change increment information; Reduce the wasting of resources, improved communication efficiency, more obvious for the wasting of resources effect of the minimizing of bigger packet.
For further understanding the present invention, with instantiation the present invention is described in detail below.
Instance one
What suppose device A operation is the communication protocol of legacy version (V1.0), the equipment B operation be the communication protocol of redaction (V2.0), the VLA scheme that provides according to the embodiment of the invention; The form of redaction packet is as shown in Figure 3, and wherein, the V field is used for identifying version information; L is length; The length of expression business datum includes the data data_P (4 bytes) after redaction is changed in the field of L back, rather than the partial data of redaction (12 bytes).
If device A receives the packet of VLA form shown in Figure 3; Its processing procedure is: the data V1.0 that finds first VLA field V back; Through analyzing V value, confirm and self version match after, data_M, data_N and data_O extracted handle.Second of device A analysis back VLA field then finds that the value of V is 2.0, do not match with self version, and promptly device A is not supported 2.0 versions, so do not process, this second VLA field is abandoned.
If equipment B receives the packet of VLA form as shown in Figure 3, its processing procedure is: scan-data bag, equipment B are at first found the data content of 1.0 versions; Be data_M, data_N, data_O, keep this data content, wouldn't handle; Continue to analyze second VLA field of back, the V value of finding this VLA is 2.0, with self version match; Therefore need handle this VLA field, because equipment B is supported this version, so the understanding of equipment B side replaces with data_P with the value of data_O; Therefore equipment B does not re-use data_O; Handle and extract data_P, promptly equipment B is the basis with the legacy data, obtains complete redaction data data_M, data_N, data_P in conjunction with the change increment information.
The said scheme of this instance has reduced the size of packet, has improved the level of resources utilization.
Instance two
What suppose device A operation is the communication protocol of legacy version (V1.0), and the communication protocol for redaction (V2.0) of equipment B operation is example, the VLA scheme that provides according to the embodiment of the invention; The form of redaction packet is as shown in Figure 4; Wherein the V field is used for identifying version information, and L is length, the length of expression business datum; The field of L back is change increment information Addition part; Include change type Oper field (1 byte) and data change position offset+len field (4 bytes) in the said Addition part, and data data_P (4 bytes) field after the change, rather than the partial data of redaction (12 bytes).
Said Oper field length is 1 byte, is operator, and the change type of the change that expression is done legacy data can comprise following three kinds of action types:
Add: being described on the legacy data basis increases data;
Del: describe certain the data deletion in the legacy version, do not re-use;
Modify: be described on the basis of legacy data and make amendment;
It is understandable that the described change type of the embodiment of the invention is not limited thereto.
In addition, the position that the change of offset+len field description among the Addition takes place, in this example, the data of modification are data_O, just from the original position of data_M 8 bytes that squint backward, so the value of offset+len is 8.
Data_P is the content after changing.
If device A receives the packet of VLA form shown in Figure 4; Its processing procedure is: the data V1.0 that finds first VLA field V back; Through analyzing V value, confirm and self version match after, data_M, data_N and data_O extracted handle.Second of device A analysis back VLA field then finds that the value of V is 2.0, do not match with self version, and promptly device A is not supported 2.0 versions, so do not process, this second VLA field is abandoned.
If equipment B receives the packet of VLA form as shown in Figure 4, its processing procedure is: scan-data bag, equipment B are at first found the data content of 1.0 versions; Be data_M, data_N, data_O, keep this data content, wouldn't handle; Continue to analyze second VLA field of back, the V value of finding this VLA is 2.0, with self version match; Therefore need handle this VLA field; Recognize in 8 bytes that squint backward of the original position from data_M according to Oper (Modify) and offset+len (8) to be modified, and amended content is data_P that equipment B obtains complete redaction data data_M, data_N, data_P and handles.Perhaps equipment B converts the packet of said VLA form the form of V2.0 version into, promptly resolves to following form:
V(V2.0) | ?L(12) | ?data_M | data_N | data_P |
Like this, the main program of equipment B need not be paid close attention to the communication compatibling problem, simplifies follow-up processing flow.
The said scheme of this instance through change increment information accurate description the change that takes place of edition upgrading, eliminated redundant information, solved the communication compatibling problem, and improved the level of resources utilization, reduced the wasting of resources.
The embodiment of the invention also provides a kind of device of realizing software version compatibility, to be example shown in Fig. 5, comprising:
Receiving element 50 is used to receive the packet of version, length, increment VLA form; The packet of said VLA form comprises version information, length information and the change increment information of the preceding legacy data field of a upgrading and at least one upgrading back redaction; The legacy data field comprises before the said upgrading: version information and length information that legacy version business datum and this legacy version business datum are corresponding;
The embodiment of the invention has solved the compatible problem of communication of different software versions, has reduced the wasting of resources simultaneously, has improved communication efficiency.
In sum, the embodiment of the invention has solved the compatible problem of communication of different software versions, has reduced the wasting of resources simultaneously, has improved communication efficiency.
One of ordinary skill in the art will appreciate that realize that all or part of step in the foregoing description method is to instruct relevant hardware to accomplish through program, described program can be stored in the computer-readable recording medium.This readable storage medium storing program for executing is read-only memory (being called for short ROM), random access memory (being called for short RAM), disk, CD etc. for example.
The above; Be merely the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technical staff who is familiar with the present technique field is in the technical scope that the present invention discloses; The variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.
Claims (7)
1. a method that realizes cross-version software interaction is characterized in that, comprising:
Receive the packet of version, length, increment VLA form; The packet of said VLA form comprises the version information of the preceding legacy data field of a upgrading and at least one upgrading back redaction, the length information and the change increment information of redaction; The legacy data field comprises before the said upgrading: version information and length information that legacy version business datum and this legacy version business datum are corresponding; Said change increment information comprises the data after the change;
Version information, length information and change increment information according to said legacy version business datum and redaction are handled the software version data matching field of using with receiving terminal in the redaction;
The length information of said version information according to said legacy version business datum and redaction, redaction and change increment information are handled specifically the software version data matching field of using with receiving terminal in the redaction and are comprised:
The software version coupling of whether using with receiving terminal according to the version information specified data field of said redaction;
If coupling, then the length information according to said redaction finds the change increment information, confirms the changed information of redaction business datum to the legacy version business datum according to the change increment information;
According to said legacy version business datum and redaction business datum the changed information of legacy version business datum is obtained the redaction business datum, this redaction business datum is handled.
2. the method for claim 1 is characterized in that, also comprises:
To not handling with the unmatched data field of software version of receiving terminal use.
3. according to claim 1 or claim 2 method is characterized in that said change increment information also comprises: data change type and data change position.
4. method as claimed in claim 3 is characterized in that, said data change type comprises: increase, delete or revise.
5. a device of realizing cross-version software interaction is characterized in that, comprising:
Receiving element is used to receive the packet of version, length, increment VLA form; The packet of said VLA form comprises version information, length information and the change increment information of the preceding legacy data field of a upgrading and at least one upgrading back redaction; The legacy data field comprises before the said upgrading: version information and length information that legacy version business datum and this legacy version business datum are corresponding; Said change increment information comprises the data after the change;
Data processing unit is used for according to version information, length information and the change increment information of said legacy version business datum and redaction redaction and the software version data matching field that receiving terminal uses being handled;
Said version information according to said legacy version business datum and redaction, length information and change increment information are handled specifically the software version data matching field of using with receiving terminal in the redaction and are comprised:
The software version coupling of whether using with receiving terminal according to the version information specified data field of said redaction;
If coupling then finds the change increment information according to length information, confirm the changed information of redaction business datum to the legacy version business datum according to the change increment information;
According to said legacy version business datum and redaction business datum the changed information of legacy version business datum is obtained the redaction business datum, this redaction business datum is handled.
6. device as claimed in claim 5 is characterized in that, said change increment information also comprises: data change type and data change position.
7. device as claimed in claim 6 is characterized in that, said change type comprises: increase, delete or revise.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100866747A CN101594355B (en) | 2009-06-17 | 2009-06-17 | Method and device for realizing cross-version software interaction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100866747A CN101594355B (en) | 2009-06-17 | 2009-06-17 | Method and device for realizing cross-version software interaction |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101594355A CN101594355A (en) | 2009-12-02 |
CN101594355B true CN101594355B (en) | 2012-11-07 |
Family
ID=41408797
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009100866747A Expired - Fee Related CN101594355B (en) | 2009-06-17 | 2009-06-17 | Method and device for realizing cross-version software interaction |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101594355B (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101977220B (en) * | 2010-10-14 | 2015-06-03 | 中兴通讯股份有限公司 | Method and device for matching functional modules with different versions among function subsystems |
CN102469073B (en) * | 2010-11-04 | 2015-05-06 | 腾讯科技(深圳)有限公司 | Communication method and apparatus thereof |
CN102902707B (en) * | 2012-08-01 | 2016-03-30 | 杭州华三通信技术有限公司 | The method of different editions binary data compatibility and versions of data converting system |
WO2014019205A1 (en) * | 2012-08-02 | 2014-02-06 | 华为技术有限公司 | Method, apparatus, and system for processing data packet |
CN103326889B (en) * | 2013-07-18 | 2016-06-08 | 迈普通信技术股份有限公司 | Communicate between a kind of new and old edition compatible method and device |
CN105573785A (en) * | 2015-12-11 | 2016-05-11 | 青岛海信电器股份有限公司 | Differential package manufacturing method and device |
CN105677402B (en) * | 2015-12-31 | 2019-06-11 | 华为技术有限公司 | A kind of message conversion method and device |
CN108021404A (en) * | 2018-01-09 | 2018-05-11 | 郑州云海信息技术有限公司 | A kind of cross-version upgrades storage system and verifies the system and method for data consistency |
CN108874563A (en) * | 2018-06-28 | 2018-11-23 | 郑州云海信息技术有限公司 | A kind of method, system and the equipment of the interaction of information cross-version |
CN111488171B (en) * | 2019-01-29 | 2023-11-03 | 杭州海康威视数字技术股份有限公司 | Data generation and analysis method and device and electronic equipment |
CN111949287A (en) * | 2019-05-16 | 2020-11-17 | 北京京东尚科信息技术有限公司 | Software upgrading method and device |
CN111190851A (en) * | 2019-12-11 | 2020-05-22 | 深圳市优必选科技股份有限公司 | Analysis method, device, equipment and medium for variable length protocol |
CN114064532B (en) * | 2021-11-08 | 2022-06-17 | 深圳华云信息系统有限公司 | Data processing method and device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6546552B1 (en) * | 1998-08-19 | 2003-04-08 | Red Bend Ltd. | Difference extraction between two versions of data-tables containing intra-references |
CN1826585A (en) * | 2003-06-23 | 2006-08-30 | 雷德本德有限公司 | Method and system for updating versions of content stored in a storage device |
CN1859151A (en) * | 2005-07-19 | 2006-11-08 | 上海华为技术有限公司 | Method for upgrading remote subsystem in communication system |
-
2009
- 2009-06-17 CN CN2009100866747A patent/CN101594355B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6546552B1 (en) * | 1998-08-19 | 2003-04-08 | Red Bend Ltd. | Difference extraction between two versions of data-tables containing intra-references |
CN1826585A (en) * | 2003-06-23 | 2006-08-30 | 雷德本德有限公司 | Method and system for updating versions of content stored in a storage device |
CN1859151A (en) * | 2005-07-19 | 2006-11-08 | 上海华为技术有限公司 | Method for upgrading remote subsystem in communication system |
Also Published As
Publication number | Publication date |
---|---|
CN101594355A (en) | 2009-12-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101594355B (en) | Method and device for realizing cross-version software interaction | |
CN101246486B (en) | Method and apparatus for improved process of expressions | |
CN101645801B (en) | Software version upgrading method based on cluster management and order exchanger | |
CN103428184A (en) | Method and system for converting communication messages | |
CN101246440B (en) | Java card system rubbish recovering method | |
CN102495739A (en) | Data compatible method and system as well as inter-plate message method and system | |
CN102541926B (en) | Data exchange processing method, equipment and system | |
CN104657164A (en) | Method and device for updating and processing software | |
CN100477582C (en) | Method and system for processing real-time multi-media information in instant telecommunication | |
CN105207984A (en) | Method Of Representing A Generic Format Header Using Continuous Bytes And An Apparatus Thereof | |
CN112416557B (en) | Method and device for determining call relation, storage medium and electronic device | |
CN106095511A (en) | A kind of server updating method and apparatus | |
US20090049136A1 (en) | Method of and System for Dynamically Managing a System of Servers | |
CN103646015B (en) | Transmission, the method and system for receiving and transmitting XML message | |
CN105187330A (en) | A method of using a unique packet identifier to identify structure of a packet and an apparatus thereof | |
CN101867524B (en) | Seamless mobile communication method and system in locator-identifier split network | |
CN101510293A (en) | Method for transmitting securities market indent queue data | |
CN102811143A (en) | Method and device for monitoring failure of data link layer, and network equipment | |
CN105450733A (en) | Business data distribution processing method and system | |
CN108228226B (en) | Hard link differential method and device and corresponding terminal | |
JPH10289172A (en) | Data transfer system | |
CN109451016B (en) | Data download management method, system and related equipment | |
CN110231954B (en) | Simplified transmission and upgrading method for OTA data of android system and storage medium thereof | |
CN100539620C (en) | A kind of method that realizes that the supplementary service attribute is provided with | |
CN101515362A (en) | Method for transmitting data of an overall snapshot of a securities quotation order |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20121107 Termination date: 20190617 |