Movatterモバイル変換


[0]ホーム

URL:


CN112422565A - Message processing method, device and storage medium and electronic device - Google Patents

Message processing method, device and storage medium and electronic device
Download PDF

Info

Publication number
CN112422565A
CN112422565ACN202011296407.5ACN202011296407ACN112422565ACN 112422565 ACN112422565 ACN 112422565ACN 202011296407 ACN202011296407 ACN 202011296407ACN 112422565 ACN112422565 ACN 112422565A
Authority
CN
China
Prior art keywords
message
substructure
network structure
target network
communication protocol
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.)
Granted
Application number
CN202011296407.5A
Other languages
Chinese (zh)
Other versions
CN112422565B (en
Inventor
任佳朋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co LtdfiledCriticalQingdao Haier Technology Co Ltd
Priority to CN202011296407.5ApriorityCriticalpatent/CN112422565B/en
Publication of CN112422565ApublicationCriticalpatent/CN112422565A/en
Application grantedgrantedCritical
Publication of CN112422565BpublicationCriticalpatent/CN112422565B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种消息处理方法、装置和存储介质及电子装置。其中,该方法包括:接收配置有第一通信协议的第一终端发送的第一消息,其中,第一消息的消息格式为第一终端可识别的第一消息格式;将第一消息输入至目标服务器的目标网络结构,确定目标网络结构中与第一通信协议对应的上行子结构,其中,目标网络结构用于转换消息格式,目标网络结构包括至少两个与不同通信协议外对应的上行子结构;获取目标网络结构中与第一通信协议对应的上行子结构输出的第二消息,其中,第二消息的第二消息格式与第一通信协议相对应,第二消息格式为目标服务器可识别的消息格式。本发明解决了消息处理的适应性差的技术问题。

Figure 202011296407

The invention discloses a message processing method, device, storage medium and electronic device. The method includes: receiving a first message sent by a first terminal configured with a first communication protocol, wherein the message format of the first message is a first message format recognizable by the first terminal; inputting the first message to the target The target network structure of the server, determining the uplink substructure corresponding to the first communication protocol in the target network structure, wherein the target network structure is used to convert the message format, and the target network structure includes at least two uplink substructures corresponding to different communication protocols Obtain the second message output by the upstream substructure corresponding to the first communication protocol in the target network structure, wherein the second message format of the second message corresponds to the first communication protocol, and the second message format is identifiable by the target server message format. The invention solves the technical problem of poor adaptability of message processing.

Figure 202011296407

Description

Message processing method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of computers, and in particular, to a message processing method, a message processing apparatus, a storage medium, and an electronic apparatus.
Background
Nowadays, in the internet of things system, access to hundreds of terminal devices is often required, and the terminal devices are not devices of the same manufacturer. There is a problem that the background system needs to have compatibility of various protocols. At present, the commonly adopted mode is that devices with different protocols are accessed into different background service nodes, so that a background system is not a pure distributed system any more, and service resources are not fully utilized. That is, in the prior art, due to incompatibility between service nodes, message processing is dispersed, and further, subsequent operation and maintenance workload is heavy.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a message processing method, a message processing device, a storage medium and an electronic device, and at least solves the technical problem of poor adaptability of message processing.
According to an aspect of an embodiment of the present invention, there is provided a message processing method, including: receiving a first message sent by a first terminal configured with a first communication protocol, wherein the message format of the first message is a first message format recognizable by the first terminal; inputting the first message into a target network structure of a target server, and determining an uplink substructure corresponding to the first communication protocol in the target network structure, wherein the target network structure is used for converting message formats, and the target network structure comprises at least two uplink substructures corresponding to different communication protocols; and acquiring a second message output by an uplink substructure corresponding to the first communication protocol in the target network structure, wherein a second message format of the second message corresponds to the first communication protocol, and the second message format is a message format recognizable by the target server.
According to another aspect of the embodiments of the present invention, there is also provided a message processing apparatus, including: a first receiving unit, configured to receive a first message sent by a first terminal configured with a first communication protocol, where a message format of the first message is a first message format recognizable by the first terminal; a first determining unit, configured to input the first message into a target network structure of a target server, and determine an uplink sub-structure corresponding to the first communication protocol in the target network structure, where the target network structure is used to convert a message format, and the target network structure includes at least two uplink sub-structures corresponding to different communication protocols; a first obtaining unit, configured to obtain a second message output by an uplink sub-structure corresponding to the first communication protocol in the target network structure, where a second message format of the second message corresponds to the first communication protocol, and the second message format is a message format recognizable by the target server.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above message processing method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the message processing method through the computer program.
In the embodiment of the present invention, a first message sent by a first terminal configured with a first communication protocol is received, where a message format of the first message is a first message format recognizable by the first terminal; inputting the first message into a target network structure of a target server, and determining an uplink substructure corresponding to the first communication protocol in the target network structure, wherein the target network structure is used for converting message formats, and the target network structure comprises at least two uplink substructures corresponding to different communication protocols; and acquiring a second message output by an uplink substructure corresponding to the first communication protocol in the target network structure, wherein the second message format of the second message corresponds to the first communication protocol, and is a message format recognizable by the target server, and by converting the message format of the input message into a message format recognizable by the server and corresponding to the input message protocol in a manner of converting the message format by using the network structure, the purpose of completing the processing of the message without configuring a plurality of service nodes capable of converting only a single protocol message is achieved, thereby achieving the effect of improving the uniformity of message processing and further solving the technical problem of poor adaptability of message processing.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of an application environment of an alternative message processing method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a flow chart of an alternative message processing method according to an embodiment of the invention;
FIG. 3 is a diagram of an alternative message processing method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an alternative message processing method according to an embodiment of the invention;
FIG. 5 is a schematic diagram of an alternative message processing method according to an embodiment of the invention;
FIG. 6 is a schematic diagram of an alternative message processing method according to an embodiment of the invention;
FIG. 7 is a schematic diagram of an alternative message processing method according to an embodiment of the invention;
FIG. 8 is a schematic diagram of an alternative message processing method according to an embodiment of the invention;
FIG. 9 is a schematic diagram of an alternative message processing apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, a message processing method is provided, and optionally, as an optional implementation manner, the message processing method may be applied, but not limited, to the environment shown in fig. 1. The system may include, but is not limited to, a user equipment 102, a network 110, and a server 112, wherein the user equipment 102 may include, but is not limited to, a display 108, a processor 106, and a memory 104. Optionally, the user device 102 may be, but is not limited to, a smart home device under the internet of things, such as the smart air conditioner shown in fig. 1. Optionally, the sensible temperature detected by the current smart air conditioner may be, but is not limited to being, displayed on the display 108.
The specific process comprises the following steps:
step S102, the user equipment 102 acquires a body sensing temperature of a current environment detected by a temperature sensor installed on the user equipment 102, and generates a first message, wherein the user equipment 102 is configured with a first communication protocol, the first message comprises the body sensing temperature, and the first message corresponds to the first communication protocol;
step S104-S106, the user equipment 102 sends a first message to the server 112 through the network 110;
steps S108-S112, the server 112 processes the first message corresponding to the first communication protocol through the processing engine 116, so as to generate a second message corresponding to the first communication protocol, wherein the second message is in a message format recognizable to the server 112; the server 112 searches the database 114 for preset data corresponding to the second message, and further generates a corresponding service instruction, where the service instruction is used to instruct to adjust temperature control, and for example, if the preset temperature value is lower than 36 degrees, a service instruction used to instruct to increase temperature is generated; the server 112 processes the service instruction corresponding to the first communication protocol through the processing engine 116, so as to generate a third message corresponding to the first communication protocol, wherein the third message is in a message format recognizable by the first terminal 102.
Steps S114 to S116, the server 112 sends the third message to the user device 102 through the network 110, the processor 106 in the user device 102 adjusts the operating range according to the third message, for example, adjusts the temperature range, displays the real-time sensible temperature after the operating range is adjusted in the display 108, and stores the third message in the memory 104.
Optionally, as an optional implementation manner, as shown in fig. 2, the message processing method includes:
s202, receiving a first message sent by a first terminal configured with a first communication protocol, wherein the message format of the first message is a first message format recognizable by the first terminal;
s204, inputting the first message into a target network structure of a target server, and determining an uplink substructure corresponding to a first communication protocol in the target network structure, wherein the target network structure is used for converting message formats and comprises at least two uplink substructures corresponding to different communication protocols;
s206, acquiring a second message output by an uplink substructure corresponding to the first communication protocol in the target network structure, wherein the second message format of the second message corresponds to the first communication protocol, and the second message format is a message format recognizable by the target server.
Optionally, in this embodiment, the message processing method may be applied, but not limited to, in an internet of things scenario, and specifically, may be applied, but not limited to, to a background server to receive or send terminal devices configured with different protocols. At present, a common access system supporting multiple protocols generally adopts a mode that one protocol corresponds to one class of service nodes, that is, a service end access system is cut into several classes of independent subsystems which are incompatible with each other.
Optionally, in this embodiment, the communication protocol may refer to, but is not limited to, rules and conventions that must be followed by two entities to complete communication or service, and a common language must be provided between a plurality of data communication systems in different geographic locations, which are interconnected by communication channels and devices, to enable the data communication systems to cooperate to realize information interaction and resource sharing. For example, a first terminal configured with a first communication protocol cannot directly communicate or service with a service node or server configured with only a second communication protocol.
Optionally, in this embodiment, the message format may refer to, but is not limited to, a message format that can be recognized by different terminals or servers, such as a byte message format, an object message format, a service message format, and the like. The conversion of the message format may be, but is not limited to, by a decoder or encoder, wherein the decoder may be, but is not limited to, a hardware/software device capable of decoding the digital data stream back into an analog signal. An encoder may be, but is not limited to, a device that formulates, converts or otherwise transforms signals or data into a form of signals that may be used for communication, transmission, and storage.
Optionally, in this embodiment, the target server may include, but is not limited to, a plurality of sub-servers, and each sub-server may include, but is not limited to, a target network structure.
For further example, optionally, as shown in fig. 3, the target server 302 includes n service nodes, and each service node includes a target network structure, where the target network structure is configured to convert message formats of messages corresponding to various protocols sent by the terminal into a message format that can be recognized by the target server, for example, the terminal a sends a message corresponding to the communication protocol a to the first service node, and then the target server 302 obtains a message corresponding to the communication protocol a that is output by the first service node and that can be recognized by the target server 302. In addition, in the case that the first service node is in the working state, the messages sent by other terminals do not need to wait, and the target service node may but is not limited to send the received messages to other service nodes in the idle state, such as the second service node. Optionally, the dashed line in fig. 3 is used to indicate that the message sent by the terminal may be sent to a different serving node for conversion.
Optionally, in this embodiment, the target network structure may be, but is not limited to, convert a message format that is recognizable by the terminal but not recognizable by the server into a message format that is recognizable by the server, and may also be, but is not limited to, convert a message format that is recognizable by the server but not recognizable by the terminal into a message format that is recognizable by the terminal. For example, the target network structure may be, but is not limited to, a network structure built based on a netty network framework, and optionally, the netty network framework may be, but is not limited to, an asynchronous time-driven network application framework, which supports rapid development of maintainable high-performance protocol-oriented servers and clients, and may be, but is not limited to, suitable for a request/processing scenario with large client data, such as a web server.
By way of further illustration, an alternative target network architecture may be, but is not limited to, such as that shown in fig. 4, the target network architecture including a network layer 402, a decoder 404, a message handler 406, and an encoder 408, wherein the network layer 402 may, but is not limited to, further manage data communications in the network over the transfer functionality of data frames between two adjacent endpoints provided by the data link layer, trying to transfer data from a source end to a destination end via several intermediate nodes, thereby providing the most basic end-to-end data transfer service to the transport layer, the decoder 404 may, but is not limited to, convert byte messages into message objects, and the encoder 408 may, but is not limited to, convert message objects into byte messages, the message handler 406 may, but is not limited to, channel message object handling, such as the message handler 406 may, but is not limited to, handler, wherein handler is primarily used for the handling, when a message is sent, the message is firstly entered into a message queue, the function for sending the message can return, and the other part takes out the messages one by one in the message queue, and then the message is processed, namely the message sending and the message receiving are not synchronous processing, and the mechanism is usually used for processing the operation which takes relatively long time.
Specifically, assuming that the target network structure is a network structure built based on a netty network architecture, and further utilizing a channelpipeine mechanism of the netty network architecture, the netty message can be intercepted in a manner of adding a ChannelHandler to the channelpipeine, and the customized logic processing is performed. Optionally, the ChannelHandler is divided into two categories: one is the InboundHandler, which is intended to handle incoming messages; the other is an OutboundHandler, which is intended to handle outgoing messages. As can be seen from the flow of the ChannelPipeline message, the message may pass through one or more inboundhandlers when entering, and may pass through one or more outboundhandlers when exiting. Where both types of handlers are where customized logic can be added. In the normal protocol message processing, InboundHandler corresponds to the decoder 404, and OutboundHandler corresponds to the encoder 408.
It should be noted that, a first message sent by a first terminal configured with a first communication protocol is received, where a message format of the first message is a first message format recognizable by the first terminal; inputting a first message into a target network structure of a target server, and determining an uplink substructure corresponding to a first communication protocol in the target network structure, wherein the target network structure is used for converting message formats and comprises at least two uplink substructures corresponding to different communication protocols; and acquiring a second message output by an uplink substructure corresponding to the first communication protocol in the target network structure, wherein the second message format of the second message corresponds to the first communication protocol, and the second message format is a message format recognizable by the target server.
Further by way of example, the optional scenario that continues to be described with reference to fig. 5 based on the scenario shown in fig. 4 includes a terminal 502 and a service processing layer 504 in a target server, where the service processing layer 504 is configured to convert a message output by a target network structure into a service instruction corresponding to the target server.
Furthermore, the corresponding encoder 408 and decoder 404 may be written for different protocols, and multiple protocols may be configured with multiple decoders 404 and encoders 408 in the ChannelPipeline. Thus, compatible extension of the protocol can be conveniently realized. Assuming two protocols (one is protocol a-custom, and one is protocol B-MQTT protocol) as an example, when the netty is initialized, corresponding encoders and decoders for the two protocols need to be written and registered in the channel, such as a custom protocol encoder, an MQTT protocol encoder, and corresponding custom protocol decoder, an MQTT protocol decoder, a corresponding custom protocol message processor, and an MQTT protocol message processor.
By way of further example, parsing for multiple protocols may be achieved by configuring each protocol with an encoder 408, decoder 404, and message processor 406. And from the flow of messages (pointed by the arrows), the messages are divided into uplink (terminal 502 to target server) messages and downlink (target server to terminal 502) messages.
According to the embodiment provided by the application, a first message sent by a first terminal configured with a first communication protocol is received, wherein the message format of the first message is a first message format which can be identified by the first terminal; inputting a first message into a target network structure of a target server, and determining an uplink substructure corresponding to a first communication protocol in the target network structure, wherein the target network structure is used for converting message formats and comprises at least two uplink substructures corresponding to different communication protocols; the method comprises the steps of obtaining a second message output by an uplink substructure corresponding to a first communication protocol in a target network structure, wherein the second message format of the second message corresponds to the first communication protocol, is a message format recognizable by a target server, and converting the message format of the input message into a message format recognizable by the server and corresponding to the input message protocol by utilizing the mode of converting the message format by the network structure, so that the aim of completing the processing of the message without configuring a plurality of service nodes capable of converting only a single protocol message is fulfilled, and the effect of improving the uniformity of message processing is further realized.
As an optional scheme, inputting the first message to a target network structure of the target server, and determining an uplink sub-structure corresponding to the first communication protocol in the target network structure includes:
s1, determining that the first uplink substructure corresponds to the first communication protocol when the first message is input to the first uplink substructure in the target network structure and the second message output by the first uplink substructure is acquired; or the like, or, alternatively,
s2, inputting the first message to the second uplink substructure of the target network structure when the first message is input to the first uplink substructure but the second message output by the first uplink substructure is not obtained;
and S3, determining that the second uplink substructure corresponds to the first communication protocol when the first message is input to the second uplink substructure and the second message output by the second uplink substructure is acquired.
It should be noted that, when the first message is input to the first uplink substructure in the target network structure and the second message output by the first uplink substructure is acquired, it is determined that the first uplink substructure corresponds to the first communication protocol; or, under the condition that the first message is input to the first uplink substructure but the second message output by the first uplink substructure is not acquired, the first message is input to the second uplink substructure of the target network structure; and under the condition that the first message is input into the second uplink substructure and the second message output by the second uplink substructure is acquired, determining that the second uplink substructure corresponds to the first communication protocol.
For further example, optionally, for example, based on the above assumption, the custom protocol encoder and the MQTT protocol encoder configured for the target network structure, and the corresponding custom protocol decoder and MQTT protocol decoder, and the corresponding custom protocol message processor and MQTT protocol message processor, the processing procedure for the uplink message may be, but is not limited to, as shown in fig. 6, and specifically includes the following steps:
step S602, receiving a message sent by a terminal;
step S604, decoding by a custom decoder;
step S606, determining whether the custom decoder decodes a correct custom message, if yes, performing step S608, and if no, performing step S610;
step S608, the custom message processor processes the decoded custom message;
step S610, decoding by an MQTT protocol decoder;
step S612, judging whether the MQTT decoder decodes a correct MQTT message, if so, executing step S6014, and if not, executing step S616;
step S614, the MQTT message processor processes the decoded MQTT message;
step S616, determining that the message sent by the terminal cannot be analyzed;
step S618, obtaining a custom message obtained by coding;
and step S620, acquiring the MQTT message obtained by coding.
According to the embodiment provided by the application, under the condition that a first message is input to a first uplink substructure in a target network structure and a second message output by the first uplink substructure is obtained, the first uplink substructure is determined to correspond to a first communication protocol; or, under the condition that the first message is input to the first uplink substructure but the second message output by the first uplink substructure is not acquired, the first message is input to the second uplink substructure of the target network structure; under the condition that the first message is input into the second uplink substructure and the second message output by the second uplink substructure is obtained, the second uplink substructure is determined to correspond to the first communication protocol, the purpose of efficiently and uniformly processing uplink messages corresponding to different protocols is achieved, and the effect of improving the processing efficiency of the uplink messages is achieved.
As an optional scheme, after obtaining the second message output by the uplink sub-structure corresponding to the first communication protocol in the target network structure, the method includes:
s1, inputting the second message into a target processing substructure of the target network structure, wherein the target processing substructure corresponds to the first communication protocol, the target processing substructure is used for processing the message into a service message corresponding to the target server, and the target network structure comprises at least two processing substructures corresponding to different communication protocols;
and S2, acquiring a first service message output by the target processing substructure, wherein the first service message is used for instructing the target server to generate a first service instruction, and the first service instruction is used for instructing to execute the first service.
Optionally, the target processing sub-structure may be, but is not limited to, used to process a message recognizable by the target server into a specific service instruction or service message by combining with a service logic preset by the target server, so as to implement information processing or terminal control.
It should be noted that, the second message is input into a target processing substructure of the target network structure, where the target processing substructure corresponds to the first communication protocol, the target processing substructure is used to process the message into a service message corresponding to the target server, and the target network structure includes at least two processing substructures corresponding to different communication protocols; and acquiring a first service message output by the target processing substructure, wherein the first service message is used for indicating the target server to generate a first service instruction, and the first service instruction is used for indicating the execution of the first service.
For further example, optionally, as shown in fig. 5, the target processing sub-structure may be, but is not limited to, a service processing layer 504, where a service logic of the service processing layer 504 may be, but is not limited to, flexibly set in different scenarios, for example, the terminal 502 is an intelligent air conditioner, in one scenario, the intelligent air conditioner sends the detected current sensible temperature to the target server, processes a message carrying the current sensible temperature into a message that can be identified by the target server through a target network structure, and then the service processing layer 504 determines the temperature data based on the preset service logic, for example, if the temperature data is lower than a target preset threshold, generates an up-adjustment service instruction, where the up-adjustment service instruction is used to instruct the intelligent air conditioner to adjust and control a temperature level until the re-detected sensible temperature reaches the target preset threshold.
According to the embodiment provided by the application, the second message is input into a target processing substructure of a target network structure, wherein the target processing substructure corresponds to the first communication protocol, the target processing substructure is used for processing the message into a service message corresponding to a target server, and the target network structure comprises at least two processing substructures corresponding to different communication protocols; and acquiring a first service message output by the target processing substructure, wherein the first service message is used for indicating the target server to generate a first service instruction, and the first service instruction is used for indicating the execution of the first service, so that the aim of combining the message processing method with a specific service scene is fulfilled, and the effect of improving the compatibility of message processing is realized.
As an optional scheme, after acquiring the first service message output by the target processing sub-structure, the method includes:
s1, inputting the first service instruction into a first downlink substructure of a target network structure, wherein the first downlink substructure is used for processing a message format corresponding to a first communication protocol into a first message format, and the target network structure comprises at least two downlink substructures corresponding to different communication protocols;
s2, acquiring a third message output by the first downlink substructure, wherein a first message format of the third message corresponds to the first communication protocol;
s3, sending a third message to the first terminal, wherein the first terminal executes the first service based on the third message.
It should be noted that, the first service instruction is input into a first downlink substructure of the target network structure, where the first downlink substructure is used to process a message format corresponding to a first communication protocol into a first message format, and the target network structure includes at least two downlink substructures corresponding to different communication protocols; acquiring a third message output by the first downlink substructure, wherein a first message format of the third message corresponds to the first communication protocol; and sending a third message to the first terminal, wherein the first terminal executes the first service based on the third message.
For further example, optionally, for example, based on the above assumption, the custom protocol encoder and the MQTT protocol encoder configured for the target network structure, and the corresponding custom protocol decoder and MQTT protocol decoder, and the corresponding custom protocol message processor and MQTT protocol message processor, the processing procedure for the downlink message may be, but is not limited to, as shown in fig. 7, and specifically includes the following steps:
step S702, receiving a message sent by a terminal;
step S704, self-defining encoder coding;
step S706, determining whether the custom encoder encodes a correct custom message, if yes, performing step S708, and if not, performing step S710;
step S708, obtaining a self-defined message obtained by coding;
step S710, encoding by an MQTT protocol encoder;
step S712, determining whether the MQTT encoder encodes a correct MQTT message, if yes, performing step S714, and if no, performing step S716;
step S714, obtaining the MQTT message obtained by coding;
step S716, determining that the message sent by the terminal cannot be analyzed.
It should be noted that after determining the protocol corresponding to the access message, the corresponding message processor and encoder may be directly selected for the access message without further determination.
According to the embodiment provided by the application, a first service instruction is input into a first downlink substructure of a target network structure, wherein the first downlink substructure is used for processing a message format corresponding to a first communication protocol into a first message format, and the target network structure comprises at least two downlink substructures corresponding to different communication protocols; acquiring a third message output by the first downlink substructure, wherein a first message format of the third message corresponds to the first communication protocol; and sending the third message to the first terminal, wherein the first terminal executes the first service based on the third message, so that the purpose of efficiently and uniformly processing the downlink messages corresponding to different protocols is achieved, and the effect of improving the processing efficiency of the downlink messages is realized.
As an optional scheme, the method further comprises the following steps:
s1, generating a second service instruction, wherein the second service instruction is used for instructing to execute a second service;
s2, inputting the second service instruction into the target network structure, and determining a downlink substructure corresponding to the third communication protocol in the target network structure;
s3, a fourth message output by a downlink substructure corresponding to a third communication protocol in the target network structure is obtained, wherein a third message format of the fourth message corresponds to the third communication protocol, the third message format is a message format recognizable by the second terminal, and the second terminal is configured with the third communication protocol;
s4, sending a third message to the second terminal, wherein the second terminal executes the second service based on the third message.
It should be noted that, a second service instruction is generated, where the second service instruction is used to instruct to execute a second service; inputting the second service instruction into the target network structure, and determining a downlink substructure corresponding to the third communication protocol in the target network structure; acquiring a fourth message output by a downlink substructure corresponding to a third communication protocol in a target network structure, wherein a third message format of the fourth message corresponds to the third communication protocol, the third message format is a message format recognizable by a second terminal, and the second terminal is configured with the third communication protocol; and sending a third message to the second terminal, wherein the second terminal executes the second service based on the third message.
For further example, optionally, for example, as shown in fig. 3, multiple terminals configured with different communication protocols may select, but are not limited to, to implement processing of an access message at one serving node, and in one scenario, the first serving node may process, but is not limited to, messages accessed by multiple terminals, such as terminal a and terminal B, simultaneously or according to an access sequence.
According to the embodiment provided by the application, a second service instruction is generated, wherein the second service instruction is used for indicating execution of a second service; inputting the second service instruction into the target network structure, and determining a downlink substructure corresponding to the third communication protocol in the target network structure; acquiring a fourth message output by a downlink substructure corresponding to a third communication protocol in a target network structure, wherein a third message format of the fourth message corresponds to the third communication protocol, the third message format is a message format recognizable by a second terminal, and the second terminal is configured with the third communication protocol; and sending a third message to the second terminal, wherein the second terminal executes the second service based on the third message, so that the purpose that one service node can process a plurality of communication protocols is achieved, and the effect of improving the efficiency of message processing is realized.
As an optional scheme, inputting the second service instruction to a target network structure of the target server, and determining a downlink sub-structure corresponding to the second communication protocol in the target network structure includes:
s1, when the second service instruction is input to the second downlink substructure in the target network structure and the third message output by the second downlink substructure is obtained, determining that the second downlink substructure corresponds to the third communication protocol; or the like, or, alternatively,
s2, when the second service instruction is input to the second downlink substructure but the third message output by the second downlink substructure is not obtained, inputting the first message to the third downlink substructure of the target network structure;
and S3, determining that the third downlink substructure corresponds to the third communication protocol when the second service instruction is input to the third downlink substructure and the third message output by the third downlink substructure is acquired.
And (4) optional.
It should be noted that, when the second service instruction is input to the second downlink substructure in the target network structure and the third message output by the second downlink substructure is obtained, it is determined that the second downlink substructure corresponds to the third communication protocol; or, under the condition that the second service instruction is input to the second downlink substructure but the third message output by the second downlink substructure is not acquired, the first message is input to the third downlink substructure of the target network structure; and under the condition that the second service instruction is input into the third downlink substructure and the third message output by the third downlink substructure is acquired, determining that the third downlink substructure corresponds to the third communication protocol.
By way of further example, optionally continuing with the scenario illustrated in fig. 5, for example, as illustrated in fig. 8, the target server may, but is not limited to, actively initiate an instruction or message to the terminal 802, for example, the target server initiates a service instruction, and processes the instruction/message, which is recognizable by the terminal 802 and corresponds to the network protocol configured by the terminal 802, via the target network structure, for instructing the terminal 802 to perform a service operation.
According to the embodiment provided by the application, under the condition that a second service instruction is input to a second downlink substructure in a target network structure and a third message output by the second downlink substructure is obtained, the second downlink substructure is determined to correspond to a third communication protocol; or, under the condition that the second service instruction is input to the second downlink substructure but the third message output by the second downlink substructure is not acquired, the first message is input to the third downlink substructure of the target network structure; and under the condition that the second service instruction is input into the third downlink substructure and the third message output by the third downlink substructure is acquired, determining that the third downlink substructure corresponds to the third communication protocol, thereby achieving the purpose of reducing the unicity of message processing and improving the comprehensive effect of message processing.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently 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.
According to another aspect of the embodiment of the present invention, there is also provided a message processing apparatus for implementing the message processing method. As shown in fig. 9, the apparatus includes:
a first receiving unit 902, configured to receive a first message sent by a first terminal configured with a first communication protocol, where a message format of the first message is a first message format recognizable by the first terminal;
a first determining unit 904, configured to input the first message to a target network structure of the target server, and determine an uplink sub-structure corresponding to the first communication protocol in the target network structure, where the target network structure is used to convert a message format, and the target network structure includes at least two uplink sub-structures corresponding to different communication protocols;
a first obtaining unit 906, configured to obtain a second message output by an uplink sub-structure corresponding to the first communication protocol in the target network structure, where a second message format of the second message corresponds to the first communication protocol, and the second message format is a message format recognizable by the target server.
Optionally, in this embodiment, the message processing apparatus may be applied, but not limited to, in a scene of an internet of things, and specifically, may be applied, but not limited to, to a background server to receive or send terminal devices configured with different protocols. At present, a common access system supporting multiple protocols generally adopts a mode that one protocol corresponds to one class of service nodes, that is, a service end access system is cut into several classes of independent subsystems which are incompatible with each other.
Optionally, in this embodiment, the communication protocol may refer to, but is not limited to, rules and conventions that must be followed by two entities to complete communication or service, and a common language must be provided between a plurality of data communication systems in different geographic locations, which are interconnected by communication channels and devices, to enable the data communication systems to cooperate to realize information interaction and resource sharing. For example, a first terminal configured with a first communication protocol cannot directly communicate or service with a service node or server configured with only a second communication protocol.
Optionally, in this embodiment, the message format may refer to, but is not limited to, a message format that can be recognized by different terminals or servers, such as a byte message format, an object message format, a service message format, and the like. The conversion of the message format may be, but is not limited to, by a decoder or encoder, wherein the decoder may be, but is not limited to, a hardware/software device capable of decoding the digital data stream back into an analog signal. An encoder may be, but is not limited to, a device that formulates, converts or otherwise transforms signals or data into a form of signals that may be used for communication, transmission, and storage.
Optionally, in this embodiment, the target server may include, but is not limited to, a plurality of sub-servers, and each sub-server may include, but is not limited to, a target network structure.
It should be noted that, a first message sent by a first terminal configured with a first communication protocol is received, where a message format of the first message is a first message format recognizable by the first terminal; inputting a first message into a target network structure of a target server, and determining an uplink substructure corresponding to a first communication protocol in the target network structure, wherein the target network structure is used for converting message formats and comprises at least two uplink substructures corresponding to different communication protocols; and acquiring a second message output by an uplink substructure corresponding to the first communication protocol in the target network structure, wherein the second message format of the second message corresponds to the first communication protocol, and the second message format is a message format recognizable by the target server.
For a specific embodiment, reference may be made to an example shown in the message processing method described above, and details in this example are not described herein again.
According to the embodiment provided by the application, a first message sent by a first terminal configured with a first communication protocol is received, wherein the message format of the first message is a first message format which can be identified by the first terminal; inputting a first message into a target network structure of a target server, and determining an uplink substructure corresponding to a first communication protocol in the target network structure, wherein the target network structure is used for converting message formats and comprises at least two uplink substructures corresponding to different communication protocols; the method comprises the steps of obtaining a second message output by an uplink substructure corresponding to a first communication protocol in a target network structure, wherein the second message format of the second message corresponds to the first communication protocol, is a message format recognizable by a target server, and converting the message format of the input message into a message format recognizable by the server and corresponding to the input message protocol by utilizing the mode of converting the message format by the network structure, so that the aim of completing the processing of the message without configuring a plurality of service nodes capable of converting only a single protocol message is fulfilled, and the effect of improving the uniformity of message processing is further realized.
As an alternative, the first determining unit 904 includes:
the first determining module is used for determining that the first uplink substructure corresponds to the first communication protocol when the first message is input into the first uplink substructure in the target network structure and the second message output by the first uplink substructure is acquired; or the like, or, alternatively,
a second determining module, configured to input the first message to a second uplink substructure of the target network structure when the first message is input to the first uplink substructure but a second message output by the first uplink substructure is not obtained;
and the third determining module is used for determining that the second uplink substructure corresponds to the first communication protocol when the first message is input into the second uplink substructure and the second message output by the second uplink substructure is acquired.
For a specific embodiment, reference may be made to an example shown in the message processing method described above, and details in this example are not described herein again.
As an alternative, the method comprises the following steps:
the system comprises an input unit, a target processing sub-structure and a processing unit, wherein the input unit is used for inputting a second message into the target processing sub-structure of a target network structure after acquiring the second message output by an uplink sub-structure corresponding to a first communication protocol in the target network structure, the target processing sub-structure corresponds to the first communication protocol and is used for processing the message into a service message corresponding to a target server, and the target network structure comprises at least two processing sub-structures corresponding to different communication protocols;
and a second obtaining unit, configured to obtain a first service message output by the target processing sub-structure after obtaining a second message output by an uplink sub-structure corresponding to the first communication protocol in the target network structure, where the first service message is used to instruct the target server to generate a first service instruction, and the first service instruction is used to instruct the target server to execute the first service.
For a specific embodiment, reference may be made to an example shown in the message processing method described above, and details in this example are not described herein again.
As an alternative, the method comprises the following steps:
the processing unit is used for inputting a first service instruction into a first downlink substructure of a target network structure after acquiring a first service message output by a target processing substructure, wherein the first downlink substructure is used for processing a message format corresponding to a first communication protocol into a first message format, and the target network structure comprises at least two downlink substructures corresponding to different communication protocols;
a third obtaining unit, configured to obtain a third message output by the first downlink sub-structure after obtaining the first service message output by the target processing sub-structure, where a first message format of the third message corresponds to the first communication protocol;
and the first sending unit is used for sending a third message to the first terminal after acquiring the first service message output by the target processing substructure, wherein the first terminal executes the first service based on the third message.
For a specific embodiment, reference may be made to an example shown in the message processing method described above, and details in this example are not described herein again.
As an optional scheme, the method further comprises the following steps:
the generating unit is used for generating a second service instruction, wherein the second service instruction is used for indicating to execute a second service;
the second determining unit is used for inputting the second service instruction into the target network structure and determining a downlink substructure corresponding to the third communication protocol in the target network structure;
a fourth obtaining unit, configured to obtain a fourth message output by a downlink sub-structure corresponding to a third communication protocol in the target network structure, where a third message format of the fourth message corresponds to the third communication protocol, the third message format is a message format recognizable by the second terminal, and the second terminal is configured with the third communication protocol;
and a second sending unit, configured to send a third message to the second terminal, where the second terminal executes the second service based on the third message.
For a specific embodiment, reference may be made to an example shown in the message processing method described above, and details in this example are not described herein again.
As an alternative, the second determining unit includes:
a fourth determining module, configured to determine that the second downlink sub-structure corresponds to the third communication protocol when the second service instruction is input to the second downlink sub-structure in the target network structure and a third message output by the second downlink sub-structure is obtained; or the like, or, alternatively,
a fifth determining module, configured to input the first message to a third downlink sub-structure of the target network structure when the second service instruction is input to the second downlink sub-structure but a third message output by the second downlink sub-structure is not obtained;
and the sixth determining module is configured to determine that the third downlink sub-structure corresponds to the third communication protocol when the second service instruction is input to the third downlink sub-structure and the third message output by the third downlink sub-structure is acquired.
For a specific embodiment, reference may be made to an example shown in the message processing method described above, and details in this example are not described herein again.
According to yet another aspect of the embodiments of the present invention, there is also provided an electronic device for implementing the message processing method, as shown in fig. 10, the electronic device includes amemory 1002 and aprocessor 1004, thememory 1002 stores a computer program, and theprocessor 1004 is configured to execute the steps in any one of the method embodiments by the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving a first message sent by a first terminal configured with a first communication protocol, wherein the message format of the first message is a first message format recognizable by the first terminal;
s2, inputting the first message into a target network structure of a target server, and determining an uplink substructure corresponding to a first communication protocol in the target network structure, wherein the target network structure is used for converting message formats and comprises at least two uplink substructures corresponding to different communication protocols;
s3, acquiring a second message output by the uplink substructure corresponding to the first communication protocol in the target network structure, wherein the second message format of the second message corresponds to the first communication protocol, and the second message format is a message format recognizable by the target server.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 10 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 10 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 10, or have a different configuration than shown in FIG. 10.
Thememory 1002 may be used to store software programs and modules, such as program instructions/modules corresponding to the message processing method and apparatus in the embodiments of the present invention, and theprocessor 1004 executes various functional applications and data processing by running the software programs and modules stored in thememory 1002, that is, implements the message processing method described above. Thememory 1002 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, thememory 1002 may further include memory located remotely from theprocessor 1004, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. Thememory 1002 may be specifically, but not limited to, used to store information such as a first message format, a first message, a second message format, and a second message. As an example, as shown in fig. 10, thememory 1002 may include, but is not limited to, the first receiving unit 902, the first determining unit 904, and the first obtaining unit 906 in the message processing apparatus. In addition, other module units in the message processing apparatus may also be included, but are not limited to, and are not described in detail in this example.
Optionally, the above-mentionedtransmission device 1006 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, thetransmission device 1006 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices so as to communicate with the internet or a local area Network. In one example, thetransmission device 1006 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In addition, the electronic device further includes: adisplay 1008 for displaying information such as the first message format, the first message, the second message format, and the second message; and aconnection bus 1010 for connecting the respective module parts in the above-described electronic apparatus.
According to a further aspect of an embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, receiving a first message sent by a first terminal configured with a first communication protocol, wherein the message format of the first message is a first message format recognizable by the first terminal;
s2, inputting the first message into a target network structure of a target server, and determining an uplink substructure corresponding to a first communication protocol in the target network structure, wherein the target network structure is used for converting message formats and comprises at least two uplink substructures corresponding to different communication protocols;
s3, acquiring a second message output by the uplink substructure corresponding to the first communication protocol in the target network structure, wherein the second message format of the second message corresponds to the first communication protocol, and the second message format is a message format recognizable by the target server.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be substantially or partially implemented in the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, or network devices) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

Translated fromChinese
1.一种消息处理方法,其特征在于,包括:1. a message processing method, is characterized in that, comprises:接收配置有第一通信协议的第一终端发送的第一消息,其中,所述第一消息的消息格式为所述第一终端可识别的第一消息格式;receiving a first message sent by a first terminal configured with a first communication protocol, wherein the message format of the first message is a first message format recognizable by the first terminal;将所述第一消息输入至目标服务器的目标网络结构,确定所述目标网络结构中与所述第一通信协议对应的上行子结构,其中,所述目标网络结构用于转换消息格式,所述目标网络结构包括至少两个与不同通信协议外对应的上行子结构;The first message is input into the target network structure of the target server, and the uplink substructure corresponding to the first communication protocol in the target network structure is determined, wherein the target network structure is used for converting message formats, and the The target network structure includes at least two uplink substructures corresponding to different communication protocols;获取所述目标网络结构中与所述第一通信协议对应的上行子结构输出的第二消息,其中,所述第二消息的第二消息格式与所述第一通信协议相对应,所述第二消息格式为所述目标服务器可识别的消息格式。Acquire a second message output by an uplink substructure corresponding to the first communication protocol in the target network structure, wherein a second message format of the second message corresponds to the first communication protocol, and the first The second message format is a message format recognizable by the target server.2.根据权利要求1所述的方法,其特征在于,所述将所述第一消息输入至目标服务器的目标网络结构,确定所述目标网络结构中与所述第一通信协议对应的上行子结构,包括:2 . The method according to claim 1 , wherein, by inputting the first message into a target network structure of a target server, an uplink sub-link corresponding to the first communication protocol in the target network structure is determined. 3 . structure, including:在将所述第一消息输入至所述目标网络结构中的第一上行子结构,且获取到所述第一上行子结构输出的所述第二消息的情况下,确定所述第一上行子结构与所述第一通信协议相对应;或,In the case where the first message is input to the first uplink substructure in the target network structure, and the second message output by the first uplink substructure is acquired, determining the first uplink substructure the structure corresponds to the first communication protocol; or,在将所述第一消息输入至所述第一上行子结构,但并未获取到所述第一上行子结构输出的所述第二消息的情况下,将所述第一消息输入至所述目标网络结构的第二上行子结构;inputting the first message to the the second upstream substructure of the target network structure;在将所述第一消息输入至所述第二上行子结构,且获取到所述第二上行子结构输出的所述第二消息的情况下,确定所述第二上行子结构与所述第一通信协议相对应。In the case where the first message is input to the second uplink substructure, and the second message output by the second uplink substructure is acquired, determine the relationship between the second uplink substructure and the first uplink substructure. corresponding to a communication protocol.3.根据权利要求1所述的方法,其特征在于,在所述获取所述目标网络结构中与所述第一通信协议对应的上行子结构输出的第二消息之后,包括:3. The method according to claim 1, wherein after acquiring the second message output by the uplink substructure corresponding to the first communication protocol in the target network structure, the method comprises:将所述第二消息输入至所述目标网络结构的目标处理子结构,其中,所述目标处理子结构与所述第一通信协议相对应,所述目标处理子结构用于将消息处理为所述目标服务器对应的业务消息,所述目标网络结构包括至少两个与不同通信协议外对应的处理子结构;The second message is input to a target processing sub-structure of the target network structure, wherein the target processing sub-structure corresponds to the first communication protocol, and the target processing sub-structure is used to process the message into all The service message corresponding to the target server, and the target network structure includes at least two processing substructures corresponding to different communication protocols;获取所述目标处理子结构输出的第一业务消息,其中,所述第一业务消息用于指示所述目标服务器生成第一业务指令,所述第一业务指令用于指示执行第一业务。The first service message output by the target processing substructure is acquired, wherein the first service message is used to instruct the target server to generate a first service instruction, and the first service instruction is used to instruct the execution of the first service.4.根据权利要求3所述的方法,其特征在于,在所述获取所述目标处理子结构输出的第一业务消息之后,包括:4. The method according to claim 3, wherein after acquiring the first service message output by the target processing substructure, the method comprises:将所述第一业务指令输入所述目标网络结构的第一下行子结构,其中,所述第一下行子结构用于将与第一通信协议对应的消息格式处理为所述第一消息格式,所述目标网络结构包括至少两个与不同通信协议外对应的下行子结构;Inputting the first service instruction into the first downlink substructure of the target network structure, wherein the first downlink substructure is used to process the message format corresponding to the first communication protocol as the first message format, the target network structure includes at least two downlink substructures corresponding to different communication protocols;获取所述第一下行子结构输出的第三消息,其中,所述第三消息的所述第一消息格式与第一通信协议相对应;acquiring a third message output by the first downlink substructure, wherein the first message format of the third message corresponds to a first communication protocol;发送所述第三消息至所述第一终端,其中,所述第一终端基于所述第三消息执行所述第一业务。Sending the third message to the first terminal, wherein the first terminal executes the first service based on the third message.5.根据权利要求1所述的方法,其特征在于,还包括:5. The method of claim 1, further comprising:生成第二业务指令,其中,所述第二业务指令用于指示执行第二业务;generating a second service instruction, wherein the second service instruction is used to instruct the execution of the second service;将所述第二业务指令输入至所述目标网络结构,确定所述目标网络结构中与第三通信协议对应的下行子结构;inputting the second service instruction into the target network structure, and determining the downlink substructure corresponding to the third communication protocol in the target network structure;获取所述目标网络结构中与所述第三通信协议对应的下行子结构输出的第四消息,其中,所述第四消息的第三消息格式与所述第三通信协议相对应,所述第三消息格式为第二终端可识别的消息格式,所述第二终端配置有所述第三通信协议;Obtain a fourth message output by a downlink substructure corresponding to the third communication protocol in the target network structure, wherein the third message format of the fourth message corresponds to the third communication protocol, and the third message format is corresponding to the third communication protocol. The third message format is a message format recognizable by the second terminal, and the second terminal is configured with the third communication protocol;发送所述第三消息至所述第二终端,其中,所述第二终端基于所述第三消息执行所述第二业务。Sending the third message to the second terminal, wherein the second terminal executes the second service based on the third message.6.根据权利要求5所述的方法,其特征在于,所述将所述第二业务指令输入至目标服务器的目标网络结构,确定所述目标网络结构中与第二通信协议对应的下行子结构,包括:6 . The method according to claim 5 , wherein, by inputting the second service instruction into a target network structure of a target server, a downlink substructure corresponding to the second communication protocol in the target network structure is determined. 7 . ,include:在将所述第二业务指令输入至所述目标网络结构中的第二下行子结构,且获取到所述第二下行子结构输出的所述第三消息的情况下,确定所述第二下行子结构与所述第三通信协议相对应;或,In the case where the second service instruction is input to the second downlink substructure in the target network structure, and the third message output by the second downlink substructure is acquired, determining the second downlink the substructure corresponds to the third communication protocol; or,在将所述第二业务指令输入至所述第二下行子结构,但并未获取到所述第二下行子结构输出的所述第三消息的情况下,将所述第一消息输入至所述目标网络结构的第三下行子结构;In the case where the second service instruction is input to the second downlink substructure, but the third message output by the second downlink substructure is not obtained, the first message is input to the Describe the third downlink substructure of the target network structure;在将所述第二业务指令输入至所述第三下行子结构,且获取到所述第三下行子结构输出的所述第三消息的情况下,确定所述第三下行子结构与所述第三通信协议相对应。In the case where the second service instruction is input to the third downlink substructure, and the third message output by the third downlink substructure is acquired, it is determined that the third downlink substructure and the The third communication protocol corresponds.7.一种消息处理装置,其特征在于,包括:7. A message processing device, comprising:第一接收单元,用于接收配置有第一通信协议的第一终端发送的第一消息,其中,所述第一消息的消息格式为所述第一终端可识别的第一消息格式;a first receiving unit, configured to receive a first message sent by a first terminal configured with a first communication protocol, wherein the message format of the first message is a first message format recognizable by the first terminal;第一确定单元,用于将所述第一消息输入至目标服务器的目标网络结构,确定所述目标网络结构中与所述第一通信协议对应的上行子结构,其中,所述目标网络结构用于转换消息格式,所述目标网络结构包括至少两个与不同通信协议外对应的上行子结构;The first determining unit is configured to input the first message to the target network structure of the target server, and determine the uplink substructure corresponding to the first communication protocol in the target network structure, wherein the target network structure uses For converting the message format, the target network structure includes at least two uplink substructures corresponding to different communication protocols;第一获取单元,用于获取所述目标网络结构中与所述第一通信协议对应的上行子结构输出的第二消息,其中,所述第二消息的第二消息格式与所述第一通信协议相对应,所述第二消息格式为所述目标服务器可识别的消息格式。a first obtaining unit, configured to obtain a second message output by an uplink substructure corresponding to the first communication protocol in the target network structure, wherein a second message format of the second message communicates with the first communication Corresponding to the protocol, the second message format is a message format identifiable by the target server.8.根据权利要求7所述的装置,其特征在于,所述第一确定单元,包括:8. The apparatus according to claim 7, wherein the first determining unit comprises:第一确定模块,用于在将所述第一消息输入至所述目标网络结构中的第一上行子结构,且获取到所述第一上行子结构输出的所述第二消息的情况下,确定所述第一上行子结构与所述第一通信协议相对应;或,a first determining module, configured to input the first message to the first uplink substructure in the target network structure and obtain the second message output by the first uplink substructure, determining that the first uplink substructure corresponds to the first communication protocol; or,第二确定模块,用于在将所述第一消息输入至所述第一上行子结构,但并未获取到所述第一上行子结构输出的所述第二消息的情况下,将所述第一消息输入至所述目标网络结构的第二上行子结构;The second determining module is configured to, when the first message is input to the first uplink substructure but the second message output from the first uplink substructure is not obtained, determine the The first message is input to the second uplink substructure of the target network structure;第三确定模块,用于在将所述第一消息输入至所述第二上行子结构,且获取到所述第二上行子结构输出的所述第二消息的情况下,确定所述第二上行子结构与所述第一通信协议相对应。a third determining module, configured to determine the second message when the first message is input to the second uplink substructure and the second message output from the second uplink substructure is acquired The uplink substructure corresponds to the first communication protocol.9.一种计算机可读的存储介质,其特征在于,所述计算机可读的存储介质包括存储的程序,其中,所述程序运行时执行上述权利要求1至6任一项中所述的方法。9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program executes the method described in any one of the preceding claims 1 to 6 when the program is run .10.一种电子装置,包括存储器和处理器,其特征在于,所述存储器中存储有计算机程序,所述处理器被设置为通过所述计算机程序执行所述权利要求1至6任一项中所述的方法。10. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute any one of claims 1 to 6 through the computer program the method described.
CN202011296407.5A2020-11-182020-11-18 Message processing method, device, storage medium and electronic deviceActiveCN112422565B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202011296407.5ACN112422565B (en)2020-11-182020-11-18 Message processing method, device, storage medium and electronic device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202011296407.5ACN112422565B (en)2020-11-182020-11-18 Message processing method, device, storage medium and electronic device

Publications (2)

Publication NumberPublication Date
CN112422565Atrue CN112422565A (en)2021-02-26
CN112422565B CN112422565B (en)2023-02-03

Family

ID=74773701

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202011296407.5AActiveCN112422565B (en)2020-11-182020-11-18 Message processing method, device, storage medium and electronic device

Country Status (1)

CountryLink
CN (1)CN112422565B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114257623A (en)*2022-03-022022-03-29中节能晶和智慧城市科技(浙江)有限公司Internet of things equipment communication method based on streaming processing
CN115208964A (en)*2021-04-092022-10-18华为技术有限公司Method and communication device for collective communication
CN115412329A (en)*2022-08-242022-11-29深圳市凯迪仕智能科技有限公司 An information processing method and related device for the Internet of Things

Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20140074994A1 (en)*2011-05-192014-03-13Fujitsu LimitedGateway apparatus, communication method of gateway apparatus, node apparatus, communication method of node apparatus, and communication system
CN105072507A (en)*2015-07-242015-11-18南京信通科技有限责任公司Method and system for transmitting multimedia data
CN105634925A (en)*2016-01-202016-06-01北京乐动卓越科技有限公司Extensible communication method and system between users
CN105915500A (en)*2015-12-222016-08-31美的集团股份有限公司Method, protocol conversion service end and Internet of things terminal for conversion of different Internet of things protocols
CN106453342A (en)*2016-10-212017-02-22过冬Terminal access method of Internet of Things
CN110515894A (en)*2019-08-022019-11-29济南浪潮数据技术有限公司Data format conversion method, device, equipment and readable storage medium
CN111049854A (en)*2019-12-252020-04-21微民保险代理有限公司Service request transmission method and device
CN111064716A (en)*2019-12-052020-04-24深圳猛犸电动科技有限公司 Message conversion method, device, storage medium and server
CN111600909A (en)*2020-06-242020-08-28腾讯科技(深圳)有限公司Data processing method, device, protocol conversion equipment and storage medium
CN111641583A (en)*2020-04-072020-09-08北京邮电大学Internet of things resource access system and resource access method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20140074994A1 (en)*2011-05-192014-03-13Fujitsu LimitedGateway apparatus, communication method of gateway apparatus, node apparatus, communication method of node apparatus, and communication system
CN105072507A (en)*2015-07-242015-11-18南京信通科技有限责任公司Method and system for transmitting multimedia data
CN105915500A (en)*2015-12-222016-08-31美的集团股份有限公司Method, protocol conversion service end and Internet of things terminal for conversion of different Internet of things protocols
CN105634925A (en)*2016-01-202016-06-01北京乐动卓越科技有限公司Extensible communication method and system between users
CN106453342A (en)*2016-10-212017-02-22过冬Terminal access method of Internet of Things
CN110515894A (en)*2019-08-022019-11-29济南浪潮数据技术有限公司Data format conversion method, device, equipment and readable storage medium
CN111064716A (en)*2019-12-052020-04-24深圳猛犸电动科技有限公司 Message conversion method, device, storage medium and server
CN111049854A (en)*2019-12-252020-04-21微民保险代理有限公司Service request transmission method and device
CN111641583A (en)*2020-04-072020-09-08北京邮电大学Internet of things resource access system and resource access method
CN111600909A (en)*2020-06-242020-08-28腾讯科技(深圳)有限公司Data processing method, device, protocol conversion equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115208964A (en)*2021-04-092022-10-18华为技术有限公司Method and communication device for collective communication
CN114257623A (en)*2022-03-022022-03-29中节能晶和智慧城市科技(浙江)有限公司Internet of things equipment communication method based on streaming processing
CN114257623B (en)*2022-03-022024-06-04中节能晶和科技有限公司Internet of things equipment communication method based on stream processing
CN115412329A (en)*2022-08-242022-11-29深圳市凯迪仕智能科技有限公司 An information processing method and related device for the Internet of Things
CN115412329B (en)*2022-08-242024-09-17深圳市凯迪仕智能科技有限公司Information processing method and related device for Internet of things

Also Published As

Publication numberPublication date
CN112422565B (en)2023-02-03

Similar Documents

PublicationPublication DateTitle
CN102413150B (en)Server and virtual desktop control method and virtual desktop control system
CN112422565A (en) Message processing method, device and storage medium and electronic device
WO2019062836A1 (en)Network slice management method, and device for same
CN111314339B (en)Data transmission method and device
US10609125B2 (en)Method and system for transmitting communication data
CN112752245B (en)Distribution network method and device, electronic equipment and storage medium
CN109889521A (en) Memory, communication channel multiplexing implementation method, device and device
US10216243B2 (en)Method, device and storage medium for waking up home interconnection device
CN116170254A (en) Conversion method, device and electronic equipment for gateway command
CN108023736A (en)Communication means, server device, client device, apparatus and system
CN111435947A (en) Electronic message control
CN112511621A (en)Data transmission method and device, storage medium, and electronic device
CN104320347B (en)A kind of method and apparatus for actively updating LLDP
CN105530268A (en) Heterogeneous protocol intercommunication method and controller
CN113196721B (en) Discovery method, device and terminal equipment of Internet of things equipment
CN107566336A (en)The encryption method in order and device of internet-of-things terminal data
CN108989157B (en)Method and device for controlling intelligent equipment
CN106657076B (en)TCP service implementation method and device for network name space
CN114731302B (en) Information transmission method and related equipment
JP6813110B1 (en) Communication devices, programs, communication methods, and communication systems
KR20180059386A (en)Delegation server for connecting a plurality of lpwa devices to common cloud
WO2019010796A1 (en)Sub-device encryption method and device for receiving data of internet of things ap
CN111506356A (en)Electronic message adaptation
CN109257264B (en)System and method for opening Ethernet virtual private network service
JP2016072947A (en) Network grouping system and network grouping method

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp