CN108924141B - Message organization and transmission method and device - Google Patents
Message organization and transmission method and device Download PDFInfo
- Publication number
- CN108924141B CN108924141B CN201810750704.9A CN201810750704A CN108924141B CN 108924141 B CN108924141 B CN 108924141B CN 201810750704 A CN201810750704 A CN 201810750704A CN 108924141 B CN108924141 B CN 108924141B
- Authority
- CN
- China
- Prior art keywords
- message
- characteristic
- standard
- packet
- organizing
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/06—Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The application discloses a message organizing and transmitting method and a device, wherein the method comprises the following steps: the first system receives a message sent by the second system, the message comprises a message header and a message body, the message body comprises a standard message and a characteristic message, the first system analyzes the message header and the standard message of the message and processes the characteristic message according to a characteristic name label of the characteristic message, and the first system organizes the messages from different second systems into a new message and sends the new message to the third system. The method and the device organize the message body of the message into a standard message and a characteristic message, can identify and distinguish the characteristic message with difference due to different service scenes through the characteristic name label of the characteristic message, and carry out identification processing according to requirements, can finish the transmission of the message comprising different data through one interface in the process, and avoid the problems of system resource waste and poor maintainability caused by respectively defining different message interfaces in different service scenes.
Description
Technical Field
The present invention relates to data transmission technologies, and in particular, to a method and an apparatus for organizing and transmitting a packet.
Background
In the financial industry, a lot of services can be completed smoothly only by data interaction between a plurality of systems, and data transmission between different systems is generally performed in a message form.
Due to different services or different specific service scenarios under the same service, there is also a great difference in the data to be transmitted between systems. In the prior art, in order to meet the requirement of accurate transmission of various different data under different service scenarios, different message interfaces are generally defined according to different service scenarios, and one interface corresponds to transmission of one specific data. However, this approach not only wastes system resources, but also results in poor maintainability due to too many interfaces.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for packet organization and transmission, so as to overcome the problems of system resource waste and poor maintainability caused by different service scenarios respectively defining different packet interfaces in the prior art.
In order to achieve the purpose, the invention provides the following technical scheme:
a message organization and transmission method comprises the following steps:
a first system receives a message sent by a second system, wherein the message comprises a message header and a message body, the message body comprises a standard message and a characteristic message, the standard message comprises a message with fixed content, and the characteristic message comprises messages with different contents in different service scenes;
the first system analyzes the message header and the standard message of the message and processes the characteristic message according to the characteristic name label of the characteristic message;
the first system organizes the messages from the different second systems into a new message and sends the new message to the third system.
Optionally, the analyzing, by the first system, the header and the standard packet of the packet, and processing the characteristic packet according to the characteristic name tag of the characteristic packet includes:
the first system analyzes the message header and the standard message of the message;
judging whether the characteristic message is the characteristic data required by the characteristic message according to the characteristic name label of the characteristic message;
if yes, analyzing the characteristic message.
Optionally, the organizing, by the first system, the messages from the different second systems into a new message, and sending the new message to a third system, includes:
the first system organizes a message header and a standard message according to a preset message interface rule of the first system and the third system;
the first system splices the characteristic messages from different second systems together to form a complete characteristic message;
the first system organizes the organized message header, the standard message and the complete characteristic message together to form a new message;
and the first system sends the new message to the third system.
Optionally, the method further includes:
the method comprises the steps of configuring characteristic message data in advance, wherein the characteristic message data comprise characteristic name labels, characteristic message attributes and characteristic message formats.
Optionally, the feature packet is a feature packet in an XML format, the packet in the XML format is encapsulated by using an XML CDATA tag, and the feature packet encapsulated by using the XML CDATA tag is encapsulated by using a feature name tag corresponding to data included in the feature packet.
A message organization and transmission apparatus, comprising:
the message receiving module is used for receiving a message sent by a second system, wherein the message comprises a message header and a message body, and the message body comprises a standard message and a characteristic message, the standard message is a message containing fixed content, and the characteristic message is a message containing different contents in different service scenes;
the message processing module is used for analyzing the message header and the standard message of the message and processing the characteristic message according to the characteristic name label of the characteristic message;
and the message sending module is used for organizing the messages from different second systems into a new message and sending the new message to a third system.
Optionally, the message processing module includes:
the message analysis module is used for analyzing the message header and the standard message of the message;
the message judging module is used for judging whether the characteristic message is the characteristic data required by the message according to the characteristic name label of the characteristic message;
the message analysis module is also used for analyzing the characteristic message when the judgment result of the message judgment module is yes.
Optionally, the message sending module includes:
the first organizing module is used for organizing a message header and a standard message according to a preset interface rule;
the message splicing module is used for splicing the characteristic messages from different second systems together to form a complete characteristic message;
the second organization module is used for organizing the organized message header, the standard message and the complete characteristic message together to form a new message;
and the message sending submodule is used for sending the new message to a third system.
Optionally, the method further includes:
the configuration module is used for configuring characteristic message data in advance, wherein the characteristic message data comprises a characteristic name label, a characteristic message segment attribute and a characteristic message segment format.
Optionally, the feature packet is a feature packet in an XML format, the packet in the XML format is encapsulated by using an XML CDATA tag, and the feature packet encapsulated by using the XML CDATA tag is encapsulated by using a feature name tag corresponding to data included in the feature packet.
As can be seen from the foregoing technical solutions, compared with the prior art, the embodiment of the present invention discloses a method and an apparatus for packet organization and transmission, where the method includes: the method comprises the steps that a first system receives messages sent by a second system, the messages comprise message headers and message bodies, the message bodies comprise standard messages and characteristic messages, the standard messages comprise fixed content messages, the characteristic messages comprise different content messages in different service scenes, the first system analyzes the message headers and the standard messages of the messages and processes the characteristic messages according to characteristic name labels of the characteristic messages, and the first system organizes the messages from different second systems into a new message and sends the new message to a third system. The method and the device organize the message body of the message into a standard message and a characteristic message, can identify and distinguish the characteristic message with difference due to different service scenes through the characteristic name label of the characteristic message, and carry out identification processing according to requirements, can finish the transmission of the message comprising different data through one interface in the process, and avoid the problems of system resource waste and poor maintainability caused by respectively defining different message interfaces in different service scenes.
Drawings
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 flowchart of a message organizing and transmitting method according to an embodiment of the present invention;
FIG. 2 is a flow chart of message parsing disclosed in the embodiments of the present invention;
fig. 3 is a schematic diagram of the message structure content disclosed in the embodiment of the present invention;
FIG. 4 is a flowchart of organizing a new message according to the embodiment of the present invention;
fig. 5 is a schematic diagram of the organization and transmission of messages disclosed in the embodiment of the present invention;
fig. 6 is a flowchart of another packet organizing and transmitting method disclosed in the embodiment of the present invention;
fig. 7 is a schematic structural diagram of a message organizing and transmitting device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a message processing module disclosed in the embodiment of the present invention;
fig. 9 is a schematic structural diagram of a message sending module disclosed in the embodiment of the present invention;
fig. 10 is a schematic structural diagram of another organization and message transmission apparatus according to an embodiment of the present invention.
Detailed Description
For the sake of reference and clarity, the descriptions, abbreviations or abbreviations of the technical terms used hereinafter are summarized as follows:
XML: an extensible standard language.
CDATA: refers to textual data that is not parsed by an XML parser.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a packet organizing and transmitting method disclosed in the embodiment of the present invention, and referring to fig. 1, the packet organizing and transmitting method may include:
step 101: the first system receives a message sent by the second system, wherein the message comprises a message header and a message body, and the message body comprises a standard message and a characteristic message.
The standard message is a message including fixed content, and the characteristic message is a message including different content in different service scenes.
Generally, the data included in the standard message is applicable to all service scenarios, and the data range is stable and usually does not change. The basic information of the client can include the name, identification number, mobile phone number, etc. of the client, and in addition, the basic information of the client can include the public information required by various businesses, such as loan application amount, service life, loan application purpose, etc. In this embodiment, there is one and only one standard segment in one message.
The characteristic message refers to data which is different due to different service scenes, for example, a house decoration loan and a car purchasing loan have a larger difference. Specifically, the message related to the home decoration loan contains a plurality of data fields describing the information of the house itself, such as the information of the residential area, orientation, floor, area, total price, and other decoration factors. The information of the vehicle itself, such as the manufacturer, brand, displacement, frame number, engine number, purchase price, etc., needs to be described in detail in the message information related to the vehicle purchase loan. There may be zero, one or more different characteristic messages in a message.
The specific configuration method may be configured to configure, in advance, relevant characteristic packet data for each service scenario that is already clear, and specifically may include configuring, for a certain specific packet in a specific service scenario, a characteristic name tag and a specific format of a corresponding characteristic segment, and the like. For example, a car purchase loan property name tag and a property segment, a people bank personal credit data property name tag and a property segment, and a school roll property name tag and a property segment may be provided.
Specifically, the first system may receive the message sent by the second system according to a message interface agreed in advance between the first system and the second system. The message may be an XML message, wherein the characteristic message is also organized as an individual XML message, and the characteristic message in the XML format is finally encapsulated in a characteristic name tag corresponding to the specific data after being tagged with a CDATA tag. In the case of multiple feature messages, each feature message needs to be processed as described above and finally spliced together to form a part of the entire message body. The representation may be: the specific XML data message in the characteristic name label + CDATA label + characteristic message segment.
In this embodiment, each system may organize different characteristic messages according to a specific service scenario. The method is suitable for the situation that different data need to be collected and transmitted due to different service scenes. The method can be used as a general message organization method, and meets the requirements of variable and flexible message interaction and transmission. For example, when newly adding the data of paying the house accumulation fund of the inquiring client as the basis of the authorization decision for the existing loan application client in service, only the characteristic name label for defining the house accumulation fund and the corresponding message format need to be added in the existing transaction message.
Step 102: and the first system analyzes the message header and the standard message of the message and processes the characteristic message according to the characteristic name label of the characteristic message.
In an exemplary example, a specific process of step 102 may refer to fig. 2, where fig. 2 is a flow chart of message parsing disclosed in the embodiment of the present invention, and as shown in fig. 2, the specific process may include:
step 201: and the first system analyzes the message header and the standard message of the message.
Since the standard packet is generally applicable to all service scenarios and is an essential element in each service, the system needs to parse the standard packet and the packet header.
Step 202: and judging whether the characteristic message is the characteristic data required by the characteristic message according to the characteristic name label of the characteristic message, and if so, entering the step 203.
When the message body is analyzed, if the characteristic name label and the CDATA message are encountered, the processing can be carried out according to the preset processing logic. The preset processing logic may include: if the first system needs the data of the characteristic message, analyzing the characteristic message; and if the first system does not need the data of the characteristic message, not performing any analysis processing on the characteristic message.
Step 203: and analyzing the characteristic message.
After step 102, the process proceeds to step 103.
Step 103: the first system organizes the messages from the different second systems into a new message and sends the new message to the third system.
According to the service requirement, the first system can organize the messages from different second systems into a new message, and the new message also comprises a message header, a message body standard message and a message body characteristic message. Because the standard messages of the message bodies may be the same, the standard messages in the message bodies can be directly copied and used, and for the characteristic messages from different second systems, the first system can splice all the characteristic messages, and the spliced characteristic messages are a part of the message bodies in the whole message.
Fig. 3 is a schematic diagram of a message structure content disclosed in the embodiment of the present invention, and as shown in fig. 3, the message includes a message header and a message body, where the message body includes a standard message and a characteristic message. The standard message is an XML message, the characteristic messages comprise five characteristic messages with serial numbers of (i) - (fifth), and each characteristic message is also an independent XML message. In a specific transaction processing process, which characteristic messages are included in the transaction messages is determined according to a specific service scenario, a predefined characteristic name tag and characteristic message data included in the predefined characteristic name tag.
In this embodiment, the message body of the message organizing and transmitting method is divided into two parts, namely a standard message and a characteristic message, for the characteristic messages with different service scenes and differences, the characteristic messages can be identified and distinguished through the characteristic name labels of the characteristic messages, and identification processing is performed according to requirements, so that transmission of the messages including different data can be completed through one interface in the process, and the problems of system resource waste and poor maintainability caused by respectively defining different message interfaces in different service scenes are solved.
In the foregoing embodiment, a specific implementation manner in which the first system organizes the messages from different second systems into a new message and sends the new message to the third system may refer to fig. 4, where fig. 4 is a flowchart of organizing the new message disclosed in the embodiment of the present invention, and as shown in fig. 4, the flowchart may include:
step 401: the first system organizes the message header and the standard message according to the preset message interface rules of the first system and the third system.
Only by organizing the message content according to the preset message interface rules of the data sender and the data receiver, the normal transmission and identification of the message can be ensured.
Step 402: the first system splices the characteristic messages from different second systems together to form a complete characteristic message.
Each feature message is a feature message in an individual XML format, the XML format message may be encapsulated by using an XML CDATA tag, and the feature message encapsulated by using the XML CDATA tag may be encapsulated by using a feature name tag corresponding to data included in the feature message.
Step 403: the first system organizes the organized message header and the standard message with the complete characteristic message to form a new message.
Step 404: and the first system sends the new message to the third system.
Fig. 5 is a schematic diagram illustrating organization and transmission of messages according to an embodiment of the present invention, and referring to fig. 5, in a specific implementation manner, a complete transaction message sent by a personal loan management system to a credit granting decision calculation engine system is actually spliced together by using messages sent by a front-end system and a third-party credit investigation system. The standard message segment information in the complete transaction message sent to the credit decision calculation engine system by the personal loan management system is unchanged, and the characteristic message in the message sent by the front-end system and the third-party credit investigation system is spliced together to form a complete characteristic message.
In this embodiment, specific contents of organizing a new packet are introduced in detail, and by the method for organizing a packet, different packet interfaces do not need to be respectively matched for different packet data in packet transmission, so that not only is expandability strong, but also the problems of system resource waste and poor maintainability caused by respectively defining different packet interfaces in different service scenarios are avoided.
On the basis of the above embodiment disclosed in the present invention, fig. 6 is a flowchart of another packet organizing and transmitting method disclosed in the embodiment of the present invention, and as shown in fig. 6, the packet organizing and transmitting method may include:
step 601: the method comprises the steps of configuring characteristic message data in advance, wherein the characteristic message data comprise characteristic name labels, characteristic segment attributes and characteristic segment formats.
The property packet data may include, but is not limited to, a property name label, a property packet attribute, and a property packet format. Therefore, in the process of message organization and transmission, the system can identify the characteristic message according to the characteristic name label and judge whether the characteristic message is the data required by the system. The characteristic message attribute and the characteristic message format can ensure the accurate transmission of data.
Of course, related configurators also need to plan complete message interface components between different systems in advance, including message headers, message bodies, interface modes (SOCKET, MQ), character sets, and the like, and may also specify in advance that all messages use an XML mode for data organization. Specific configurations may include: defining the specific format of a message header, defining the specific format of a standard message in a message body, and defining the specific format of a characteristic name label and corresponding characteristic messages for known characteristic messages according to different service scenes. In the future, if a new feature packet is needed, a new feature name tag needs to be assigned to the new feature packet and a specific format of the feature packet needs to be defined. When organizing the message subsequently, the XML can be used to organize the message for each feature message, then the XML CDATA tag is added to the beginning of the feature message in the XML format to encapsulate the feature message, and finally the corresponding feature name tag is used to encapsulate the feature message.
Step 602: the first system receives a message sent by the second system, wherein the message comprises a message header and a message body, and the message body comprises a standard message and a characteristic message.
The standard message is a message including fixed content, and the characteristic message is a message including different content in different service scenes.
Step 603: and the first system analyzes the message header and the standard message of the message and processes the characteristic message according to the characteristic name label of the characteristic message.
Step 604: the first system organizes the messages from the different second systems into a new message and sends the new message to the third system.
In this embodiment, the message organizing and transmitting method configures characteristic message data in advance, so that the system can identify the characteristic message according to the characteristic name tag and determine whether the characteristic message is data required by the system in the subsequent message organizing and transmitting process. The characteristic message attributes and the characteristic message format facilitate accurate transmission and parsing of data.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present invention is not limited by the illustrated ordering of acts, as some steps may occur in other orders or concurrently with other steps in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
The method is described in detail in the embodiments disclosed above, and the method of the present invention can be implemented by various types of apparatuses, so that the present invention also discloses an apparatus, and the following detailed description will be given of specific embodiments.
Fig. 7 is a schematic structural diagram of a message organizing and transmitting device according to an embodiment of the present invention, where the message organizing and transmitting device may operate in a first system, and referring to fig. 7, the message organizing and transmitting device 70 may include:
the message receiving module 701 is configured to receive a message sent by a second system, where the message includes a message header and a message body, and the message body includes a standard message and a characteristic message.
The standard message is a message including fixed content, and the characteristic message is a message including different content in different service scenes.
Generally, the data included in the standard message is applicable to all service scenarios, and the data range is stable and usually does not change. The basic information of the client can include the name, identification number, mobile phone number, etc. of the client, and in addition, the basic information of the client can include the public information required by various businesses, such as loan application amount, service life, loan application purpose, etc. In this embodiment, there is one and only one standard segment in one message.
The characteristic message refers to data which is found to be different due to different service scenes, for example, a house decoration loan and a car purchasing loan have a larger difference. Specifically, the message related to the home decoration loan contains a plurality of data fields describing the information of the house itself, such as the information of the residential area, orientation, floor, area, total price, and other decoration factors. The information of the vehicle itself, such as the manufacturer, brand, displacement, frame number, engine number, purchase price, etc., needs to be described in detail in the message information related to the vehicle purchase loan. There may be zero, one or more different characteristic messages in a message.
The specific configuration method may be configured to configure, in advance, relevant characteristic packet data for each service scenario that is already clear, and specifically may include configuring, for a certain specific packet in a specific service scenario, a characteristic name tag and a specific format of a corresponding characteristic segment, and the like. For example, a car purchase loan property name tag and a property segment, a people bank personal credit data property name tag and a property segment, and a school roll property name tag and a property segment may be provided.
Specifically, the first system may receive the message sent by the second system according to a message interface agreed in advance between the first system and the second system. The message may be an XML message, wherein the characteristic message is also organized as an individual XML message, and the characteristic message in the XML format is finally encapsulated in a characteristic name tag corresponding to the specific data after being tagged with a CDATA tag. In the case of multiple feature messages, each feature message needs to be processed as described above and finally spliced together to form a part of the entire message body. The representation may be: the specific XML data message in the characteristic name label + CDATA label + characteristic message segment.
In this embodiment, each system may organize different characteristic messages according to a specific service scenario. The method is suitable for the situation that different data need to be collected and transmitted due to different service scenes. The method can be used as a general message organization method, and meets the requirements of variable and flexible message interaction and transmission. For example, when newly adding the data of paying the house accumulation fund of the inquiring client as the basis of the authorization decision for the existing loan application client in service, only the characteristic name label for defining the house accumulation fund and the corresponding message format need to be added in the existing transaction message.
A message processing module 702, configured to parse the message header and the standard message of the message, and process the characteristic message according to the characteristic name tag of the characteristic message.
In an illustrative example, a specific structure of the message processing module 702 may refer to fig. 8, where fig. 8 is a schematic structural diagram of the message processing module disclosed in the embodiment of the present invention, and as shown in fig. 8, the message processing module 702 may include:
and the message analysis module 801 is configured to analyze a header of the message and a standard message.
Since the standard packet is generally applicable to all service scenarios and is an essential element in each service, the system needs to parse the standard packet and the packet header.
The message determining module 802 is configured to determine whether the characteristic message is the required characteristic data according to the characteristic name tag of the characteristic message.
The message analyzing module 801 is further configured to analyze the characteristic message when the determination result of the message determining module 802 is yes.
When the message body is analyzed, if the characteristic name label and the CDATA message are encountered, the processing can be carried out according to the preset processing logic. The preset processing logic may include: if the first system needs the data of the characteristic message, analyzing the characteristic message; and if the first system does not need the data of the characteristic message, not performing any analysis processing on the characteristic message.
In addition to the message receiving module 701 and the message processing module 702, the message transmitting apparatus 70 further includes:
the message sending module 703 is configured to organize messages from different second systems into a new message, and send the new message to a third system.
According to the service requirement, the first system can organize the messages from different second systems into a new message, and the new message also comprises a message header, a message body standard message and a message body characteristic message. Because the standard messages of the message bodies may be the same, the standard messages in the message bodies can be directly copied and used, and for the characteristic messages from different second systems, the first system can splice all the characteristic messages, and the spliced characteristic messages are a part of the message bodies in the whole message.
In this embodiment, the message body of the message organization and transmission device message is divided into two parts, namely a standard message and a characteristic message, and for the characteristic messages with different service scenes and differences, the characteristic messages can be identified and distinguished through the characteristic name labels of the characteristic messages and are identified and processed according to requirements, and the transmission of the messages containing different data can be completed through one interface in the process, so that the problems of system resource waste and poor maintainability caused by respectively defining different message interfaces in different service scenes are solved.
In the foregoing embodiment, a specific implementation of the message sending module 703 may refer to fig. 9, where fig. 9 is a schematic structural diagram of the message sending module disclosed in the embodiment of the present invention, and referring to fig. 9, the message sending module 703 may include:
the first organizing module 901 is configured to organize a packet header and a standard packet according to a preset interface rule.
Only by organizing the message content according to the preset message interface rules of the data sender and the data receiver, the normal transmission and identification of the message can be ensured.
The message concatenation module 902 is configured to concatenate the characteristic messages from different second systems to form a complete characteristic message.
Each feature message is a feature message in an individual XML format, the XML format message may be encapsulated by using an XML CDATA tag, and the feature message encapsulated by using the XML CDATA tag may be encapsulated by using a feature name tag corresponding to data included in the feature message.
And a second organizing module 903, configured to organize the organized packet header and the standard packet together with the complete characteristic packet to form a new packet.
And a message sending sub-module 904, configured to send the new message to a third system.
In this embodiment, specific contents of organizing a new packet are introduced in detail, and by the specific implementation of organizing a packet, packet transmission does not need to match different packet interfaces for different packet data, so that not only is expandability strong, but also the problems of system resource waste and poor maintainability caused by different service scenarios defining different packet interfaces respectively are avoided.
Fig. 10 is a schematic structural diagram of another message organizing and transmitting device disclosed in the embodiment of the present invention, where the message transmitting device may operate in a first system, and as shown in fig. 10, the message organizing and transmitting device 100 may include:
the configuration module 1001 is configured to pre-configure characteristic message data, where the characteristic message data includes a characteristic name tag, a characteristic segment attribute, and a characteristic segment format.
The property packet data may include, but is not limited to, a property name label, a property packet attribute, and a property packet format. Therefore, in the process of message organization and transmission, the system can identify the characteristic message according to the characteristic name label and judge whether the characteristic message is the data required by the system. The characteristic message attribute and the characteristic message format can ensure the accurate transmission of data.
Of course, related configurators also need to plan complete message interface components between different systems in advance, including message headers, message bodies, interface modes (SOCKET, MQ), character sets, and the like, and may also specify in advance that all messages use an XML mode for data organization. Specific configurations may include: defining the specific format of a message header, defining the specific format of a standard message in a message body, and defining the specific format of a characteristic name label and corresponding characteristic messages for known characteristic messages according to different service scenes. In the future, if a new feature packet is needed, a new feature name tag needs to be assigned to the new feature packet and a specific format of the feature packet needs to be defined. When organizing the message subsequently, the XML can be used to organize the message for each feature message, then the XML CDATA tag is added to the beginning of the feature message in the XML format to encapsulate the feature message, and finally the corresponding feature name tag is used to encapsulate the feature message.
The message receiving module 701 is configured to receive a message sent by a second system, where the message includes a message header and a message body, and the message body includes a standard message and a characteristic message.
The standard message is a message including fixed content, and the characteristic message is a message including different content in different service scenes.
A message processing module 702, configured to parse the message header and the standard message of the message, and process the characteristic message according to the characteristic name tag of the characteristic message.
The message sending module 703 is configured to organize messages from different second systems into a new message, and send the new message to a third system.
In this embodiment, the message organizing and transmitting device is configured with the characteristic message data in advance, so that the system can identify the characteristic message according to the characteristic name tag and determine whether the characteristic message is data required by the system in the subsequent message organizing and transmitting process. The characteristic message attributes and the characteristic message format facilitate accurate transmission and parsing of data.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
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 (8)
1. A message organization and transmission method is characterized by comprising the following steps:
a first system receives a message sent by a second system, wherein the message comprises a message header and a message body, the message body comprises a standard message and a characteristic message, the standard message comprises a message with fixed content, and the characteristic message comprises messages with different contents in different service scenes;
the first system analyzes the message header and the standard message of the message and processes the characteristic message according to the characteristic name label of the characteristic message;
the first system organizes a message header and a standard message according to a preset message interface rule of the first system and the third system;
the first system splices the characteristic messages from different second systems together to form a complete characteristic message;
the first system organizes the organized message header, the standard message and the complete characteristic message together to form a new message;
and the first system sends the new message to the third system.
2. The packet organizing and transmitting method according to claim 1, wherein the first system parses the packet header and the standard packet of the packet, and processes the characteristic packet according to the characteristic name tag of the characteristic packet, including:
the first system analyzes the message header and the standard message of the message;
judging whether the characteristic message is the characteristic data required by the characteristic message according to the characteristic name label of the characteristic message;
if yes, analyzing the characteristic message.
3. The message organizing and transmitting method according to any of claims 1-2, further comprising:
configuring characteristic message data in advance, wherein the characteristic message data comprises a characteristic name label, characteristic message attributes and a characteristic message format.
4. The message organizing and transmitting method according to claim 3, wherein the feature message is a feature message in an XML format, the message in the XML format is encapsulated by using an XML CDATA label, and the feature message encapsulated by using the XML CDATA label is encapsulated by using a feature name label corresponding to data included in the feature message.
5. A message organization and transmission apparatus, comprising:
the message receiving module is used for receiving a message sent by a second system, wherein the message comprises a message header and a message body, and the message body comprises a standard message and a characteristic message, the standard message is a message containing fixed content, and the characteristic message is a message containing different contents in different service scenes;
the message processing module is used for analyzing the message header and the standard message of the message and processing the characteristic message according to the characteristic name label of the characteristic message;
the message sending module is used for organizing the messages from different second systems into a new message and sending the new message to a third system;
the message sending module comprises:
the first organizing module is used for organizing a message header and a standard message according to a preset interface rule;
the message splicing module is used for splicing the characteristic messages from different second systems together to form a complete characteristic message;
the second organization module is used for organizing the organized message header, the standard message and the complete characteristic message together to form a new message;
and the message sending submodule is used for sending the new message to a third system.
6. The message organizing and transmitting device according to claim 5, wherein the message processing module comprises:
the message analysis module is used for analyzing the message header and the standard message of the message;
the message judging module is used for judging whether the characteristic message is the characteristic data required by the message according to the characteristic name label of the characteristic message;
the message analysis module is also used for analyzing the characteristic message when the judgment result of the message judgment module is yes.
7. The message organizing and transmitting device according to any of claims 5-6, further comprising:
the configuration module is used for configuring characteristic message data in advance, wherein the characteristic message data comprises a characteristic name label, a characteristic message segment attribute and a characteristic message segment format.
8. The packet organizing and transmitting device according to claim 7, wherein the feature packet is a XML-formatted feature packet, the XML-formatted packet is encapsulated by using an XML CDATA tag, and the feature packet encapsulated by using the XML CDATA tag is encapsulated by using a feature name tag corresponding to data included in the feature packet.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810750704.9A CN108924141B (en) | 2018-07-10 | 2018-07-10 | Message organization and transmission method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810750704.9A CN108924141B (en) | 2018-07-10 | 2018-07-10 | Message organization and transmission method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108924141A CN108924141A (en) | 2018-11-30 |
CN108924141B true CN108924141B (en) | 2021-01-26 |
Family
ID=64412198
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810750704.9A Active CN108924141B (en) | 2018-07-10 | 2018-07-10 | Message organization and transmission method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108924141B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110209377B (en) * | 2019-04-26 | 2024-06-25 | 平安科技(深圳)有限公司 | Interface message processing method, device, equipment and storage medium based on factory class |
CN110445658B (en) * | 2019-08-16 | 2023-01-24 | 中国银行股份有限公司 | Message processing method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103095609A (en) * | 2013-01-09 | 2013-05-08 | 大唐软件技术股份有限公司 | Access adaptive method and device based on Internet of things terminals |
CN105391593A (en) * | 2015-12-30 | 2016-03-09 | 迈普通信技术股份有限公司 | Message transmission method and equipment |
CN106874325A (en) * | 2016-06-29 | 2017-06-20 | 阿里巴巴集团控股有限公司 | Data query method and device |
CN108040041A (en) * | 2017-12-05 | 2018-05-15 | 东北大学 | A kind of image difference transport protocol design system and method based on business-driven |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2835366B1 (en) * | 2002-01-29 | 2004-06-18 | Canon Kk | METHOD AND DEVICE FOR FORMING A REDUCED COMPRESSED DIGITAL SIGNAL |
-
2018
- 2018-07-10 CN CN201810750704.9A patent/CN108924141B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103095609A (en) * | 2013-01-09 | 2013-05-08 | 大唐软件技术股份有限公司 | Access adaptive method and device based on Internet of things terminals |
CN105391593A (en) * | 2015-12-30 | 2016-03-09 | 迈普通信技术股份有限公司 | Message transmission method and equipment |
CN106874325A (en) * | 2016-06-29 | 2017-06-20 | 阿里巴巴集团控股有限公司 | Data query method and device |
CN108040041A (en) * | 2017-12-05 | 2018-05-15 | 东北大学 | A kind of image difference transport protocol design system and method based on business-driven |
Also Published As
Publication number | Publication date |
---|---|
CN108924141A (en) | 2018-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106844372B (en) | Logistics information query method and device | |
US20090106645A1 (en) | Adaptive response/interpretive expression, communication distribution, and intelligent determination system and method | |
CN107800894B (en) | Intelligent voice prompt method and terminal equipment | |
CN107302597B (en) | Message file pushing method and device | |
CN104579909B (en) | Method and equipment for classifying user information and acquiring user grouping information | |
CN110908967B (en) | Method, device, equipment and computer readable medium for storing log | |
CN108924141B (en) | Message organization and transmission method and device | |
CN110688828A (en) | File processing method and device, file processing system and computer equipment | |
CN111381986B (en) | Message transmission method, system, device, electronic equipment and readable storage medium | |
CN110798567A (en) | Short message classification display method and device, storage medium and electronic equipment | |
CN112416739B (en) | Test method and device and electronic equipment | |
CN112383436B (en) | Network monitoring method and device | |
CN110336731B (en) | User matching method and device in group | |
CN109542743B (en) | Log checking method and device, electronic equipment and computer readable storage medium | |
CN112905826A (en) | Product anti-counterfeiting and tracing method and system based on product image recognition technology | |
CN110336872B (en) | Method, device and system for acquiring third-party data | |
CN112669850A (en) | Voice quality detection method and device, computer equipment and storage medium | |
CN110544467A (en) | Voice data auditing method, device, equipment and storage medium | |
CN115082057A (en) | Method, device, electronic device, medium, and program product for intelligently following up arrears | |
CN1707430B (en) | Method and system for packaging data | |
CN114663042A (en) | Intelligent telephone calling recruitment method and device, electronic equipment and storage medium | |
CN114611482A (en) | Product performance recording method, device, electronic equipment and storage medium | |
CN113744066B (en) | Information pushing method and device | |
CN111709855A (en) | Fund escrow method, device, storage medium and equipment based on OCR | |
CN111161012B (en) | Information pushing method and device and computer equipment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |