CN102546599A - Method for implementing equivalent conversion of different protocol data - Google Patents
Method for implementing equivalent conversion of different protocol data Download PDFInfo
- Publication number
- CN102546599A CN102546599A CN2011104275404A CN201110427540A CN102546599A CN 102546599 A CN102546599 A CN 102546599A CN 2011104275404 A CN2011104275404 A CN 2011104275404A CN 201110427540 A CN201110427540 A CN 201110427540A CN 102546599 A CN102546599 A CN 102546599A
- Authority
- CN
- China
- Prior art keywords
- data
- cdata
- message
- array
- data object
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a method for implementing equivalent conversion of different protocol data, comprising the steps of: step 1, converting protocol data to be converted into a CDATA data object; and step 2, converting the converted CDATA data into appointed protocol data according to a CDATA standard. Through the method for implementing equivalent conversion of different protocol data provided by the invention, the data in various formats is unified to a set of standard data so that the difference of data protocols among different systems is eliminated, various data is conveniently interacted, and loose coupling of data provision and data display is implemented.
Description
Technical field
The present invention relates to a kind of computer technology, particularly a kind of different agreement data method of changeing mutually of equal value that realizes.
Background technology
Along with the Internet technology development; Increasing system needs intercommunication and swap data mutually; Owing to reason or other specific demands such as data that have various different agreements, there are not unified interface protocol and data format between each system, cause between the system very difficulty of information exchange.
So, need to propose a kind ofly to realize any two kinds of data method of exchanging of equal value, the difference of the data protocol between the elimination system, mutual between the convenient various data realizes that data provide the loose coupling with data display.
Summary of the invention
The object of the present invention is to provide a kind of different agreement data method of changeing mutually of equal value that realizes; Become a cover normal data to the uniform data of various forms; The difference of the data protocol between the elimination system, mutual between the convenient various data realizes that data provide the loose coupling with data display.
In order to solve above technical problem, the present invention provides a kind of different agreement data method of changeing mutually of equal value that realizes, comprising:
Step 1, the data transaction of agreement to be converted is become the CDATA data object;
Step 2, will convert the CDATA data object becomes specified protocol through the CDATA standard handovers data to.
Further, said CDATA data object is the set of CDATA data and CDATA object, and wherein, the CDATA data are carriers of business datum, and the CDATA object provides and the various data after decomposing are carried out assemble method gathers.
Further, said CDATA data object is by the CDATA data, and three kinds of basic elements of array data and non-array data are formed.
Further, in the step 1, the data transaction of agreement to be converted is become the CDATA data object, specifically comprises:
The data that comprise in the specified protocol are decomposed, can assemble the various data after decomposing, constitute the CDATA data according to the method that the CDATA object provides.
Further, in the step 2, become the data of specified protocol through the CDATA standard handovers, specifically comprise converting the CDATA data object to:
Method according to the CDATA object provides is operated the CDATA data, takes out data from the CDATA data, take out data after, carry out assembly unit according to the message of specified protocol, realize that the CDATA object is converted into the message data of other specified protocol.
Compared with prior art; A kind of different agreement data method of changeing mutually of equal value that realizes provided by the invention; Through with the standard of CDATA data object as data transaction; Any one data convert the CDATA data object of standard into through analytic equivalence, and the CDATA data object just can change with arbitrary data is of equal value mutually like this, and the CDATA data object becomes intermediary's data of changeing mutually of equal value between the data.Adopt the inventive method, become a cover normal data to various formatted data unifications, the difference of the data protocol between the elimination system, mutual between the convenient various data, the realization data provide the loose coupling with data display.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes a part of the present invention, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, does not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is a kind of flow chart of realizing different agreement data method of changeing mutually of equal value provided by the invention.
Embodiment
In order to make technical problem to be solved by this invention, technical scheme and beneficial effect clearer, clear,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.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.
The present invention provides a kind of different agreement data method of changeing mutually of equal value that realizes; Through the standard of CDATA data object of the present invention as data transaction; Any one data convert the CDATA data object of standard into through analytic equivalence; Through CDATA data object and arbitrary data commentaries on classics mutually of equal value, the CDATA data object becomes intermediary's data of changeing mutually of equal value between the data again.
The CDATA data object is the set of CDATA data and CDATA object, and wherein, the CDATA data are carriers of business datum, and the CDATA object provides and the various data after decomposing are carried out assemble method gathers.After the CDATA data object makes up a business; This business datum just becomes memory database; When it comprises various relation data; The various methods of operation that the CDATA object comprises can easily be set the complicacy of CDATA data construct and carry out various operations; Easily make up the CDATA data object, add various data to CDATA data object the inside, also can carry out the CDATA data object that has built node data deletion, node data revise, copy node data, obtain appointment the CDATA data, obtain appointment array, obtain the operations such as node data of appointment.Thereby realize operation to business datum.
The CDATA data object is mainly by the CDATA data; Three kinds of basic elements of array data and non-array data are formed; Non-array is a least member, and array can nested array, also can nested CDATA data; Can Infinite Cyclic nested, so the CDATA data object that makes up can be described any complicated service logic.
Wherein, the CDATA data object has following characteristics:
A: there are one-to-one relationship in the description field of data object and numeric field data value.Specifically, through being provided with or obtaining the domain name object and the thresholding object of initial data, just can realize the one-to-one relationship of field and numeric field data value.
B: the type and the length precision of data object ability accurate description numeric field data.Specifically, through being provided with or obtaining type and length accuracy variable, just can realize the relation of field and data type and length precision.
C: data object can be described the tabulation corresponding relation of any a plurality of field and numeric field data value.Specifically, add the method and the circulation of data object through circulation and obtain data method, realize the tabulation corresponding relation of any a plurality of field and numeric field data value.
D: data object can comprise a plurality of arrays, and array can comprise the tabulation corresponding relation of many group fields and numeric field data value, and array and non-array can and be stored in the same data object.Specifically,, need to calculate array size and the method for obtaining array size, realize that data object comprises a plurality of arrays through creating array and the method for obtaining array.
E: array can also nested again array, is nested in tabulation that the array of array the inside also can comprise many group fields and numeric field data value for relation, loop nesting, and the depth of nesting can infinity.Specifically,, also promptly, need and can possess the method for in array object, adding array, can from array object, obtain the method for array object, realize array cover array array manipulation through realizing the algorithm of recurrence,
F: above all relations are included in a CDATA data object the inside.Specifically; Provide CDATA data object method of operating, also promptly need and to operate the data object, from data object, create the territory; From data object, obtain the territory; From data object, create array, from data object, obtain array, thereby realize that all relations are included in a CDATA data object the inside.
G: a CDATA data object the inside can comprise one or more CDATA data objects, and CDATA data object and Array array object can be nested against one another.Specifically; Through the nested CDATA data object of CDATA data object, realize that a CDATA data object the inside can comprise one or more CDATA data objects, also is; The data object is carried out integrated operation; Need to give data object storage allocation space, can under data object, create data object, can carry out traversing operation the data object; The CDATA data object has the method that is provided with and obtains the Array array object, and the Array data object has the method that is provided with and obtains the CDATA array object.
As shown in Figure 1, the present invention provides a kind of different agreement data method of changeing mutually of equal value that realizes, comprising:
Step 1, the data transaction of agreement to be converted is become the CDATA data object;
Step 2, will convert the CDATA data object becomes specified protocol through the CDATA standard handovers data to.
In the step 1, the data transaction of agreement to be converted is become the CDATA data object, specifically comprises:
The data that comprise in the specified protocol are decomposed, can assemble the various data after decomposing according to the method that the CDATA object provides, the data after the assembling constitute the CDATA data.So, no matter be the data of which kind of agreement, decomposed data can be used for organizing and be bundled into the data object into CDATA.
The data of agreement to be converted generally comprise: XML message, fixed length message, soap protocol message, Session Initiation Protocol message, FIX message, JSON message etc.The process that specifically converts the CDATA data object to is following:
The XML message converts the CDATA data object to: resolve the xml message, extract the key message of each node, form correct object data according to the method that the CDATA object is confirmed.
The fixed length message converts the CDATA data object to: resolve the fixed length message, extract the key message of each node, form correct object data according to the method that the CDATA object is confirmed.
The JSON message converts the CDATA data object to: resolve the JSON message, extract the key message of each node, form correct object data according to the method that the CDATA object is confirmed.
In the step 2, become the data of specified protocol with converting the CDATA data object to through the CDATA standard handovers, detailed process is following:
Method according to the CDATA object provides is operated the CDATA data object, takes out data from the CDATA data, take out data after, carry out assembly unit according to the message of specified protocol, realize that the CDATA object is converted into the message data of other specified protocol.
The CDATA data object converts the XML message to: the method for the operand that provides according to the CDATA object, assembling becomes the XML message of appointment.
The CDATA data object converts the fixed length message to: the operand method according to the CDATA object provides is obtained data and interface document regulation field length, and assembling becomes the fixed length message of appointment.
The CDATA data object converts the JSON message to: the operand method according to the CDATA object provides is obtained data and interface document regulation field length, and assembling becomes the JSON message of appointment.
Method of the present invention can realize the method for changeing mutually of equal value between the data; For butt joint between the operation system of data in different formats (like XML message, fixed length message, soap protocol message, Session Initiation Protocol message, FIX message, JSON message etc.) message provides good data mutual shifting method, particularly change mutually with the of equal value of XML data.Change mutually because the CDATA data object of design ability and XML data are of equal value; Use CDATA data object of the present invention; Can develop the CDATA data object API of multilingual version, for the operation system swap data of different language exploitation is provided convenience, for example: the JAVA language; The C language .NET etc. can both develop the API of CDATA data object.
One, JAVA language API
1, the CDATA object converts the XML message to: the method for the operand that provides according to the CDATA object, assembling becomes the XML message of appointment.
2, the XML message converts the CDATA object to: resolve the xml message, extract the key message of each node, form correct object data according to the method that the CDATA object is confirmed;
3, the CDATA object converts the fixed length message to: the operand method according to the CDATA object provides is obtained data and interface document regulation field length, and assembling becomes the fixed length message of appointment.
4, the fixed length message converts the CDATA object to: resolve the fixed length message, extract the key message of each node, form correct object data according to the method that the CDATA object is confirmed;
5, the CDATA object converts the JSON message to: the operand method according to the CDATA object provides is obtained data and interface document regulation field length, and assembling becomes the JSON message of appointment.
6, the JSON message converts the CDATA object to: resolve the JSON message, extract the key message of each node, form correct object data according to the method that the CDATA object is confirmed;
7,, possess and the interface packets data of any system function of changeing mutually of equal value through customized development.
Two, C language API
C language API and JAVA language API are similar, can carry out various operations to data, and CDATA object and XML message are of equal value to be changeed mutually, and CDATA object and fixed length message are of equal value to be changeed mutually, CDATA object and JSON message function of changeing mutually of equal value.
Three .NET language API
.NET language API and JAVA language API are similar, can carry out various operations to data, and CDATA object and XML message are of equal value to be changeed mutually, and CDATA object and fixed length message are of equal value to be changeed mutually, CDATA object and JSON message function of changeing mutually of equal value.
A kind of different agreement data method of changeing mutually of equal value that realizes provided by the invention; Through with the standard of CDATA data object as data transaction; Any one data convert the CDATA data object of standard into through analytic equivalence; The CDATA data object just can change with arbitrary data is of equal value mutually like this, and the CDATA data object becomes intermediary's data of changeing mutually of equal value between the data.Adopt method of the present invention, become a cover normal data to the uniform data of various forms, the difference of the data protocol between the elimination system, mutual between the convenient various data realizes that data provide the loose coupling with data display.
Above-mentioned explanation illustrates and has described a preferred embodiment of the present invention; But as previously mentioned; Be to be understood that the present invention is not limited to the form that this paper discloses, should do not regard eliminating as, and can be used for various other combinations, modification and environment other embodiment; And can in invention contemplated scope described herein, change through the technology or the knowledge of above-mentioned instruction or association area.And change that those skilled in the art carried out and variation do not break away from the spirit and scope of the present invention, then all should be in the protection range of accompanying claims of the present invention.
Claims (5)
1. realize different agreement data method of changeing mutually of equal value for one kind, it is characterized in that, comprising:
Step 1, the data transaction of agreement to be converted is become the CDATA data object;
Step 2, will convert the CDATA data object becomes specified protocol through the CDATA standard handovers data to.
2. the method for claim 1; It is characterized in that said CDATA data object is the set of CDATA data and CDATA object, wherein; The CDATA data are carriers of business datum, and the CDATA object provides and the various data after decomposing are carried out assemble method gathers.
3. the method for claim 1 is characterized in that, said CDATA data object is by the CDATA data, and three kinds of basic elements of array data and non-array data are formed.
4. method as claimed in claim 2 is characterized in that, in the step 1, the data transaction of agreement to be converted is become the CDATA data object, specifically comprises:
The data that comprise in the specified protocol are decomposed, can assemble the various data after decomposing, constitute the CDATA data according to the method that the CDATA object provides.
5. method as claimed in claim 2 is characterized in that, in the step 2, becomes the data of specified protocol with converting the CDATA data object to through the CDATA standard handovers, specifically comprises:
Method according to the CDATA object provides is operated the CDATA data, takes out data from the CDATA data, take out data after, carry out assembly unit according to the message of specified protocol, realize that the CDATA object is converted into the message data of other specified protocol.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011104275404A CN102546599A (en) | 2011-12-16 | 2011-12-16 | Method for implementing equivalent conversion of different protocol data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011104275404A CN102546599A (en) | 2011-12-16 | 2011-12-16 | Method for implementing equivalent conversion of different protocol data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102546599A true CN102546599A (en) | 2012-07-04 |
Family
ID=46352561
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011104275404A Pending CN102546599A (en) | 2011-12-16 | 2011-12-16 | Method for implementing equivalent conversion of different protocol data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102546599A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105138683A (en) * | 2015-09-15 | 2015-12-09 | 歌尔声学股份有限公司 | Method and system for converting JSON data into two-dimensional array |
CN107135188A (en) * | 2016-02-29 | 2017-09-05 | 阿里巴巴集团控股有限公司 | The service implementation method of financial information exchange FIX agreements, apparatus and system |
CN108337229A (en) * | 2017-12-26 | 2018-07-27 | 神华集团有限责任公司 | Method, storage medium and the electronic equipment that multisystem interconnects |
CN117454846A (en) * | 2023-12-25 | 2024-01-26 | 广州睿帆科技有限公司 | Method for converting XSD file into JSON file |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030134590A1 (en) * | 1998-08-11 | 2003-07-17 | Hirofumi Suda | Data communication apparatus, data communication system, data communication method and storage medium |
CN201146538Y (en) * | 2008-01-21 | 2008-11-05 | 上海可鲁系统软件有限公司 | Apparatus for protocol conversion |
CN101854083A (en) * | 2010-04-30 | 2010-10-06 | 广州合立正通信息网络集成有限公司 | Adaptive device for realizing A/D conversion protocol of power equipment |
CN102215381A (en) * | 2011-06-23 | 2011-10-12 | 天地阳光通信科技(北京)有限公司 | Integrating device and method for integrating digital video monitoring systems |
-
2011
- 2011-12-16 CN CN2011104275404A patent/CN102546599A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030134590A1 (en) * | 1998-08-11 | 2003-07-17 | Hirofumi Suda | Data communication apparatus, data communication system, data communication method and storage medium |
CN201146538Y (en) * | 2008-01-21 | 2008-11-05 | 上海可鲁系统软件有限公司 | Apparatus for protocol conversion |
CN101854083A (en) * | 2010-04-30 | 2010-10-06 | 广州合立正通信息网络集成有限公司 | Adaptive device for realizing A/D conversion protocol of power equipment |
CN102215381A (en) * | 2011-06-23 | 2011-10-12 | 天地阳光通信科技(北京)有限公司 | Integrating device and method for integrating digital video monitoring systems |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105138683A (en) * | 2015-09-15 | 2015-12-09 | 歌尔声学股份有限公司 | Method and system for converting JSON data into two-dimensional array |
CN105138683B (en) * | 2015-09-15 | 2018-06-15 | 歌尔股份有限公司 | JSON data turn the method and system of two-dimensional array |
CN107135188A (en) * | 2016-02-29 | 2017-09-05 | 阿里巴巴集团控股有限公司 | The service implementation method of financial information exchange FIX agreements, apparatus and system |
US10791070B2 (en) | 2016-02-29 | 2020-09-29 | Alibaba Group Holding Limited | Service implementation method, apparatus, and system based on fix protocol |
CN108337229A (en) * | 2017-12-26 | 2018-07-27 | 神华集团有限责任公司 | Method, storage medium and the electronic equipment that multisystem interconnects |
CN108337229B (en) * | 2017-12-26 | 2021-03-09 | 神华集团有限责任公司 | Multi-system interconnection method, storage medium and electronic equipment |
CN117454846A (en) * | 2023-12-25 | 2024-01-26 | 广州睿帆科技有限公司 | Method for converting XSD file into JSON file |
CN117454846B (en) * | 2023-12-25 | 2024-03-26 | 广州睿帆科技有限公司 | Method for converting XSD file into JSON file |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7761586B2 (en) | Accessing and manipulating data in a data flow graph | |
RU2370808C2 (en) | System and method for data display with enclosed tables without circuit diagram | |
Maali et al. | A publishing pipeline for linked government data | |
Third et al. | Linked data indexing of distributed ledgers | |
US8495594B2 (en) | Method and system for providing a componentized resource adapter architecture | |
CN103744891A (en) | Method and system for data query | |
CN102270137B (en) | Method for acquiring ADL (architecture description language) and modeling tool | |
CN102968307A (en) | Java-based web development middleware | |
CN101957758A (en) | Method for realizing rapid Web Service publishment in service oriented architecture application systems | |
JP2011159302A (en) | Xml payload specification for modeling edi schema | |
US7945893B2 (en) | Mapping web services description language documents to XQuery functions | |
CN102546599A (en) | Method for implementing equivalent conversion of different protocol data | |
Martin et al. | Towards semantic annotations of web services: OWL-S from the SAWSDL perspective | |
US9471640B2 (en) | Automatic conversion of units of measure during data stream processing | |
CN105306542A (en) | System for integrating Web services | |
Jones et al. | Many views, many modes, many tools... one structure: Towards a Non-disruptive Integration of Personal Information | |
Goyal et al. | An overview of hybrid databases | |
CN103810267A (en) | Data interaction method among heterogeneous PDM systems | |
CN101609463B (en) | Method for establishing data conversion relation among notes and method for data migration among notes | |
Aman et al. | Reverse engineering: from XML to Uml for generation of software requirement specification | |
US8442934B2 (en) | Query and result rebinding | |
TW201042470A (en) | Data synchronization system and method using directory service format to establish metadata | |
Garg et al. | Study on JSON, its Uses and Applications in Engineering Organizations | |
McKenzie et al. | Integrating witsml, prodml, and resqml standards for cross-domain workflows | |
CN102314406A (en) | The method and system that is used for the lazy data sequenceization of compunication |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120704 |