CN111866109B - Message processing method, device, equipment and storage medium - Google Patents

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

Info

Publication number
CN111866109B
CN111866109B CN202010662714.4A CN202010662714A CN111866109B CN 111866109 B CN111866109 B CN 111866109B CN 202010662714 A CN202010662714 A CN 202010662714A CN 111866109 B CN111866109 B CN 111866109B
Authority
CN
China
Prior art keywords
message
application program
sending
conversion
conversion message
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
CN202010662714.4A
Other languages
Chinese (zh)
Other versions
CN111866109A (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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010662714.4A priority Critical patent/CN111866109B/en
Publication of CN111866109A publication Critical patent/CN111866109A/en
Application granted granted Critical
Publication of CN111866109B publication Critical patent/CN111866109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Abstract

The embodiment of the disclosure discloses a message processing method, a message processing device, message processing equipment and a storage medium. The method comprises the following steps: receiving a message from a server; converting the message according to a preset format to obtain a converted message; determining an application program matched with the conversion message and a sending strategy; and sending the conversion message to the application program according to the sending strategy, and pushing the conversion message through the application program. After the application program and the sending strategy matched with the conversion message are determined in advance, the conversion message is directly sent to the application program according to the sending strategy, so that the server and the application program are decoupled, the application program is only used for obtaining the conversion message without complex message processing, and the message pushing of the application program is more accurate.

Description

Message processing method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing a message.
Background
Currently, a message push mode of an application program of a mobile terminal mainly includes system level push and in-application push, so that the application program makes different responses according to a push message, for example, a prompt tone, a change of a document, or a change of local data of a user, and the like.
In the process of implementing the invention, the inventor finds that the prior art has the following defects: in an existing intra-application push mode, a state change of an application program is generally determined by messages of multiple servers, or a state of the application program is determined by the messages of the multiple servers together, so that mess of message push is easily caused by directly acquiring and processing the messages by the application program, and a display effect of message push of the application program is influenced.
Disclosure of Invention
The embodiment of the disclosure provides a message processing method, a message processing device, message processing equipment and a storage medium, so as to achieve accuracy of message pushing in an application.
In a first aspect, an embodiment of the present disclosure provides a message processing method, where the method includes: receiving a message from a server;
converting the message according to a preset format to obtain a converted message;
determining an application program matched with the conversion message and a sending strategy;
and sending the conversion message to an application program according to the sending strategy, and pushing the conversion message through the application program.
In a second aspect, an embodiment of the present disclosure further provides a message processing apparatus, where the apparatus includes:
the message receiving module is used for receiving a message from the server;
the message conversion module is used for converting the message according to a preset format to obtain a conversion message;
the sending strategy determining module is used for determining the application program matched with the conversion message and the sending strategy;
and the message pushing module is used for sending the conversion message to the application program according to the sending strategy and pushing the conversion message through the application program.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device to store one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement a method as in any embodiment of the present disclosure.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements a method according to any of the embodiments of the present disclosure.
The embodiment of the disclosure provides a message processing method, a message processing device, a message processing apparatus and a storage medium, wherein after an application program and a sending strategy matched with a conversion message are determined in advance, the conversion message is directly sent to the application program according to the sending strategy, so that a server is decoupled from the application program, and the application program is only used for obtaining the conversion message without performing complex message processing, so that the message pushing of the application program is more accurate.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a flowchart of a message processing method provided in an embodiment of the present disclosure;
fig. 2 is a flowchart of another message processing method provided by the embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and the embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of a message processing method provided by an embodiment of the present disclosure, where the embodiment is applicable to an in-application message pushing situation, the method may be performed by a message pushing apparatus, the apparatus may be implemented by software and/or hardware, and the apparatus may be configured in an electronic device.
Optionally, as shown in fig. 1, the method in this embodiment may include the following steps:
step 101, receiving a message from a server.
Optionally, receiving a message from the server may include: and receiving a message sent by the server through a preset type channel, wherein the channel comprises a HyperText Transfer Protocol (HTTP) channel or a long connection channel.
Specifically, in this embodiment, the message center receives the message sent by the server through a preset type channel, where the preset type channel includes a hypertext transfer protocol HTTP or a long connection channel, and certainly, the preset type channel may also include other forms. And the server specifically sends the message to a message center of the electronic device, and processes and subsequently distributes the acquired message of each server through the message center. The electronic device may specifically be a mobile terminal device, and the specific type of the electronic device is not limited in this embodiment.
And 102, converting the message according to a preset format to obtain a converted message.
In this embodiment, because the types of the messages sent by each server may be different, if the message center processes the different types of messages respectively, the message processing pressure of the electronic device may be greatly increased, and the subsequent message distribution processing may also be affected, so that the messages sent by each server may be converted according to the preset format to obtain the converted messages, and the preset formats adopted for the messages not sent by the servers are the same, thereby realizing the unification of the formats of the different types of messages sent by each server. Because the format of the converted message is uniform, the messages of different types sent by each server can be processed uniformly, and the message processing speed is improved. Of course, the message processing transmitted by one server is described as an example in the present embodiment, and the message processing method transmitted by other servers is substantially the same as that described above, and is not described in the present embodiment again.
It should be noted that, in this embodiment, a message sender, for example, a server, only needs to be responsible for submitting a message to a message center, and a message receiver, for example, an application, only needs to receive a message distributed from the message center and make corresponding interaction changes according to the distributed message, without concern for the source of the message and the matching problem of the source of the message, and these operations are already completed by the message center of the electronic device when the distribution policy is determined. Therefore, the decoupling of the message sender and the message receiver is realized, the maintainability of the code is convenient to improve, and when the work is finished through the message center, the message notification does not need to be carried out by depending on a platform or a third party.
Optionally, after converting the message according to the preset format to obtain the converted message, the method may further include: the conversion message is stored locally.
Specifically, by storing the conversion message locally, the conversion message can be conveniently multiplexed under the condition of conversion message processing failure or restart of an application program, so that the accuracy of message pushing is ensured.
And 103, determining an application program matched with the conversion message and a sending strategy.
Optionally, the conversion message includes server identification information; determining the application and the sending policy that the conversion message matches may include: acquiring an application program registration information table, wherein the application program registration information table comprises corresponding relations of server identification information, application programs and sending strategies; and determining the application program matched with the conversion message and the sending strategy according to the application program registration information table.
Optionally, the sending policy includes: instant sending and sending according to preset time intervals.
Specifically, the application program according to this embodiment registers in the message center before pushing the message, specifically, determines the identification information of the server corresponding to the received conversion message, that is, specifies which server the message sent by the server is received, and records and stores the type of the application program and the corresponding sending policy in the application program registration information table, for example, the application program a stores the message sent by the server with identification information 001 and the message sent by the server with identification information 002 in the application program registration information table, and the sending policy is a request for sending the conversion message immediately after the conversion message is obtained.
It should be noted that the sending policy may be further refined, and the obtained message is specifically sent to a specific page in the application program, for example, the application program includes an a page and a b page, and when both pages are open, the conversion message from the server with identification information 001 is sent to the a page for push presentation in an instant manner, and the conversion message from the server with identification information 002 is sent to the b page for push presentation in an instant manner, so that the message is sent according to the sending policy, and management of a cross-page state is effectively supported.
Because the conversion message includes the server identification information, that is, the conversion message identifies the source information, the corresponding relationship group including the same server identification information is found out according to the matching between the server identification information in the conversion message and the application registration information table, and the corresponding application type and the sending policy are determined from the corresponding relationship group, for example, one conversion message includes the server identification information 003, and the registration information table is shown in the following table 1:
TABLE 1
Serial number Server identification information Application type Transmission strategy
1 001 Application A Instant delivery
2 002 Application A Instant delivery
3 003 Application program B Transmitting every 5min
If the same server identification information is found in the correspondence group with the sequence number 3 according to the matching between the server identification information 003 contained in the conversion information table and the table 1, the application type matched with the conversion message is determined to be the application a, and the sending policy is to send the conversion message at intervals of 5 min.
And step 104, sending the conversion message to an application program according to the sending strategy, and pushing the conversion message through the application program.
Optionally, sending the conversion message to the application program according to the sending policy, and pushing the conversion message through the application program may include: if the sending strategy comprises instant sending, the conversion message is directly sent to the application program, and the conversion message is pushed through the application program; if the sending strategy comprises sending according to a preset time interval, caching the conversion message, sending the conversion message to an application program when the preset time interval is reached, and pushing the conversion message through the application program.
Specifically, in this embodiment, after determining the application and the sending policy that are matched with the conversion message according to the application registration information, the conversion message may be sent to the application according to the sending policy, and the application pushes the conversion message. When the sending strategy is determined to be instant sending, the conversion message is directly sent to the determined application program through a message center in the electronic equipment, and the conversion message is pushed through the application program; when the sending strategy is determined to include sending at preset time intervals, for example, specifically, sending at every 10min interval, the message center will cache the conversion message in the data storage after obtaining the conversion message, and extract the cached conversion message from the data storage after determining that 10min has elapsed, and send the conversion message to the determined application program, and push the conversion message through the application program.
Optionally, before sending the conversion message to the application according to the sending policy and pushing the conversion message through the application, the method may further include: determining a broadcasting mode corresponding to an application program and a received message type; and encapsulating the conversion message according to the type of the received message to obtain the message to be broadcasted. The sending the conversion message to the application program according to the sending policy and the pushing of the conversion message by the application program may include: and sending the message to be broadcasted to the application program according to the sending strategy and the broadcasting mode, and pushing the broadcast message through the application program.
Specifically, in this embodiment, before sending the conversion message to the application program, the message center needs to determine a broadcast mode and a received message type corresponding to the application program, and specifically, the method may send an acquisition instruction to the application program before sending, and receive the broadcast mode and the received message type fed back by the application program according to the instruction, or store the broadcast mode and the received message type of each application program in a database, and determine the broadcast mode and the received message type corresponding to the application program by a mode searched in the database.
After the received message type corresponding to the application program is determined, the conversion message is required to be encapsulated according to the received message type to obtain the message to be broadcasted, so that the message to be broadcasted conforms to the message receiving format of the application program, the message to be broadcasted is sent to the application program according to the sending strategy and the broadcasting mode, and the message to be broadcasted is pushed through the application program.
The embodiment provides a message pushing method, which is characterized in that after an application program and a sending strategy matched with a conversion message are determined in advance, the conversion message is directly sent to the application program according to the sending strategy, so that a server is decoupled from the application program, and the application program is only used for obtaining the conversion message without performing complex message processing, so that the message pushing of the application program is more accurate.
Fig. 2 shows a flowchart of another message processing method provided in an embodiment of the present disclosure, and this embodiment optimizes on the basis of the alternatives provided in the foregoing embodiments, specifically, after sending a conversion message to an application according to a sending policy and pushing the conversion message by the application, a step of detecting a pushing result of the conversion message is added.
Optionally, as shown in fig. 2, the method in this embodiment may include the following steps:
step 201, receiving a message from a server.
Optionally, receiving the message from the server may include: and receiving a message sent by the server through a preset type channel, wherein the channel comprises a HyperText Transfer Protocol (HTTP) channel or a long connection channel.
Step 202, converting the message according to a preset format to obtain a converted message.
Optionally, after converting the message according to the preset format to obtain the converted message, the method may further include: the converted message is stored locally.
Step 203, determine the application program and sending strategy matched with the conversion message.
Optionally, the conversion message includes server identification information; determining the application type and the sending policy matched to each conversion message may include: acquiring an application program registration information table, wherein the application program registration information table comprises the corresponding relation of server identification information, an application program and a sending strategy; and determining the application program matched with the conversion message and the sending strategy according to the application program registration information table.
Optionally, the sending policy includes: instant sending and sending at preset time intervals.
And step 204, sending the conversion message to an application program according to the sending strategy, and pushing the conversion message through the application program.
Optionally, sending the conversion message to the application program according to the sending policy, and pushing the conversion message through the application program may include: if the sending strategy comprises instant sending, directly sending the conversion message to an application program, and pushing the conversion message through the application program; if the sending strategy comprises sending according to a preset time interval, caching the conversion message, sending the conversion message to an application program when the preset time interval is reached, and pushing the conversion message through the application program.
Optionally, before sending the conversion message to the application program according to the sending policy and pushing the conversion message through the application program, the method may further include: determining a broadcast mode and a received message type corresponding to an application program; and encapsulating the conversion message according to the type of the received message to obtain the message to be broadcasted. Sending the conversion message to the application program according to the sending policy, and pushing the conversion message by the application program may include: and sending the message to be broadcasted to the application program according to the sending strategy and the broadcasting mode, and pushing the broadcast message through the application program.
Step 205, detecting a result of pushing the conversion message.
Specifically, in this embodiment, after the conversion message is pushed by the application program, detection may be performed on a conversion message pushing result of the application program, specifically, whether the application program displays a message sent by the server is detected, and if the application program displays the message, it is determined that the message is pushed successfully; if the application program does not display the message, the failure of the hardware equipment in the electronic equipment may occur, or the communication failure occurs in the message center during the message processing or distribution, which causes the failure of message pushing, and an alarm prompt message is also sent out when the message pushing fails, so as to remind the user to overhaul the hardware equipment or the communication line in time, thereby further improving the user experience effect of message pushing.
The embodiment provides a message pushing method, which is characterized in that after an application program and a sending strategy matched with a conversion message are determined in advance, the conversion message is directly sent to the application program according to the sending strategy, so that a server is decoupled from the application program, and the application program is only used for obtaining the conversion message without performing complex message processing, so that the message pushing of the application program is more accurate. The message pushing result is detected, and an alarm prompt is timely sent to remind a user of overhauling when the message pushing failure is determined through detection, so that the user experience effect of message pushing is further improved.
Fig. 3 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present disclosure, where the embodiment of the present disclosure is applicable to a case of pushing a message within an application. The apparatus may be implemented by software and/or hardware and integrated in an electronic device executing the method, as shown in fig. 3, the apparatus may include:
a message receiving module 301, configured to receive a message from a server.
The message conversion module 302 is configured to convert the message according to a preset format to obtain a converted message.
A sending policy determining module 303, configured to determine an application and a sending policy that are matched with the conversion message;
and the message pushing module 304 is configured to send the conversion message to the application program according to the sending policy, and push the conversion message through the application program.
The embodiment of the disclosure provides a message pushing device, which directly sends a conversion message to an application program according to a sending strategy after determining the application program and the sending strategy matched with the conversion message in advance, so that a server is decoupled from the application program, and the application program is only used for obtaining the conversion message without performing complex message processing, so that the message pushing of the application program is more accurate.
Further, the message receiving module is specifically configured to: and receiving a message sent by the server through a preset type channel, wherein the preset type channel comprises a hypertext transfer protocol (HTTP) channel or a long connection channel.
Further, the conversion message includes server identification information; the transmission policy determination module is specifically configured to: acquiring an application program registration information table, wherein the application program registration information table comprises the corresponding relation of server identification information, an application program and a sending strategy;
and determining the application program matched with the conversion message and the sending strategy according to the application program registration information table.
Further, the sending policy includes: instant sending and sending according to preset time intervals.
Further, the message pushing module is specifically configured to: if the sending strategy comprises instant sending, directly sending the conversion message to an application program, and pushing the conversion message through the application program;
if the sending strategy comprises sending according to a preset time interval, caching the conversion message, sending the conversion message to an application program when the preset time interval is reached, and pushing the conversion message through the application program.
Further, the apparatus further comprises a broadcast information obtaining module configured to: determining a broadcast mode and a received message type corresponding to an application program;
and encapsulating the conversion message according to the type of the received message to obtain the message to be broadcasted.
The message pushing module is further configured to: and sending the information to be broadcasted to the application program according to the sending strategy and the broadcasting mode, and pushing the information to be broadcasted through the application program.
Further, the transposing further includes a conversion information storage module for: the converted message is stored locally.
Referring now to FIG. 4, a block diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device in the embodiment of the present disclosure may be a device corresponding to a backend service platform of an application program, and may also be a mobile terminal device installed with an application program client. In particular, the electronic device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 408 including, for example, magnetic tape, hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices, either wirelessly or by wire, to exchange data. While fig. 4 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program, when executed by the processing device 401, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may be separate and not incorporated into the electronic device.
The computer readable medium carries one or more programs, which when executed by the electronic device, cause the internal processes of the electronic device to perform: receiving a message from a server; converting the message according to a preset format to obtain a converted message; determining an application program matched with the conversion message and a sending strategy; and sending the conversion message to the application program according to the sending strategy, and pushing the conversion message through the application program.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, a message processing method is provided, which includes: receiving a message from a server;
converting the message according to a preset format to obtain a converted message;
determining an application program and a sending strategy matched with the conversion message;
and sending the conversion message to the application program according to the sending strategy, and pushing the conversion message through the application program.
According to one or more embodiments of the present disclosure, in the above method, the receiving a message from a server includes:
and receiving the message sent by the server through a preset type channel, wherein the preset type channel comprises a hypertext transfer protocol (HTTP) channel or a long connection channel.
According to one or more embodiments of the present disclosure, in the above method, the conversion message includes server identification information;
the determining the application program and the sending policy matched with the conversion message comprises:
acquiring an application program registration information table, wherein the application program registration information table comprises corresponding relations of server identification information, application programs and sending strategies;
and determining the application program and the sending strategy matched with the conversion message according to the application program registration information table.
According to one or more embodiments of the present disclosure, in the above method, the sending policy includes: instant sending and sending at preset time intervals.
According to one or more embodiments of the present disclosure, in the foregoing method, the sending the conversion message to the application program according to the sending policy, and pushing the conversion message by the application program includes:
if the sending strategy comprises instant sending, the conversion message is directly sent to the application program, and the conversion message is pushed through the application program;
if the sending strategy comprises sending according to a preset time interval, caching the conversion message, sending the conversion message to the application program when the preset time interval is reached, and pushing the conversion message through the application program.
According to one or more embodiments of the present disclosure, in the above method, before the converting message is sent to the application program according to the sending policy and the application program pushes the converting message, the method further includes:
determining a broadcast mode and a received message type corresponding to the application program;
packaging the conversion message according to the type of the received message to obtain a message to be broadcasted;
the sending the conversion message to the application program according to the sending policy and the pushing of the conversion message by the application program include:
and sending the information to be broadcasted to the application program according to the sending strategy and the broadcasting mode, and pushing the information to be broadcasted through the application program.
According to one or more embodiments of the present disclosure, in the above method, after the converting the message according to the preset format to obtain the converted message, the method further includes:
storing the converted message locally.
According to one or more embodiments of the present disclosure, there is provided a message processing apparatus including:
the message receiving module is used for receiving a message from the server;
the message conversion module is used for converting the message according to a preset format to obtain a conversion message;
a sending strategy determining module, configured to determine an application program and a sending strategy that are matched with the conversion message;
and the message pushing module is used for sending the conversion message to the application program according to the sending strategy and pushing the conversion message through the application program.
According to one or more embodiments of the present disclosure, there is provided an electronic device including:
one or more processors;
a storage device for storing one or more programs,
when executed by one or more processors, cause the one or more processors to implement a message processing method as any embodiment of the present disclosure.
According to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor implements a message processing method according to any of the embodiments of the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other combinations of features described above or equivalents thereof without departing from the spirit of the disclosure. For example, the above features and the technical features disclosed in the present disclosure (but not limited to) having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (9)

1. A message processing method, comprising:
receiving a message from a server;
converting the message according to a preset format to obtain a conversion message, wherein the conversion message comprises server identification information;
determining an application program and a sending strategy matched with the conversion message;
sending the conversion message to the application program according to the sending strategy, and pushing the conversion message through the application program;
the determining the application program and the sending policy matched with the conversion message comprises:
acquiring an application program registration information table, wherein the application program registration information table comprises corresponding relations of server identification information, application programs and sending strategies;
and determining the application program and the sending strategy matched with the conversion message according to the application program registration information table.
2. The method of claim 1, wherein receiving the message from the server comprises:
and receiving the message sent by the server through a preset type channel, wherein the preset type channel comprises a hypertext transfer protocol (HTTP) channel or a long connection channel.
3. The method of claim 1, wherein the transmission policy comprises: instant sending and sending according to preset time intervals.
4. The method of claim 3, wherein sending the conversion message to the application according to the sending policy and pushing the conversion message through the application comprises:
if the sending strategy comprises instant sending, directly sending the conversion message to the application program, and pushing the conversion message through the application program;
if the sending strategy comprises sending according to a preset time interval, caching the conversion message, sending the conversion message to the application program when the preset time interval is reached, and pushing the conversion message through the application program.
5. The method of claim 1, wherein before sending the conversion message to the application according to the sending policy and pushing the conversion message by the application, the method further comprises:
determining a broadcast mode and a received message type corresponding to the application program;
packaging the conversion message according to the type of the received message to obtain a message to be broadcasted;
the sending the conversion message to the application program according to the sending policy and the pushing of the conversion message by the application program include:
and sending the message to be broadcasted to the application program according to the sending strategy and the broadcasting mode, and pushing the message to be broadcasted through the application program.
6. The method according to any one of claims 1 to 5, wherein after said converting the message according to the preset format to obtain the converted message, the method further comprises:
storing the converted message locally.
7. A message processing apparatus comprising:
the message receiving module is used for receiving a message from the server;
the message conversion module is used for converting the message according to a preset format to obtain a conversion message, and the conversion message comprises server identification information;
a sending strategy determining module, configured to determine an application program and a sending strategy that are matched with the conversion message;
the message pushing module is used for sending the conversion message to the application program according to the sending strategy and pushing the conversion message through the application program;
the sending strategy determining module is used for acquiring an application program registration information table, wherein the application program registration information table comprises the corresponding relation of server identification information, the application program and the sending strategy;
and determining the application program and the sending strategy matched with the conversion message according to the application program registration information table.
8. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202010662714.4A 2020-07-10 2020-07-10 Message processing method, device, equipment and storage medium Active CN111866109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010662714.4A CN111866109B (en) 2020-07-10 2020-07-10 Message processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010662714.4A CN111866109B (en) 2020-07-10 2020-07-10 Message processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111866109A CN111866109A (en) 2020-10-30
CN111866109B true CN111866109B (en) 2022-07-26

Family

ID=73153744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010662714.4A Active CN111866109B (en) 2020-07-10 2020-07-10 Message processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111866109B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115706736A (en) * 2021-08-10 2023-02-17 广东艾檬电子科技有限公司 Push message processing method and device, intelligent terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106100967A (en) * 2016-05-24 2016-11-09 微梦创科网络科技(中国)有限公司 A kind of method and device sending message
CN107438081A (en) * 2011-10-28 2017-12-05 谷歌公司 The strategy execution of client device
CN108647051A (en) * 2018-03-13 2018-10-12 广东欧珀移动通信有限公司 Optimisation strategy acquisition methods, providing method, device and equipment
CN111200653A (en) * 2019-12-31 2020-05-26 深圳市科漫达智能管理科技有限公司 Multi-platform communication method, multi-platform communication device and intermediate server

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106921717B (en) * 2015-12-28 2020-01-10 航天信息股份有限公司 Message pushing method and system based on mobile terminal
CN107465601B (en) * 2017-08-18 2020-09-04 武汉斗鱼网络科技有限公司 Push information processing method and device
CN108540565A (en) * 2018-04-17 2018-09-14 中山市华南理工大学现代产业技术研究院 A method of the mobile terminal push based on MQTT agreements and statistics
CN110633442A (en) * 2019-08-19 2019-12-31 阿里巴巴集团控股有限公司 Pushing method and device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107438081A (en) * 2011-10-28 2017-12-05 谷歌公司 The strategy execution of client device
CN106100967A (en) * 2016-05-24 2016-11-09 微梦创科网络科技(中国)有限公司 A kind of method and device sending message
CN108647051A (en) * 2018-03-13 2018-10-12 广东欧珀移动通信有限公司 Optimisation strategy acquisition methods, providing method, device and equipment
CN111200653A (en) * 2019-12-31 2020-05-26 深圳市科漫达智能管理科技有限公司 Multi-platform communication method, multi-platform communication device and intermediate server

Also Published As

Publication number Publication date
CN111866109A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
CN111858518B (en) Method and device for updating reference document, electronic equipment and storage medium
CN110753089A (en) Method, device, medium and electronic equipment for managing client
CN111209306A (en) Business logic judgment method and device, electronic equipment and storage medium
CN110781437A (en) Method and device for acquiring webpage image loading duration and electronic equipment
CN112491859A (en) Domain name certificate detection method and device, electronic equipment and computer readable medium
CN111679990A (en) Test data generation method and device, readable medium and electronic equipment
CN111800513A (en) Method and device for pushing information and computer readable medium of electronic equipment
CN112099982A (en) Collapse information positioning method, device, medium and electronic equipment
CN115640285A (en) Power abnormality information transmission method, device, electronic apparatus, and medium
CN111866109B (en) Message processing method, device, equipment and storage medium
CN111163336A (en) Video resource pushing method and device, electronic equipment and computer readable medium
CN110597602A (en) Transaction processing method and device, computer equipment and storage medium
CN111596992B (en) Navigation bar display method and device and electronic equipment
CN112506968A (en) Information aggregation method and device, electronic equipment and computer readable medium
CN112084441A (en) Information retrieval method and device and electronic equipment
CN111241137A (en) Data processing method and device, electronic equipment and storage medium
CN112732457B (en) Image transmission method, image transmission device, electronic equipment and computer readable medium
CN111259287B (en) Page content display method and device, electronic equipment and storage medium
CN112346661A (en) Data processing method and device and electronic equipment
CN111314021A (en) Data transmission method and device, electronic equipment and computer readable storage medium
CN111538717A (en) Data processing method and device, electronic equipment and computer readable medium
CN110795670A (en) Webpage image monitoring method and device, electronic equipment and readable storage medium
CN112422600A (en) Information synchronous publishing method, server, system and electronic equipment
CN111400322B (en) Method, apparatus, electronic device and medium for storing data
CN112084440B (en) Data verification method, device, electronic equipment and computer readable medium

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