CN114428686B - Message communication method, device, electronic equipment and readable storage medium - Google Patents

Message communication method, device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN114428686B
CN114428686B CN202011183688.3A CN202011183688A CN114428686B CN 114428686 B CN114428686 B CN 114428686B CN 202011183688 A CN202011183688 A CN 202011183688A CN 114428686 B CN114428686 B CN 114428686B
Authority
CN
China
Prior art keywords
sent
terminal
downlink message
message
sending
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011183688.3A
Other languages
Chinese (zh)
Other versions
CN114428686A (en
Inventor
程小龙
唐永华
王文杰
李春
卓从彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile IoT Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile IoT Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile IoT Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202011183688.3A priority Critical patent/CN114428686B/en
Publication of CN114428686A publication Critical patent/CN114428686A/en
Application granted granted Critical
Publication of CN114428686B publication Critical patent/CN114428686B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/547Messaging middleware

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a message communication method, a message communication device, an electronic device and a readable storage medium, wherein the method comprises the following steps: receiving an uplink message sent by a terminal; acquiring a terminal identifier corresponding to the terminal according to the uplink message; inquiring whether a downlink message to be sent corresponding to the terminal identification is stored or not based on the terminal identification; and if the sending triggering condition of the downlink message to be sent is met under the condition that the downlink message to be sent corresponding to the terminal identification is inquired, sending the downlink message to be sent to the terminal. The application can improve the message communication effect.

Description

Message communication method, device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of internet of things, and more particularly, to a message communication method, apparatus, electronic device, and readable storage medium.
Background
In the prior art, in the command issuing under the NB-IoT (Narrow Band Internet of Things ) scenario, whether the terminal device is online is generally judged through a Socket (Socket) on the access platform, and in the case that the terminal device is determined to be online, the command issuing of the upper application platform can reach the terminal device. The message communication scheme in the existing narrowband internet of things scene can cause that the message can not be smoothly issued to the terminal equipment in some scenes, so that the communication effect of the message communication scheme in the existing narrowband internet of things scene is poor.
Disclosure of Invention
The embodiment of the application provides a message communication method, a message communication device, electronic equipment and a readable storage medium, which are used for solving the problem of poor communication effect of the existing message communication scheme.
In a first aspect, an embodiment of the present application provides a message communication method, including:
receiving an uplink message sent by a terminal;
acquiring a terminal identifier corresponding to the terminal according to the uplink message;
Inquiring whether a downlink message to be sent corresponding to the terminal identification is stored or not based on the terminal identification;
and if the sending triggering condition of the downlink message to be sent is met under the condition that the downlink message to be sent corresponding to the terminal identification is inquired, sending the downlink message to be sent to the terminal.
In a second aspect, an embodiment of the present application further provides a message communication apparatus, including:
The first receiving module is used for receiving the uplink message sent by the terminal;
the first acquisition module is used for acquiring a terminal identifier corresponding to the terminal according to the uplink message;
the inquiring module is used for inquiring whether the downlink message to be sent corresponding to the terminal identification is stored or not based on the terminal identification;
and the first sending module is used for sending the downlink message to be sent to the terminal if the sending trigger condition of the downlink message to be sent is met under the condition that the downlink message to be sent corresponding to the terminal identifier is inquired.
In a third aspect, an embodiment of the present application further provides an electronic device, including: a memory, a processor, and a program or instructions stored on the memory and executable on the processor, which when executed by the processor, implement the steps in the messaging method disclosed in the first aspect of the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored, where the program or the instruction implements the steps in the messaging method disclosed in the first aspect of the embodiment of the present application when the program or the instruction is executed by a processor.
In this way, in this embodiment, the online state of the terminal may be determined by receiving the uplink message sent by the terminal, and the terminal identifier may be obtained through the uplink message, and the pre-stored downlink message to be sent corresponding to the terminal may be queried based on the terminal identifier, and the downlink message to be sent may be sent to the terminal, so that asynchronous communication of the downlink message to be sent may be implemented, and the terminal may obtain the downlink message to be sent in any scenario, thereby implementing a technical effect of improving a communication effect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a message communication method according to an embodiment of the present application;
Fig. 2 is a schematic structural diagram of a message communication apparatus according to an embodiment of the present application;
Fig. 3 is a schematic structural diagram of another message communication apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another message communication apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of another message communication apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of another message communication apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another message communication apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a flow chart of a message communication method according to an embodiment of the application, as shown in fig. 1, including the following steps:
step 101, receiving an uplink message sent by a terminal.
The uplink message may be a message for triggering transmission of a downlink message to be transmitted, for example: uplink messages processed by the terminal service, uplink messages activated by the terminal, and the like.
Step 102, obtaining the terminal identification corresponding to the terminal according to the uplink message.
Step 103, inquiring whether a downlink message to be sent corresponding to the terminal identification is stored or not based on the terminal identification.
The downlink message to be sent may be a pre-stored downlink message to be sent, for example: a command message for turning on or off the lamp of the lamp, a command message for adjusting the brightness of the lamp, a command message for timing on-off of the current by the socket, etc.
Step 104, if the sending trigger condition of the downlink message to be sent is met under the condition that the downlink message to be sent corresponding to the terminal identification is inquired and stored, the downlink message to be sent is sent to the terminal.
The sending trigger condition may be a preset message sending trigger condition, for example: setting that the downlink message to be sent takes effect at a certain time as the sending triggering condition, and if the current time meets the effective time, sending the downlink message to be sent to the terminal.
In this embodiment, the on-line state of the terminal may be determined by receiving the uplink message sent by the terminal, and the terminal identifier may be obtained through the uplink message, and the pre-stored downlink message to be sent corresponding to the terminal may be queried based on the terminal identifier, and the downlink message to be sent may be sent to the terminal, so that asynchronous communication of the downlink message to be sent may be implemented, and thus a technical effect of improving a communication effect may be implemented.
In addition, in the prior art, the command issuing under NB-IoT (Narrow Band Internet of Things ) scenario generally determines whether the terminal device is online through Socket (Socket) on the access platform, and when the device is not online under some scenarios, the message cannot be issued to the terminal device smoothly, for example: when a user sends a downlink message to the terminal through an upper layer application platform, the terminal is in a PSM (Power Saving Mode ), and then the terminal does not receive downlink data when in deep dormancy, only the terminal can receive downlink data when actively sending uplink data, and the downlink message to be sent corresponding to the terminal is obtained by receiving the uplink message sent by the terminal, so that the terminal can be ensured to receive the downlink message to be sent corresponding to the terminal.
Optionally, after the downlink message to be sent is sent to the terminal in step 104, the method may further include:
receiving a response message sent by the terminal to the downlink message to be sent;
And sending the response message to a preset network address.
The preset network address may be a network address preset by a user, for example: and pushing the response message on a URL (Uniform Resource Locator ) set by a user in an http/https mode.
In this embodiment, the response message sent by the terminal to the downlink message to be sent is sent to a preset network address, and the response state of the terminal to the downlink message to be sent can be monitored in real time through the preset network address.
Optionally, in step 103, the querying, based on the terminal identifier, whether the downlink message to be sent corresponding to the terminal identifier is stored may specifically include:
Inquiring whether index information corresponding to the terminal identification exists or not through a remote dictionary service;
Under the condition that index information corresponding to the terminal identification exists, detecting whether a sending triggering condition of a downlink message to be sent corresponding to the index information is met or not;
In step 104, if the sending trigger condition of the downlink message to be sent is met, sending the downlink message to be sent to the terminal may specifically include:
if the transmission triggering condition of the downlink message to be transmitted corresponding to the index information is met, acquiring the downlink message to be transmitted corresponding to the index information based on the index information;
And sending the downlink message to be sent to the terminal.
The index information may be information stored in advance, for example: and storing index information of the downlink message to be sent in a Redis (Remote Dictionary Server, remote dictionary service), automatically sequencing the index information through the remote dictionary service, and inquiring whether the index information of the downlink message to be sent corresponding to the terminal identification exists or not. In addition, the downlink message to be sent may be stored in a database in advance, and when the index information satisfies a sending trigger condition of the downlink message to be sent, the downlink message to be sent in the database may be obtained, and the downlink message to be sent may be sent to the terminal.
In this embodiment, by querying whether index information corresponding to the terminal identifier exists through the remote dictionary service, automatic ordering of the index information can be achieved, and query pressure when whether a downlink message to be sent corresponding to the terminal identifier is stored in the query is reduced.
Optionally, before the receiving the uplink message sent by the terminal in step 101, the method may further include:
Acquiring a downlink message to be sent corresponding to the terminal, and determining a sending triggering condition corresponding to the downlink message to be sent;
storing the downlink message to be sent, and acquiring index information of the downlink message to be sent;
And storing the corresponding relation between the terminal identification and the index information through a remote dictionary service.
The downlink message to be sent may be stored in a database, for example: and storing the downlink message to be sent in a MongoDB database, and acquiring the downlink message to be sent corresponding to the index information according to the index information under the condition that the index information corresponding to the terminal is inquired through the corresponding relation between the Redis storage terminal and the index information.
The terminal identifier may correspond to a plurality of index information, for example: the stored downlink messages to be sent comprise downlink message A, downlink message B and downlink message C, the corresponding relation between the downlink message A and the terminal 1, the corresponding relation between the downlink message B and the terminal 2 and the corresponding relation between the downlink message C and the terminal 1 can be stored through Redis, when the index information of the downlink message to be sent corresponding to the terminal 1 is queried, the index information of the downlink message A and the index information of the downlink message C can be obtained respectively, and then the downlink message A and the downlink message C are obtained according to the index information of the downlink message A and the index information of the downlink message C, and the downlink message A and the downlink message C are sent to the terminal 1.
In this embodiment, according to the terminal identifier obtained from the uplink message sent by the terminal, the index information of the downlink message to be sent corresponding to the terminal is quickly queried through the corresponding relationship between the terminal identifier and the index information stored by the remote dictionary service, so that the query of direct database storage messages is reduced, and the query pressure of the database can be reduced.
Optionally, the sending triggering condition includes a retry number, and after the sending the downlink message to be sent to the terminal in step 104, the method may further include:
And under the condition that the response message of the downlink message to be sent, which is sent by the terminal, is not received, judging whether to send the downlink message to be sent to the terminal again according to the retry times.
The foregoing failure to receive the response message sent by the terminal to the downlink message to be sent may be understood as failure to receive the response message sent by the terminal to the downlink message to be sent within a preset period, where in this embodiment, by determining whether to send the downlink message to be sent to the terminal again according to the retry number when the failure to receive the response message sent by the terminal to the downlink message to be sent is not received, the control capability of the downlink message to be sent may be improved.
Optionally, the sending triggering condition includes an effective time and an effective time, and in step 104, if the sending triggering condition of the downlink message to be sent is met, the sending the downlink message to be sent to the terminal may specifically include:
And under the condition that the current time is detected to meet the effective time, if the current time is determined to meet the effective time, sending the downlink message to be sent to the terminal.
The effective time and the valid time may be determined according to a usage scenario of the terminal, for example: for the lamp turn-on command of the lamp bulb, the effective time can be set to 7 pm, and the effective time is 7 pm to 9 pm on the same day, in this embodiment, by detecting the effective time and the effective time of the downlink message to be sent, it is determined whether to send the downlink message to be sent to the terminal, and the sending trigger condition of the downlink message to be sent can be set according to the usage scenario of the terminal in a self-defining manner, so as to enhance the control capability of the downlink message to be sent.
Optionally, before the sending the downlink message to be sent to the terminal in step 104, the method may further include:
Receiving a cancel sending instruction of a user to the downlink message to be sent;
And responding to the cancellation sending instruction, canceling sending the downlink message to be sent to the terminal.
In this embodiment, by receiving a cancel sending instruction of the user to the downlink message to be sent, and in response to the cancel sending instruction, canceling sending the downlink message to be sent to the terminal, a command to be sent can be controlled according to the cancel sending instruction of the user, and the control capability of the user to send the downlink message can be improved.
Fig. 2 is a schematic structural diagram of a message communication apparatus provided in an embodiment of the present application, as shown in fig. 2, an apparatus 200 includes a NBIoT-api (Narrow Band Internet of Things-Application Programming Interface, internet of things-application program interface) module 201, session (session control) module 202, dis203, mongoDB (database) 204, NBIoT-acc (Narrow Band Internet of Things-access) module 205, NBIoT-cmd Narrow Band Internet of Things-command, internet of things-control) module 206, datapush (data push) module 207 and kafka208, and as a specific embodiment, the message communication method may be used in the message communication apparatus 200, including the following procedures:
NBIoT-api module 201 receives a message to be issued, analyzes parameter information of the issued message, and verifies validity of the message, wherein the parameter information comprises effective time, effective time and retry times;
storing the issued message in a mongo db204, and storing index information and effective time corresponding to the issued message in a Redis 203;
NBIoT-acc module 205 receives the uplink message sent by the terminal, sends the uplink message to Kafka 208 according to a certain message format, and caches the address of NBIoT-acc module 205 to session module 202;
NBIoT-cmd module 206 pulls the uplink message in Kafka208, acquires the terminal identifier according to the uplink message, queries whether index information of a downlink message corresponding to the terminal identifier exists in Redis203 according to the terminal identifier, if so, performs the next process, and if not, sleeps the message downlink channel of the terminal for a certain time;
Under the condition that index information of a down message corresponding to the terminal identifier exists in the Redis203, acquiring a first effective command of the down message, detecting effective time of the down message, deleting the index information of the down message in the Redis203 and updating the state of the down message in the MongoDB204 if the down message is outdated, detecting effective time of the down message, and carrying out the next process if the effective time and the effective time are both satisfied, otherwise, dormancy of a message down channel of the terminal for a certain time;
Under the condition that the effective time and the effective time are both met, NBIoT-cmd module 206 acquires the downlink message in MongoDB according to the index information of the downlink message, inquires the session module 202 about the address of NBIoT-acc module 205 corresponding to the terminal, sequences the downlink message according to a certain format, and transmits the downlink message to NBIoT-acc module 205 in a communication mode through RPC (Remote Procedure Call );
NBIoT-acc module 205 sends the downlink message to the terminal;
NBIoT-acc module 205 receives the response message of the down message sent by the terminal, and sends the response message to NBIoT-cmd module 206;
NBIoT-cmd module 206 determines whether the transmission is successful and whether the next retry is required according to the response information;
NBIoT-cmd module 206 stores the response message in mongo db204 and sends the final response of the outgoing message to kafka208;
datapush module 207 pulls the response message in kafka208 and sends the response message to the URL address set by the user.
The NBIoT-api module 201 may also provide a function of querying the status of a single or multiple outgoing messages and an outgoing history, so as to facilitate the user to monitor the status of the outgoing messages. In addition, the NBIoT-api module 201 may perform cancellation of the transmission message based on a cancellation command for the transmission message.
After the terminal accesses through NBIoT-acc module 205, the session module 202 may cache related information (such as subscription information) of the device and the address of the corresponding access module NBIoT-acc module 205.
Wherein, the NBIoT-cmd module 206 can be executed according to the following logic:
Judging whether a downlink channel of the terminal is activated by acquiring an uplink message of the terminal, inquiring whether index information of a downlink message corresponding to the terminal exists in Redis203 or not if the downlink channel is activated, continuously judging whether the downlink message corresponding to the terminal meets a trigger condition if the index information exists, acquiring the downlink message in MongoDB204 if the trigger condition is met, transmitting the downlink message to NBIoT-acc module 205 in an RPC communication mode, receiving response information of the terminal to the downlink message by NBIoT-acc module 205, and continuously transmitting the downlink message in series if the response is successful. In addition, if index information of the downlink message corresponding to the terminal does not exist in the dis203 or the triggering condition of the downlink message corresponding to the terminal is not satisfied, the downlink channel of the terminal is temporarily dormant, and if the triggering condition of the downlink message corresponding to the terminal is not satisfied, if the downlink message has expired, the transmission of the downlink message can be canceled.
In addition, the NBIoT-cmd module 206 and the NBIoT-acc module 205 communicate with each other through remote procedure call, so that the coupling degree between the modules can be reduced, the stability and iterative maintenance of the system can be improved, and the current limiting control and statistics on the command downlink can be facilitated.
The message received by the kafka208 uses the terminal identifier as a key word, so that the message of one terminal can be pulled by a certain node of the module, serial winding parts of a single terminal are ensured, and the overhead of a distributed lock is avoided. The above-described kafka208 may act as a middleware for asynchronous communication between modules, reducing the degree of coupling between modules.
In this embodiment, the message to be sent is stored in the mongo db204, the index information of the message to be sent is stored in the Redis203, and the sending of the message to be sent corresponding to the terminal is triggered by the uplink message sent by the terminal, so that asynchronous communication of the message to be sent can be achieved, the communication effect is improved, and the response message sent by the terminal is received by the NBIoT-acc module 205, so that the response message is pushed in real time, thereby facilitating the user to monitor the status of the message to be sent.
In addition, the uplink message of a single terminal is directed to a certain control module node through the message structure characteristic of the kafka208 assembly, the problem of locking in a distributed environment is skillfully solved, the index information of the issued message is sequentially cached in a Redis203 sequencing structure body to realize automatic sequencing, the dynamic serial issuing of the issued message can be realized, the database query pressure is effectively reduced, the decoupling between modules can be realized through the mode of kafka208 and RPC communication, the capacity expansion and the capacity expansion of the module node can be realized through adopting a distributed deployment scheme in a hot-pluggable manner, and the concurrency capacity and the expansibility of a service cluster can be improved.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a message communication apparatus according to an embodiment of the present application, and as shown in fig. 3, an apparatus 300 includes:
A first receiving module 301, configured to receive an uplink message sent by a terminal;
A first obtaining module 302, configured to obtain a terminal identifier corresponding to the terminal according to the uplink message;
a query module 303, configured to query whether a downlink message to be sent corresponding to the terminal identifier is stored based on the terminal identifier;
And the first sending module 304 is configured to send the downlink message to be sent to the terminal if a sending trigger condition of the downlink message to be sent is met when the downlink message to be sent corresponding to the terminal identifier is queried.
Optionally, as shown in fig. 4, the apparatus 300 further includes:
A second receiving module 305, configured to receive a response message sent by the terminal to the downlink message to be sent;
a second sending module 306, configured to send the response message to a preset network address.
Alternatively, the query module 303 may be specifically configured to:
Inquiring whether index information corresponding to the terminal identification exists or not through a remote dictionary service;
Under the condition that index information corresponding to the terminal identification exists, detecting whether a sending triggering condition of a downlink message to be sent corresponding to the index information is met or not;
the first sending module 304 may specifically be configured to:
if the transmission triggering condition of the downlink message to be transmitted corresponding to the index information is met, acquiring the downlink message to be transmitted corresponding to the index information based on the index information;
And sending the downlink message to be sent to the terminal.
Optionally, as shown in fig. 5, the apparatus 300 further includes:
a second obtaining module 307, configured to obtain a downlink message to be sent corresponding to the terminal, and determine a sending trigger condition corresponding to the downlink message to be sent;
a first storage module 308, configured to store the downlink message to be sent, and obtain index information of the downlink message to be sent;
And a second storage module 309, configured to store, through a remote dictionary service, a correspondence between the terminal identifier and the index information.
Optionally, as shown in fig. 6, the apparatus 300 further includes:
And a judging module 310, configured to judge whether to send the downlink message to be sent to the terminal again according to the retry number if the response message to the downlink message to be sent by the terminal is not received.
Optionally, the sending triggering condition includes an effective time and an effective time, and if the sending triggering condition of the downlink message to be sent is met in the first sending module 304, sending the downlink message to be sent to the terminal may include:
And under the condition that the current time is detected to meet the effective time, if the current time is determined to meet the effective time, sending the downlink message to be sent to the terminal.
Optionally, as shown in fig. 7, the apparatus 300 further includes:
A third receiving module 311, configured to receive a cancel sending instruction of the user on the downlink message to be sent;
and a response module 312, configured to cancel sending the downlink message to be sent to the terminal in response to the cancellation sending instruction.
The apparatus 300 is capable of implementing various processes implemented by the apparatus in the method embodiment of fig. 1, and will not be described herein again for the sake of avoiding repetition. The apparatus 300 can achieve the technical effect of improving the message communication effect.
Referring to fig. 8, an embodiment of the present application further provides an electronic device, where the electronic device 800 includes a processor 801, a memory 802, and a program or an instruction stored in the memory 802 and capable of running on the processor 801, where the program or the instruction implements each process of the above-mentioned message communication method embodiment when executed by the processor 801, and the process can achieve the same technical effect, and for avoiding repetition, a detailed description is omitted herein.
The embodiment of the application also provides a readable storage medium, and the readable storage medium stores a program or an instruction, which when executed by a processor, implements each process of the above-mentioned message communication method embodiment, and can achieve the same technical effects, so that repetition is avoided, and no further description is provided herein.
The processor is a processor in the electronic device in the above embodiment. Readable storage media include computer readable storage media such as Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic or optical disks, and the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method of the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.

Claims (9)

1. A method of messaging, the method comprising:
receiving an uplink message sent by a terminal;
acquiring a terminal identifier corresponding to the terminal according to the uplink message;
Inquiring whether a downlink message to be sent corresponding to the terminal identification is stored or not based on the terminal identification;
Under the condition that the downlink message to be sent corresponding to the terminal identification is inquired, if the sending triggering condition of the downlink message to be sent is met, the downlink message to be sent is sent to the terminal;
The querying whether the downlink message to be sent corresponding to the terminal identifier is stored based on the terminal identifier includes:
Inquiring whether index information corresponding to the terminal identification exists or not through a remote dictionary service;
Under the condition that index information corresponding to the terminal identification exists, detecting whether a sending triggering condition of a downlink message to be sent corresponding to the index information is met or not;
And if the sending triggering condition of the downlink message to be sent is met, sending the downlink message to be sent to the terminal, including:
if the transmission triggering condition of the downlink message to be transmitted corresponding to the index information is met, acquiring the downlink message to be transmitted corresponding to the index information based on the index information;
And sending the downlink message to be sent to the terminal.
2. The method of claim 1, wherein after the sending the downlink message to be sent to the terminal, the method further comprises:
receiving a response message sent by the terminal to the downlink message to be sent;
And sending the response message to a preset network address.
3. The method of claim 1, wherein prior to receiving the uplink message sent by the terminal, the method further comprises:
Acquiring a downlink message to be sent corresponding to the terminal, and determining a sending triggering condition corresponding to the downlink message to be sent;
storing the downlink message to be sent, and acquiring index information of the downlink message to be sent;
And storing the corresponding relation between the terminal identification and the index information through a remote dictionary service.
4. The method of claim 1, wherein the transmission trigger condition includes a number of retries, and wherein after the sending the downlink message to be sent to the terminal, the method further comprises:
And under the condition that the response message of the downlink message to be sent, which is sent by the terminal, is not received, judging whether to send the downlink message to be sent to the terminal again according to the retry times.
5. The method of claim 1, wherein the transmission trigger condition includes an effective time and a valid time, and the transmitting the downlink message to be transmitted to the terminal if the transmission trigger condition of the downlink message to be transmitted is satisfied includes:
And under the condition that the current time is detected to meet the effective time, if the current time is determined to meet the effective time, sending the downlink message to be sent to the terminal.
6. The method of claim 1, wherein prior to the sending the downlink message to be sent to the terminal, the method further comprises:
Receiving a cancel sending instruction of a user to the downlink message to be sent;
And responding to the cancellation sending instruction, canceling sending the downlink message to be sent to the terminal.
7. A messaging device, comprising:
The first receiving module is used for receiving the uplink message sent by the terminal;
the first acquisition module is used for acquiring a terminal identifier corresponding to the terminal according to the uplink message;
the inquiring module is used for inquiring whether the downlink message to be sent corresponding to the terminal identification is stored or not based on the terminal identification;
The first sending module is used for sending the downlink message to be sent to the terminal if the sending triggering condition of the downlink message to be sent is met under the condition that the downlink message to be sent corresponding to the terminal identifier is inquired and stored;
The query module is specifically configured to:
Inquiring whether index information corresponding to the terminal identification exists or not through a remote dictionary service;
Under the condition that index information corresponding to the terminal identification exists, detecting whether a sending triggering condition of a downlink message to be sent corresponding to the index information is met or not;
the first sending module is specifically configured to:
if the transmission triggering condition of the downlink message to be transmitted corresponding to the index information is met, acquiring the downlink message to be transmitted corresponding to the index information based on the index information;
And sending the downlink message to be sent to the terminal.
8. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and running on the processor, which when executed by the processor, implements the steps of the messaging method of any of claims 1 to 6.
9. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the message communication method according to any of claims 1 to 6.
CN202011183688.3A 2020-10-29 2020-10-29 Message communication method, device, electronic equipment and readable storage medium Active CN114428686B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011183688.3A CN114428686B (en) 2020-10-29 2020-10-29 Message communication method, device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011183688.3A CN114428686B (en) 2020-10-29 2020-10-29 Message communication method, device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN114428686A CN114428686A (en) 2022-05-03
CN114428686B true CN114428686B (en) 2024-06-04

Family

ID=81310182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011183688.3A Active CN114428686B (en) 2020-10-29 2020-10-29 Message communication method, device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114428686B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115361659A (en) * 2022-09-23 2022-11-18 中信百信银行股份有限公司 Method and device for pre-controlling message sending and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109417782A (en) * 2016-09-22 2019-03-01 Oppo广东移动通信有限公司 Communication means and communication device
CN109691173A (en) * 2016-09-22 2019-04-26 Oppo广东移动通信有限公司 Communication means, terminal device and the network equipment
CN110928874A (en) * 2019-10-14 2020-03-27 京东数字科技控股有限公司 Information processing method, device and system, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7653393B2 (en) * 2004-08-17 2010-01-26 Samsung Electronics Co., Ltd Method and system for forming and transmitting/receiving neighbor base station information in a BWA communication system
KR101549022B1 (en) * 2008-11-03 2015-09-01 엘지전자 주식회사 A random access method of a user equipment to a base station in a wireless communiaction system supproting uplink and downlink multi carriers

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109417782A (en) * 2016-09-22 2019-03-01 Oppo广东移动通信有限公司 Communication means and communication device
CN109691173A (en) * 2016-09-22 2019-04-26 Oppo广东移动通信有限公司 Communication means, terminal device and the network equipment
CN110928874A (en) * 2019-10-14 2020-03-27 京东数字科技控股有限公司 Information processing method, device and system, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
The design and implementation of electric energy data acquisition terminal based on linux system;Yang Chen等;《2010 2nd International Conference on Industrial and Information Systems》;20100907;第180-183页 *
基于Linux的组播快速转发系统的设计与实现;张晋;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180515;第I139-7页 *

Also Published As

Publication number Publication date
CN114428686A (en) 2022-05-03

Similar Documents

Publication Publication Date Title
CN1732667B (en) Transmission of application information and commands using presence technology
CN101437044A (en) Method and system for downloading file by point-to-point network technique based on sliced sheet
CN110336848B (en) Scheduling method, scheduling system and scheduling equipment for access request
CN109921967B (en) Instruction processing method and system, gateway device and computer readable storage medium
CN106993043B (en) Data communication system and method based on agency
CN114428686B (en) Message communication method, device, electronic equipment and readable storage medium
WO2017219519A1 (en) Method, apparatus, and system for controlling device
US20210289343A1 (en) Subscription message processing method and apparatus, and computer device and storage medium
US20070206442A1 (en) Method of updating daylight saving time information in wireless terminal
KR100713412B1 (en) Method for searching service by using mobile communication terminal and the mobile communication terminal and server therefor
CN112666877A (en) Control system of Internet of things
JP2019008645A (en) SERVER DEVICE, METHOD FOR ALLOWING SERVER DEVICE TO COMMUNICATE WITH IoT DEVICE, COMPUTER PROGRAM, COMMUNICATION SYSTEM AND IoT DEVICE
CN101232466A (en) Information transmitting method and information transmitting device
JP2018116349A (en) Relay apparatus, communication control method and communication control program
CN101019373A (en) A method and device for controlling the configuration of configuration parameter set of the remote device
CN107087011B (en) Method, device and system for realizing remote access
CN113133027B (en) Communication method, server, terminal and communication system
CN101467399B (en) Method for updating united access terminal identification of access terminal and the access terminal
US20190312929A1 (en) Information synchronization method and device
CN102025707B (en) Method, system and apparatus for data sending
CN114363999B (en) Method, device and storage medium for sending downlink instructions of Internet of things
CN114785838B (en) Control method and device of equipment, storage medium and electronic device
CN115879160B (en) Customizable privacy protection method, system, device and equipment based on semantic perception
CN115622988B (en) Call response method and device for web interface, electronic equipment and storage medium
CN110225507B (en) Cell locking method for terminal equipment and terminal equipment

Legal Events

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