CN113055494B - Communication method and communication device - Google Patents
Communication method and communication device Download PDFInfo
- Publication number
- CN113055494B CN113055494B CN202110339490.8A CN202110339490A CN113055494B CN 113055494 B CN113055494 B CN 113055494B CN 202110339490 A CN202110339490 A CN 202110339490A CN 113055494 B CN113055494 B CN 113055494B
- Authority
- CN
- China
- Prior art keywords
- message
- communication
- receiver
- parameter
- request
- 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
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/565—Conversion or adaptation of application format or content
-
- 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 Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Communication Control (AREA)
Abstract
The invention provides a communication method and a communication device, which relate to the technical field of communication and the financial field, and the communication method comprises the following steps: receiving a communication request of a sender, wherein the communication request comprises a first request message and an interface unique identifier corresponding to a receiver; acquiring a communication parameter of a preset receiver according to the interface unique mark number, wherein the communication parameter comprises the message type of the receiver and the communication mode of the receiver; assembling the first request message according to the message type of the receiver to obtain a second request message; and sending the second request message to the receiver according to the communication mode of the receiver. The communication method and the communication device provided by the invention can reduce the docking cost, the communication coupling between the calling party and the receiving party is reduced through the communication device, when one party is changed, the change can be completed only by arranging the communication device in a configuration mode, and the other party does not need to be docked and developed again.
Description
Technical Field
The present invention relates to the field of communications technologies and financial technologies, and in particular, to a communication method and a communication apparatus.
Background
There are various communication modes in the application layer of the enterprise, and there are various communication message formats, and so are the application communication between the enterprise and the enterprise. Two applications need to communicate, and firstly, a communication mode needs to be unified, for example, both the communication modes adopt an HTTP (hyper text transport protocol) or SOCKET (SOCKET communication protocol); secondly, unifying the communication message format, such as messages using XML or JSON format; when the two conditions are satisfied, the communication between the two parties can be smoothly carried out. However, this communication method has several problems:
1) When one party in the communication adjusts the communication mode and/or the communication message, the other party also needs to adjust the communication mode and/or the communication message correspondingly, and the two parties can continue to communicate.
2) The difficulty of adjusting the communication mode and the communication message by the two communication parties is high, the integral promotion of enterprise projects is influenced, and the two parties are forcibly butted to each other at a high cost.
3) The data returned by the same interface can only provide interfaces of different versions according to different caller requirements, and the docking cost is high.
Disclosure of Invention
The invention provides a communication method and a communication device, and relates to the technical field of communication and the field of finance. The communication method comprises the following steps:
receiving a communication request of a sender, wherein the communication request comprises a first request message and an interface unique mark number corresponding to a receiver;
obtaining a communication parameter of a pre-configured receiver according to the interface unique mark number, wherein the communication parameter comprises: the message type of the receiver and the communication mode of the receiver;
assembling the first request message according to the message type of the receiver to obtain a second request message;
and sending the second request message to a receiver according to the communication mode of the receiver.
In an embodiment, the communication method further includes:
and when the transmission mode in the communication parameters is transparent transmission, directly sending the first request message to a receiver according to the communication mode of the receiver.
In one embodiment, the communication parameters further include: a pre-service configuration item, when the pre-service configuration item is a pre-service activation item, before the assembling the first request packet according to the packet type of the receiver, the method further includes:
and merging, splitting and/or changing the message parameters of the first request message according to the message parameter structure configuration of the receiver, so that the message parameter structure of the first request message is consistent with the message parameter structure of the receiver.
In an embodiment, before the assembling the first request packet according to the packet type of the receiving party, the method further includes:
checking the message parameters of the first request message according to a preset message parameter rule;
if the verification is passed, assembling the first request message according to the message type of the receiver; if the verification is not passed, returning error prompt information to a sender or setting the first request message according to the message parameter rule.
In an embodiment, when the communication mode of the receiving party is HTTP \ HTTPs, before the assembling the first request packet according to the packet type of the receiving party, the method further includes:
and restoring the message parameter level information of the first request message according to a preset message parameter mapping relation.
In one embodiment, the communication method further includes:
receiving a response message sent by the receiver;
when the post-service configuration item of the communication parameters is to start the post-service, merging, splitting and/or changing the message parameters of the response message according to the message parameter structure configuration of a sender, so that the message parameter structure of the response message is consistent with the message parameter structure of the sender;
and sending a response message consistent with the message parameter structure of the sender to the sender.
In an embodiment, the sending, to the sender, a response packet consistent with a packet parameter structure of the sender includes:
and sending the response message to the sender according to the communication mode of the sender.
The present invention also provides a communication device for implementing all the steps of the communication method provided by the present invention, the communication device comprising:
the communication receiving module is used for receiving a communication request of a sender, wherein the communication request comprises a first request message and an interface unique mark number corresponding to a receiver;
a communication parameter obtaining module, configured to obtain a communication parameter of a pre-configured receiver according to the interface unique identifier, where the communication parameter includes: the message type of the receiver and the communication mode of the receiver;
the message conversion module is used for assembling the first request message according to the message type of the receiver to obtain a second request message;
and the communication sending module is used for sending the second request message to the receiver according to the communication mode of the receiver.
In an embodiment, the communication sending module is further configured to:
and when the transmission mode in the communication parameters is transparent transmission, directly sending the first request message to a receiver according to the communication mode of the receiver.
In one embodiment, the communication parameters further include: a pre-service configuration item; the communication device also comprises a front-end service module;
the preposed service module is used for merging, splitting and/or changing the message parameters of the first request message according to the message parameter structure configuration of the receiver before the first request message is assembled according to the message type of the receiver when the preposed service configuration item is the start of the preposed service, so that the message parameter structure of the first request message is consistent with the message parameter structure of the receiver.
In an embodiment, the communication device further includes a parameter checking module, configured to:
before the first request message is assembled according to the message type of the receiver, checking the message parameters of the first request message according to a preset message parameter rule;
if the verification is passed, assembling the first request message according to the message type of the receiver; and if the verification fails, returning error prompt information to a sender or setting the first request message according to the message parameter rule.
In an embodiment, the packet conversion module is further configured to:
when the communication mode of the receiving party is HTTP \ HTTPS, before the first request message is assembled according to the message type of the receiving party, message parameter level information of the first request message is restored according to a preset message parameter mapping relation.
In an embodiment, the communication receiving module is further configured to receive a response message sent by the receiving party;
the communication device also comprises a post-service module, which is used for merging, splitting and/or changing the message parameters of the response message according to the message parameter structure configuration of a sender when the post-service configuration item of the communication parameters is the start of the post-service, so that the message parameter structure of the response message is consistent with the message parameter structure of the sender;
the communication sending module is further used for sending a response message consistent with the message parameter structure of the sender to the sender.
The communication method and the communication device provided by the invention can achieve the following technical effects:
1) The butt joint cost can be reduced, the communication coupling of the calling party and the receiving party is reduced, when one party is changed, the communication device is arranged in a configuration mode, the change can be completed, and the other party does not need to be in butt joint development again.
2) The output capacity is improved, the calling parties with different requirements can be connected through the same interface only by developing once, and time and labor are saved.
3) The expansion capability of message encryption, parameter verification and the like is provided. For example, if the output message has an encryption requirement, the message encryption can be realized by configuring an encryption mode.
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 some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a communication method provided by the present invention.
Fig. 2 is a schematic diagram of another communication method provided by the present invention.
Fig. 3 is a schematic diagram of another communication method provided by the present invention.
Fig. 4 is a schematic diagram of a communication device according to the present invention.
Fig. 5 is a schematic diagram of another communication device provided in the present invention.
Fig. 6 is a schematic diagram of an electronic device provided in the present invention.
Detailed Description
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 obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The invention provides a communication method and a communication device, and relates to the technical field of communication and the financial field. As shown in fig. 1, the communication method includes the following steps:
step S101, a communication request of a sender is received, wherein the communication request comprises a first request message and an interface unique mark number corresponding to a receiver.
And step S102, obtaining a communication parameter of a pre-configured receiver according to the unique interface identifier, wherein the communication parameter comprises the message type of the receiver and the communication mode of the receiver. The communication parameters of the receiver are pre-configured, one receiver can be uniquely determined according to the unique interface identifier, and the message type and the communication mode of the receiver are acquired simultaneously. The message types mainly comprise XML formats and JSON formats, and the communication modes mainly comprise HTTP \ HTTPS communication and SOCKET communication.
Step S103, the first request message is assembled according to the message type of the receiving party to obtain a second request message. For example, when the message type of the receiver configured in the communication parameters of the receiver is in an XML format and the message type of the first request message is in a JSON format, each field of the first request message is split, and then each split field is reassembled according to the XML format, so that the request message in the XML format, that is, the second request message, can be obtained. The same process is applied when the message type of the receiver is JSON format and the message type of the first request message is XML format, which is not described herein again.
It can be understood that, when the received packet type is consistent with the packet type of the first request packet, for example, the packet type of the receiving party and the packet type of the first request packet are both in JSON format, or the packet type of the receiving party and the packet type of the first request packet are both in XML format, and the first request packet does not need to be assembled.
And step S104, sending the second request message to a receiver according to the communication mode of the receiver. For example, when the communication mode of the receiver configured in the communication parameters of the receiver is HTTP \ HTTPs communication, the receiver communicates through an HTTP \ HTTPs communication module; and when the communication mode of the receiver configured in the communication parameters of the receiver is SOCKET communication, the receiver communicates with the receiver through a SOCKET communication module.
Meanwhile, in addition to selecting the communication mode of the receiving party, the selection of the communication line is also required. The communication line comprises a private line, intranet communication and internet communication. When the communication line is a private line or an internal network, the communication can be realized by direct connection; when the communication line is the internet, the internet agent address needs to be read, and the communication with the receiver can be realized only after the access through the agent communication module.
The communication method provided by the invention can reduce the docking cost, the communication coupling between the calling party and the receiving party is reduced through the communication device, when the requirement of one party is changed, the change can be completed only by adjusting the configuration of the communication parameter of the party, and the other party does not need to be docked and developed again. Meanwhile, the same interface only needs to be developed once, and calling parties with different requirements can be connected through the interconnection device, so that time and labor are saved.
In an embodiment, as shown in fig. 2, the communication method further includes:
and when the transmission mode in the communication parameters is transparent transmission, directly sending the first request message to a receiver according to the communication mode of the receiver.
Because the transparent transmission only transmits the service to be transmitted to the destination node, and simultaneously ensures the transmission quality, and does not process the transmitted service, when the transmission mode in the communication parameters of the receiver is transparent transmission, the message type conversion is not needed, the communication mode of the receiver is directly selected, and the unprocessed first request message is forwarded to the receiver according to the communication mode of the receiver.
In one embodiment, as shown in fig. 2, the communication parameters further include: a pre-service configuration item, when the pre-service configuration item is to start a pre-service, and before assembling the first request packet according to the packet type of the receiver in step S102, the method further includes:
and merging, splitting and/or changing the message parameters of the first request message according to the message parameter structure configuration of the receiver, so that the message parameter structure of the first request message is consistent with the message parameter structure of the receiver.
The pre-service configuration item is one of communication parameters and is used for identifying whether to start the pre-service. The pre-service is used for responding to the change of the message parameter structure of the receiving party. In practical applications, the receiver may change the message parameter structure, for example, combine the parameter a and the parameter B into the parameter C, and at this time, in order to ensure that the communication with the receiver is performed smoothly, the sender needs to change its own sending logic. However, since the sender may initiate communication to a plurality of different receivers at the same time, once the sending logic of the sender is changed, communication with other receivers may be affected. Therefore, in this embodiment, when the message parameter structure of the receiving party is changed, the message parameter structure in the communication parameter of the receiving party may be first adjusted, and meanwhile, the pre-service configuration item in the communication parameter of the receiving party is set as the pre-service to be started. When communication with the receiver is needed, if the preposed service is identified to be started, the message parameter structure of the receiver is read, and the parameters of the first request message of the sender are merged, split and/or changed according to the message parameter structure, so that the message parameter structure of the first request message is consistent with the message parameter structure of the receiver, and the subsequent steps of message assembly and the like are facilitated.
For example, assume that the message parameter structure of the receiving party changes to: and the parameter A and the parameter B are combined into a parameter C, at this time, the parameter A and the parameter B of the first request message are firstly obtained, and the parameter A and the parameter B are combined into one parameter C. When the message assembly is subsequently performed, the parameter C of the first request message can be directly used.
In an embodiment, as shown in fig. 2, before assembling the first request packet according to the packet type of the receiving party in step S102, the method further includes:
checking the message parameters of the first request message according to a preset message parameter rule;
if the verification is passed, assembling the first request message according to the message type of the receiver; and if the verification fails, returning error prompt information to a sender or setting the first request message according to the message parameter rule.
The preset message parameter rules mainly include basic rules that some fields cannot be empty, some fields need to be encrypted, and sensitive information of the message needs to be hidden, so that the verification of the message parameters of the first request message includes basic verification such as non-empty judgment and settings such as field encryption and sensitive information hiding.
When the communication mode of the receiving party is HTTP \ HTTPs, before the first request packet is assembled according to the packet type of the receiving party, the packet parameter verification in the above step further includes setting the first request packet as follows:
and restoring the message parameter level information of the first request message according to a preset message parameter mapping relation.
The parameter name of the request message of the sender and the parameter name of the message of the receiver corresponding to the request message of the sender have a corresponding relation. Assuming that the packet type of the first request packet is in an agreed format, such as JSON format, which does not need to include a hierarchical relationship, or has only one layer, for example, when the parameter D in the first request packet is 1, the first request packet is D =1; in practice, however, parameter D belongs to parameter E, which in turn belongs to parameter F, i.e. in practice D =1 should be f.e.d =1, which is a hierarchical relationship. In order to send a message in the communication mode of HTTP \ HTTPS, the hierarchical relationship of the message needs to be restored. Therefore, when the first request message with the parameter D =1 is received, if the communication mode of the receiving party is HTTP \ HTTPs, the hierarchical relationship with the parameter D =1 is reduced to f.e.d =1 according to the preset parameter mapping relationship, the identification parameter F includes the parameter E, the parameter D is included in the parameter E, and the value of the parameter D is 1.
In an embodiment, as shown in fig. 3, the communication method further includes:
and receiving a response message sent by the receiver. It can be understood that, after the sender sends a request message to the receiver, the receiver returns a response message for the request message.
When the post-service configuration item of the communication parameters is to start the post-service, merging, splitting and/or changing the message parameters of the response message according to the message parameter structure configuration of the sender, so that the message parameter structure of the response message is consistent with the message parameter structure of the sender.
Similar to the pre-service, the post-service is also used to deal with the change of the message parameter structure of one party. For example, when the message parameter structure of the receiver changes, the parameter structure of the returned response message changes correspondingly, and at this time, in order to ensure that the response message of the receiver is received smoothly without affecting the communication between the sender and the other receivers, the message format of the response message is merged, split and/or changed through a post-service, so that the message parameter structure of the response message is consistent with the message parameter structure of the sender. In this embodiment, when the message parameter structure of the receiving party is changed, the post-service configuration item in the communication parameter of the receiving party is set to start the post-service. When the response message of the receiver is received, if the starting of the postposition service is identified, the message parameter structure of the sender is read, and the parameters of the response message of the receiver are merged, split and/or changed according to the message parameter structure of the sender, so that the message parameter structure of the first request message is consistent with the message parameter structure of the receiver.
For example, assume that the message parameter structure of the receiving party changes to: and the parameter A and the parameter B are combined into a parameter C, at the moment, the parameter C of the response message is firstly obtained, and the parameter C is split into the parameter A and the parameter B. When the response message is subsequently sent to the sender, the parameter A and the parameter B of the response message can be directly used.
And sending a response message consistent with the message parameter structure of the sender to the sender. It can be understood that, through the processing of the previous step, the message parameter structure of the response message is consistent with the message parameter structure of the sender, and the parameter C, which cannot be read by the sender, in the response message is changed into the parameter a and the parameter B, which can be directly read by the sender.
And when the response message is sent to the sender, sending the response message according to the communication mode of the sender.
The communication method provided by the invention can reduce the butt joint cost and reduce the communication coupling of the calling party and the receiving party, when one party is changed, the change can be completed only by setting the communication device in a configuration mode, and the other party does not need to be re-butted and developed; meanwhile, the communication method improves the output capability, and calling parties with different requirements can be connected only by developing the same interface once, so that time and labor are saved; the communication method of the invention also provides the expansion capabilities of message encryption, parameter verification and the like, and when the output message has the encryption requirement, the message encryption can be realized by configuring the encryption mode.
The present invention further provides a communication device, which can be used to implement all the steps of the communication method provided by the present invention, as shown in fig. 4, the communication device includes:
a communication receiving module 41, configured to receive a communication request of a sender, where the communication request includes a first request packet and an interface unique identifier corresponding to a receiver; the communication device can be arranged at one side of the sender, and the communication mode and the message type of the communication device and the sender are predetermined.
A communication parameter obtaining module 42, configured to obtain a communication parameter of a pre-configured receiver according to the interface unique identifier, where the communication parameter includes: the message type of the receiver and the communication mode of the receiver;
a message conversion module 43, configured to assemble the first request message according to the message type of the receiving party, so as to obtain a second request message;
and the communication sending module 44 is configured to send the second request message to the receiving party according to the communication mode of the receiving party.
In an embodiment, the communication sending module is further configured to:
and when the transmission mode in the communication parameters is transparent transmission, directly sending the first request message to a receiver according to the communication mode of the receiver.
In one embodiment, as shown in fig. 5, the communication parameters further include: a pre-service configuration item; the communication device further comprises a front-end service module 45;
the preposed service module is used for merging, splitting and/or changing the message parameters of the first request message according to the message parameter structure configuration of the receiver before the first request message is assembled according to the message type of the receiver when the preposed service configuration item is the start of the preposed service, so that the message parameter structure of the first request message is consistent with the message parameter structure of the receiver.
In one embodiment, as shown in fig. 5, the communication device further includes a parameter checking module 46 configured to:
before the first request message is assembled according to the message type of the receiver, checking the message parameters of the first request message according to a preset message parameter rule;
if the verification is passed, assembling the first request message according to the message type of the receiver; and if the verification fails, returning error prompt information to a sender or setting the first request message according to the message parameter rule.
In an embodiment, the packet conversion module is further configured to:
when the communication mode of the receiving party is HTTP \ HTTPS, before the first request message is assembled according to the message type of the receiving party, message parameter level information of the first request message is restored according to a preset message parameter mapping relation.
In an embodiment, the communication receiving module is further configured to receive a response message sent by the receiving party;
the communication device also comprises a post-service module, which is used for merging, splitting and/or changing the message parameters of the response message according to the message parameter structure configuration of a sender when the post-service configuration item of the communication parameters is the start of the post-service, so that the message parameter structure of the response message is consistent with the message parameter structure of the sender;
the communication sending module is further used for sending a response message consistent with the message parameter structure of the sender to the sender.
The communication device provided by the invention can reduce the butt joint cost and reduce the communication coupling of the calling party and the receiving party, when one party is changed, the change can be completed only by arranging the communication device in a configuration mode, and the other party does not need to be re-butted and developed; meanwhile, the communication method improves the output capacity, and the calling parties with different requirements can be connected by developing the same interface once, so that time and labor are saved; the communication method of the invention also provides the expansion capabilities of message encryption, parameter verification and the like, and when the output message has the encryption requirement, the message encryption can be realized by configuring the encryption mode.
The present invention further provides an electronic device including the communication apparatus in the above embodiment, as shown in fig. 6, the electronic device 600 specifically includes:
a central processing unit (processor) 610, a memory 620, a communication module (Communications) 630, an input unit 640, an output unit 650, and a power supply 660.
The memory (memory) 620, the communication module (Communications) 630, the input unit 640, the output unit 650, and the power supply 660 are respectively connected to the central processing unit (processor) 610. The memory 620 stores a computer program, the cpu 610 can call the computer program, and the cpu 610 executes the computer program to implement all the steps of the communication method in the above embodiments.
Embodiments of the present application also provide a computer storage medium for storing a computer program executable by a processor. The computer program is executed by a processor to realize any near communication method provided by the invention.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points. In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of an embodiment of the specification.
In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction. The above description is only an example of the embodiments of the present disclosure, and is not intended to limit the embodiments of the present disclosure. Various modifications and variations to the embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present specification should be included in the scope of the claims of the embodiments of the present specification.
Claims (9)
1. A method of communication, comprising:
receiving a communication request of a sender, wherein the communication request comprises a first request message and an interface unique mark number corresponding to a receiver;
obtaining a communication parameter of a pre-configured receiver according to the interface unique identifier, wherein the communication parameter comprises: the message type of the receiver, the communication mode of the receiver and the preposed service configuration item of the receiver;
merging, splitting and/or changing the message parameters of the first request message according to the message parameter structure configuration corresponding to the preposed service configuration item, so that the message parameter structure of the first request message is consistent with the message parameter structure of the receiver;
splitting each field in the first request message, and assembling each field according to the message type of the receiver to obtain a second request message;
and sending the second request message to the receiver according to the communication mode of the receiver.
2. The communication method according to claim 1, further comprising:
and when the transmission mode in the communication parameters is transparent transmission, directly sending the first request message to a receiver according to the communication mode of the receiver.
3. The communication method according to any one of claims 1 to 2, wherein before the assembling the first request packet according to the packet type of the receiver, the method further comprises:
checking the message parameters of the first request message according to a preset message parameter rule;
if the verification is passed, assembling the first request message according to the message type of the receiver; and if the verification fails, returning error prompt information to a sender or setting the first request message according to the message parameter rule.
4. The communication method according to claim 3, wherein when the communication mode of the receiving side is HTTP \ HTTPs, before the assembling the first request packet according to the packet type of the receiving side, the method further includes:
and restoring the message parameter level information of the first request message according to a preset message parameter mapping relation.
5. The communication method according to claim 4, further comprising:
receiving a response message sent by the receiver;
when the post-service configuration item of the communication parameters is the start of post-service, merging, splitting and/or changing the message parameters of the response message according to the message parameter structure configuration of a sender, so that the message parameter structure of the response message is consistent with the message parameter structure of the sender;
and sending a response message consistent with the message parameter structure of the sender to the sender.
6. The communication method according to claim 4, wherein the sending a response message in accordance with the message parameter structure of the sender to the sender comprises:
and sending the response message to the sender according to the communication mode of the sender.
7. A communication device, comprising:
the communication receiving module is used for receiving a communication request of a sender, wherein the communication request comprises a first request message and an interface unique mark number corresponding to a receiver;
a communication parameter obtaining module, configured to obtain a communication parameter of a pre-configured receiver according to the interface unique identifier, where the communication parameter includes: the message type of the receiver, the communication mode of the receiver and the preposed service configuration item of the receiver;
the preposed service module is used for merging, splitting and/or changing the message parameters of the first request message according to the message parameter structure configuration corresponding to the preposed service configuration item, so that the message parameter structure of the first request message is consistent with the message parameter structure of the receiver;
the message conversion module is used for splitting each field in the first request message and assembling each field according to the message type of the receiver to obtain a second request message;
and the communication sending module is used for sending the second request message to the receiver according to the communication mode of the receiver.
8. An electronic device, comprising:
a central processing unit, a memory and a communication module, wherein the memory stores a computer program, the central processing unit can call the computer program, and the central processing unit realizes the communication method according to any one of claims 1-6 when executing the computer program.
9. A computer storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the communication method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110339490.8A CN113055494B (en) | 2021-03-30 | 2021-03-30 | Communication method and communication device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110339490.8A CN113055494B (en) | 2021-03-30 | 2021-03-30 | Communication method and communication device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113055494A CN113055494A (en) | 2021-06-29 |
CN113055494B true CN113055494B (en) | 2022-11-29 |
Family
ID=76516993
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110339490.8A Active CN113055494B (en) | 2021-03-30 | 2021-03-30 | Communication method and communication device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113055494B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115292624B (en) * | 2022-10-08 | 2023-08-04 | 成都同步新创科技股份有限公司 | General message processing method and device based on HTTP protocol |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105991564A (en) * | 2015-02-05 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Message processing method and device |
CN112187829A (en) * | 2020-10-21 | 2021-01-05 | 中国工商银行股份有限公司 | Online transaction message processing method, device and system |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106534243B (en) * | 2015-09-14 | 2020-02-18 | 阿里巴巴集团控股有限公司 | Caching, requesting and responding method based on HTTP protocol and corresponding device |
CN106487712B (en) * | 2016-11-24 | 2019-11-15 | 泰康保险集团股份有限公司 | For accessing the method, apparatus and server of multiple external systems |
CN109194495B (en) * | 2018-06-29 | 2021-08-24 | 平安科技(深圳)有限公司 | Server, message processing method, and computer-readable storage medium |
CN111355774B (en) * | 2019-08-01 | 2021-10-29 | 杭州海康威视数字技术股份有限公司 | Service communication method, device and system based on P2P |
CN112055078B (en) * | 2020-09-02 | 2023-10-03 | 数字广东网络建设有限公司 | Data transmission method, device, computer equipment and storage medium |
-
2021
- 2021-03-30 CN CN202110339490.8A patent/CN113055494B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105991564A (en) * | 2015-02-05 | 2016-10-05 | 阿里巴巴集团控股有限公司 | Message processing method and device |
CN112187829A (en) * | 2020-10-21 | 2021-01-05 | 中国工商银行股份有限公司 | Online transaction message processing method, device and system |
Also Published As
Publication number | Publication date |
---|---|
CN113055494A (en) | 2021-06-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109361550B (en) | Method, device and equipment for network equipment configuration management | |
US7406313B2 (en) | Systems, methods and computer program products for connecting ad hoc piconets to wide area networks | |
CN112788074B (en) | Data transmitting method, processing method, receiving method, apparatus thereof, and storage medium | |
US7519950B2 (en) | Method and system for version negotiation of distributed objects | |
US20070162560A1 (en) | System and method for asynchronous request response | |
US20080091832A1 (en) | Configurable connector | |
CN101729491B (en) | Method, device and system for enhancing application reliability of script-based business | |
WO2007060430A1 (en) | Apparatus for and a method of delivering a message to a user | |
US8484281B2 (en) | System and method for callbacks based on web service addressing | |
CN108512903B (en) | Abnormal information processing method and device, storage medium and API gateway | |
EP1843550B1 (en) | Transport medium selection to optimize device operation | |
CN110324193A (en) | A kind of terminal upgrade management method and device | |
CN113055494B (en) | Communication method and communication device | |
JPWO2002078385A1 (en) | Device setting update system | |
CN114363306A (en) | Data transmission method based on Netconf protocol and related equipment | |
WO2024109543A1 (en) | Vehicle-to-cloud communication method based on service-oriented architecture, and storage medium | |
CN103237050A (en) | Method and system for intelligent voice interaction | |
US7568194B2 (en) | Method and system for availability checking on distributed objects | |
CN112866268B (en) | Message processing method and system | |
CN114553666B (en) | Channel event reporting method, system, device and storage medium | |
US7143313B2 (en) | Support interface module bug submitter | |
CN114025005A (en) | Data communication method, system, electronic equipment and storage medium | |
US20070162539A1 (en) | System and method for callbacks based on Web service addressing | |
CN118101838B (en) | Third party service protocol answering substituting realization method, terminal equipment and storage medium | |
KR100650803B1 (en) | The system and operating method for enterprise wireless application service |
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 |