CN112395112A - Application message processing method and device, computer equipment and storage medium - Google Patents

Application message processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112395112A
CN112395112A CN202011377581.2A CN202011377581A CN112395112A CN 112395112 A CN112395112 A CN 112395112A CN 202011377581 A CN202011377581 A CN 202011377581A CN 112395112 A CN112395112 A CN 112395112A
Authority
CN
China
Prior art keywords
application
message
target
shared
current online
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011377581.2A
Other languages
Chinese (zh)
Inventor
罗伟东
史坤坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Hexun Huagu Information Technology Co ltd
Original Assignee
Shenzhen Hexun Huagu Information 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 Shenzhen Hexun Huagu Information Technology Co ltd filed Critical Shenzhen Hexun Huagu Information Technology Co ltd
Priority to CN202011377581.2A priority Critical patent/CN112395112A/en
Publication of CN112395112A publication Critical patent/CN112395112A/en
Pending legal-status Critical Current

Links

Images

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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses an application message processing method, an application message processing device, computer equipment and a storage medium, wherein the application message processing method comprises the following steps: receiving a cloud message by adopting a current online application establishing a long connection channel with a cloud server; analyzing the cloud message to obtain analysis information corresponding to the cloud message, wherein the analysis information comprises message content and at least one target application identifier; if the number of the target application identifications is one, displaying message content on the current online application; and if the number of the target application identifications is at least two, displaying the message content on the current online application, determining the target sharing application corresponding to the current online application, and forwarding the message content to the target sharing application. According to the technical scheme, the number of long connecting channels of the client is reduced, the target sharing application can effectively and timely acquire the message content corresponding to the cloud message, the performance loss, the electric quantity consumption and the flow consumption of the client are reduced, and the performance of the client is improved.

Description

Application message processing method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of network technologies, and in particular, to an application message processing method and apparatus, a computer device, and a storage medium.
Background
Most of applications in the client side need to use a long connecting channel to perform network interaction with the cloud server, so that the purpose of acquiring application messages anytime and anywhere is achieved. In order to ensure effective and timely receiving of application messages, a plurality of long connecting channels need to be established for receiving cloud messages corresponding to a plurality of applications in a client, but when the number of the long connecting channels is too large, the problems of performance reduction, too large electric quantity consumption, high flow consumption and the like of the client can be caused.
In the prior art, in order to solve the above problem, after an application is closed by a user, the application is in a non-running state, that is, an offline application, and a client disconnects a long connection channel corresponding to the offline application. However, this may cause the application in the client to fail to receive the cloud message, which may reduce the user activity.
Disclosure of Invention
Embodiments of the present invention provide an application message processing method and apparatus, a computer device, and a storage medium, so as to solve the problem that performance loss, power consumption, and traffic consumption of a client cannot be reduced while it is ensured that an application in a non-operating state receives a cloud message.
An application message processing method comprises the following steps:
receiving a cloud message by adopting a current online application establishing a long connection channel with a cloud server;
analyzing the cloud end message to obtain analysis information corresponding to the cloud end message, wherein the analysis information comprises message content and at least one target application identifier;
if the number of the target application identifications is one, displaying the message content on the current online application;
if the number of the target application identifications is at least two, displaying the message content on the current online application, determining a target sharing application corresponding to the current online application, and forwarding the message content to the target sharing application.
Further, the parsing information further includes a message type;
if the number of the target application identifications is at least two, determining a target shared application corresponding to the current online application, and forwarding the message content to the target shared application, including:
if the number of the target application identifications is at least two and the message type is a special message, displaying the message content on the current online application;
if the number of the target application identifications is at least two and the message type is the sharing message, displaying the message content on the current online application, determining the target sharing application corresponding to the current online application, and forwarding the message content to the target sharing application.
Further, the determining the target shared application corresponding to the current online application includes:
identifying a configuration file of the current online application, and judging whether the configuration file comprises a shared application identifier corresponding to the target application identifier;
and if the configuration file contains the shared application identifier corresponding to the target application identifier, determining the application program corresponding to the shared application identifier as the target shared application.
Further, if the configuration file includes a shared application identifier corresponding to the target application identifier, determining the application program corresponding to the shared application identifier as a target shared application, including:
if the configuration file contains a shared application identifier corresponding to the target application identifier, determining an application program corresponding to the shared application identifier as a to-be-selected shared application;
acquiring a network state corresponding to the to-be-selected shared application;
and if the network state corresponding to the to-be-selected shared application is an offline state, determining the to-be-selected shared application as a target shared application.
Further, the forwarding the message content to the target sharing application includes:
sending a connection request to the target shared application;
if response information returned by the target sharing application is received within preset time, the message content is not sent to the target sharing application;
and if the response information returned by the target sharing application is not received within the preset time, executing to send the message content to the target sharing application.
Further, before the identifying the configuration file of the current online application, the application message processing method further includes:
acquiring a program registration request triggered by the current online application, wherein the program registration request comprises a current application identifier, a shared application identifier and a registration server address;
in a registration server corresponding to the registration server address, performing associated registration on the current application identifier and the shared application identifier to obtain an application certificate;
storing the application credentials to a configuration file of the current online application.
Further, the receiving of the cloud end message by the current online application of the long connection channel established with the cloud end server includes:
and receiving the cloud information by adopting the current online application of a long connecting channel established between the cloud server and the cloud server based on a preset acquisition strategy.
An application message processing apparatus comprising:
the message acquisition module is used for receiving the cloud message by adopting the current online application establishing a long connecting channel with the cloud server;
the message analysis module is used for analyzing the cloud end message and acquiring analysis information corresponding to the cloud end message, wherein the analysis information comprises message content and at least one target application identifier;
the message display module is used for displaying the message content on the current online application if the number of the target application identifications is one;
and the message forwarding module is used for displaying the message content on the current online application if the number of the target application identifications is at least two, determining a target shared application corresponding to the current online application, and forwarding the message content to the target shared application.
Further, the message forwarding module comprises:
a special message submodule, configured to display the message content on the current online application if the number of the target application identifiers is at least two and the message type is a special message;
and the shared message sub-module is used for displaying the message content on the current online application, determining a target shared application corresponding to the current online application and forwarding the message content to the target shared application if the number of the target application identifications is at least two and the message type is shared message.
Further, the message forwarding module further includes:
the identification judgment submodule is used for identifying a configuration file of the current online application and judging whether the configuration file comprises a shared application identification corresponding to the target application identification;
and the shared identifier sub-module is used for determining the application program corresponding to the shared application identifier as the target shared application if the configuration file contains the shared application identifier corresponding to the target application identifier.
Further, the shared identification submodule includes:
the application to be selected unit is used for determining the application program corresponding to the shared application identifier as the shared application to be selected if the configuration file contains the shared application identifier corresponding to the target application identifier;
the state acquisition unit is used for acquiring a network state corresponding to the to-be-selected shared application;
and the offline state unit is used for determining the to-be-selected shared application as the target shared application if the network state corresponding to the to-be-selected shared application is the offline state.
Further, the message forwarding module further includes:
the request sending submodule is used for sending a connection request to the target sharing application;
the first response submodule is used for not executing the step of sending the message content to the target sharing application if response information returned by the target sharing application is received within preset time;
and the second response submodule is used for executing the message content to be sent to the target sharing application if the response information returned by the target sharing application is not received within the preset time.
Further, the application message processing apparatus further includes:
the registration request module is used for acquiring a program registration request triggered by the current online application, wherein the program registration request comprises a current application identifier, a shared application identifier and a registration server address;
the associated registration module is used for performing associated registration on the current application identifier and the shared application identifier in a registration server corresponding to the registration server address to acquire an application certificate;
and the certificate storage module is used for storing the application certificate to the configuration file of the current online application.
Further, the message acquisition module comprises:
and the acquisition strategy sub-module is used for receiving the cloud end message by adopting the current online application of the long connecting channel established between the acquisition strategy sub-module and the cloud end server based on a preset acquisition strategy.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the application message processing method when executing the computer program.
A computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the above-described application message processing method.
According to the application message processing method and device, the computer equipment and the storage medium, the client receives the cloud message by adopting the current online application of the long connecting channel established between the client and the cloud server; analyzing the cloud message to obtain analysis information corresponding to the cloud message, wherein the analysis information comprises message content and at least one target application identifier; if the number of the target application identifications is one, only the message content is displayed on the current online application, if the number of the target application identifications is at least two, the message content is displayed on the current online application, the target sharing application corresponding to the current online application is determined, the message content is forwarded to the target sharing application, the client sends the cloud message to the target sharing application through the current online application of the long connecting channel established between the client and the cloud server, the number of the long connecting channels of the client is reduced, meanwhile, the target sharing application can effectively and timely acquire the message content corresponding to the cloud message, the performance loss, the electric quantity consumption and the flow consumption of the client are reduced, and the performance of the client is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flow chart of a method for applying message processing in accordance with an embodiment of the present invention;
FIG. 2 is another flow chart of a method for processing application messages in an embodiment of the present invention;
FIG. 3 is another flow chart of a method for processing application messages in an embodiment of the present invention;
FIG. 4 is another flow chart of a method for processing application messages in an embodiment of the present invention;
FIG. 5 is another flow chart of a method for processing application messages in an embodiment of the present invention;
FIG. 6 is another flow chart of a method for processing application messages in an embodiment of the present invention;
FIG. 7 is a diagram of an application message processing apparatus according to an embodiment of the present invention;
FIG. 8 is a diagram of an application environment to which a message processing method is applied according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The application message processing method provided by the embodiment of the invention can be applied to the application environment shown in fig. 7. Specifically, the application message processing method is applied to an application message processing system, where the application message processing system includes a client and a cloud server as shown in fig. 1, and the client and the cloud server communicate with each other through a network to implement application message processing. The client is also called a user side, and refers to a program corresponding to the server and providing local services for the client. The client may be installed on, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The cloud server may be implemented by an independent server or a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 1, an application message processing method is provided, which is described by taking the application of the method to the client in fig. 7 as an example, and includes the following steps:
s11: and receiving the cloud information by adopting the current online application with a long connection channel established between the current online application and the cloud server.
Wherein the application is an application program on the client. For example, applications on a mobile phone or a computer, such as iOS applications or Android applications. The current online application is the application that the user is using at the current time. The long connection channel is a channel corresponding to the long connection channel established between the current online application on the client and the cloud server. The cloud information is information sent by the cloud server to the current online application. It should be noted that, in order to reduce performance loss, power consumption, and traffic consumption of the client, the client establishes a long connection channel with the cloud server only for the application currently in use by the user at the present time (i.e., the current online application).
As an example, the client determines an application currently used by the user at the present time as a current online application, and because a long connection channel is established between the current online application and the cloud server, the client receives a cloud message sent by the cloud server by using the current online application, so that performance loss, power consumption and traffic consumption of the client are reduced, and the performance of the client is improved.
S12: and analyzing the cloud message to obtain analysis information corresponding to the cloud message, wherein the analysis information comprises message content and at least one target application identifier.
The analysis information is information obtained after the cloud information is analyzed. The parsing information includes message content and a target application identification. The message content is obtained by analyzing the cloud message. As an example, the message content includes basic content of the message presentation, such as a message header and message specific content. The target application identifier is an identifier corresponding to an application which needs to acquire the cloud end message. For example, the target application identification may be an appkey, which is a unique identification of the application.
As an example, a client analyzes a cloud message sent by a cloud server, and obtains analysis information corresponding to the cloud message, where the analysis information includes message content and at least one target application identifier. For example, the parsing information includes the message content T and the target application identifier a corresponding to the application a, or the parsing information includes the message content T and the target application identifier a corresponding to the application a, and the target application identifier B/. the target application identifier N corresponding to the application B. It is understood that the parsing information includes the message content and at least one target application identifier, so that the client can send the message content to an application corresponding to the at least one target application identifier according to the target application identifier.
S13: and if the number of the target application identifications is one, displaying the message content on the current online application.
Specifically, after the client analyzes the cloud information, the number of the target application identifiers obtained through analysis is judged, and if the number of the target application identifiers is one, the information content is displayed on the current online application. The client side displays the message content corresponding to the cloud message on the current online application after acquiring and analyzing the cloud message, so that a user can effectively and timely acquire the message content corresponding to the cloud message through the current online application.
S14: and if the number of the target application identifications is at least two, displaying the message content on the current online application, determining the target sharing application corresponding to the current online application, and forwarding the message content to the target sharing application.
The target sharing application is an application for sharing the message content by the client. It will be appreciated that the target sharing application corresponds to a target application identification. As an example, the target shared application may be an application in an offline state, that is, an application that is closed by a user, and a long connection channel is not established with the cloud server.
Specifically, when the number of the target application identifiers is at least two, the client determines the target shared application corresponding to the current online application while displaying the message content on the current online application, or the client determines the target shared application according to the current online application and the target application identifier corresponding to the target shared application, and forwards the message content to the target shared application.
In this embodiment, the client receives the cloud message by using the current online application of the long connection channel established between the client and the cloud server; analyzing the cloud message to obtain analysis information corresponding to the cloud message, wherein the analysis information comprises message content and at least one target application identifier; if the number of the target application identifications is one, only the message content is displayed on the current online application, if the number of the target application identifications is at least two, the message content is displayed on the current online application, the target sharing application corresponding to the current online application is determined, the message content is forwarded to the target sharing application, the client sends the cloud message to the target sharing application through the current online application of the long connecting channel established between the client and the cloud server, the number of the long connecting channels of the client is reduced, meanwhile, the target sharing application can effectively and timely acquire the message content corresponding to the cloud message, the performance loss, the electric quantity consumption and the flow consumption of the client are reduced, and the performance of the client is improved.
In an embodiment, as shown in fig. 2, the parsing information further includes a message type, and in step S14, if the number of the target application identifiers is at least two, determining a target shared application corresponding to the current online application, and forwarding the message content to the target shared application includes:
s21: and if the number of the target application identifications is at least two and the message type is the special message, displaying the message content on the current online application.
The message type is the type of the cloud message. A private message is a message that cannot be shared. For example, cloud messages containing user sensitive data are not shared with cloud messages of which the message type is a private message in order to ensure privacy of the user.
As an example, when the number of the target application identifiers is at least two, and the message type of the cloud message is a dedicated message, that is, the cloud message is a message that cannot be shared, the client displays the message content only on the current online application corresponding to the dedicated message.
S22: and if the number of the target application identifications is at least two and the message type is the sharing message, displaying the message content on the current online application, determining the target sharing application corresponding to the current online application, and forwarding the message content to the target sharing application.
The shared message is a message shared with the target shared application.
As an example, when the number of the target application identifiers is at least two, and the message type is a shared message, that is, the cloud message is a message shared with the target shared application, the client determines the target shared application according to the current online application and the target application identifier corresponding to the target shared application, and forwards the message content to the target shared application.
In this embodiment, when the number of the target application identifiers is at least two and the message type of the cloud message is a special message, the message content is displayed on the current online application, so that the security of the privacy of the user is improved; when the number of the target application identifications is at least two and the message type is the shared message, the target shared application is determined according to the current online application and the target application identification corresponding to the target shared application, the message content is forwarded to the target shared application, the client side can accurately display the cloud message on the corresponding application according to the type of the cloud message, and the accuracy of cloud message display is improved.
In one embodiment, as shown in fig. 3, the step S14 of determining the target shared application corresponding to the current online application includes:
s31: and identifying the configuration file of the current online application, and judging whether the configuration file comprises a shared application identifier corresponding to the target application identifier.
S32: and if the configuration file contains the shared application identifier corresponding to the target application identifier, determining the application program corresponding to the shared application identifier as the target shared application.
The configuration file is a file in the current online application. The configuration file can be configured in advance according to the actual requirement of a user. The configuration file includes a shared application identification corresponding to the target application identification. The shared application identifier is an identifier preset in a configuration file by a user.
As an example, the configuration file includes a shared application identification a and a shared application identification b. The analysis information comprises message content T, a target application identifier a corresponding to the application A, a target application identifier B corresponding to the application B and a target application identifier C corresponding to the application C. And the client identifies the configuration file of the current online application, and judges that the configuration file only comprises a shared application identifier a corresponding to the target application identifier a, a shared application identifier b corresponding to the target application identifier b and a target application identifier C corresponding to the application C. Therefore, the cloud message cannot be forwarded to the application C corresponding to the target application identifier C through the current online application.
Further, when the configuration file includes a shared application identifier a corresponding to the target application identifier a and a shared application identifier B corresponding to the target application identifier B, the client determines the application program a corresponding to the shared application identifier a as the target shared application a, determines the application program B corresponding to the shared application identifier B as the target shared application B, and forwards the message content T to the target shared application a and the target shared application B.
In this embodiment, the client identifies a configuration file of a current online application, determines whether the configuration file includes a shared application identifier corresponding to the target application identifier, and determines an application program corresponding to the shared application identifier as the target shared application if the configuration file includes the shared application identifier corresponding to the target application identifier.
In one embodiment, as shown in fig. 4, the step S32 of determining the target shared application corresponding to the current online application includes:
s41: and if the configuration file contains the shared application identifier corresponding to the target application identifier, determining the application program corresponding to the shared application identifier as the to-be-selected shared application.
S42: and acquiring the network state corresponding to the to-be-selected shared application.
S43: and if the network state corresponding to the to-be-selected shared application is the offline state, determining the to-be-selected shared application as the target shared application.
The selected sharing application is the application to be determined as the target sharing application. The network state is a state corresponding to the to-be-selected shared application, and comprises an offline state and an online state. The offline state is a state in which the to-be-selected shared application does not establish a long connection channel with the cloud server, that is, a state unused by the user. The online state is a state in which the to-be-selected shared application establishes a long connection channel with the cloud server, that is, a state in which the user is using.
As an example, when the configuration file includes a shared application identifier a corresponding to the target application identifier a and a shared application identifier B corresponding to the target application identifier B, the client determines the application program a corresponding to the shared application identifier a as the shared application a to be selected, and determines the application program B corresponding to the shared application identifier B as the shared application B to be selected. Further, the client acquires the network states corresponding to the to-be-selected shared application A and the to-be-selected shared application B, and determines the to-be-selected shared application A as the target shared application A if the network state of the to-be-selected shared application A is acquired as an offline state; and if the network state of the to-be-selected shared application B is acquired to be the online state, determining the to-be-selected shared application B as the target shared application B is not executed, and finally, the client forwards the message content T to the target shared application A. It can be understood that if the network state of the to-be-selected shared application B is the online state, the message content T does not need to be forwarded to the to-be-selected shared application B, and the to-be-selected shared application B can directly acquire the message content T through a long connection channel established with the cloud server. The client side obtains the cloud information only through the current online application, and determines the target sharing application through the sharing application identification in the configuration file of the current online application, so that the target sharing application can effectively and timely obtain the information content corresponding to the cloud information while the number of long connecting channels of the client side is reduced, the performance loss, the electric quantity consumption and the flow consumption of the client side are reduced, and the performance of the client side is improved.
In this embodiment, if the configuration file includes a shared application identifier corresponding to the target application identifier, the client determines the application program corresponding to the shared application identifier as the shared application to be selected; further, the client acquires a network state corresponding to the to-be-selected shared application; and finally, if the network state corresponding to the to-be-selected shared application is an offline state, the client determines the to-be-selected shared application as the target shared application, so that the target shared application can effectively and timely acquire the message content corresponding to the cloud message while the number of long connecting channels of the client is reduced, the performance loss, the electric quantity consumption and the flow consumption of the client are reduced, and the performance of the client is improved.
In one embodiment, as shown in fig. 5, in step S14, forwarding the message content to the target sharing application includes:
s51: and sending a connection request to the target sharing application.
S52: and if the response information returned by the target sharing application is received within the preset time, the message content is not sent to the target sharing application.
S53: and if the response information returned by the target sharing application is not received within the preset time, executing to send the message content to the target sharing application.
The connection request is a request sent by the client to the target shared application and is used for connecting the target shared application. The preset time is preset by a user. The response information is information of the target shared application responding to the connection request.
As an example, the client sends a connection request to the target sharing application a, and if response information returned by the target sharing application a is received within a preset time T, the client does not send the message content T to the target sharing application a. And if the response information returned by the target sharing application A is not received within the preset time T, executing to send the message content T to the target sharing application A. It can be understood that if the response information returned by the target sharing application is received within the preset time T, which indicates that the target sharing application a is an application in an online state, and it may be a network reason that the target sharing application a is in an offline state within a period of time, the sending of the message content T to the target sharing application a is not performed. And if the response information returned by the target shared application A is not received within the preset time T, the client determines that the target shared application A is in an offline state, and executes to send the message content T to the target shared application A.
In this embodiment, the client sends a connection request to the target shared application, and when response information returned by the target shared application is received within a preset time, the client does not execute sending of message content to the target shared application; and when the response information returned by the target sharing application is not received within the preset time, the message content is sent to the target sharing application, the phenomenon that the client erroneously forwards the message content to the target sharing application in an online state due to network reasons is avoided, the performance loss of the client is avoided being increased, and the performance of the client is improved.
In an embodiment, as shown in fig. 6, before the step S13, before identifying the configuration file of the current online application, the application message processing method further includes:
s61: acquiring a program registration request triggered by the current online application, wherein the program registration request comprises a current application identifier, a shared application identifier and a registration server address.
S62: and in the registration server corresponding to the registration server address, performing associated registration on the current application identifier and the shared application identifier to acquire an application certificate.
S63: the application credentials are stored to a configuration file of the current online application.
The program registration request is a request for registering the current online application. The address of the registration server is the address corresponding to the registration server. The registration server is a server that registers the current online application. The application certificate is a certificate corresponding to the current online application and comprises a current application identifier and a shared application identifier.
As an example, a program registration request triggered by the current online application N is obtained, and the program registration request is sent to the registration server corresponding to the registration server address, the current application identifier n, the shared application identifier a and the shared application identifier b are registered in an associated manner, application credentials are obtained, the application credentials are stored in a configuration file of the current online application A, so that the client can determine the application program A corresponding to the sharing application identification a in the configuration file as the target sharing application A, determine the application program B corresponding to the sharing application identification B as the target sharing application B, and the message content T is forwarded to the target sharing application A and the target sharing application B, so that the client can forward the message content T to the target sharing application A and the target sharing application B only on the basis of a long connecting channel established between the current online application N and the cloud server.
In this embodiment, a client obtains a program registration request triggered by a current online application N, performs associated registration on a current application identifier and a shared application identifier in a registration server corresponding to a registration server address, obtains an application credential, and stores the application credential in a configuration file of a current online application a, so that the client can forward a message content T to a target shared application a and a target shared application B only by using a long connection channel established between the current online application N and a cloud server, thereby reducing performance loss, power consumption, and traffic consumption of the client and improving client performance.
In an embodiment, in step S11, the receiving the cloud message by using the current online application with the long connection channel established with the cloud server includes receiving the cloud message by using the current online application with the long connection channel established with the cloud server based on a preset obtaining policy.
The preset obtaining strategy is a strategy for obtaining the cloud end message preset by the user. As an example, the preset obtaining policy may obtain the cloud end message in real time, or obtain the cloud end message based on a preset obtaining time. The preset acquisition time is preset by a user and is used for acquiring the cloud end message.
As an example, the client acquires the received cloud message in real time (24 hours) by using a current online application of a long connection channel established between the client and the cloud server, so that the user can effectively and timely acquire the cloud message.
As an example, the client receives the cloud message by using the current online application of the long connection channel established between the client and the cloud server based on the preset acquisition time, so that the problem that the user is disturbed by sending the cloud message during the user's rest time can be avoided, and the user experience of the user is improved.
In this embodiment, the client receives the cloud information by using the current online application of the long connection channel established between the client and the cloud server based on the preset acquisition policy, so that the user can effectively and timely acquire the cloud information, or the cloud information is prevented from being sent in the rest time of the user to disturb the user, and the use experience of the user is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, an application message processing apparatus is provided, and the application message processing apparatus corresponds to the application message processing method in the above embodiment one to one. As shown in fig. 7, the application message processing apparatus includes a message acquisition module 10, a message parsing module 20, a message display module 30, and a message forwarding module 40. The functional modules are explained in detail as follows:
the message acquisition module 10 is configured to receive a cloud message by using a current online application that establishes a long connection channel with a cloud server;
the message analysis module 20 is configured to analyze the cloud-end message to obtain analysis information corresponding to the cloud-end message, where the analysis information includes a message content and at least one target application identifier;
a message display module 30, configured to display message content on the current online application if the number of the target application identifiers is one;
and the message forwarding module 40 is configured to display the message content on the current online application if the number of the target application identifiers is at least two, determine a target shared application corresponding to the current online application, and forward the message content to the target shared application.
Further, the message forwarding module 40 includes:
the special message submodule is used for displaying the message content on the current online application if the number of the target application identifications is at least two and the message type is the special message;
and the shared message sub-module is used for displaying the message content on the current online application, determining the target shared application corresponding to the current online application and forwarding the message content to the target shared application if the number of the target application identifications is at least two and the message type is the shared message.
Further, the message forwarding module 40 further includes:
the identification judgment submodule is used for identifying a configuration file of the current online application and judging whether the configuration file comprises a shared application identification corresponding to the target application identification;
and the shared identification submodule is used for determining the application program corresponding to the shared application identification as the target shared application if the configuration file contains the shared application identification corresponding to the target application identification.
Further, the shared identification submodule includes:
the application to be selected unit is used for determining the application program corresponding to the shared application identifier as the shared application to be selected if the configuration file contains the shared application identifier corresponding to the target application identifier;
the state acquisition unit is used for acquiring a network state corresponding to the to-be-selected shared application;
and the offline state unit is used for determining the to-be-selected shared application as the target shared application if the network state corresponding to the to-be-selected shared application is the offline state.
Further, the message forwarding module 40 further includes:
the request sending submodule is used for sending a connection request to the target sharing application;
the first response submodule is used for not executing the transmission of the message content to the target sharing application if the response information returned by the target sharing application is received within the preset time;
and the second response submodule is used for executing the message content to be sent to the target sharing application if the response information returned by the target sharing application is not received within the preset time.
Further, the application message processing device further comprises:
the registration request module is used for acquiring a program registration request triggered by the current online application, wherein the program registration request comprises a current application identifier, a shared application identifier and a registration server address;
the associated registration module is used for performing associated registration on the current application identifier and the shared application identifier in a registration server corresponding to the registration server address to acquire an application certificate;
and the certificate storage module is used for storing the application certificate to the configuration file of the current online application.
Further, the message acquiring module 10 includes:
and the acquisition strategy sub-module is used for receiving the cloud end message by adopting the current online application of the long connecting channel established between the acquisition strategy sub-module and the cloud end server based on a preset acquisition strategy.
For the specific definition of the application message processing device, the above definition of the application message processing method can be referred to, and is not described herein again. The modules in the application message processing device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 9. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for applying message processing. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an application message processing method.
In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the method for processing an application message in the foregoing embodiments, for example, steps S11 to S14, which are not repeated herein to avoid repetition. Alternatively, the processor implements the functions of each module/unit in the embodiment of the application message processing apparatus when executing the computer program, for example, the modules 10 to 40, which are not described herein again to avoid repetition.
In an embodiment, a computer-readable storage medium is provided, and a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements the method for processing an application message in the foregoing embodiments, for example, steps S11 to S14, which are not repeated herein for avoiding repetition. Alternatively, the computer program, when executed by the processor, implements the functions of the modules/units in the embodiment of the application message processing apparatus, such as the modules 10 to 40, which are not described herein again to avoid repetition.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. An application message processing method, comprising:
receiving a cloud message by adopting a current online application establishing a long connection channel with a cloud server;
analyzing the cloud end message to obtain analysis information corresponding to the cloud end message, wherein the analysis information comprises message content and at least one target application identifier;
if the number of the target application identifications is one, displaying the message content on the current online application;
if the number of the target application identifications is at least two, displaying the message content on the current online application, determining a target sharing application corresponding to the current online application, and forwarding the message content to the target sharing application.
2. The application message processing method of claim 1, wherein the parsing information further includes a message type;
if the number of the target application identifications is at least two, determining a target shared application corresponding to the current online application, and forwarding the message content to the target shared application, including:
if the number of the target application identifications is at least two and the message type is a special message, displaying the message content on the current online application;
if the number of the target application identifications is at least two and the message type is the sharing message, displaying the message content on the current online application, determining the target sharing application corresponding to the current online application, and forwarding the message content to the target sharing application.
3. The application message processing method of claim 1, wherein the determining the target shared application corresponding to the current online application comprises:
identifying a configuration file of the current online application, and judging whether the configuration file comprises a shared application identifier corresponding to the target application identifier;
and if the configuration file contains the shared application identifier corresponding to the target application identifier, determining the application program corresponding to the shared application identifier as the target shared application.
4. The method for processing application messages according to claim 3, wherein if the configuration file includes the shared application identifier corresponding to the target application identifier, determining the application program corresponding to the shared application identifier as the target shared application includes:
if the configuration file contains a shared application identifier corresponding to the target application identifier, determining an application program corresponding to the shared application identifier as a to-be-selected shared application;
acquiring a network state corresponding to the to-be-selected shared application;
and if the network state corresponding to the to-be-selected shared application is an offline state, determining the to-be-selected shared application as a target shared application.
5. The application message processing method of claim 1, wherein said forwarding the message content to the target shared application comprises:
sending a connection request to the target shared application;
if response information returned by the target sharing application is received within preset time, the message content is not sent to the target sharing application;
and if the response information returned by the target sharing application is not received within the preset time, executing to send the message content to the target sharing application.
6. The application message processing method of claim 3, wherein prior to said identifying the configuration file of the current online application, the application message processing method further comprises:
acquiring a program registration request triggered by the current online application, wherein the program registration request comprises a current application identifier, a shared application identifier and a registration server address;
in a registration server corresponding to the registration server address, performing associated registration on the current application identifier and the shared application identifier to obtain an application certificate;
storing the application credentials to a configuration file of the current online application.
7. The method of claim 1, wherein the receiving the cloud message by the current online application using a long connection channel with a cloud server comprises:
and receiving the cloud information by adopting the current online application of a long connecting channel established between the cloud server and the cloud server based on a preset acquisition strategy.
8. An application message processing apparatus, comprising:
the message acquisition module is used for receiving the cloud message by adopting the current online application establishing a long connecting channel with the cloud server;
the message analysis module is used for analyzing the cloud end message and acquiring analysis information corresponding to the cloud end message, wherein the analysis information comprises message content and at least one target application identifier;
the message display module is used for displaying the message content on the current online application if the number of the target application identifications is one;
and the message forwarding module is used for displaying the message content on the current online application if the number of the target application identifications is at least two, determining a target shared application corresponding to the current online application, and forwarding the message content to the target shared application.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the application message processing method as claimed in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the method of application message processing according to any one of claims 1 to 7.
CN202011377581.2A 2020-11-30 2020-11-30 Application message processing method and device, computer equipment and storage medium Pending CN112395112A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011377581.2A CN112395112A (en) 2020-11-30 2020-11-30 Application message processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011377581.2A CN112395112A (en) 2020-11-30 2020-11-30 Application message processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112395112A true CN112395112A (en) 2021-02-23

Family

ID=74604820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011377581.2A Pending CN112395112A (en) 2020-11-30 2020-11-30 Application message processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112395112A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120239817A1 (en) * 2011-03-17 2012-09-20 Research In Motion Limited System and Method for Controlling Connections to an Application Server
CN103391307A (en) * 2012-05-11 2013-11-13 阿里巴巴集团控股有限公司 Off-line transparent-transmitting and display method, device and system for off-line data
CN107872528A (en) * 2017-11-21 2018-04-03 口碑(上海)信息技术有限公司 Information push method and device
CN108400946A (en) * 2013-06-11 2018-08-14 杭州硕文软件有限公司 A kind of method, apparatus, system and computer readable storage medium for reducing Internet traffic
CN109525629A (en) * 2018-09-11 2019-03-26 北京小米移动软件有限公司 Information-pushing method, device and storage medium
CN109962953A (en) * 2017-12-25 2019-07-02 深圳市优必选科技有限公司 Client communication method for building up and device
KR20190113200A (en) * 2018-03-28 2019-10-08 삼성에스디에스 주식회사 Message server and message processing apparatus including the same
CN111866150A (en) * 2020-07-23 2020-10-30 深圳市和讯华谷信息技术有限公司 High-concurrency message service distribution method and device, computer equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120239817A1 (en) * 2011-03-17 2012-09-20 Research In Motion Limited System and Method for Controlling Connections to an Application Server
CN103391307A (en) * 2012-05-11 2013-11-13 阿里巴巴集团控股有限公司 Off-line transparent-transmitting and display method, device and system for off-line data
CN108400946A (en) * 2013-06-11 2018-08-14 杭州硕文软件有限公司 A kind of method, apparatus, system and computer readable storage medium for reducing Internet traffic
CN107872528A (en) * 2017-11-21 2018-04-03 口碑(上海)信息技术有限公司 Information push method and device
WO2019100921A1 (en) * 2017-11-21 2019-05-31 口碑(上海)信息技术有限公司 Information pushing method and device
CN109962953A (en) * 2017-12-25 2019-07-02 深圳市优必选科技有限公司 Client communication method for building up and device
KR20190113200A (en) * 2018-03-28 2019-10-08 삼성에스디에스 주식회사 Message server and message processing apparatus including the same
CN109525629A (en) * 2018-09-11 2019-03-26 北京小米移动软件有限公司 Information-pushing method, device and storage medium
CN111866150A (en) * 2020-07-23 2020-10-30 深圳市和讯华谷信息技术有限公司 High-concurrency message service distribution method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄永华;: "应用Socket的微服务之间的通讯", 福建电脑, no. 02 *

Similar Documents

Publication Publication Date Title
CN110300050B (en) Message pushing method and device, computer equipment and storage medium
CN110213523B (en) Video conference processing method, system, device, computer equipment and storage medium
CN108933993B (en) Short message cache queue selection method and device, computer equipment and storage medium
CN109842617B (en) Advertisement blocking method and device and storage medium
CN108632110B (en) Device performance testing method, system, computer device and storage medium
CN108933994B (en) Short message distribution processing method and device, computer equipment and storage medium
CN110113250B (en) Method for sharing wireless access point through instant messaging software
US20230161541A1 (en) Screen projection method and system
CN107862091B (en) Control method and device for realizing webpage access
CN108595280B (en) Interface adaptation method and device, computer equipment and storage medium
CN113469736A (en) Resource distribution control method, device, system, electronic device and storage medium
CN108924043A (en) System monitoring method, gateway communication, gateway apparatus, service processing equipment
CN109118291B (en) User authentication method and device in advertisement task popularization and computer equipment
CN113923008B (en) Malicious website interception method, device, equipment and storage medium
CN106161647B (en) Method for discovering cloud terminal devices in batches and cloud terminal management system
CN110913083A (en) Communication line connection method, communication line connection device, computer equipment and storage medium
CN110769482A (en) Method and device for network connection of wireless equipment and wireless router equipment
CN113672894A (en) Data processing method, device and equipment for identifying code request and storage medium
CN113630418A (en) Network service identification method, device, equipment and medium
CN108345508B (en) Interface call testing method and device
CN112395112A (en) Application message processing method and device, computer equipment and storage medium
CN111782447A (en) Batch test updating method and device based on SSH service and computer equipment
CN114916023B (en) Method and device for neighboring cell configuration, storage medium and electronic equipment
CN111026988A (en) Page loading method, device and system and computer equipment
CN112653609B (en) VPN identification application method, device, terminal and storage 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