CN112214967A - Message format conversion method and device - Google Patents

Message format conversion method and device Download PDF

Info

Publication number
CN112214967A
CN112214967A CN202011083940.3A CN202011083940A CN112214967A CN 112214967 A CN112214967 A CN 112214967A CN 202011083940 A CN202011083940 A CN 202011083940A CN 112214967 A CN112214967 A CN 112214967A
Authority
CN
China
Prior art keywords
message
version
target
converting
format
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
CN202011083940.3A
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.)
China Travelsky Technology Co Ltd
China Travelsky Holding Co
Original Assignee
China Travelsky Holding Co
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 China Travelsky Holding Co filed Critical China Travelsky Holding Co
Priority to CN202011083940.3A priority Critical patent/CN112214967A/en
Publication of CN112214967A publication Critical patent/CN112214967A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/154Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
    • G06Q50/40

Abstract

The invention provides a message format conversion method and a message format conversion device, which are used for obtaining a version of a request message and at least one navigation mark by analyzing the request message sent by a third-party user platform, converting the version of the request message into a target message version corresponding to the navigation mark, analyzing a return message fed back by the target navigation mark to obtain a version of the return message and a third-party user platform mark, converting the version of the return message into a message version corresponding to the third-party user platform mark, realizing the conversion of messages of various versions based on an aggregator system in new distribution capacity, and improving the compatibility of the aggregator system in the new distribution capacity.

Description

Message format conversion method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for converting a message format.
Background
The New Distribution Capability (NDC) standard is a New Distribution industry standard that is motivated by the international air transport association IATA in recent years. The NDC mainly establishes a unified data transmission standard based on messages in an XML format, and data interaction can be carried out between an airline company and partners of the airline company through the unified standard.
In recent years, with the establishment of airline NDCs, airline channels are in a diversified development trend, and more airlines issue their NDC sales interfaces, but because the NDC interfaces are updated quickly in an iterative manner, different airlines select NDC interfaces of different versions, and even more, a JSON format message is used as an interface message. Therefore, an NDC aggregator compatible with the XML message format and the JSON message format is needed to access messages with different formats.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
A message format conversion method is applied to an aggregator system in new distribution capacity, and comprises the following steps:
receiving a request message sent by a third-party user platform;
analyzing the request message to obtain the version of the request message and at least one navigation mark;
converting the version of the request message into a target message version corresponding to the navigation department identifier, and sending the target message version to the target navigation department corresponding to the navigation department identifier;
receiving a return message fed back by the target navigation server;
analyzing the return message to obtain the version of the return message and a third-party user platform identifier;
and converting the version of the returned message into a message version corresponding to the third-party user platform identification, and sending the message version to the third-party user platform.
A message format conversion apparatus applied to an aggregator system in new distribution capability, the apparatus comprising:
a request message receiving unit, configured to receive a request message sent by a third-party user platform;
the request message analyzing unit is used for analyzing the request message to obtain the version of the request message and at least one navigation mark;
the first format conversion unit is used for converting the version of the request message into a target message version corresponding to the navigation department identifier and sending the target message version to the target navigation department corresponding to the navigation department identifier;
a return message receiving unit, configured to receive a return message fed back by the target navigation server;
a return message analyzing unit, configured to analyze the return message to obtain a version of the return message and a third-party user platform identifier;
and the second format conversion unit is used for converting the version of the returned message into a message version corresponding to the third-party user platform identification and sending the message version to the third-party user platform.
Compared with the prior art, the invention has the following beneficial effects:
the message format conversion method disclosed by the invention is characterized in that the version of the request message and at least one navigation department identifier are obtained by analyzing the request message sent by a third-party user platform, the version of the request message is converted into the target message version corresponding to the navigation department identifier, the return message fed back by the target navigation department is analyzed to obtain the version of the return message and the third-party user platform identifier, and the version of the return message is converted into the message version corresponding to the third-party user platform identifier, so that the conversion of messages of various versions based on the aggregator system in new distribution capacity is realized, and the compatibility of the aggregator system in new distribution capacity is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flow chart of a message format conversion method disclosed in the embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for converting json format messages according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a method for converting XML format messages according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for converting json format messages and XML format messages disclosed in the embodiment of the present invention;
fig. 5 is a schematic structural diagram of a message format conversion device according to an embodiment of the present invention.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The invention discloses a message format conversion method, which is applied to an aggregator system in new distribution capacity, and with reference to fig. 1, the method specifically comprises the following steps:
s101: receiving a request message sent by a third-party user platform;
the request message may be a message in an XML format, such as 19.1, 18.2, 18.1, 17.2 messages conforming to the NDC standard, or may be a message in a json format.
S102: analyzing the request message to obtain the version of the request message and at least one navigation mark;
analyzing the request message, taking the request message as an XML format as an example, analyzing each XML message node and attribute of the request message, for example, judging which version the request message belongs to according to a PayloadAttributes/VersionNumber (agg (aggsky) system request message version number) node, wherein the request XML includes the requested MessageDoc/Name node airline company.
The navigation department identifier represents a target navigation department (namely a target airline company) to be sent by the request message, and can be a navigation department binary code.
The request message may correspond to one or more navigation system identifiers, that is, the request message may be sent to one navigation system or to more than one navigation system.
S103: converting the version of the request message into a target message version corresponding to the navigation department identifier, and sending the target message version to the target navigation department corresponding to the navigation department identifier;
specifically, the system stores a corresponding relationship between the navigation department identifier and the message version in advance, that is, the message version supported by each navigation department, and determines the target message version corresponding to the navigation department identifier in the request message according to the corresponding relationship.
The message format conversion method disclosed in this embodiment supports conversion between XML messages of different versions, conversion between an XML message and a json message, and conversion between json messages of different versions.
S104: receiving a return message fed back by the target navigation server;
s105: analyzing the return message to obtain the version of the return message and a third-party user platform identifier;
s106: and converting the version of the returned message into a message version corresponding to the third-party user platform identification, and sending the message version to the third-party user platform.
The method for determining the message version corresponding to the third-party user platform identifier comprises the following steps: the system prestores the corresponding relation between different third-party user platform identifications and message versions, and determines the message versions corresponding to the third-party user platform identifications according to the corresponding relation.
Another method for determining a message version corresponding to a third-party user platform identifier is as follows: after receiving a request message sent by a third-party user platform, recording the version of the request message sent by the third-party user platform, and after receiving a return message, obtaining a third-party user platform identifier by analyzing the return message, namely determining the message version corresponding to the third-party user platform identifier.
The version of the returned message is converted into the message version corresponding to the third-party user platform identification, and the conversion among XML messages with different versions, the conversion between XML messages and json messages with different versions and the conversion among json messages with different versions are also supported in the same way as the conversion of the version of the request message into the target version corresponding to the navigation department identification.
Three different message format conversion scenarios are introduced below:
scene one
The request message sent by the third-party user platform is oriented to a single navigation department, the aggregator system in the new distribution capability receives the json message, and the json message is also sent to the navigation department. The third-party user platform sends the JSON format request message which accords with the aviation letter making rule to the aggregator system in the new distribution capability, the aggregator system in the new distribution capability carries out a series of analyses on the JSON message of the request, the JSON message of the request is converted into the JSON message format message required by the aviation department through the JSON message conversion component to be sent to the aviation department, the JSON message returned by the aviation department is successfully received, the JSON message is converted through the JSON message conversion component and is converted into the JSON format of the aviation letter making rule to be sent to the third-party user platform.
Referring to fig. 2, the json message conversion component-based json format message conversion method includes the following steps:
s201: splitting the request message according to a preset rule to obtain a plurality of fields;
specifically, the request message is split according to the format of the json message.
S202: respectively converting each field into a field format corresponding to the target message version to obtain a field to be assembled;
s203: and assembling the fields to be assembled according to the target message version to obtain the message of the target message version.
Scene two
The request message sent by the third-party user platform is oriented to a single navigation department, the aggregator system in the new distribution capability receives the XML message, and the XML message is also sent to the navigation department from the outside. And the third party platform sends the NDC XML message formulated by the airline letter meeting the IATA standard to the aggregator system in the new distribution capability, the aggregator system in the new distribution capability analyzes the version of the request XML, and then converts the request message from the XML into the NDC XML version required by the navigation department through the extensible stylesheet conversion language xslt and sends the NDC XML version to the corresponding navigation department. And successfully receiving the XML message returned by the navigation department, converting the navigation department message into an NDC standard XML message which accords with navigation message rules through the xslt message analysis, and sending the NDC standard XML message to a third-party user platform.
In the process of converting an XML-format message, an aggregator system in the new distribution capability performs XML conversion by calling xslt, but in the case of XML conversion, definitions of some nodes are not similar to those of an airline department, in this embodiment, a mode of calling a java method by using XML and json is designed for processing a part of nodes as functions, so that a part of message fragments can be successfully transmitted to the java method by a json-format parameter in a mode of customizing the java function when the xslt converts the XML message, and after a series of logic processing is performed, the returned nodes or message fragments are returned to the current position, and then the xslt conversion is performed. Specifically, referring to fig. 3, the method for converting XML format messages is as follows:
s301: converting the definition mode of each node in the request message into the definition mode of the corresponding node in the target message version in a mode of self-defining a Java function to obtain a message to be converted;
s302: and converting the message to be converted into a target message version by using an extensible stylesheet conversion language xslt.
Scene three
The request message sent by the third-party user platform is oriented to multiple navigation departments, the aggregator system in the new distribution capacity receives the XML request message, and the XML request message is also sent to the navigation departments externally. The third-party user platform sends an NDC XML message formulated by the airline letter conforming to the IATA standard to the system, the system can analyze the airline department binary code in the request XML, analyze the NDC version number in the request message and then respectively process the NDC version number, for example, the NDC version in the request message is 18.2 (the NDC XML message conforming to the IATA standard in the airline letter rule) and the airline department binary code of three airline departments exists in the request message, the aggregator system in the new distribution capacity can respectively process the request message into message formats required by the three airline departments, the message required by the A airline department is XML of 17.2 version, the message required by the B airline department is JSON, and the XML required by the C airline department of 18.1 version. Then 18.2XML message conversion 17.2XML message is needed for the a navigation department, 18.2XML message conversion JSON message is needed for the B navigation department, and 18.2XML message conversion 18.1XML message is needed for the C navigation department. And the message is distributed to each airline company to obtain a correct airline department return message, and then the return 17.2XML message of the A airline department is converted into an 18.2XML message, the JSON format message of the B airline department is converted into an 18.2XML message, and the 18.1XML message of the C airline department is converted into an 18.2XML message. And finally, performing aggregation processing on all the 18.2 version XML messages to obtain a total return message, and sending the total return message to a third-party user platform.
When the request message is in json format and the target message version is in XML format, please refer to fig. 4, and convert the version of the request message into the target message version corresponding to the navigation mark, including the following steps:
s401: splitting the request message according to a preset rule to obtain a plurality of fields;
specifically, the request message is split according to the format of the json message.
S402: performing logic processing on each field, and converting each field into a field in an XML format to obtain a message to be converted;
s403: and converting the message to be converted into a target message version by using an extensible stylesheet conversion language xslt.
In the message format conversion method disclosed in this embodiment, the version of the request message and at least one navigation department identifier are obtained by analyzing the request message sent by the third-party user platform, the version of the request message is converted into the target message version corresponding to the navigation department identifier, the return message fed back by the target navigation department is analyzed to obtain the version of the return message and the third-party user platform identifier, and the version of the return message is converted into the message version corresponding to the third-party user platform identifier, so that the conversion of messages of various versions based on the aggregator system in the new distribution capacity is realized, and the compatibility of the aggregator system in the new distribution capacity is improved.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Although the operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Based on the method for converting a message format disclosed in the foregoing embodiment, this embodiment correspondingly discloses a device for converting a message format, please refer to fig. 5, which includes:
a request message receiving unit 100, configured to receive a request message sent by a third-party user platform;
a request message parsing unit 200, configured to parse the request message to obtain a version of the request message and at least one navigation mark;
a first format conversion unit 300, configured to convert the version of the request message into a target message version corresponding to the navigation department identifier, and send the target message version to the target navigation department corresponding to the navigation department identifier;
a return message receiving unit 400, configured to receive a return message fed back by the target navigation server;
a return message parsing unit 500, configured to parse the return message to obtain a version of the return message and a third-party user platform identifier;
a second format conversion unit 600, configured to convert the version of the returned packet into a packet version corresponding to the identifier of the third-party user platform, and send the packet version to the third-party user platform.
Optionally, when the request packet is in a json format and the target packet version is in an XML format, the first format conversion unit 300 is specifically configured to:
splitting the request message according to a preset rule to obtain a plurality of fields;
performing logic processing on each field, and converting each field into a field in an XML format to obtain a message to be converted;
and converting the message to be converted into the target message version by using an extensible stylesheet conversion language xslt.
Optionally, when the request packet is in an XML format and the target packet version is also in the XML format, the first format conversion unit 300 is specifically configured to:
converting the definition mode of each node in the request message into the definition mode of the corresponding node in the target message version in a mode of self-defining a Java function to obtain a message to be converted;
and converting the message to be converted into the target message version by using an extensible stylesheet conversion language xslt.
Optionally, when the request packet is in a json format and the target packet version is also in the json format, the first format conversion unit 300 is specifically configured to:
splitting the request message according to a preset rule to obtain a plurality of fields;
respectively converting each field into a field format corresponding to the target message version to obtain a field to be assembled;
and assembling the fields to be assembled according to the target message version to obtain the message of the target message version.
Optionally, under the condition that the return messages fed back by multiple target drivers are received, the second format conversion unit 600 is specifically configured to:
respectively converting the version of each returned message into a message version corresponding to the third-party user platform identification;
carrying out polymerization treatment on the converted message to obtain a total return message;
and sending the total return message to the third-party user platform.
The message format conversion device disclosed in this embodiment obtains a version of a request message and at least one navigation department identifier by analyzing the request message sent by a third-party user platform, converts the version of the request message into a target message version corresponding to the navigation department identifier, obtains a version of a return message and a third-party user platform identifier by analyzing a return message fed back by the target navigation department, converts the version of the return message into a message version corresponding to the third-party user platform identifier, realizes conversion of messages of various versions based on an aggregator system in new distribution capacity, and improves compatibility of the aggregator system in new distribution capacity.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
According to one or more embodiments of the present disclosure, there is provided a message format conversion method, including:
receiving a request message sent by a third-party user platform;
analyzing the request message to obtain the version of the request message and at least one navigation mark;
converting the version of the request message into a target message version corresponding to the navigation department identifier, and sending the target message version to the target navigation department corresponding to the navigation department identifier;
receiving a return message fed back by the target navigation server;
analyzing the return message to obtain the version of the return message and a third-party user platform identifier;
and converting the version of the returned message into a message version corresponding to the third-party user platform identification, and sending the message version to the third-party user platform.
Optionally, when the request packet is in a json format and the target packet version is in an XML format, the converting the version of the request packet into the target packet version corresponding to the navigation mark includes:
splitting the request message according to a preset rule to obtain a plurality of fields;
performing logic processing on each field, and converting each field into a field in an XML format to obtain a message to be converted;
and converting the message to be converted into the target message version by using an extensible stylesheet conversion language xslt.
Optionally, when the request packet is in an XML format and the target packet version is also in the XML format, the converting the version of the request packet into the target packet version corresponding to the navigation mark includes:
converting the definition mode of each node in the request message into the definition mode of the corresponding node in the target message version in a mode of self-defining a Java function to obtain a message to be converted;
and converting the message to be converted into the target message version by using an extensible stylesheet conversion language xslt.
Optionally, when the request packet is in a json format and the target packet version is also in the json format, the converting the version of the request packet into the target packet version corresponding to the navigation mark includes:
splitting the request message according to a preset rule to obtain a plurality of fields;
respectively converting each field into a field format corresponding to the target message version to obtain a field to be assembled;
and assembling the fields to be assembled according to the target message version to obtain the message of the target message version.
Optionally, in a case that a return message fed back by a plurality of target navigation systems is received, the converting the version of the return message into a message version corresponding to the third-party user platform identifier, and sending the message version to the third-party user platform includes:
respectively converting the version of each returned message into a message version corresponding to the third-party user platform identification;
carrying out polymerization treatment on the converted message to obtain a total return message;
and sending the total return message to the third-party user platform.
According to one or more embodiments of the present disclosure, there is provided a message format conversion apparatus including:
a request message receiving unit, configured to receive a request message sent by a third-party user platform;
the request message analyzing unit is used for analyzing the request message to obtain the version of the request message and at least one navigation mark;
the first format conversion unit is used for converting the version of the request message into a target message version corresponding to the navigation department identifier and sending the target message version to the target navigation department corresponding to the navigation department identifier;
a return message receiving unit, configured to receive a return message fed back by the target navigation server;
a return message analyzing unit, configured to analyze the return message to obtain a version of the return message and a third-party user platform identifier;
and the second format conversion unit is used for converting the version of the returned message into a message version corresponding to the third-party user platform identification and sending the message version to the third-party user platform.
Optionally, when the request packet is in a json format and the target packet version is in an XML format, the first format conversion unit is specifically configured to:
splitting the request message according to a preset rule to obtain a plurality of fields;
performing logic processing on each field, and converting each field into a field in an XML format to obtain a message to be converted;
and converting the message to be converted into the target message version by using an extensible stylesheet conversion language xslt.
Optionally, when the request packet is in an XML format and the target packet version is also in the XML format, the first format conversion unit is specifically configured to:
converting the definition mode of each node in the request message into the definition mode of the corresponding node in the target message version in a mode of self-defining a Java function to obtain a message to be converted;
and converting the message to be converted into the target message version by using an extensible stylesheet conversion language xslt.
Optionally, when the request packet is in a json format and the target packet version is also in the json format, the first format conversion unit is specifically configured to:
splitting the request message according to a preset rule to obtain a plurality of fields;
respectively converting each field into a field format corresponding to the target message version to obtain a field to be assembled;
and assembling the fields to be assembled according to the target message version to obtain the message of the target message version.
Optionally, the second format conversion unit is specifically configured to, in a case that return messages fed back by multiple target navigation systems are received:
respectively converting the version of each returned message into a message version corresponding to the third-party user platform identification;
carrying out polymerization treatment on the converted message to obtain a total return message;
and sending the total return message to the third-party user platform.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
While several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A message format conversion method applied to an aggregator system in new distribution capability, the method comprising:
receiving a request message sent by a third-party user platform;
analyzing the request message to obtain the version of the request message and at least one navigation mark;
converting the version of the request message into a target message version corresponding to the navigation department identifier, and sending the target message version to the target navigation department corresponding to the navigation department identifier;
receiving a return message fed back by the target navigation server;
analyzing the return message to obtain the version of the return message and a third-party user platform identifier;
and converting the version of the returned message into a message version corresponding to the third-party user platform identification, and sending the message version to the third-party user platform.
2. The method of claim 1, wherein when the request message is in json format and the target message version is in XML format, the converting the version of the request message to the target message version corresponding to the navigation mark comprises:
splitting the request message according to a preset rule to obtain a plurality of fields;
performing logic processing on each field, and converting each field into a field in an XML format to obtain a message to be converted;
and converting the message to be converted into the target message version by using an extensible stylesheet conversion language xslt.
3. The method of claim 1, wherein converting the version of the request message to the target message version corresponding to the navigation mark when the request message is in XML format and the target message version is also in XML format comprises:
converting the definition mode of each node in the request message into the definition mode of the corresponding node in the target message version in a mode of self-defining a Java function to obtain a message to be converted;
and converting the message to be converted into the target message version by using an extensible stylesheet conversion language xslt.
4. The method of claim 1, wherein converting the version of the request message to the target message version corresponding to the navigation mark when the request message is in json format and the target message version is also in json format comprises:
splitting the request message according to a preset rule to obtain a plurality of fields;
respectively converting each field into a field format corresponding to the target message version to obtain a field to be assembled;
and assembling the fields to be assembled according to the target message version to obtain the message of the target message version.
5. The method according to claim 1, wherein in case of receiving a return message fed back by a plurality of target navigation systems, the converting the version of the return message into a message version corresponding to the third party user platform identifier and sending the message version to the third party user platform comprises:
respectively converting the version of each returned message into a message version corresponding to the third-party user platform identification;
carrying out polymerization treatment on the converted message to obtain a total return message;
and sending the total return message to the third-party user platform.
6. A message format conversion apparatus applied to an aggregator system in a new distribution capability, the apparatus comprising:
a request message receiving unit, configured to receive a request message sent by a third-party user platform;
the request message analyzing unit is used for analyzing the request message to obtain the version of the request message and at least one navigation mark;
the first format conversion unit is used for converting the version of the request message into a target message version corresponding to the navigation department identifier and sending the target message version to the target navigation department corresponding to the navigation department identifier;
a return message receiving unit, configured to receive a return message fed back by the target navigation server;
a return message analyzing unit, configured to analyze the return message to obtain a version of the return message and a third-party user platform identifier;
and the second format conversion unit is used for converting the version of the returned message into a message version corresponding to the third-party user platform identification and sending the message version to the third-party user platform.
7. The apparatus according to claim 6, wherein when the request packet is in json format and the target packet version is in XML format, the first format conversion unit is specifically configured to:
splitting the request message according to a preset rule to obtain a plurality of fields;
performing logic processing on each field, and converting each field into a field in an XML format to obtain a message to be converted;
and converting the message to be converted into the target message version by using an extensible stylesheet conversion language xslt.
8. The apparatus according to claim 6, wherein when the request packet is in XML format and the target packet version is also in XML format, the first format conversion unit is specifically configured to:
converting the definition mode of each node in the request message into the definition mode of the corresponding node in the target message version in a mode of self-defining a Java function to obtain a message to be converted;
and converting the message to be converted into the target message version by using an extensible stylesheet conversion language xslt.
9. The apparatus according to claim 6, wherein when the request packet is in json format and the target packet version is also in json format, the first format conversion unit is specifically configured to:
splitting the request message according to a preset rule to obtain a plurality of fields;
respectively converting each field into a field format corresponding to the target message version to obtain a field to be assembled;
and assembling the fields to be assembled according to the target message version to obtain the message of the target message version.
10. The apparatus according to claim 6, wherein, in a case where a plurality of return messages fed back by the target navigation server are received, the second format conversion unit is specifically configured to:
respectively converting the version of each returned message into a message version corresponding to the third-party user platform identification;
carrying out polymerization treatment on the converted message to obtain a total return message;
and sending the total return message to the third-party user platform.
CN202011083940.3A 2020-10-12 2020-10-12 Message format conversion method and device Pending CN112214967A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011083940.3A CN112214967A (en) 2020-10-12 2020-10-12 Message format conversion method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011083940.3A CN112214967A (en) 2020-10-12 2020-10-12 Message format conversion method and device

Publications (1)

Publication Number Publication Date
CN112214967A true CN112214967A (en) 2021-01-12

Family

ID=74053249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011083940.3A Pending CN112214967A (en) 2020-10-12 2020-10-12 Message format conversion method and device

Country Status (1)

Country Link
CN (1) CN112214967A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113329024A (en) * 2021-06-01 2021-08-31 中国民航信息网络股份有限公司 Method, device, equipment and storage medium for data message conversion
CN113783860A (en) * 2021-09-01 2021-12-10 建信金融科技有限责任公司 Message processing method, device and equipment based on visual configuration
CN114070886A (en) * 2021-11-17 2022-02-18 深圳壹账通智能科技有限公司 Message conversion method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160016234A (en) * 2014-08-04 2016-02-15 한국전자통신연구원 Method and apparatus for tansforming packet format
CN107040613A (en) * 2017-06-05 2017-08-11 上海艾融软件股份有限公司 A kind of message transmitting method and system
CN107483592A (en) * 2017-08-22 2017-12-15 中国银行股份有限公司 A kind of transaction processing method based on General Front End Processor and a kind of General Front End Processor
CN108075972A (en) * 2017-11-17 2018-05-25 中国银行股份有限公司 A kind of automatic route system of integrated layer and method
CN110290127A (en) * 2019-06-20 2019-09-27 云南电网有限责任公司电力科学研究院 A kind of message forwarding method and message converting system
CN110730181A (en) * 2019-10-21 2020-01-24 中国民航信息网络股份有限公司 Message conversion method, device and adapter

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20160016234A (en) * 2014-08-04 2016-02-15 한국전자통신연구원 Method and apparatus for tansforming packet format
CN107040613A (en) * 2017-06-05 2017-08-11 上海艾融软件股份有限公司 A kind of message transmitting method and system
CN107483592A (en) * 2017-08-22 2017-12-15 中国银行股份有限公司 A kind of transaction processing method based on General Front End Processor and a kind of General Front End Processor
CN108075972A (en) * 2017-11-17 2018-05-25 中国银行股份有限公司 A kind of automatic route system of integrated layer and method
CN110290127A (en) * 2019-06-20 2019-09-27 云南电网有限责任公司电力科学研究院 A kind of message forwarding method and message converting system
CN110730181A (en) * 2019-10-21 2020-01-24 中国民航信息网络股份有限公司 Message conversion method, device and adapter

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘云玉 等: "Android Studio移动开发教程", vol. 1, 30 September 2020, 西南交通大学出版社, pages: 187 - 188 *
房晓溪: "JAVA网络程序设计", vol. 1, 31 March 2005, 中国铁道出版社, pages: 194 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113329024A (en) * 2021-06-01 2021-08-31 中国民航信息网络股份有限公司 Method, device, equipment and storage medium for data message conversion
CN113783860A (en) * 2021-09-01 2021-12-10 建信金融科技有限责任公司 Message processing method, device and equipment based on visual configuration
CN113783860B (en) * 2021-09-01 2023-11-28 建信金融科技有限责任公司 Message processing method, device, equipment and storage medium based on visual configuration
CN114070886A (en) * 2021-11-17 2022-02-18 深圳壹账通智能科技有限公司 Message conversion method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN112214967A (en) Message format conversion method and device
US20200213244A1 (en) Internet of Things Resource Subscription Method, Device, and System
CN109495392B (en) Message conversion processing method and device, electronic equipment and storage medium
CN110968438B (en) Asynchronous notification method and device of event message, electronic equipment and storage medium
CN111291103B (en) Interface data analysis method and device, electronic equipment and storage medium
CN111459944B (en) MR data storage method, device, server and storage medium
CN111447257A (en) Message conversion method and device
CN110688828A (en) File processing method and device, file processing system and computer equipment
CN110858202A (en) Method and device for generating where clause in database query statement
CN115114044A (en) Message pushing method, device, equipment and medium
CN112417016B (en) Data exchange method, system, equipment and storage medium
CN113014618B (en) Message processing method and system and electronic equipment
CN115357286B (en) Program file comparison method and device, electronic equipment and storage medium
CN114513552B (en) Data processing method, device, equipment and storage medium
CN114661807A (en) Method, device, equipment and medium for processing abnormity of flight management system
CN112261121A (en) Message processing method and device
CN113779018A (en) Data processing method and device
CN113515285A (en) Method and device for generating real-time calculation logic data
CN112306984A (en) Data source routing method and device
CN114253520B (en) Interface code generation method and device
CN112671877B (en) Data processing method and device
CN115309612B (en) Method and device for monitoring data
CN109376023B (en) Method and equipment for generating calling information and issuing return code group
CN113688181A (en) Data processing method and device, electronic equipment and computer readable medium
CN116862604A (en) Data processing method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination