CN114884913A - Message interaction method and device, electronic equipment, message server and storage medium - Google Patents

Message interaction method and device, electronic equipment, message server and storage medium Download PDF

Info

Publication number
CN114884913A
CN114884913A CN202210022148.XA CN202210022148A CN114884913A CN 114884913 A CN114884913 A CN 114884913A CN 202210022148 A CN202210022148 A CN 202210022148A CN 114884913 A CN114884913 A CN 114884913A
Authority
CN
China
Prior art keywords
message
post request
terminal
address
post
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210022148.XA
Other languages
Chinese (zh)
Inventor
刘悦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN202210022148.XA priority Critical patent/CN114884913A/en
Publication of CN114884913A publication Critical patent/CN114884913A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a message interaction method, a message interaction device, electronic equipment, a message server and a storage medium, wherein the method comprises the following steps: the method comprises the steps that a first terminal constructs and sends a first POST request; the POST request is constructed based on a CoAP POST method; wherein, the Playload of the first POST request carries a first message body; the message body carries at least one parameter for describing the first message.

Description

Message interaction method and device, electronic equipment, message server and storage medium
Technical Field
The present application relates to the field of internet of things technology, and in particular, to a message interaction method and apparatus, an electronic device, a message server, and a storage medium.
Background
The instant message interaction requirements exist in the scene of the internet of things, for example, the devices transmit instructions point to point, multiple sensors share data through group messages, multiple smart home devices share instructions through group messages, and the like. However, in the related art, the implementation manner of instant message interaction cannot be well applied to the scene of the internet of things, which affects the message interaction efficiency.
Disclosure of Invention
In order to solve the related technical problems, embodiments of the present application provide a message interaction method, an apparatus, an electronic device, a message server, and a storage medium.
The technical scheme of the embodiment of the application is realized as follows:
the embodiment of the application provides a message sending method, which is applied to a first terminal and comprises the following steps:
constructing and sending a first POST request; the POST request is constructed based on a POST method of a restricted Application Protocol (CoAP); wherein the content of the first and second substances,
a first message body is carried in a bearer (Playload) of the first POST request; the message body carries at least one parameter for describing the first message.
In the above scheme, the parameters carried in the message body include at least one of the following:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which represents that the receiver of the first message is the terminal pointed by the second terminal address;
a second server address, which characterizes that the receiver of the first message is an application server pointed by the second server address;
a group identifier, which characterizes that a receiver of the first message is a terminal in a group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
In the above scheme, the destination address of the first POST request points to a message server or a second terminal; wherein the content of the first and second substances,
the second terminal is directly connected with the message server.
In the foregoing solution, before the building and sending the first POST request, the method further includes:
constructing and sending a second POST request; wherein the content of the first and second substances,
the destination address of the second POST request points to a message server; the second message body is carried in the Playload of the second POST request; and the second message body carries parameters for representing the request to register the first terminal.
In the above scheme, when constructing the POST request, the method includes:
the T parameter of the POST request is set to 0.
The embodiment of the present application further provides a message receiving method, which is applied to an electronic device, where the electronic device includes a terminal or an application server, and the method includes:
receiving a third POST request; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message;
analyzing the third POST request to obtain a first analysis result; the first analysis result at least comprises at least one parameter which is carried by the third message body and is used for describing the first message;
processing the third POST request based on the first parsing result; wherein the content of the first and second substances,
at least one parameter used for describing the first message is carried in the message body; the POST request is constructed based on the CoAP POST method.
In the above scheme, the parameters carried in the message body include at least one of the following:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which represents that the receiver of the first message is the terminal pointed by the second terminal address;
a second server address, which characterizes that the receiver of the first message is an application server pointed by the second server address;
a group identifier, which characterizes that the receiver of the first message is the terminal in the group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
In the foregoing solution, the processing the third POST request based on the first parsing result includes:
processing the first message by setting an application under the condition that the first analysis result represents that a second terminal address or a second server address carried in the third message is the same as the address registered by the electronic equipment; the setting application represents a message application corresponding to the first message;
under the condition that the first analysis result represents that the address of the second terminal carried in the third message body is the same as the address registered by the third terminal, constructing and sending a fourth POST request; wherein the content of the first and second substances,
the third message body is carried in the Playload of the fourth POST request; the destination address of the fourth POST request is directed to the third terminal.
In the above scheme, the method further comprises:
and replying a response to the message server under the condition that the first analysis result represents that the T parameter of the third POST request is 0.
In the foregoing solution, before the receiving the third POST request, the method further includes:
constructing and sending a fifth POST request; wherein the content of the first and second substances,
the destination address of the fifth POST request points to a message server; a fourth message body is carried in the Playload of the fifth POST request; and the fourth message body carries parameters for representing the request for registering the electronic equipment.
In the above solution, when constructing the POST request, the method includes:
the parameter T of the POST method is set to 0.
The embodiment of the application also provides a message interaction method, which is applied to a message server and comprises the following steps:
receiving a sixth POST request; the Playload of the sixth POST request carries a first message body; analyzing the sixth POST request to obtain a second analysis result; the second analysis result at least represents at least one parameter carried by the first message body and used for describing the first message;
constructing and sending a third POST request based on the second analysis result; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on a CoAP POST method; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message.
In the above scheme, the parameters carried in the message body include at least one of the following:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which represents that the receiver of the first message is the terminal pointed by the second terminal address;
a second server address, which characterizes that the receiver of the first message is an application server pointed by the second server address;
a group identifier, which characterizes that the receiver of the first message is the terminal in the group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
In the foregoing solution, constructing a third POST request based on the second parsing result includes:
constructing the third POST request under the condition that the second analysis result represents that the receiver of the third message is a terminal or an application server; wherein the content of the first and second substances,
the destination address of the third POST request is the address registered by the receiver of the first message; the third message body is the same as the first message body.
In the foregoing solution, constructing a third POST request based on the second parsing result includes:
under the condition that the second analysis result represents that the first message body carries the group identifier, querying a corresponding group member list through the group identifier to obtain M fourth terminal registration addresses;
constructing M third POST requests; wherein the content of the first and second substances,
the M fourth terminals represent terminals of all group members in the group corresponding to the group identification; the destination address of each of the M third POST requests is an address registered by one of the M fourth terminals, and the address of the second terminal carried in the third message body carried in the Playload of each third POST request points to the corresponding fourth terminal; and M is an integer greater than or equal to 1.
In the foregoing solution, constructing a third POST request based on the second parsing result includes:
and under the condition that the second analysis result represents that the fifth message body carries the area identifier, calling broadcasting capacity based on the area identifier, and constructing the third POST request.
In the foregoing solution, constructing a third POST request based on the second parsing result includes:
under the condition that the second analysis result represents that the fifth message body carries the topic identification, subscribing the registered addresses of N electronic devices of the corresponding message topic through the topic identification; the electronic equipment comprises a terminal and/or an application server;
constructing N third POST requests; wherein the content of the first and second substances,
the destination address of each of the N third POST requests is an address registered by one of the N electronic devices, and the second terminal address carried in the third message body carried in the Playload of each third POST request points to a corresponding terminal or the carried second server address points to a corresponding application server; and N is an integer greater than or equal to 1.
In the foregoing solution, before the receiving the sixth POST request, the method further includes:
receiving a second POST request and/or a fifth POST request; the message body carried in the Playload of the second POST request and/or the fifth POST request carries parameters representing electronic equipment corresponding to the request for registration;
registering the corresponding electronic device based on the second POST request and/or the fifth POST request.
In the foregoing solution, before the receiving the sixth POST request, the method further includes:
pulling a group message of at least one group from a group management server; and/or the presence of a gas in the gas,
notifying at least one electronic device of a group message of the corresponding group; wherein the content of the first and second substances,
the group message includes a group identification and a group member list of the corresponding group.
An embodiment of the present application further provides a message sending apparatus, including:
the first sending unit is used for constructing and sending a first POST request; wherein the content of the first and second substances,
the POST request is constructed based on a CoAP POST method; the Playload of the first POST request carries a first message body; the message body carries at least one parameter for describing the first message.
An embodiment of the present application further provides a message receiving apparatus, including:
a first receiving unit, configured to receive a third POST request; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message;
the first analysis unit is used for analyzing the third POST request to obtain a first analysis result; the first analysis result at least comprises at least one parameter which is carried by the third message body and is used for describing the first message;
a first processing unit, configured to process the third POST request based on the first parsing result; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on the CoAP POST method.
An embodiment of the present application further provides a message interaction apparatus, including:
a second receiving unit configured to receive a sixth POST request; the Playload of the sixth POST request carries a first message body;
the second analysis unit is used for analyzing the sixth POST request to obtain a second analysis result; the second analysis result at least represents at least one parameter carried by the first message body and used for describing the first message;
the second sending unit is used for constructing and sending a third POST request based on the second analysis result; wherein, the first and the second end of the pipe are connected with each other,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on a CoAP POST method; the Playload of the third POST request carries the third message body; the third message body is generated based on the first message.
An embodiment of the present application further provides a first terminal, including: a first processor and a first communication interface; wherein the content of the first and second substances,
the first processor is used for constructing a first POST request; the POST request is constructed based on a CoAP POST method;
the first communication interface is used for sending the first POST request; wherein the content of the first and second substances,
the bearing Playload of the first POST request carries a first message body; the message body carries at least one parameter for describing the first message.
An embodiment of the present application further provides an electronic device, where the electronic device includes a terminal or an application server, and the electronic device includes: a second processor and a second communication interface; wherein the content of the first and second substances,
the second communication interface is used for receiving a third POST request; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message;
the first processor is used for analyzing the third POST request to obtain a first analysis result; and processing the third POST request based on the first parsing result; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on a CoAP POST method; the first parsing result at least includes at least one parameter carried by the third message body for describing the first message.
An embodiment of the present application further provides a message server, including: a third processor and a third communication interface; wherein the content of the first and second substances,
the third communication interface is used for receiving a sixth POST request; the Playload of the sixth POST request carries a first message body;
the third processor is configured to analyze the sixth POST request to obtain a second analysis result; and constructing a third POST request based on the second resolution result; the second analysis result at least represents at least one parameter which is carried by the first message body and is used for describing the first message;
the third communication interface is further configured to send the third POST request; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; constructing a POST method based on CoAP for a POST request; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message.
An embodiment of the present application further provides a first terminal, including: a first processor and a first memory for storing a computer program capable of running on the processor,
wherein the first processor is configured to execute the steps of any one of the above-mentioned methods at the first terminal side when running the computer program.
An embodiment of the present application further provides an electronic device, including: a second processor and a second memory for storing a computer program capable of running on the processor,
wherein the second processor is configured to execute the steps of the electronic device side method when the computer program is executed.
An embodiment of the present application further provides a message server, including: a third processor and a third memory for storing a computer program capable of running on the processor,
wherein the third processor is configured to execute the steps of any of the above-mentioned methods at the message server side when running the computer program.
Embodiments of the present application also provide a storage medium having a computer program stored thereon, where the computer program is executed by a processor to implement the steps of any one of the above methods.
In the message interaction method, the message interaction device, the electronic device, the message server and the storage medium provided by the embodiment of the application, a message body carries at least one parameter for describing a first message; the POST request is constructed based on a CoAP POST method; firstly, a first terminal constructs and sends a first POST request, wherein a Playload of the first POST request carries a first message body; the message server receives a sixth POST request carrying the first message body in a Playload, analyzes the sixth POST request to obtain a second analysis result, wherein the second analysis result at least represents at least one parameter carried by the first message body and used for describing the first message, and constructs and sends a third POST request based on the second analysis result, and the Playload of the third POST request carries a third message body; the third message body is generated based on the first message; the electronic equipment comprises a terminal or an application server and receives a third POST request; analyzing the third POST request to obtain a first analysis result; the first analysis result at least comprises at least one parameter which is carried by the third message body and is used for describing the first message; the electronic device processes the third POST request based on the first parsing result. According to the scheme, the message interaction is realized based on the CoAP protocol message body extension mode, the message interaction realization mode is light in weight and is not limited by resource-limited application scenes, corresponding APPs do not need to be installed on each interactive terminal, and the message interaction efficiency is improved.
Drawings
Fig. 1 is a schematic diagram illustrating a related art 5G message/RCS group message creation process;
fig. 2 is a schematic flow chart illustrating message interaction between users after a 5G message/RCS group message is created according to the related art;
FIG. 3 is a schematic flow chart of a related art group message initiated based on an instant message APP;
FIG. 4 is a diagram illustrating an example of a system architecture for supporting message interaction in a networking scenario, according to an embodiment of the present application;
fig. 5 is a schematic flow chart of a message sending method according to an embodiment of the present application;
fig. 6 is a schematic flowchart of a message interaction method according to an embodiment of the present application;
fig. 7 is a schematic flow chart of a message receiving method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a message sending apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a message receiving apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a message interaction apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a first terminal according to an embodiment of the present application;
FIG. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a message server according to an embodiment of the present application.
Detailed Description
The terminal supports instant message interaction such as point-to-point and group message, and mainly comprises the following implementation modes: the terminal native supports instant messages, creates and performs instant message interaction in a telephone number mode, such as fifth generation mobile communication technology (5G) messages, or performs instant message interaction between users installed with the same APP based on installed Application software (APP).
Among them, the 5G messaging/Converged Communication (RCS) service implements an instant messaging function based on an OPEN MOBILE ALLIANCE (OMA) Converged IP messaging (CPM) protocol. The OMA CPM Protocol is an extension to the Session Initiation Protocol (SIP). Referring to the 5G message/RCS group message creation flow shown in fig. 1: a terminal of a user A of a group Message initiator creates a group Message Session by an expanded SIP request (INVITE) method carrying a group member list, and establishes a Message Session Relay Protocol (MSRP) channel of the group Message with a 5G Message center (5 GMC); 5GMC invites other users to join the group message by initiating an expanded SIP INVITE method to all users in the group list, and establishes an MSRP channel with the users joining the group message; and the group messages of all subsequent users are transmitted in the established MSRP channel. Fig. 2 shows a flow of message interaction between users after the 5G message/RCS group message is created.
Fig. 3 shows a flow of initiating a group message based on an instant message APP: the user firstly logs in the instant message APP, and initiates a group message to the user installed with the same instant message APP through the service platform of the instant message APP by adopting a method supported by the instant message APP. Specifically, the manner of initiating the group message includes the following two ways: firstly, an instant message APP establishes a group, invites a plurality of users to join, and then initiates a group message through the group; and secondly, selecting a plurality of contacts in the friend list by the instant message APP user, and directly creating and initiating the group message.
At present, the related protocol standards require that 5G internet of things messages should support functions such as point-to-point, application point-to-point, group messages, and broadcast messages, that is, there is a demand for instant message interaction in the internet of things scene, for example, a device-to-device transmission instruction, multiple sensors share data through group messages, and multiple smart home devices share instructions through group messages. In the related technology, the 5G message which can be supported by the terminal originally is realized based on the SIP protocol, so that the resource requirement is high, and the method is not suitable for the condition that the resource of the terminal of the Internet of things is limited in the scene of the Internet of things. The implementation mode based on the instant message APP requires that the same instant message APP is prefabricated or downloaded on each terminal, and the situation that message interaction cannot be performed between devices of different manufacturers exists. Generally speaking, in the related art, the implementation manner of instant message interaction cannot be well applied to the scene of the internet of things, which affects the message interaction efficiency.
Based on this, in the embodiments of the present application, at least one parameter for describing the first message is carried in the message body; the POST request is constructed based on a CoAP POST method; firstly, a first terminal constructs and sends a first POST request, wherein a Playload of the first POST request carries a first message body; the message server receives a sixth POST request carrying the first message body in a Playload, analyzes the sixth POST request to obtain a second analysis result, wherein the second analysis result at least represents at least one parameter carried by the first message body and used for describing the first message, and constructs and sends a third POST request based on the second analysis result, and the Playload of the third POST request carries a third message body; the third message body is generated based on the first message; the electronic equipment comprises a terminal or an application server and receives a third POST request; analyzing the third POST request to obtain a first analysis result; the first analysis result at least comprises at least one parameter which is carried by the third message body and used for describing the first message; the electronic device processes the third POST request based on the first parsing result. According to the scheme, the message interaction is realized based on the CoAP protocol message body extension mode, the message interaction realization mode is light in weight and is not limited by resource-limited application scenes, corresponding APPs do not need to be installed on each interactive terminal, and the message interaction efficiency is improved.
The present application will be described in further detail with reference to the following drawings and examples.
First, to better explain the message interaction method provided in the embodiment of the present application, an example of a system architecture for supporting message interaction in a networking scenario, to which the embodiment of the present application is applicable, is given in fig. 4. In the system architecture shown in fig. 4: the message server and the message client support CoAP; the terminal 1 is directly connected with the message server, and meanwhile, the message client in the terminal 2 cannot be directly connected with the message server on the assumption that the terminal 2 is limited by factors such as wireless connection capacity, distance and the like; the application server performs application logic processing based on the message obtained from the message server, the application client performs application logic processing based on the message obtained from the message client, and the application logic processing performed in the application server and the application client is irrelevant to the message interaction flow provided by the embodiment of the application; the group management client and the group management server are used for creating and managing a group corresponding to the group message, and in practical application, considering that most terminals of the internet of things belong to terminals with weak capabilities, in the embodiment of the application, it is assumed that the terminals with weak capabilities do not support the capabilities of creating and managing the group, only group message interaction is supported, and the other terminals with strong capabilities support the capabilities of creating and managing the group. In addition, as shown in fig. 4, the sms client may communicate with the message server through the conversion gateway, and the conversion gateway completes the conversion between the sms and the CoAP protocol. In practical application, message clients of other non-CoAP protocols can communicate with the message server in fig. 4 through the corresponding message server of other non-CoAP protocols.
Here, the CoAP Protocol is an internet of things Protocol based on User Datagram Protocol (UDP) transmission, and uses a RESTFul style similar to a hypertext Transfer Protocol (HTTP), and in addition to supporting four RESTFul methods of POST, PUT, GET, and DELETE, an Oberve method for resources is also supported.
In the embodiment of the application, before the message interaction, the message client initiates registration to the message server to obtain an application layer address (UE Service ID) used by the terminal in the message interaction process, and similarly, the application server initiates registration to the message server to obtain an application layer address (AS Service ID) used by the application server in the message interaction process. In actual application, the message client and the application server can make a configuration request through the private identification of the message client and the application server, so as to obtain the corresponding application layer address.
Before the group message interaction, the group required by the group message needs to be created first. The application server or the terminal (for example, terminal 1 in fig. 4) having the group management client interacts with the group management server, the group management server creates a group, and after the creation of the group is completed, the group management server notifies the message server of group information such as a group identifier, a group user list, and the like, or the message server pulls the group information to the group management server when the group information is needed. Here, the group management server simultaneously interacts with the terminals having the group management clients, notifies the group management clients of the group information, and then, the group management clients notify the message clients of the group information.
Here, using extended CoAP line messaging, if the sender wishes to receive a response to the sent message during the messaging process, the parameter T in the CoAP message is set to 0.
With reference to the system architecture shown in fig. 4, in the embodiment of the present application, the message body of the CoAP is extended, and an extension parameter is added to the message body, so that message interaction is implemented. Firstly, before message interaction, a message client and an application server need to perform application layer registration with a message server, and the registration process is as follows:
step 1: and the message body carries the parameters representing the electronic equipment corresponding to the registration request.
Specifically, the message body carries a parameter representing that the message is a registration request message.
Step 2: construct and send POST requests.
The POST request is constructed based on the CoAP protocol, and the destination address of the POST request is the address of the message server. In practical application, according to the requirement of the CoAP protocol, the T parameter of the POST request is set to be 0, namely, the message server is required to return a response. Meanwhile, setting the Content-Format to be '50', namely application/JSON, and representing that a message body in a JSON Format is carried in a load (Payload) of the POST request.
And 3, step 3: and under the condition that the first terminal is successfully registered in the message server, acquiring the address of the first terminal registration returned by the message server.
During actual application, after the registration is completed, the message server maintains the actual address corresponding to the application layer address of the registered terminal and/or application server.
The embodiment of the present application provides a message sending method, which is applied to a terminal 1 or a terminal 2 in a system architecture of fig. 4, and with reference to fig. 5, the method includes:
step 501: a first POST request is constructed and sent.
The POST request is constructed based on a POST method of a restricted application protocol CoAP; the Playload of the first POST request carries a first message body; the message body carries at least one parameter for describing the first message.
In one embodiment, prior to the building and sending the first POST request, the method further comprises:
constructing and sending a second POST request; wherein the content of the first and second substances,
the destination address of the second POST request points to a message server; the Playload of the second POST request carries a second message body; and the second message body carries parameters for representing the request to register the first terminal.
Here, the first message is the essential message content that needs to be interacted during the message interaction process, including but not limited to text, voice, picture, video, and so on. The message service type of the first message includes, but is not limited to, a point-to-point message, a point-to-application message, a group message, a broadcast message, or a message subject specific message, etc. The first terminal is used as a sender of the instant message, and generates a first message body according to the message service type of the first message, or generates the first message body by an application calling the message service capability on the first terminal. In the embodiment of the present application, it is considered that the method defined by CoAP cannot implement the group message function, and therefore, Payload of CoAP is used to carry a message body. In the embodiment of the present application, a message body of CoAP is extended, and a first message to be sent and at least one related parameter for describing the first message are carried in the first message body.
In this embodiment, the parameters carried in the message body include at least one of the following:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which characterizes that a receiver of the first message is a terminal pointed by the second terminal address;
a second server address, which characterizes that the receiver of the first message is an application server pointed by the second server address;
a group identifier, which characterizes that the receiver of the first message is the terminal in the group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
For example, each parameter is configured with a corresponding parameter name, for example, the parameter names are configured as follows in sequence for each parameter:
MSGin5 GserviceIdentifier: the first message is characterized as the message of the message service of the Internet of things, so that the message server receives the first message and processes the message according to the message logic of the Internet of things;
originationueserviceid: the sender of the first message is characterized as a terminal pointed by the originationueserviceid, and the corresponding parameter value represents an application layer address registered by the corresponding terminal to the message server;
originationasserviceid: the sender of the first message is characterized as an application server pointed by the origin authority ID, wherein the corresponding parameter value represents the address registered by the corresponding application server to the message server;
recipienteceserviceid: the receiver of the first message is represented as a terminal pointed by the RecipientUEServiceID, wherein the corresponding parameter value represents an application layer address registered by the corresponding terminal to a message server, and when the parameter value exists, the first message is represented as a point-to-point message or an application point-to-point message;
recipientaasserviceid: the sender of the first message is characterized as an application server pointed by the recipientaasserviceID, wherein the corresponding parameter value represents the address registered by the corresponding application server to the message server, and when the parameter value exists, the first message is characterized as a point-to-point application message;
group pServiceID: and characterizing that the receiver of the first message is a terminal in a group corresponding to the group server ID, wherein the corresponding parameter value characterizes the group ID of the corresponding group, and when the parameter has the parameter value, the receiver of the first message is characterized as the group message. In actual application, the message server should obtain the group information such as the group ID, the group member list and the like of the group from the group management server;
broadcastareid: and characterizing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the broadcastaneaID, and when the parameter has a parameter value, characterizing that the first message is a broadcast message, and the parameter value characterizes the corresponding broadcast area. And in actual application, the message server calls the broadcast capability to send the first message to a corresponding receiver. Here, the broadcast capability includes a 5BMS capability calling CBCF or 5GC through a Network Exposure Function (NEF).
MessagingTopic: and characterizing that the receiver of the first message is all terminals which concern message topics corresponding to the Messaging topic, and when the parameter has a parameter value, characterizing that the first message is a topic message, and the parameter value characterizes the corresponding message topic, and the message is sent to all receivers which concern the message topic, including the terminals or the application server.
Here, the message body carries different parameters to distinguish the sender, the receiver and the message type of the first message, but it should be noted that the sender and the receiver in the above parameters are not the sender and the receiver of the CoAP message, that is, are not the sender and the receiver of the POST request, but are application layer message services, that is, the sender and the receiver of the instant message. For example, a terminal a sends an instant message to a terminal B, a sender in a first message body identified by a parameter is the terminal a, a receiver is the terminal B, a sender of a POST request of CoAP sent by the terminal a is the terminal a, the receiver is a message server, the sender of the POST request of CoAP sent by the message server to the terminal B is the message server, and the receiver is the terminal B.
In addition, in practical application, for example, the terminal 1 in the system architecture of fig. 4 can be directly connected to the message server, so the destination address of the first POST request is the address of the message server, and for the terminal 2 in the system architecture of fig. 4, because it cannot be directly connected to the message server, the first POST request needs to be sent to the message server through the terminal 1, so the destination address of the first POST request is the address of the terminal 1. For example, the terminal 2 sends an instant message to the terminal B, and if the instant message passes through the terminal 1, the Payload of the posi request of the CoAP generated by the message client 2 of the terminal 2 should carry a RecipientUEServiceID, where the RecipientUEServiceID is an address registered by the terminal B on the message server, and at the same time, the CoAP operation resource address in the POST request of the CoAP, that is, the destination address of the POST request, points to the message client 1 on the terminal 1.
After generating the first message body, the message client on the first terminal constructs a first POST request based on the POST method of the CoAP. In one embodiment, in building a POST request, the method includes:
the parameter T of the POST method is set to 0.
Here, all POST requests related to the embodiment of the present application set the parameter T of the POST method to 0 at the time of construction, that is, a receiver of the POST request is required to return a confirmation response.
In practical application, the POST request is constructed by a message client, and for the condition that the message Content is required to be in a JSON Format, the Content-Format is set to be 50, namely application/JSON, when the POST request is constructed.
Table 1 gives an example of the message body carried by the Playload in the first POST request issued by the first terminal.
TABLE 1
Figure BDA0003463095280000171
Figure BDA0003463095280000181
Based on the above scheme, a first POST request is issued. If the first POST request is sent by the terminal 2 in the system architecture example of fig. 4, the terminal 1 receives and processes the first POST request, and then sends the corresponding POST request to the message server; if the first POST request is issued by the terminal 1 in the system architecture example of fig. 4, the first POST request is directly received by the message server. Therefore, an embodiment of the present application further provides a message interaction method, which is applied to the message server in the system architecture example of fig. 4, and with reference to fig. 6, the method includes:
step 601: a sixth POST request is received.
Wherein the first message body is carried in the Playload of the sixth POST request.
In an embodiment, prior to said receiving the sixth POST request, the method further comprises:
receiving a second POST request and/or a fifth POST request; the message body carried in the Playload of the second POST request and/or the fifth POST request carries parameters representing electronic equipment corresponding to the request for registration;
registering the corresponding electronic device based on the second POST request and/or the fifth POST request.
Here, the sixth POST request is sent by a terminal directly connected to the message server, and the terminal as a sender of the instant message may be terminal 1 in the example of the system architecture of fig. 4, in which case, the sixth POST request may be understood as the first POST request in the above embodiment, or the terminal may be terminal 2 in the example of the system architecture of fig. 4, in which case, the sixth POST request may be understood as a fourth POST request which is sent again after the first POST request in the above embodiment is sent to terminal 1 and processed by terminal 1.
Step 602: and analyzing the sixth POST request to obtain a second analysis result.
And the second analysis result at least represents at least one parameter which is carried by the first message body and is used for describing the first message.
In practical application, the message server parses the sixth POST request, further comprising: after receiving a sixth POST request with the destination address pointing to the message server, the message server checks whether the T parameter of the sixth POST request is 0. If the T parameter of the sixth POST request is 0, which indicates that the sixth POST request requires a response to be replied, the message server replies CoAP ACK to the sender of the sixth POST request. And, the message server checks whether the Content-Format of the sixth POST request is "50", i.e. application/json, and if the Content-Format of the sixth POST request is "50", the message server detects whether the Payload of the sixth POST request contains the MSGin5gs serviceidentifier. If the Payload of the sixth POST request contains the MSgin5 Gservicidentifier, the message is a message of the message service of the Internet of things, and the message server further analyzes the Payload of the sixth POST request; and if the Payload of the sixth POST request does not contain the MSgin5GserviceIdentifier, which indicates that the received sixth POST request is not a message of the message service of the Internet of things, the message server processes the sixth POST request according to the corresponding message service logic.
Step 603: and constructing and sending a third POST request based on the second resolution result.
Wherein, the Playload of the third POST request carries a third message body; the third message body is generated based on the first message.
Likewise, the sixth POST request and the third POST request are both constructed based on the CoAP POST method.
Here, after receiving a sixth POST request with a destination address pointing to the message server, the message server parses a first message body in Payload of the sixth POST request, and constructs a corresponding third POST request according to a parameter condition carried in the first message body.
In one embodiment, constructing a third POST request based on the second parsing result includes:
and constructing the third POST request under the condition that the second analysis result represents that the receiver of the third message is a terminal or an application server.
Wherein a destination address of the third POST request is an address registered by a receiver of the first message; the third message body is the same as the first message body.
For example, the first message body contains recipientendeserviceid, the receiving party is characterized as another internet of things terminal, and the message is a point-to-point message or an application point-to-point message. And the message server takes the address registered by the terminal on the message server as the destination address of the third POST request, carries the Payload of the first POST request and sends out the third POST request.
For another example, the first message body includes recipientaasserviceid, the receiver is characterized as an application server, the message is a point-to-point application message, the message server shall use an address registered by the application server on the message server as a destination address of the third PSOT request, and carry Payload of the first POST request, and also carry the first message body, and then send out the third POST request.
In one embodiment, constructing a third POST request based on the second parsing result includes:
under the condition that the second analysis result represents that the first message body carries the group identifier, querying a corresponding group member list through the group identifier to obtain M fourth terminal registration addresses;
m third POST requests are constructed.
The M fourth terminals represent the terminals of all group members in the group corresponding to the group identification; the destination address of each of the M third POST requests is an address registered by one of the M fourth terminals, and the address of the second terminal carried in the third message body carried in the Playload of each third POST request points to the corresponding fourth terminal; and M is an integer greater than or equal to 1.
In an embodiment, prior to said receiving the sixth POST request, the method further comprises:
pulling a group message of at least one group from a group management server; and/or the presence of a gas in the gas,
notifying at least one electronic device of a group message of the corresponding group.
The group message includes a group identifier and a group member list of the corresponding group.
That is, the message server pulls the group message of each group from the group management server by querying in advance, and notifies the corresponding electronic device of the pulled group message.
For example, the first message body contains GroupServiceID, which indicates that the receiving party is a group, and the message is a group message. The message server obtains group information corresponding to the group server from the group management server through group server ID query, wherein the group information comprises a group member list of the group and the like, and then the message server constructs a third POST request respectively aiming at all group members in the group list or other group members except a sender of a sixth POST request in the group list, and each third POST request is sent to one group member. Here, the destination address of each third POST request points to the address registered by the corresponding group member on the message server, and the third message body is obtained by modifying on the basis of the first message body and is carried in the third POST request. Specifically, the GroupServiceID in the payload of the first POST request is deleted and written into the recipienteceserviceid of the corresponding group member, and the other information holds the content of the payload of the first POST request, after which the third POST request is issued.
In one embodiment, constructing a third POST request based on the second parsing result includes:
and under the condition that the second analysis result represents that the fifth message body carries the area identifier, calling broadcast capability based on the area identifier and constructing the third POST request.
For example, the first message body contains broadcastaneaaid, which indicates that the receiving mode is broadcast, and the message is a broadcast message. The message server constructs a third POST request upon invoking broadcast capabilities (e.g., 5BMS capabilities calling CBCF or 5GC via NEF), and thereafter issues the third POST request.
In one embodiment, constructing a third POST request based on the second parsing result includes:
under the condition that the second analysis result represents that the fifth message body carries the topic identification, subscribing the registered addresses of N electronic devices of the corresponding message topic through the topic identification; the electronic equipment comprises a terminal and/or an application server;
constructing N third POST requests; wherein the content of the first and second substances,
the destination address of each of the N third POST requests is an address registered by one of the N electronic devices, and the second terminal address carried in the third message body carried in the Playload of each third POST request points to a corresponding terminal or the carried second server address points to a corresponding application server; and N is an integer greater than or equal to 1.
For example, the first message body contains MessagingTopic, the token is a message delivered based on the message topic, and the message server queries the terminal and/or the application server subscribed to the message topic. Thereafter, the message server constructs a third POST request for each of the terminals and/or application servers using the subscribed message topic. Here, the destination address of each third POST request points to the address registered on the message server by the corresponding terminal and/or application server, and the third message body is obtained by modifying on the basis of the first message body and is carried in the third POST request. Specifically, Messaging Topic in the payload of the first POST request is deleted, the RecipientUEServiceID of the corresponding terminal and/or the RecipientASServiceID of the application server are/is written, other information keeps the content of the payload of the first POST request, and then a third POST request is sent out.
In an embodiment, prior to said receiving the sixth POST request, the method further comprises:
receiving a second POST request and/or a fifth POST request; the message body carried in the Playload of the second POST request and/or the fifth POST request carries parameters representing electronic equipment corresponding to the request for registration;
and registering the corresponding electronic equipment based on the second POST request and/or the fifth POST request, and returning a registered address to the corresponding electronic equipment under the condition of successful registration.
Table 2 and table 3 give examples of different message bodies carried by Playload in the third POST request from the message server, respectively.
TABLE 2
Figure BDA0003463095280000221
TABLE 3
Figure BDA0003463095280000222
Based on the scheme, the message server receives the first POST request, and constructs and sends out a third POST request on the basis. Therefore, an embodiment of the present application further provides a message receiving method, which is applied to an electronic device, including a terminal or an application server in the system architecture example of fig. 4, and with reference to fig. 7, the method includes:
step 701: a third POST request is received.
The Playload of the third POST request carries a third message body; the third message is generated based on the first message.
Step 702: and analyzing the third POST request to obtain a first analysis result.
The first parsing result at least includes at least one parameter carried by the third message body for describing the first message.
Step 703: and processing the third POST request based on the first resolution result.
Similarly, a third message body carries at least one parameter for describing the first message; the third POST request is constructed based on the CoAP POST method.
In one embodiment, the processing the third POST request based on the first parsing result includes:
processing the first message by setting an application under the condition that the first analysis result represents that a second terminal address or a second server address carried in the third message is the same as the address registered by the electronic equipment; the setting application represents a message application corresponding to the first message;
under the condition that the first analysis result represents that the address of the second terminal carried in the third message body is the same as the address registered by the third terminal, constructing and sending a fourth POST request; wherein the content of the first and second substances,
the third message body is carried in the Playload of the fourth POST request; the destination address of the fourth POST request is directed to the third terminal.
In an embodiment, the method further comprises:
and replying a response to the message server under the condition that the first analysis result represents that the T parameter of the third POST request is 0.
In practical application, for the case that the message client 1 on the terminal 1 directly connected to the message server in the system architecture example of fig. 4, or for the case that the application server connected to the message server in the system architecture example of fig. 4 receives a message:
after the electronic equipment receives a third POST request with the destination address of the electronic equipment, checking whether the T parameter of the third POST request is 0 or not. And if the T parameter of the third POST request is 0, which indicates that the third POST request requires to reply the response, the electronic equipment replies a CoAP ACK to the sender of the third POST request. And, the electronic device checks whether the Content-Format of the third POST request is "50", i.e., application/json. If the Content-Format of the third POST request is "50", the electronic device detects whether the Payload of the third POST request contains the MSgin5 GserviceIdentifier. If the Payload of the third POST request contains the MSGin5GserviceIdentifier, which indicates that the message is a message of the message service of the internet of things, the electronic device further analyzes the Payload of the third POST request.
The electronic device checks whether Payload in the third POST request carries the UEServiceID or the ASServiceID of the electronic device itself, and if the Payload in the third POST request is the same, the third POST request is a POST request sent to the electronic device. Under the condition that the electronic equipment is a terminal, if Payload in the third POST request carries the applicative ID, the message client of the electronic equipment sends the first message carried in the third POST request to a corresponding application using the message capability of the message client based on the applicative ID for processing; if the electronic device is an application server, if the Payload in the third POST request carries the ApplicationID, the application processing is performed on the application having the ApplicationID corresponding to the application.
In the case that the electronic device is the terminal 1 in the system architecture example of fig. 4, the message client 1 on the terminal 1 detects that the Payload in the third POST request has an address that is not registered with the terminal 1, but the addresses registered with the terminals 2 are the same, and determines that the first message in the third POST request is a message that needs to be forwarded to the message client 2 on the terminal 2, and then the message client 1 sends the message to the message client 2 on the terminal 2 through the fourth POST request. The fourth POST request takes the address registered by the message client 2 on the terminal 2 on the message client 1 as the destination address of the fourth POST request, keeps the Payload content in the third POST request unchanged, and sends the fourth POST request to the message client 2 on the terminal 2.
For the case where the message client 2 on the terminal 2 not directly connected to the message server in the system architecture example of fig. 4 receives a message:
after receiving the third POST request with the destination address of the terminal 2, the terminal 2 checks whether the T parameter of the third POST request is 0. If the T parameter of the third POST request is 0, which indicates that the third POST request requires a response to be replied, the terminal 2 replies CoAP ACK to the sender of the third POST request. And, the terminal 2 checks whether the Content-Format of the third POST request is "50", i.e., application/json. If the Content-Format of the third POST request is "50", the terminal 2 detects whether the Payload of the third POST request contains the MSgin5 GserviceIdentifier. If the Payload of the third POST request includes the MSGin5GserviceIdentifier, it indicates that the Payload is a message of the message service of the internet of things, and the terminal 2 further analyzes the Payload of the third POST request.
The message client 2 checks whether the Payload of the third POST request carries the UEServiceID of the terminal 2, and if the Payload of the third POST request carries the ApplicationID, the message client of the terminal 2 sends the first message carried in the third POST request to the corresponding application using the message capability of the message client based on the ApplicationID.
In an embodiment, prior to said receiving the third POST request, the method further comprises:
a fifth POST request is constructed and sent.
Wherein a destination address of the fifth POST request points to a message server; a fourth message body is carried in the Playload of the fifth POST request; and the fourth message body carries parameters for representing the request for registering the electronic equipment.
In one embodiment, in constructing a POST request, the method comprises:
the parameter T of the POST method is set to 0.
In the message interaction method, the message interaction device, the electronic device, the message server and the storage medium provided by the embodiment of the application, a message body carries at least one parameter for describing a first message; the POST request is constructed based on a CoAP POST method; firstly, a first terminal constructs and sends a first POST request, wherein a Playload of the first POST request carries a first message body; the message server receives a sixth POST request carrying the first message body in a Playload, analyzes the sixth POST request to obtain a second analysis result, wherein the second analysis result at least represents at least one parameter carried by the first message body and used for describing the first message, and constructs and sends a third POST request based on the second analysis result, and the Playload of the third POST request carries a third message body; the third message body is generated based on the first message; the electronic equipment comprises a terminal or an application server and receives a third POST request; analyzing the third POST request to obtain a first analysis result; the first analysis result at least comprises at least one parameter which is carried by the third message body and is used for describing the first message; the electronic device processes the third POST request based on the first parsing result. The technical scheme realizes message interaction based on a CoAP protocol message body extension mode, and compared with 5G messages, the message interaction realization mode is light and is not limited by resource-limited application scenes; compared with the CoAP protocol in the related technology, the method increases message application processes such as point-to-point, application point-to-point, group message, broadcast message, message based on message theme and the like, and is more suitable for various specific Internet of things applications; in addition, the terminals which cannot directly communicate with the message server are supported to transfer with other terminals which can communicate with the message server, the message interaction of the Internet of things is realized with the message server, corresponding APPs do not need to be installed on each interactive terminal, and the message interaction efficiency is improved.
In order to implement the message sending method according to the embodiment of the present application, an embodiment of the present application further provides a message sending apparatus, which is disposed on a first terminal, and as shown in fig. 8, the apparatus includes:
a first sending unit 81 for constructing and sending a first POST request; wherein the content of the first and second substances,
the POST request is constructed based on a CoAP POST method; the Playload of the first POST request carries a first message body; the message body carries at least one parameter for describing the first message.
In an embodiment, the parameters carried in the message body include at least one of the following:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which represents that the receiver of the first message is the terminal pointed by the second terminal address;
a second server address, which characterizes that the receiver of the first message is an application server pointed by the second server address;
a group identifier, which characterizes that the receiver of the first message is the terminal in the group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
In one embodiment, the destination address of the first POST request is directed to a message server or a second terminal; wherein the content of the first and second substances,
the second terminal is directly connected with the message server.
In one embodiment, the apparatus further comprises:
a third sending unit, configured to build and send a second POST request before the building and sending of the first POST request; wherein the content of the first and second substances,
the destination address of the second POST request points to a message server; the second message body is carried in the Playload of the second POST request; and the second message body carries parameters for representing the request to register the first terminal.
In one embodiment, when constructing the POST request, the T parameter of the POST request is set to 0.
In practical applications, the first sending unit 81 and the third sending unit may be implemented by a processor in the message sending apparatus in combination with a communication interface.
It should be noted that: in the message sending device provided in the above embodiment, only the division of the program modules is exemplified when sending a message, and in practical applications, the above processing distribution may be completed by different program modules according to needs, that is, the internal structure of the device may be divided into different program modules to complete all or part of the above-described processing. In addition, the message sending apparatus provided in the foregoing embodiment and the message sending method embodiment belong to the same concept, and specific implementation processes are described in the method embodiment and are not described herein again.
In order to implement the message receiving method according to the embodiment of the present application, an embodiment of the present application further provides a message receiving apparatus, which is disposed on an electronic device, where the electronic device includes a terminal or an application server, and as shown in fig. 9, the apparatus includes:
a first receiving unit 91 for receiving a third POST request; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message;
a first parsing unit 92, configured to parse the third POST request to obtain a first parsing result; the first analysis result at least comprises at least one parameter which is carried by the third message body and is used for describing the first message;
a first processing unit 93, configured to process the third POST request based on the first parsing result; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on the CoAP POST method.
In an embodiment, the parameters carried in the message body include at least one of the following:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which characterizes that a receiver of the first message is a terminal pointed by the second terminal address;
a second server address, which characterizes that a receiver of the first message is an application server pointed to by the second server address;
a group identifier, which characterizes that the receiver of the first message is the terminal in the group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
In an embodiment, the first processing unit 93 is configured to:
processing the first message by setting an application under the condition that the first analysis result represents that a second terminal address or a second server address carried in the third message is the same as the address registered by the electronic equipment; the setting application represents a message application corresponding to the first message;
under the condition that the first analysis result represents that the address of the second terminal carried in the third message body is the same as the address registered by the third terminal, constructing and sending a fourth POST request; wherein the content of the first and second substances,
the third message body is carried in the Playload of the fourth POST request; the destination address of the fourth POST request is directed to the third terminal.
In one embodiment, the apparatus further comprises:
and a first response unit, configured to reply a response to the message server when the first parsing result indicates that the T parameter of the third POST request is 0.
In one embodiment, the apparatus further comprises:
a fourth sending unit, configured to construct and send a fifth POST request; wherein the content of the first and second substances,
the destination address of the fifth POST request points to a message server; the fourth message body is carried in the Playload of the fifth POST request; and the fourth message body carries parameters for representing the request for registering the electronic equipment.
In one embodiment, the parameter T of the POST method is set to 0 when constructing the POST request.
In practical applications, the first receiving unit 91 and the first responding unit may be implemented by a communication interface in the message receiving apparatus, the first parsing unit 92 may be implemented by a processor in the message receiving apparatus, and the first processing unit 93 and the fourth sending unit may be implemented by a processor in the message receiving apparatus in combination with the communication interface.
It should be noted that: in the message receiving apparatus provided in the above embodiment, only the division of the program modules is exemplified when receiving a message, and in practical applications, the above processing may be distributed to different program modules according to needs, that is, the internal structure of the apparatus may be divided into different program modules to complete all or part of the above-described processing. In addition, the message receiving apparatus and the message receiving method provided in the foregoing embodiments belong to the same concept, and specific implementation processes are described in detail in the method embodiments and are not described herein again.
In order to implement the message interaction method according to the embodiment of the present application, an embodiment of the present application further provides a message interaction apparatus, which is disposed on a message server, and as shown in fig. 10, the apparatus includes:
a second receiving unit 1001 configured to receive a sixth POST request; the Playload of the sixth POST request carries a first message body;
a second parsing unit 1002, configured to parse the sixth POST request to obtain a second parsing result; the second analysis result at least represents at least one parameter carried by the first message body and used for describing the first message;
a second sending unit 1003, configured to construct and send a third POST request based on the second parsing result; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on a CoAP POST method; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message.
In an embodiment, the parameters carried in the message body include at least one of the following:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which represents that the receiver of the first message is the terminal pointed by the second terminal address;
a second server address, which characterizes that a receiver of the first message is an application server pointed to by the second server address;
a group identifier, which characterizes that the receiver of the first message is the terminal in the group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
In an embodiment, the second sending unit 1003 is configured to:
constructing the third POST request under the condition that the second analysis result represents that the receiver of the third message is a terminal or an application server; wherein the content of the first and second substances,
the destination address of the third POST request is the address registered by the receiver of the first message; the third message body is the same as the first message body.
In an embodiment, the second sending unit 1003 is configured to:
under the condition that the second analysis result represents that the first message body carries the group identifier, querying a corresponding group member list through the group identifier to obtain M fourth terminal registration addresses;
constructing M third POST requests; wherein the content of the first and second substances,
the M fourth terminals represent the terminals of all group members in the group corresponding to the group identification; the destination address of each of the M third POST requests is an address registered by one of the M fourth terminals, and the address of the second terminal carried in the third message body carried in the Playload of each third POST request points to the corresponding fourth terminal; and M is an integer greater than or equal to 1.
In an embodiment, the second sending unit 1003 is configured to:
and under the condition that the second analysis result represents that the fifth message body carries the area identifier, calling broadcast capability based on the area identifier and constructing the third POST request.
In an embodiment, the second sending unit 1003 is configured to:
under the condition that the second analysis result represents that the fifth message body carries the topic identification, subscribing the registered addresses of N electronic devices of the corresponding message topic through the topic identification; the electronic equipment comprises a terminal and/or an application server;
constructing N third POST requests; wherein the content of the first and second substances,
the destination address of each of the N third POST requests is an address registered by one of the N electronic devices, and the second terminal address carried in the third message body carried in the Playload of each third POST request points to a corresponding terminal or the carried second server address points to a corresponding application server; and N is an integer greater than or equal to 1.
In one embodiment, the apparatus further comprises:
a third receiving unit, configured to receive a second POST request and/or a fifth POST request before the receiving of the sixth POST request; the message body carried in the Playload of the second POST request and/or the fifth POST request carries parameters representing electronic equipment corresponding to the request for registration;
and the registration unit is used for registering the corresponding electronic equipment based on the second POST request and/or the fifth POST request.
In one embodiment, the apparatus further comprises:
a pull unit, configured to pull the group message of at least one group to the group management server before the sixth POST request is received; and/or the presence of a gas in the gas,
a notification unit configured to notify at least one electronic device of a group message of a corresponding group before the receiving of the sixth POST request; wherein the content of the first and second substances,
the group message includes a group identification and a group member list of the corresponding group.
In actual application, the second receiving unit 1001, the pulling unit, the notifying unit, and the third receiving unit may be implemented by a communication interface in a message interaction device, the second parsing unit 1002 and the registering unit may be implemented by a processor in the message interaction device, and the second sending unit 1003 may be implemented by a processor in the message interaction device in combination with the communication interface.
It should be noted that: in the message interaction device provided in the above embodiment, when receiving a message, the above division of each program module is merely used as an example, and in practical applications, the above processing distribution may be completed by different program modules according to needs, that is, the internal structure of the device is divided into different program modules to complete all or part of the above-described processing. In addition, the message interaction device and the message interaction method provided by the above embodiments belong to the same concept, and specific implementation processes are described in the method embodiments for details, which are not described herein again.
Based on the hardware implementation of the program module, and in order to implement the method at the first terminal side in the embodiment of the present application, an embodiment of the present application further provides a first terminal, as shown in fig. 11, the first terminal 1100 includes:
a first communication interface 1101 capable of information interaction with other network nodes;
the first processor 1102 is connected to the first communication interface 1101 to implement information interaction with other network nodes, and is configured to execute the method provided by one or more technical solutions of the first terminal side when running a computer program. And the computer program is stored on the first memory 1103.
Specifically, the first processor 1102 is configured to construct a first POST request;
the first communication interface 1101 is configured to send the first POST request; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on a CoAP POST method; the first message body is carried in the Playload of the first POST request.
In an embodiment, the parameters carried in the message body include at least one of the following:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which represents that the receiver of the first message is the terminal pointed by the second terminal address;
a second server address, which characterizes that the receiver of the first message is an application server pointed by the second server address;
a group identifier, which characterizes that the receiver of the first message is the terminal in the group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
In one embodiment, the destination address of the first POST request is directed to a message server or a second terminal; wherein the content of the first and second substances,
the second terminal is directly connected with the message server.
In one embodiment, the first processor 1102 is further configured to construct a second POST request before the constructing and sending the first POST request; the second message body carries parameters for representing the request to register the first terminal;
a first communication interface 1101 for sending a second POST request; wherein the content of the first and second substances,
the destination address of the second POST request points to a message server; the second message body is carried in the Playload of the second POST request.
In one embodiment, when constructing the POST request, the T parameter of the POST request is set to 0.
It should be noted that: the specific processing of the first processor 1102 and the first communication interface 1101 can be understood with reference to the methods described above.
Of course, in practice, the various components in the first terminal 1100 are coupled together by a bus system 1104. It is understood that the bus system 1104 is used to enable communications among the components for connection. The bus system 1104 includes a power bus, a control bus, and a status signal bus in addition to the data bus. For clarity of illustration, however, the various buses are designated as the bus system 1104 in FIG. 11.
The first memory 1103 in the embodiment of the present application is used to store various types of data to support the operation of the first terminal 1100. Examples of such data include: any computer program for operating on the first terminal 1100.
The method disclosed in the embodiments of the present application can be applied to the first processor 1102, or implemented by the first processor 1102. The first processor 1102 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the first processor 1102. The first Processor 1102 may be a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. The first processor 1102 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium located in the first memory 1103, and the first processor 1102 reads the information in the first memory 1103 and performs the steps of the foregoing method in combination with the hardware thereof.
In an exemplary embodiment, the first terminal 1100 may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, Micro Controllers (MCUs), microprocessors (microprocessors), or other electronic components for performing the aforementioned methods.
Based on the hardware implementation of the program module, and in order to implement the method on the electronic device side in the embodiment of the present application, an embodiment of the present application further provides an electronic device, where the electronic device includes a terminal or an application server, and as shown in fig. 12, the electronic device 1200 includes:
a second communication interface 1201 capable of performing information interaction with other network nodes;
the second processor 1202 is connected to the second communication interface 1201 to implement information interaction with other network nodes, and is configured to execute the method provided by one or more technical solutions of the electronic device side when running a computer program. And the computer program is stored on the second memory 1203.
Specifically, the second communication interface 1201 is configured to receive a third POST request; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message;
the second processor 1202 is configured to analyze the third POST request to obtain a first analysis result; further configured to process the third POST request based on the first resolution result;
wherein the first parsing result at least includes at least one parameter carried by the third message body and used for describing the first message; the message body carries at least one parameter for describing the first message; the POST request is constructed based on the CoAP POST method.
In an embodiment, the parameters carried in the message body include at least one of the following:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which represents that the receiver of the first message is the terminal pointed by the second terminal address;
a second server address, which characterizes that the receiver of the first message is an application server pointed by the second server address;
a group identifier, which characterizes that the receiver of the first message is the terminal in the group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
In an embodiment, the second processor 1202 is configured to:
processing the first message through setting application under the condition that the first analysis result represents that a second terminal address or a second server address carried in the third message is the same as the address registered by the electronic equipment; the setting application represents a message application corresponding to the first message;
constructing a fourth POST request under the condition that the first analysis result represents that the address of the second terminal carried in the third message body is the same as the address registered by the third terminal;
the second communication interface 1201 is further configured to send the fourth POST request; wherein, the first and the second end of the pipe are connected with each other,
the third message body is carried in the Playload of the fourth POST request; the destination address of the fourth POST request is directed to the third terminal.
In an embodiment, the second communication interface 1201 is further configured to:
and replying a response to the message server under the condition that the first analysis result represents that the T parameter of the third POST request is 0.
In one embodiment, the second processor 1202 is further configured to construct a fifth request prior to the receiving the third POST request; the fourth message body carries parameters for representing the request to register the electronic equipment;
the second communication interface is used for sending a fifth POST request; wherein the content of the first and second substances,
the destination address of the fifth POST request points to a message server; the fourth message body is carried in the Playload of the fifth POST request.
In one embodiment, the parameter T of the POST method is set to 0 when constructing the POST request.
It should be noted that: the specific processing procedures of the second processor 1202 and the second communication interface 1201 can be understood with reference to the methods described above.
Of course, in practice, the various components in the electronic device 1200 are coupled together by a bus system 1204. It is understood that the bus system 1204 is used to enable connective communication between these components. The bus system 1204 includes a power bus, a control bus, and a status signal bus, in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 1204 in fig. 12.
The second memory 1203 in the embodiment of the present application is used for storing various types of data to support the operation of the electronic device 1200. Examples of such data include: any computer program for operating on the electronic device 1200.
The method disclosed in the embodiments of the present application can be applied to the second processor 1202, or implemented by the second processor 1202. The second processor 1202 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the second processor 1202. The second processor 1202 described above may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The second processor 1202 may implement or perform the methods, steps and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the second memory 1203, and the second processor 1202 reads the information in the second memory 1203 to implement the steps of the foregoing method in combination with its hardware.
In an exemplary embodiment, the electronic device 1200 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general-purpose processors, controllers, MCUs, microprocessors, or other electronic components for performing the aforementioned methods.
Based on the hardware implementation of the program module, and in order to implement the method on the message server side in the embodiment of the present application, an embodiment of the present application further provides a message server, as shown in fig. 13, the message server 1300 includes:
the third communication interface 1301 can perform information interaction with other network nodes;
the third processor 1302 is connected to the third communication interface 1301 to implement information interaction with other network nodes, and is configured to execute a method provided by one or more technical solutions of the message server side when running a computer program. And the computer program is stored on the third memory 1303.
Specifically, the third communication interface 1301 is configured to receive a sixth POST request; the Playload of the sixth POST request carries a first message body;
the third processor 1302 is configured to analyze the sixth POST request to obtain a second analysis result; and constructing a third POST request based on the second resolution result; the second analysis result at least represents at least one parameter carried by the first message body and used for describing the first message;
the third communication interface 1301 is further configured to send the third POST request; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the corresponding message; the POST request is constructed based on a CoAP POST method; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message.
In an embodiment, the parameters carried in the message body include at least one of the following:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which represents that the receiver of the first message is the terminal pointed by the second terminal address;
a second server address, which characterizes that the receiver of the first message is an application server pointed by the second server address;
a group identifier, which characterizes that the receiver of the first message is the terminal in the group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
In an embodiment, the third processor 1302 is configured to:
constructing the third POST request under the condition that the second analysis result represents that the receiver of the third message is a terminal or an application server; wherein the content of the first and second substances,
the destination address of the third POST request is the address registered by the receiver of the first message; the third message body is the same as the first message body.
In an embodiment, the third processor 1302 is configured to:
under the condition that the second analysis result represents that the first message body carries the group identifier, querying a corresponding group member list through the group identifier to obtain M fourth terminal registration addresses;
constructing M third POST requests; wherein the content of the first and second substances,
the M fourth terminals represent the terminals of all group members in the group corresponding to the group identification; the destination address of each of the M third POST requests is an address registered by one of the M fourth terminals, and the address of the second terminal carried in the third message body carried in the Playload of each third POST request points to the corresponding fourth terminal; and M is an integer greater than or equal to 1.
In an embodiment, the third processor 1302 is configured to:
and under the condition that the second analysis result represents that the fifth message body carries the area identifier, calling broadcast capability based on the area identifier and constructing the third POST request.
In an embodiment, the third processor 1302 is configured to:
under the condition that the second analysis result represents that the fifth message body carries the topic identification, subscribing the registered addresses of N electronic devices of the corresponding message topic through the topic identification; the electronic equipment comprises a terminal and/or an application server;
constructing N third POST requests; wherein the content of the first and second substances,
the destination address of each of the N third POST requests is an address registered by one of the N electronic devices, and the second terminal address carried in the third message body carried in the Playload of each third POST request points to a corresponding terminal or the carried second server address points to a corresponding application server; and N is an integer greater than or equal to 1.
In an embodiment, the third communication interface 1301 is further configured to:
receiving a second POST request and/or a fifth POST request prior to said receiving a sixth POST request; the message body carried in the Playload of the second POST request and/or the fifth POST request carries parameters representing electronic equipment corresponding to the request for registration;
the third processor 1302 is configured to register a corresponding electronic device based on the second POST request and/or the fifth POST request.
In an embodiment, the third communication interface 1301 is further configured to:
prior to said receiving a sixth POST request, pulling a group message for at least one group to a group management server; and/or the presence of a gas in the gas,
notifying at least one electronic device of a group message of a corresponding group prior to said receiving a sixth POST request; wherein the content of the first and second substances,
the group message includes a group identification and a group member list of the corresponding group.
Of course, in practice, the various components of the message server 1300 are coupled together by a bus system 1304. It is understood that the bus system 1304 is used to enable connective communication between these components. The bus system 1304 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled in fig. 13 as the bus system 1304.
The third memory 1303 in the embodiment of the present application is used to store various types of data to support the operation of the message server 1300. Examples of such data include: any computer program for operating on message server 1300.
The method disclosed in the embodiment of the present application may be applied to the third processor 1302, or implemented by the third processor 1302. The third processor 1302 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by an integrated logic circuit of hardware or an instruction in the form of software in the third processor 1302. The third processor 1302 may be a general purpose processor, a DSP, or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. The third processor 1302 may implement or perform the methods, steps and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium located in the third memory 1303, and the third processor 1302 reads information in the third memory 1303, and completes the steps of the foregoing method in combination with hardware thereof.
In an exemplary embodiment, the message server 1300 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general-purpose processors, controllers, MCUs, microprocessors, or other electronic components for performing the aforementioned methods.
It is understood that the memories (the first memory 1203, the second memory 1303, and the third memory 1303) in the embodiments of the present application may be volatile memories or nonvolatile memories, and may also include both volatile and nonvolatile memories. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memories described in the embodiments of the present application are intended to comprise, without being limited to, these and any other suitable types of memory.
In an exemplary embodiment, the present application further provides a storage medium, specifically a computer storage medium, which is a computer readable storage medium, for example, the storage medium includes a first memory 1103 storing a computer program, and the computer program is executable by the first processor 1102 of the first terminal 1100, so as to complete the steps of the first terminal-side method. For another example, the second memory 1203 may be configured to store a computer program, which may be executed by the second processor 1202 of the electronic device 1200 to perform the steps of the electronic device side method. For another example, the third memory 1303 stores a computer program, which can be executed by the third processor 1302 of the message server 1300 to perform the steps of the message server-side method. The computer readable storage medium may be Memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface Memory, optical disk, or CD-ROM.
It should be noted that: "first," "second," and the like are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any combination of any one or more of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
The technical means described in the embodiments of the present application may be arbitrarily combined without conflict.
The above description is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application.

Claims (29)

1. A message sending method is applied to a first terminal, and comprises the following steps:
constructing and sending a first POST request; the POST request is constructed based on a POST method of a restricted application protocol CoAP; wherein, the first and the second end of the pipe are connected with each other,
the bearing Playload of the first POST request carries a first message body; the message body carries at least one parameter for describing the first message.
2. The method of claim 1, wherein the parameters carried in the message body comprise at least one of:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which represents that the receiver of the first message is the terminal pointed by the second terminal address;
a second server address, which characterizes that the receiver of the first message is an application server pointed by the second server address;
a group identifier, which characterizes that the receiver of the first message is the terminal in the group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
3. The method of claim 1, wherein the destination address of the first POST request is directed to a message server or a second terminal; wherein the content of the first and second substances,
the second terminal is directly connected with the message server.
4. The method of claim 1, wherein prior to said building and sending the first POST request, the method further comprises:
constructing and sending a second POST request; wherein the content of the first and second substances,
the destination address of the second POST request points to a message server; the Playload of the second POST request carries a second message body; and the second message body carries parameters for representing the request to register the first terminal.
5. The method of any of claims 1 through 4, wherein in constructing the POST request, the method comprises:
the T parameter of the POST request is set to 0.
6. A message receiving method, applied to an electronic device, where the electronic device includes a terminal or an application server, the method includes:
receiving a third POST request; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message;
analyzing the third POST request to obtain a first analysis result; the first analysis result at least comprises at least one parameter which is carried by the third message body and is used for describing the first message;
processing the third POST request based on the first parsing result; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on the CoAP POST method.
7. The method of claim 6, wherein the parameters carried in the message body comprise at least one of:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which represents that the receiver of the first message is the terminal pointed by the second terminal address;
a second server address, which characterizes that the receiver of the first message is an application server pointed by the second server address;
a group identifier, which characterizes that the receiver of the first message is the terminal in the group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
8. The method of claim 6, wherein processing the third POST request based on the first resolution result comprises:
processing the first message through setting application under the condition that the first analysis result represents that a second terminal address or a second server address carried in the third message is the same as the address registered by the electronic equipment; the setting application represents a message application corresponding to the first message;
under the condition that the first analysis result represents that the address of the second terminal carried in the third message body is the same as the address registered by the third terminal, constructing and sending a fourth POST request; wherein the content of the first and second substances,
the third message body is carried in the Playload of the fourth POST request; the destination address of the fourth POST request is directed to the third terminal.
9. The method of claim 6, further comprising:
and replying a response to the message server under the condition that the first analysis result represents that the T parameter of the third POST request is 0.
10. The method of claim 6, wherein prior to said receiving a third POST request, the method further comprises:
constructing and sending a fifth POST request; wherein the content of the first and second substances,
the destination address of the fifth POST request points to a message server; a fourth message body is carried in the Playload of the fifth POST request; and the fourth message body carries parameters for representing the request for registering the electronic equipment.
11. The method of claim 6, wherein in constructing the POST request, the method comprises:
the parameter T of the POST method is set to 0.
12. A message interaction method is applied to a message server, and comprises the following steps:
receiving a sixth POST request; the Playload of the sixth POST request carries a first message body;
analyzing the sixth POST request to obtain a second analysis result; the second analysis result at least represents at least one parameter which is carried by the first message body and is used for describing the first message;
constructing and sending a third POST request based on the second analysis result; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on a CoAP POST method; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message.
13. The method of claim 12, wherein the parameters carried in the message body include at least one of:
the service identifier is used for representing that the first message is a message of the message service of the Internet of things;
a first terminal address, which represents that a sender of the first message is a terminal pointed by the first terminal address;
a first server address, which characterizes that a sender of the first message is an application server pointed to by the first server address;
a second terminal address, which represents that the receiver of the first message is the terminal pointed by the second terminal address;
a second server address, which characterizes that the receiver of the first message is an application server pointed by the second server address;
a group identifier, which characterizes that the receiver of the first message is the terminal in the group corresponding to the group identifier;
the area identification is used for representing that a receiver of the first message is a terminal and/or an application server in an area corresponding to the area identification;
and the theme identification is used for representing that the receiver of the first message is all terminals which concern the message theme corresponding to the theme identification.
14. The method of claim 12 wherein constructing a third POST request based on the second resolution comprises:
constructing the third POST request under the condition that the second analysis result represents that the receiver of the third message is a terminal or an application server; wherein the content of the first and second substances,
the destination address of the third POST request is the address registered by the receiver of the first message; the third message body is the same as the first message body.
15. The method of claim 13, wherein constructing a third POST request based on the second parsing result comprises:
under the condition that the second analysis result represents that the first message body carries the group identifier, querying a corresponding group member list through the group identifier to obtain M fourth terminal registration addresses;
constructing M third POST requests; wherein, the first and the second end of the pipe are connected with each other,
the M fourth terminals represent the terminals of all group members in the group corresponding to the group identification; the destination address of each of the M third POST requests is an address registered by one of the M fourth terminals, and the address of the second terminal carried in the third message body carried in the Playload of each third POST request points to the corresponding fourth terminal; and M is an integer greater than or equal to 1.
16. The method of claim 13, wherein constructing a third POST request based on the second parsing result comprises:
and under the condition that the second analysis result represents that the fifth message body carries the area identifier, calling broadcast capability based on the area identifier and constructing the third POST request.
17. The method of claim 13, wherein constructing a third POST request based on the second parsing result comprises:
under the condition that the second analysis result represents that the fifth message body carries the topic identification, subscribing the registered addresses of N electronic devices of the corresponding message topic through the topic identification; the electronic equipment comprises a terminal and/or an application server;
constructing N third POST requests; wherein the content of the first and second substances,
the destination address of each of the N third POST requests is an address registered by one of the N electronic devices, and the second terminal address carried in the third message body carried in the Playload of each third POST request points to a corresponding terminal or the carried second server address points to a corresponding application server; and N is an integer greater than or equal to 1.
18. The method as recited in claim 12, wherein prior to the receiving a sixth POST request, the method further comprises:
receiving a second POST request and/or a fifth POST request; the message body carried in the Playload of the second POST request and/or the fifth POST request carries parameters for representing the electronic equipment corresponding to the registration request;
registering the corresponding electronic device based on the second POST request and/or the fifth POST request.
19. The method of claim 12, wherein prior to said receiving a sixth POST request, the method further comprises:
pulling a group message of at least one group from a group management server; and/or the presence of a gas in the gas,
notifying at least one electronic device of a group message of the corresponding group; wherein the content of the first and second substances,
the group message includes a group identification and a group member list of the corresponding group.
20. A message transmission apparatus, comprising:
the first sending unit is used for constructing and sending the first POST request; wherein, the first and the second end of the pipe are connected with each other,
the POST request is constructed based on a CoAP POST method; the Playload of the first POST request carries a first message body; the message body carries at least one parameter for describing the first message.
21. A message receiving apparatus, comprising:
a first receiving unit, configured to receive a third POST request; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message;
the first analysis unit is used for analyzing the third POST request to obtain a first analysis result; the first analysis result at least comprises at least one parameter which is carried by the third message body and is used for describing the first message;
a first processing unit, configured to process the third POST request based on the first parsing result; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on the CoAP POST method.
22. A message interaction apparatus, comprising:
a second receiving unit configured to receive a sixth POST request; the Playload of the sixth POST request carries a first message body;
the second analysis unit is used for analyzing the sixth POST request to obtain a second analysis result; the second analysis result at least represents at least one parameter which is carried by the first message body and is used for describing the first message;
the second sending unit is used for constructing and sending a third POST request based on the second analysis result; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on a CoAP POST method; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message.
23. A first terminal, comprising: a first processor and a first communication interface; wherein the content of the first and second substances,
the first processor is used for constructing a first POST request; constructing a POST method of a POST request CoAP;
the first communication interface is used for sending the first POST request; wherein the content of the first and second substances,
the bearing Playload of the first POST request carries a first message body; the message body carries at least one parameter for describing the first message.
24. An electronic device, wherein the electronic device comprises a terminal or an application server, and wherein the electronic device comprises: a second processor and a second communication interface; wherein the content of the first and second substances,
the second communication interface is used for receiving a third POST request; the Playload of the third POST request carries a third message body; the third message body is generated based on the first message;
the first processor is used for analyzing the third POST request to obtain a first analysis result; and processing the third POST request based on the first parsing result; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on a CoAP POST method; the first parsing result at least includes at least one parameter carried by the third message body for describing the first message.
25. A message server, comprising: a third processor and a third communication interface; wherein the content of the first and second substances,
the third communication interface is used for receiving a sixth POST request; the Playload of the sixth POST request carries a first message body;
the third processor is configured to analyze the sixth POST request to obtain a second analysis result; and constructing a third POST request based on the second resolution result; the second analysis result at least represents at least one parameter which is carried by the first message body and is used for describing the first message;
the third communication interface is further configured to send the third POST request; wherein the content of the first and second substances,
the message body carries at least one parameter for describing the first message; the POST request is constructed based on a CoAP POST method; the Playload of the third POST request carries the third message body; the third message body is generated based on the first message.
26. A first terminal, comprising: a first processor and a first memory for storing a computer program capable of running on the processor,
wherein the first processor is adapted to perform the steps of the method of any one of claims 1 to 5 when running the computer program.
27. An electronic device, comprising: a second processor and a second memory for storing a computer program capable of running on the processor,
wherein the second processor is adapted to perform the steps of the method of any of claims 6 to 11 when running the computer program.
28. A message server, comprising: a third processor and a third memory for storing a computer program capable of running on the processor,
wherein the third processor is adapted to perform the steps of the method of any of claims 12 to 19 when running the computer program.
29. A storage medium having stored thereon a computer program for performing the steps of the method of any one of claims 1 to 5, or for performing the steps of the method of any one of claims 6 to 11, or for performing the steps of the method of any one of claims 12 to 19, when the computer program is executed by a processor.
CN202210022148.XA 2022-01-10 2022-01-10 Message interaction method and device, electronic equipment, message server and storage medium Pending CN114884913A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210022148.XA CN114884913A (en) 2022-01-10 2022-01-10 Message interaction method and device, electronic equipment, message server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210022148.XA CN114884913A (en) 2022-01-10 2022-01-10 Message interaction method and device, electronic equipment, message server and storage medium

Publications (1)

Publication Number Publication Date
CN114884913A true CN114884913A (en) 2022-08-09

Family

ID=82666612

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210022148.XA Pending CN114884913A (en) 2022-01-10 2022-01-10 Message interaction method and device, electronic equipment, message server and storage medium

Country Status (1)

Country Link
CN (1) CN114884913A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166931A (en) * 2011-12-15 2013-06-19 华为技术有限公司 Method, device and system of transmitting data safely
CN103227803A (en) * 2012-01-30 2013-07-31 华为技术有限公司 Internet of thing resource obtaining method, client and internet of thing resource devices
WO2013163908A1 (en) * 2012-05-04 2013-11-07 华为技术有限公司 Data packet transmission method and device
CN106850841A (en) * 2011-03-17 2017-06-13 华为技术有限公司 The method and apparatus of transmitting data resources
WO2020094475A1 (en) * 2018-11-05 2020-05-14 Telefonaktiebolaget Lm Ericsson (Publ) Authentication and key agreement for a terminal device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850841A (en) * 2011-03-17 2017-06-13 华为技术有限公司 The method and apparatus of transmitting data resources
CN103166931A (en) * 2011-12-15 2013-06-19 华为技术有限公司 Method, device and system of transmitting data safely
CN103227803A (en) * 2012-01-30 2013-07-31 华为技术有限公司 Internet of thing resource obtaining method, client and internet of thing resource devices
WO2013163908A1 (en) * 2012-05-04 2013-11-07 华为技术有限公司 Data packet transmission method and device
WO2020094475A1 (en) * 2018-11-05 2020-05-14 Telefonaktiebolaget Lm Ericsson (Publ) Authentication and key agreement for a terminal device

Similar Documents

Publication Publication Date Title
US9648052B2 (en) Real-time communications gateway
CN116962994A (en) Multicast communication method, device, computer readable medium and electronic equipment
EP1571791B1 (en) Mobile communication system and method for providing a real time messenger service among mobile communication terminals
US7773584B2 (en) Method and apparatus for processing session initiation protocol messages associated with a voice over IP terminal
US8943572B2 (en) Method for accessing a storage server of an IM service system, and an IM service system
EP2863615A1 (en) Method, push system, and relevant devices for setting up push session
KR101859235B1 (en) System and method of multi-media conferencing between universal plug and play (upnp) enabled telephony devices and wireless area network (wan) devices
US20100222085A1 (en) Methods and arrangements for creating a virtual relationship
CN104753877A (en) Group communication method and device
RU2438171C2 (en) Method, device and system for identifying service
US20140113668A1 (en) Short Message Processing Method and Relevant System
EP2560329A1 (en) Method and processing system for routing message request
CN106161201B (en) method, device and system for participating in group chat by using mailbox account as identifier
CN107770141B (en) Communication method and device of video conference system
US20180139247A1 (en) Message sending method and device
US10567183B2 (en) System and method for conference messaging between telephony devices in a first network and devices connected to a second network
US20110053620A1 (en) Mobile service advertiser
US20130188559A1 (en) Method for Establishing a Communication Connection over the Internet Between Mobile Terminals, Computer Program, and Storage Medium
US20100049804A1 (en) Instant Messaging
CN114884913A (en) Message interaction method and device, electronic equipment, message server and storage medium
EP2187584A1 (en) A message association method, user terminal and server
CN113630732B (en) Converged communication method, terminal, system and storage medium
CN114095615A (en) Session establishment method, device, equipment and storage medium
US20100009664A1 (en) Methods, telecommunications node, and user equipment for transmission of user identifier
CN107852577A (en) A kind of supplementary service implementation method, terminal device and IMS service device

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