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

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

Info

Publication number
CN112395112B
CN112395112B CN202011377581.2A CN202011377581A CN112395112B CN 112395112 B CN112395112 B CN 112395112B CN 202011377581 A CN202011377581 A CN 202011377581A CN 112395112 B CN112395112 B CN 112395112B
Authority
CN
China
Prior art keywords
application
message
target
current online
cloud
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
CN202011377581.2A
Other languages
Chinese (zh)
Other versions
CN112395112A (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.)
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/CN112395112B/en
Publication of CN112395112A publication Critical patent/CN112395112A/en
Application granted granted Critical
Publication of CN112395112B publication Critical patent/CN112395112B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/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)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses an application message processing method, a device, a computer device and a storage medium, wherein the application message processing method comprises the following steps: receiving cloud information by adopting a current online application for 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 identifiers is one, displaying message content on the current online application; and if the number of the target application identifiers 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. According to the technical scheme, the number of the long connecting channels of the client is reduced, meanwhile, the target sharing application can also 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, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method and apparatus for processing an application message, a computer device, and a storage medium.
Background
Most of the applications in the client end need to use a long connection channel to perform network interaction with the cloud server so as to achieve the purpose of acquiring application messages anytime and anywhere. In order to ensure that the existing client terminal effectively and timely receives application messages, a plurality of long connection channels are required to be established to receive cloud messages corresponding to a plurality of applications in the client terminal, but when the long connection channels are too many, the problems of performance reduction, overlarge electric quantity consumption, high flow consumption and the like of the client terminal are caused.
In the prior art, in order to solve the above-mentioned 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, so that the user activity is reduced.
Disclosure of Invention
The embodiment of the invention provides an application message processing method, an application message processing device, computer equipment and a storage medium, which are used for solving the problems that the performance loss, the electric quantity consumption, the flow consumption and the like of a client cannot be reduced while the application in a non-running state is guaranteed to receive cloud messages.
An application message processing method, comprising:
Receiving cloud information by adopting a current online application for 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 the message content on the current online application;
and if the number of the target application identifiers 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 identifiers is at least two, determining a target sharing application corresponding to the current online application, and forwarding the message content to the target sharing 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;
And if the number of the target application identifiers is at least two and the message type is a shared message, 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.
Further, the determining a target sharing 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 sharing application identifier corresponding to the target application identifier, determining the application program corresponding to the sharing application identifier as the target sharing application.
Further, if the configuration file includes a sharing application identifier corresponding to the target application identifier, determining the application program corresponding to the sharing application identifier as the target sharing application includes:
If the configuration file contains a sharing application identifier corresponding to the target application identifier, determining an application program corresponding to the sharing application identifier as a sharing application to be selected;
Acquiring a network state corresponding to the to-be-selected sharing application;
And if the network state corresponding to the to-be-selected sharing application is an offline state, determining the to-be-selected sharing application as a target sharing application.
Further, the forwarding the message content to the target sharing application includes:
sending a connection request to the target sharing application;
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;
and if 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.
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 a current online application, wherein the program registration request comprises a current application identifier, a shared application identifier and a registration server address;
In the registration server corresponding to the registration server address, carrying out association registration on the current application identifier and the shared application identifier to obtain an application credential;
and storing the application credential to a configuration file of the current online application.
Further, the receiving the cloud message by the current online application using the long connection channel established between the cloud server includes:
Based on a preset acquisition strategy, receiving cloud information by adopting the current online application of a long connection channel established between the cloud server and the cloud server.
An application message processing apparatus comprising:
the message acquisition module is used for receiving cloud messages by adopting the current online application for establishing a long connection channel with the cloud server;
The message analysis module is used for analyzing the cloud message and obtaining analysis information corresponding to the cloud 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 identifiers 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 identifiers is at least two, determining a target sharing application corresponding to the current online application and forwarding the message content to the target sharing application.
Further, the message forwarding module includes:
a special message sub-module, 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 if the number of the target application identifications is at least two and the message type is a shared message, 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 further includes:
The identification judging sub-module 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 or not;
And the sharing identification sub-module is used for determining the application program corresponding to the sharing application identification as the target sharing application if the configuration file contains the sharing application identification corresponding to the target application identification.
Further, the sharing identification submodule includes:
the application unit to be selected is used for determining an 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;
a state acquisition unit, configured to acquire a network state corresponding to the to-be-selected shared application;
And the offline state unit is used for determining the to-be-selected sharing application as a target sharing application if the network state corresponding to the to-be-selected sharing application is an offline state.
Further, the message forwarding module further includes:
a request sending sub-module, configured to send a connection request to the target sharing application;
The first response sub-module is used for not executing the sending 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 sub-module is used for sending the message content 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 carrying out associated registration on the current application identifier and the shared application identifier in the registration server corresponding to the registration server address to acquire an application credential;
And the credential storage module is used for storing the application credential to the configuration file of the current online application.
Further, the message acquisition module includes:
The acquisition strategy sub-module is used for receiving cloud information by adopting the current online application of the long connection channel established between the acquisition strategy sub-module and the cloud server based on the 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 above application message processing method when executing the computer program.
A computer readable storage medium storing a computer program which when executed by a processor implements the application message processing method described above.
According to the application message processing method, the device, the computer equipment and the storage medium, the client receives the cloud message by adopting 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 identifiers is one, the message content is only displayed on the current online application, if the number of the target application identifiers 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 connection channel established between the client and the cloud server, the number of the long connection channels of the client is reduced, the target sharing application can also 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 that are needed in the description of the embodiments of the present invention will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an application message processing method in an embodiment of the invention;
FIG. 2 is another flow chart of an application message processing method in an embodiment of the invention;
FIG. 3 is another flow chart of an application message processing method in an embodiment of the invention;
FIG. 4 is another flow chart of an application message processing method in an embodiment of the invention;
FIG. 5 is another flow chart of an application message processing method in an embodiment of the invention;
FIG. 6 is another flow chart of an application message processing method in an embodiment of the invention;
FIG. 7 is a schematic diagram of an application message processing apparatus according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of an application environment for applying a message processing method according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a computer device in accordance with an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The application message processing method provided by the embodiment of the invention can be applied to an application environment shown in fig. 7. Specifically, the application message processing method is applied in an application message processing system, and the application message processing system comprises a client and a cloud server as shown in fig. 1, wherein the client and the cloud server communicate through a network and are used for realizing application message processing. The client is also called a client, and refers to a program corresponding to the server for providing local service for the client. The client may be installed on, but is not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices. The cloud server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 1, an application message processing method is provided, and the method is applied to the client in fig. 7 for illustration, and includes the following steps:
S11: and receiving the cloud message by adopting the current online application for establishing a long connection channel with the cloud server.
Wherein the application is an application program on the client. For example, applications on a cell phone or computer, such as iOS applications or Android applications. The current online application is an 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 message is a message 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 only establishes a long connection channel with the cloud server for an application that is currently being used by the user (i.e., a current online application).
As an example, the client determines the application currently being used by the user as the current online application, and the client adopts the current online application to receive the cloud message sent by the cloud server because a long connection channel is established between the current online application and the cloud server, so that the performance loss, the electric quantity consumption and the flow consumption of the client are reduced, and the performance of the client is improved.
S12: 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 message is analyzed. The parsing information includes message content and destination application identification. The message content is obtained after the cloud message is analyzed. 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 needing to acquire the cloud message. For example, the target application identification may be appkey, appkey, which is a unique identification of the application.
As an example, the client analyzes the cloud message sent by the 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 a target application identifier a corresponding to the message content T and the application a, or the parsing information includes a target application identifier a corresponding to the message content T and the application a, and a target application identifier B/. The application B corresponds to the application N. It will be appreciated 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 the 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 message, the number of target application identifiers obtained through analysis is judged, and if the number of target application identifiers is one, the message content is displayed on the current online application. It can be understood that, because the number of the target application identifiers is only one and the cloud message is the message acquired by the current online application, after the client acquires and analyzes the cloud message, the message content corresponding to the cloud message is displayed on the current online application, so that the 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 identifiers 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.
The target sharing application is an application for sharing the message content by the client. It will be appreciated that the target shared application corresponds to the target application identification. As an example, the target sharing application may be an application in an offline state, that is, an application that is closed by a user, and does not establish a long connection channel with the cloud server.
Specifically, when the number of the target application identifiers is at least two, the client determines the target sharing application corresponding to the current online application while displaying the message content on the current online application, that is, the client determines the target sharing application according to the current online application and the target application identifier corresponding to the target sharing application, and forwards the message content to the target sharing application.
In the embodiment, a client receives a cloud message by adopting a current online application of a long connection channel established between the client and 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 identifiers is one, the message content is only displayed on the current online application, if the number of the target application identifiers 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 connection channel established between the client and the cloud server, the number of the long connection channels of the client is reduced, the target sharing application can also 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 target application identifiers is at least two, determining a target sharing application corresponding to the current online application, and forwarding the message content to the target sharing application includes:
S21: and 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.
The message type is the type of the cloud message. The dedicated message is a message which cannot be shared. For example, a cloud message containing user sensitive data is not shared with a cloud message whose message type is a dedicated message in order to ensure the 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 only displays the message content 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 shared message, 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.
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 sharing message, that is, the cloud message is a message shared with the target sharing application, the client determines the target sharing application according to the current online application and the target application identifier corresponding to the target sharing application, and forwards the message content to the target sharing application.
In the 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 user privacy is improved; when the number of the target application identifiers is at least two and the message types are sharing messages, determining the target sharing application according to the current online application and the target application identifier corresponding to the target sharing application, forwarding the message content to the target sharing application, and enabling the client to accurately display the cloud message on the corresponding application according to the type of the cloud message, so that the accuracy of displaying the cloud message is improved.
In one embodiment, as shown in fig. 3, in step S14, determining a target sharing application corresponding to a 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 sharing application identification corresponding to the target application identification, determining the application program corresponding to the sharing application identification as the target sharing application.
Wherein the configuration file is a file in the current online application. The configuration file can be preconfigured according to the actual requirements of the user. The configuration file includes a shared application identification corresponding to the target application identification. The shared application identifier is an identifier preset in the configuration file by the user.
As an example, the configuration file includes a shared application identification a and a shared application identification b. The analysis information comprises a 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. The client identifies the configuration file of the current online application, judges that the configuration file only comprises a shared application identifier a corresponding to a target application identifier a and a shared application identifier b corresponding to a target application identifier b, and does not comprise a target application identifier C corresponding to an 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 sharing application identifier a corresponding to the target application identifier a and a sharing application identifier B corresponding to the target application identifier B, the client determines the application program a corresponding to the sharing application identifier a as the target sharing application a, determines the application program B corresponding to the sharing application identifier B as the target sharing application B, and forwards the message content T to the target sharing application a and the target sharing application B.
In this embodiment, the client identifies the configuration file of the current online application, determines whether the configuration file includes a shared application identifier corresponding to the target application identifier, and if the configuration file includes the shared application identifier corresponding to the target application identifier, determines the application program corresponding to the shared application identifier 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 reducing the number of long connection channels of the client, thereby reducing performance loss, electric quantity consumption and flow consumption of the client, and improving performance of the client.
In one embodiment, as shown in fig. 4, in step S32, determining a target sharing application corresponding to a current online application includes:
s41: if the configuration file contains the sharing application identifier corresponding to the target application identifier, determining the application program corresponding to the sharing application identifier as the candidate sharing application.
S42: and acquiring a network state corresponding to the to-be-selected sharing application.
S43: 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 the target shared application.
The candidate sharing application is an application to be determined as a target sharing application. The network state is a state corresponding to the shared application to be selected, and comprises an offline state and an online state. The offline state is a state that the candidate sharing application does not establish a long connection channel with the cloud server, namely a state that the user is not used. The online state is a state in which the candidate sharing application and the cloud server establish a long connection channel, namely 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 candidate shared application a, and determines the application program B corresponding to the shared application identifier B as the candidate shared application B. Further, the client acquires network states corresponding to the to-be-selected sharing application A and the to-be-selected sharing application B, and determines the to-be-selected sharing application A as a target sharing application A if the network state of the to-be-selected sharing application A is an offline state; and if the network state of the to-be-selected sharing application B is obtained to be in an online state, determining the to-be-selected sharing application B as the target sharing application B is not executed, and finally, the client forwards the message content T to the target sharing application A. It can be understood that, if the network state of the to-be-selected sharing application B is an online state, the message content T does not need to be forwarded to the to-be-selected sharing application B, and the to-be-selected sharing application B can directly obtain the message content T through a long connection channel established with the cloud server. The client side only obtains the cloud message 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 message content corresponding to the cloud message while reducing the number of long connecting channels of the client side, 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 sharing application identifier corresponding to the target application identifier, the client determines an application program corresponding to the sharing application identifier as a to-be-selected sharing application; further, the client acquires a network state corresponding to the shared application to be selected; and finally, if the network state corresponding to the to-be-selected sharing application is an offline state, the client determines the to-be-selected sharing application as a target sharing application, so that the target sharing application can effectively and timely acquire the message content corresponding to the cloud message while reducing the number of long connecting channels of the client, 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, not executing the transmission of the message content 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 the step of sending the message content to the target sharing application.
The connection request is a request sent by the client to the target sharing application and is used for connecting the target sharing application. The preset time is a time preset by a user. The response information is information of the target sharing application responding to the connection request.
As an example, the client sends a connection request to the target sharing application a, and if the response information returned by the target sharing application a is received within the preset time T, 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 sharing application A is not received within the preset time T, executing the step of sending 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, possibly because the target sharing application a is in an offline state for a period of time by network reasons, the sending of the message content T to the target sharing application a is not performed. If the response information returned by the target sharing application A is not received within the preset time T, the client determines that the target sharing application A is in an offline state, and sends the message content T to the target sharing application A.
In this embodiment, the client sends a connection request to the target sharing application, and when receiving response information returned by the target sharing application within a preset time, the client does not execute sending the message content to the target sharing application; 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, so that the problem that the network causes the client to forward the message content to the target sharing application in an online state by mistake is avoided, the performance loss of the client is avoided, and the performance of the client is improved.
In one embodiment, as shown in fig. 6, before step S13, before identifying the configuration file of the current online application, the application message processing method further includes:
s61: and 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, carrying out association registration on the current application identifier and the shared application identifier to acquire an application credential.
S63: the application credentials are stored to a configuration file of the current online application.
Wherein the program registration request is a request to register the current online application. The registration server address is an address corresponding to the registration server. The registration server is a server that registers for the current online application. The application credential is a credential corresponding to the current online application, including 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, in a registration server corresponding to a registration server address, the current application identifier N, the shared application identifier a and the shared application identifier B are associated and registered, an application credential is obtained, the application credential is stored in a configuration file of the current online application a, so that a client can determine that the application program a corresponding to the shared application identifier a in the configuration file is a target shared application a, determine that the application program B corresponding to the shared application identifier B is a target shared application B, and forward the message content T to the target shared application a and the target shared application B, so that the client can forward the message content T to the target shared application a and the target shared application B only by using a long connection channel established by the current online application N and the cloud server.
In this embodiment, the client obtains a program registration request triggered by the current online application N, performs association registration on the current application identifier and the shared application identifier in the registration server corresponding to the registration server address, obtains an application credential, and stores the application credential in a configuration file of the current online application a, so that the client can forward the message content T to the target shared application a and the target shared application B only by using a long connection channel established by the current online application N and the cloud server, thereby reducing performance loss, electric quantity consumption and flow consumption of the client, and improving performance of the client.
In an embodiment, in step S11, the current online application of the long connection channel established with the cloud server is used to receive the cloud message, which includes receiving the cloud message based on a preset acquisition policy by using the current online application of the long connection channel established with the cloud server.
The preset acquisition strategy is a strategy for acquiring cloud information, which is preset by a user. As an example, the preset acquisition policy may be to acquire the cloud message in real time, or acquire the cloud message based on a preset acquisition time. The preset acquisition time is preset by a user and is used for acquiring cloud information.
As an example, the client obtains the received cloud message in real time (24 hours) by adopting the current online application of the long connection channel established between the client and the cloud server, so that the user can effectively and timely obtain the cloud message.
As an example, the client receives the cloud message by adopting 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 user is prevented from being disturbed by sending the cloud message in the rest time of the user, and the use experience of the user is improved.
In this embodiment, the client receives the cloud message by adopting the current online application of the long connection channel established between the client and the cloud server based on the preset acquisition strategy, so that the user can effectively and timely acquire the cloud message, or the user is prevented from being disturbed by sending the cloud message in the rest time of the user, and the use experience of the user is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
In an embodiment, an application message processing apparatus is provided, where the application message processing apparatus corresponds to the application message processing method in the foregoing embodiment one by 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 described in detail as follows:
The message obtaining 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 parsing module 20 is configured to parse the cloud message, and obtain parsing information corresponding to the cloud message, where the parsing information includes 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 sharing application corresponding to the current online application, and forward the message content to the target sharing application.
Further, the message forwarding module 40 includes:
the special message sub-module is used for displaying message content on the current online application if the number of the target application identifications 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 if the number of the target application identifications is at least two and the message type is the shared message, determining the target shared application corresponding to the current online application and forwarding the message content to the target shared application.
Further, the message forwarding module 40 further includes:
The identification judging sub-module is used for identifying the configuration file of the current online application and judging whether the configuration file comprises a shared application identification corresponding to the target application identification or not;
and the sharing identification sub-module is used for determining the application program corresponding to the sharing application identification as the target sharing application if the configuration file contains the sharing application identification corresponding to the target application identification.
Further, the shared identification submodule includes:
the to-be-selected application unit is used for determining an application program corresponding to the shared application identifier as the to-be-selected shared application 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 shared application to be selected;
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:
A request sending sub-module, configured to send a connection request to a target sharing application;
the first response sub-module is used for not executing the sending of the message content to the target sharing application if response information returned by the target sharing application is received within a preset time;
and the second response sub-module is used for executing the sending of the message content 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 carrying out associated registration on the current application identifier and the shared application identifier in the registration server corresponding to the registration server address to acquire an application credential;
and the credential storage module is used for storing the application credential to the configuration file of the current online application.
Further, the message acquisition module 10 includes:
The acquisition strategy sub-module is used for receiving cloud information by adopting the current online application of the long connection channel established between the acquisition strategy sub-module and the cloud server based on the preset acquisition strategy.
The specific limitation of the application message processing apparatus may be referred to the limitation of the application message processing method hereinabove, and will not be described herein. The above-described respective modules in the application message processing apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which 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 includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for application 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, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the message processing method in the above embodiment when executing the computer program, for example, steps S11 to S14, and for avoiding repetition, the description is omitted herein. Or the processor when executing the computer program performs the functions of the modules/units of this embodiment of the application message processing apparatus, e.g. modules 10 to 40, which are not described here again for the sake of avoiding 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 the computer program is executed by a processor, the method for processing a message in the above embodiment is implemented, for example, step S11 to step S14, which is not repeated herein. Or the computer program when executed by a processor, implements the functions of the modules/units in this embodiment of the application message processing apparatus, such as the modules 10 to 40, and will not be described herein again for the sake of avoiding repetition.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile 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 (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the 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 scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention.

Claims (9)

1. An application message processing method, comprising:
Receiving cloud information by adopting a current online application for 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 the message content on the current online application;
If the number of the target application identifiers 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;
wherein the parsing information further includes a message type; if the number of the target application identifiers is at least two, determining a target sharing application corresponding to the current online application, and forwarding the message content to the target sharing 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;
And if the number of the target application identifiers is at least two and the message type is a shared message, 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.
2. The application message processing method of claim 1, wherein the determining a 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 sharing application identifier corresponding to the target application identifier, determining the application program corresponding to the sharing application identifier as the target sharing application.
3. The application message processing method as claimed in claim 2, wherein if the configuration file includes a shared application identifier corresponding to the target application identifier, determining the application corresponding to the shared application identifier as the target shared application includes:
If the configuration file contains a sharing application identifier corresponding to the target application identifier, determining an application program corresponding to the sharing application identifier as a sharing application to be selected;
Acquiring a network state corresponding to the to-be-selected sharing application;
And if the network state corresponding to the to-be-selected sharing application is an offline state, determining the to-be-selected sharing application as a target sharing application.
4. The application message processing method of claim 1, wherein the forwarding the message content to the target sharing application comprises:
sending a connection request to the target sharing application;
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;
and if 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.
5. The application message processing method of claim 2, 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 a current online application, wherein the program registration request comprises a current application identifier, a shared application identifier and a registration server address;
In the registration server corresponding to the registration server address, carrying out association registration on the current application identifier and the shared application identifier to obtain an application credential;
and storing the application credential to a configuration file of the current online application.
6. The application message processing method according to claim 1, wherein the receiving the cloud message by the current online application using the long connection channel established with the cloud server includes:
Based on a preset acquisition strategy, receiving cloud information by adopting the current online application of a long connection channel established between the cloud server and the cloud server.
7. An application message processing apparatus, comprising:
the message acquisition module is used for receiving cloud messages by adopting the current online application for establishing a long connection channel with the cloud server;
The message analysis module is used for analyzing the cloud message and obtaining analysis information corresponding to the cloud 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 identifiers is one;
The message forwarding module is used for displaying the message content on the current online application if the number of the target application identifiers is at least two, determining a target sharing application corresponding to the current online application and forwarding the message content to the target sharing application;
Wherein the parsing information further includes a message type; the message forwarding module is further 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 dedicated message; and if the number of the target application identifiers is at least two and the message type is a shared message, 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.
8. 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 according to any of claims 1 to 6 when executing the computer program.
9. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the application message processing method according to any one of claims 1 to 6.
CN202011377581.2A 2020-11-30 2020-11-30 Application message processing method, device, computer equipment and storage medium Active CN112395112B (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN112395112A CN112395112A (en) 2021-02-23
CN112395112B true CN112395112B (en) 2024-06-25

Family

ID=74604820

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN112395112B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8572262B2 (en) * 2011-03-17 2013-10-29 Blackberry Limited System and method for controlling connections to an application server
CN103391307B (en) * 2012-05-11 2018-03-20 阿里巴巴集团控股有限公司 Offline transparent transmission and display methods, the apparatus and system of off-line data
CN109962953A (en) * 2017-12-25 2019-07-02 深圳市优必选科技有限公司 client communication establishing method and device
KR102412226B1 (en) * 2018-03-28 2022-06-22 삼성에스디에스 주식회사 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

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN112395112A (en) 2021-02-23

Similar Documents

Publication Publication Date Title
US10812314B2 (en) Methods and apparatuses for pushing a message
US9697368B2 (en) Regulating communication of audio data from a client device based on a privacy setting stored by the client device
US20140006578A1 (en) Device, system, and method for client-governed session persistency between one or more clients and servers of a data center
US20180249515A1 (en) Method and device for establishing wireless connection
US11895611B2 (en) Sim card registration method and apparatus, computer device, and storage medium
CN108933994B (en) Short message distribution processing method and device, computer equipment and storage medium
US9929930B2 (en) Reducing an amount of captured network traffic data to analyze
US12041688B2 (en) Screen projection method and system
US20160277417A1 (en) Method and apparatus for communication number update
US11838381B2 (en) Device cross-area access method, electronic device, and non-transitory computer-readable storage medium
US20230247007A1 (en) Quic transport protocol-based communication method and system
CN113469736A (en) Resource distribution control method, device, system, electronic device and storage medium
CN113630418B (en) Network service identification method, device, equipment and medium
CN112395112B (en) Application message processing method, device, computer equipment and storage medium
CN107948022B (en) Identification method and identification device for peer-to-peer network traffic
CN113923008A (en) Malicious website interception method, device, equipment and storage medium
US11265807B2 (en) Method for network sharing on a terminal, apparatus, air conditioner and storage medium
CN114916023B (en) Method and device for neighboring cell configuration, storage medium and electronic equipment
CN113746851B (en) Proxy system and method supporting real-time analysis of GRPC request
CN115016995A (en) Interface testing method, computer device and computer storage medium
CN112653609B (en) VPN identification application method, device, terminal and storage medium
CN111049949B (en) Domain name identification method and device, electronic equipment and medium
CN114168876A (en) Page display method and device, computer equipment and computer readable storage medium
CN109327517B (en) Method and equipment for acquiring network state of wireless access point
CN112769960A (en) Active flow control method and system based on Nginx server

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