CN110838968B - Communication connection control method, device, equipment and storage medium for social application - Google Patents

Communication connection control method, device, equipment and storage medium for social application Download PDF

Info

Publication number
CN110838968B
CN110838968B CN201911009727.5A CN201911009727A CN110838968B CN 110838968 B CN110838968 B CN 110838968B CN 201911009727 A CN201911009727 A CN 201911009727A CN 110838968 B CN110838968 B CN 110838968B
Authority
CN
China
Prior art keywords
social application
server
communication connection
time
time threshold
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
CN201911009727.5A
Other languages
Chinese (zh)
Other versions
CN110838968A (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.)
Xi'an Guanghetong Wireless Communication Co ltd
Original Assignee
Xi'an Guanghetong Wireless Communication 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 Xi'an Guanghetong Wireless Communication Co ltd filed Critical Xi'an Guanghetong Wireless Communication Co ltd
Priority to CN201911009727.5A priority Critical patent/CN110838968B/en
Publication of CN110838968A publication Critical patent/CN110838968A/en
Application granted granted Critical
Publication of CN110838968B publication Critical patent/CN110838968B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • H04L51/046Interoperability with other network applications or services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/52User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail for supporting social networking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Telephone Function (AREA)

Abstract

The application relates to a communication connection control method, a communication connection control device, equipment and a storage medium for social applications, wherein the method comprises the following steps: when a social application is operated, acquiring a process identifier of the social application; establishing a communication connection between the social application and a server based on the process identification; interrupting the communication connection between the social application and the server when the time the social application is in communication connection with the server reaches a first time threshold; when the time that the social application and the server are in communication interruption reaches a second time threshold, the communication connection between the social application and the server is reestablished. The scheme provided by the application can reduce the power consumption of the terminal.

Description

Communication connection control method, device, equipment and storage medium for social application
Technical Field
The present application relates to the field of computer technologies, and in particular, to a communication connection control method, apparatus, device, and storage medium for social applications.
Background
With the development of internet technology, users can communicate instantly anytime and anywhere through social applications installed on terminals. And in the process of sending and receiving the instant messaging message by the user, the social application and the server are in a communication connection state. In the conventional scheme, in order to update data, even if a user does not send and receive instant messaging messages, the social application and the server always keep a communication connection state.
However, the requirement of time effectiveness for updating data is not high, and the social application and the server are always kept in a communication connection state for updating data, so that the power consumption of the terminal is high.
Disclosure of Invention
In view of the above, it is necessary to provide a communication connection control method, apparatus, device and storage medium for social applications, aiming at the technical problem that the power consumption of the terminal is high.
A communication connection control method of a social application, comprising:
when a social application is operated, acquiring a process identifier of the social application;
establishing a communication connection between the social application and a server based on the process identification;
interrupting the communication connection between the social application and the server when the time the social application is in communication connection with the server reaches a first time threshold;
when the time that the social application and the server are in communication interruption reaches a second time threshold, the communication connection between the social application and the server is reestablished.
In one embodiment, the method further comprises:
when the time of the communication connection between the social application and the server reaches a first time threshold value, if the fact that information interaction exists between the social application and the server is detected, determining the extension time of the communication connection;
and prolonging the time of the communication connection between the social application and the server according to the prolonged time.
In one embodiment, the method further comprises:
and when the communication between the social application and the server is interrupted, if message sending operation is detected, reestablishing the communication connection between the social application and the server.
In one embodiment, the method further comprises:
and when the communication between the social application and the server is interrupted, if a refreshing operation is detected, reestablishing the communication connection between the social application and the server.
In one embodiment, the method further comprises:
acquiring interactive data of the social application interacting with the server in a historical operation process;
determining the distribution state of the interactive data on a time axis;
and adjusting the sizes of the first time threshold and the second time threshold according to the distribution state.
In one embodiment, the method further comprises:
acquiring behavior information of a user using the social application;
and adjusting the sizes of the first time threshold and the second time threshold according to the behavior information.
A communication connection control apparatus of a social application, the apparatus comprising:
the process identification acquisition module is used for acquiring the process identification of the social application when the social application is operated;
the communication connection establishing module is used for establishing communication connection between the social application and the server based on the process identification;
a communication connection interruption module, configured to interrupt a communication connection between the social application and the server when a time that the social application is in communication connection with the server reaches a first time threshold;
the communication connection establishing module is further used for reestablishing the communication connection between the social application and the server when the time that the communication between the social application and the server is interrupted reaches a second time threshold.
In one embodiment, the apparatus further comprises: an extended time determination module; wherein:
the extended time determining module is used for determining the extended time of communication connection if the social application and the server are detected to have information interaction when the time of communication connection between the social application and the server reaches a first time threshold;
the communication connection establishing module is further configured to prolong the time that the social application and the server are in communication connection according to the extension time.
In one embodiment, the communication connection establishing module is further configured to:
and when the communication between the social application and the server is interrupted, if a message sending operation is detected, reestablishing the communication connection between the social application and the server.
In one embodiment, the communication connection establishing module is further configured to:
and when the communication between the social application and the server is interrupted, if a refreshing operation is detected, reestablishing the communication connection between the social application and the server.
In one embodiment, the device further comprises an interactive data acquisition module, a distribution state determination module and a time threshold adjustment module; wherein:
the interactive data acquisition module is used for acquiring interactive data of the social application interacting with the server in the historical operation process;
the distribution state determining module is used for determining the distribution state of the interactive data on a time axis;
and the time threshold adjusting module is used for adjusting the sizes of the first time threshold and the second time threshold according to the distribution state.
In one embodiment, the apparatus further comprises a behavior information acquisition module; wherein:
the behavior information acquisition module is used for acquiring the behavior information of the user using the social application;
the time threshold adjusting module is further configured to adjust the first time threshold and the second time threshold according to the behavior information.
A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method as claimed in any one of the above.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any one of the above.
According to the communication connection control method, the communication connection control device, the communication connection control equipment and the communication connection control storage medium of the social application, when the social application is operated, the process identification of the social application is obtained; establishing a communication connection between the social application and the server based on the process identification; when the time that the social application is in communication connection with the server reaches a first time threshold, interrupting the communication connection between the social application and the server; and when the time that the social application and the server are in communication interruption reaches a second time threshold, reestablishing the communication connection between the social application and the server. Therefore, the instant messaging message can be sent and received and data can be updated when the social application is in communication connection with the server, and the sleep is performed when the social application is in communication interruption with the server, so that the power consumption of the terminal is reduced.
Drawings
FIG. 1 is a diagram of an application environment for a communication connection control method for a social application in one embodiment;
FIG. 2 is a flow diagram that illustrates a method for controlling communication connections for a social application, according to one embodiment;
FIG. 3 is a flowchart illustrating the step of determining a time threshold in one embodiment;
FIG. 4 is a schematic flow chart of the step of determining a time threshold in another embodiment;
FIG. 5 is a flowchart of a communication connection control method of a social application in one embodiment;
FIG. 6 is a block diagram of a communication connection control apparatus of a social application in one embodiment;
FIG. 7 is a block diagram showing a communication connection control apparatus of a social application in another embodiment;
FIG. 8 is a block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad application.
Fig. 1 is an application environment diagram of a communication connection control method of a social application in one embodiment. Referring to fig. 1, the communication connection control method of the social application is applied to a communication connection control system of the social application. The communication connection control system of the social application includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network. When the terminal 110 runs the social application, acquiring a process identifier of the social application; establishing a communication connection between the social application and the server 120 based on the process identification; interrupting the communication connection between the social application and the server 120 when the time the social application is in communication connection with the server 120 reaches a first time threshold; when the time that the social application and the server 120 are in communication interruption reaches a second time threshold, the communication connection between the social application and the server 120 is re-established.
The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
As shown in FIG. 2, in one embodiment, a communication connection control method for a social application is provided. The embodiment is mainly illustrated by applying the method to the terminal 110 in fig. 1. Referring to fig. 2, the method for controlling communication connection of social applications specifically includes the following steps:
s202, when the social application is operated, the process identification of the social application is obtained.
The social application may be an application program capable of performing network social interaction, such as an instant messaging application. The process identifier is a basic attribute of the process, and one process identifier uniquely corresponds to one process, that is, one process identifier uniquely corresponds to one application program. After the terminal acquires the application program file of the social application, the application program file is loaded into the memory and operated, and at least one process corresponding to the social application is generated.
S204, establishing communication connection between the social application and the server based on the process identification.
The communication connection may be a TCP (Transmission Control Protocol) connection, which is a connection-oriented, reliable transport layer communication Protocol based on a byte stream.
In one embodiment, when the terminal runs the social application, the process identification is obtained by calling an interface function, and then the communication connection between the social application and the server is established based on the process identification. The called interface function may be getpid, which is a function for retrieving the process identifier.
In one embodiment, after the terminal acquires the process identifier of the social application, the terminal acquires a port number of the terminal called by the social application according to the process identifier, and then establishes communication connection between the social application and the server based on the port number of the terminal. And in the state that the social application is in communication connection with the server, the terminal and the server can perform signaling interaction through the established communication connection channel, wherein the signaling comprises data information and control information.
In one embodiment, after the terminal acquires the process identifier of the social application, the social application performs a handshake with the server based on the process identifier, so that a TCP connection is established between the sockets of the social application and the server, and the social application and the server can simultaneously transmit and receive data through the TCP connection.
S206, when the time that the social application is in communication connection with the server reaches a first time threshold, the communication connection between the social application and the server is interrupted.
The first time threshold may be set according to a frequency of sending and receiving messages when the user uses the social application historically, or may be set by the user in a user-defined manner through the terminal. In addition, the 24 hours of the day may be divided into several time periods, each time period corresponding to a first time threshold.
In one embodiment, the terminal starts timing when the social application establishes a communication connection with the server, and interrupts the communication connection between the social application and the server when the time that the social application is in the communication connection with the server reaches a first time threshold.
And S208, when the time that the social application and the server are in communication interruption reaches a second time threshold, reestablishing the communication connection between the social application and the server.
The second time threshold may be set according to a frequency of receiving and sending messages when the user uses the social application historically, or may be set by the user according to customization through the terminal. In addition, the 24 hours of the day may be divided into several time periods, each time period corresponding to a second time threshold.
In one embodiment, the terminal starts timing from the time of the communication connection between the social application and the server, and when the time that the social application and the server are in communication interruption reaches a second time threshold, the communication connection between the social application and the server is reestablished. The re-established communication connection may be a terminal port and a server port based on a previous communication connection, or may be a new terminal port and a server port.
In the embodiment, when the terminal runs the social application, the process identifier of the social application is obtained; establishing a communication connection between the social application and the server based on the process identification; when the time that the social application is in communication connection with the server reaches a first time threshold, interrupting the communication connection between the social application and the server; and when the time that the social application and the server are in communication interruption reaches a second time threshold, reestablishing the communication connection between the social application and the server. Therefore, the instant messaging message can be sent and received and data can be updated when the social application is in communication connection with the server, and the sleep is performed when the social application is in communication interruption with the server, so that the power consumption of the terminal is reduced.
In one embodiment, when the time that the social application is in communication connection with the server reaches a first time threshold, the terminal detects that information interaction still exists between the social application and the social server, determines the extension time of the communication connection, and extends the time that the social application is in communication connection with the server according to the determined extension time.
In one embodiment, when the time that the social application is in communication connection with the server reaches a first time threshold, the terminal detects that information interaction still exists between the social application and the server, determines the type of the information interaction, then obtains the corresponding extension time of the communication connection according to the type of the information interaction, and extends the time that the social application is in communication connection with the server according to the determined extension time.
For example, information interaction between the social application and the server includes that the social application sends messages to other terminals through the server, or receives messages from other terminals through the server, and acquires dynamic information of social friends from the server. The social application sends messages to other terminals through the server, or receives information interaction types of messages from other terminals through the server, and the information interaction types can be defined as message receiving and sending types; the obtaining of the dynamic information of the social friend from the server may be defined as an information obtaining type. The extension time of the communication connection corresponding to the message sending and receiving type is longer than that of the communication connection of the information acquisition type. When the time of the communication connection between the social application and the server reaches a first time threshold value, the terminal detects that information interaction still exists between the social application and the server, the information interaction type is determined, and then the corresponding communication connection extension time is obtained according to the information interaction type.
In one embodiment, the terminal prolongs the time that the social application is in communication connection with the server according to the extension time, and when the time that the social application is in communication connection with the server reaches the extension time, the terminal detects that information interaction still exists between the social application and the server, and then the time that the social application is in communication connection with the server is prolonged again according to the determined extension time.
In the above embodiment, when the time of the social application in communication connection with the server reaches a first time threshold, if it is detected that there is information interaction between the social application and the server, determining the extended time of the communication connection; and prolonging the time for which the social application is in communication connection with the server according to the extension time. Therefore, the timeliness of timely information interaction between the social application and the server is guaranteed while the power consumption of the terminal is reduced.
In one embodiment, when the social application and the server are in communication interruption, the terminal detects a message sending operation, and then the communication connection between the social application and the server is reestablished. The message sending operation can be generated by triggering a sending button in a conversation window of the social application or triggering a publishing button in a message publishing platform of the social application. The re-established communication connection may be a terminal port and a server port based on a previous communication connection or a new terminal port and a server port.
In one embodiment, when the social application and the server are in communication interruption, the terminal detects the refresh operation, and then the communication connection between the social application and the server is reestablished. The refresh operation may be generated by sliding a dialog window in the social application up and down, or may be generated by sliding an information center page in the social application up and down. The information center page is a page showing a message issued by a social application user in the social application, such as a friend circle, friend trends and the like.
In the embodiment, when the communication between the social application and the server is interrupted, if the terminal detects a message sending operation or a refreshing operation, the communication connection between the social application and the server is reestablished, so that the power consumption of the terminal is reduced, the user requirements can be timely responded, and the timeliness of information interaction between the social application and the server is ensured.
In one embodiment, as shown in fig. 3, the method for controlling communication connection of social applications further includes the following steps:
s302, interactive data of the social application interacting with the server in the historical operation process are obtained.
The interactive data is data generated when the terminal interacts with the server through the social application, and specifically includes data sent by the social application through the server and data acquired by the social application from the server. The interactive data specifically records a data transmitting and receiving end and transmitting and receiving time.
In one embodiment, the terminal acquires interaction data of the last period of interaction between the social application and the server in the historical operation process. Where a cycle refers to a period of time, such as a day, a week, or a month.
S304, determining the distribution state of the interactive data on the time axis.
S306, adjusting the size of the first time threshold and the second time threshold according to the distribution state.
Where the duration of the timeline is a period of time, such as one hour or two hours. The duration of the time axis may be determined according to the amount and frequency of interactive data.
In one embodiment, after acquiring interactive data interacted with the server in the historical operation process of the social application, the terminal determines the distribution state of the interactive data on a time axis and adjusts the size of the first time threshold and the second time threshold.
For example, the terminal acquires interactive data interacted with the server in the historical operation process of the social application in the last week, then determines the distribution state of the interactive data on a time axis, determines the message receiving and sending frequency of the social application and the information actively acquiring frequency from the server by analyzing the distribution state, and then adjusts the first time threshold and the second time threshold according to the message receiving and sending frequency of the social application and the information actively acquiring frequency from the server.
In the embodiment, the terminal interacts with the server in the historical operation process by acquiring the interaction data of the social application; determining the distribution state of the interactive data on a time axis; according to the distribution state, adjusting the sizes of the first time threshold and the second time threshold, namely optimizing the time of communication connection and the time of communication interruption between the social application and the server, so that when the social application is in communication connection with the server, the terminal detects that information interaction exists between the social application and the server, the extension time of the communication connection needs to be determined, and the number of times of the time of the communication connection between the social application and the server is prolonged according to the extension time; and reducing the times that the terminal detects message sending operation or refreshing operation and reestablishes the communication connection between the social application and the server when the communication between the social application and the server is interrupted. The power consumption of the terminal is more effectively reduced.
In one embodiment, as shown in fig. 4, the method for controlling communication connection of social applications further includes the following steps:
s402, acquiring behavior information of the user using the social application.
The behavior information of the user using the social application refers to data of the social application running generated by the user behavior, such as the number of times of running the social application every day, the time of running each time, the frequency of sending and receiving data information in running each time, and the like.
S404, adjusting the size of the first time threshold and the second time threshold according to the behavior information.
In one embodiment, the terminal acquires behavior information of a user using social applications in a latest period, analyzes the acquired behavior information, determines that the frequency of data information transceiving is different when the user uses the social applications in different time periods in one day, divides the one day into a plurality of time periods according to the frequency of data information transceiving of the social applications in different time periods, and respectively adjusts the sizes of a corresponding first time threshold and a corresponding second time threshold in each time period.
In one embodiment, the terminal obtains behavior information of the user using the social application in at least one week last, analyzes the obtained behavior information, determines that the frequency of using the social application on the user working day and the frequency of using the social application on the user non-working day are different, and respectively adjusts the sizes of a first time threshold and a second time threshold corresponding to the working day and the non-working day according to the behavior information of the social application on the user working day and the weekend.
In the above embodiment, the terminal adjusts the first time threshold and the second time threshold according to the behavior information by acquiring the behavior information of the user using the social application. The method comprises the steps that the time of communication connection between the social application and a server and the time of communication interruption are optimized, so that when the social application and the server are in communication connection, a terminal detects that information interaction exists between the social application and the server, the communication connection extension time needs to be determined, and the number of times of the communication connection time between the social application and the server is prolonged according to the extension time; and reducing the times that the terminal detects message sending operation or refreshing operation and reestablishes the communication connection between the social application and the server when the communication between the social application and the server is interrupted. The power consumption of the terminal is more effectively reduced.
As shown in FIG. 5, in one embodiment, a communication connection control method for a social application is provided. The embodiment is mainly illustrated by applying the method to the terminal 110 in fig. 1. Referring to fig. 5, the communication connection control method of the social application specifically includes the following steps:
s502, interactive data of the social application interacting with the server in the historical operation process are obtained.
S504, determining the distribution state of the interactive data on the time axis.
S506, adjusting the size of the first time threshold and the second time threshold according to the distribution state.
S508, when the social application is operated, the process identification of the social application is obtained.
S510, communication connection between the social application and the server is established based on the process identification.
S512, when the time of the communication connection between the social application and the server reaches a first time threshold, the communication connection between the social application and the server is interrupted.
S514, when the time of the communication connection between the social contact application and the server reaches a first time threshold value, if the information interaction between the social contact application and the server is detected, the extension time of the communication connection is determined.
And S516, prolonging the time of the social application and the server in communication connection according to the extension time.
S518, when the time that the communication between the social application and the server is interrupted reaches a second time threshold, the communication connection between the social application and the server is reestablished.
S520, when the communication between the social application and the server is interrupted, if the message sending operation is detected, the communication connection between the social application and the server is reestablished.
S522, when the communication between the social application and the server is interrupted, if the refreshing operation is detected, the communication connection between the social application and the server is reestablished.
Fig. 2-5 are flow diagrams illustrating a communication connection control method for a social application in one embodiment. It should be understood that although the various steps in the flow diagrams of fig. 2-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-5 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 6, there is provided a communication connection control apparatus of a social application, the apparatus including: a process identifier obtaining module 602, a communication connection establishing module 604 and a communication connection interrupting module 606; wherein:
a process identifier obtaining module 602, configured to obtain, when the social application is running, a process identifier of the social application;
a communication connection establishing module 604, configured to establish a communication connection between the social application and the server based on the process identifier;
a communication connection interruption module 606, configured to interrupt a communication connection between the social application and the server when a time that the social application and the server are in communication connection reaches a first time threshold;
the communication connection establishing module 604 is further configured to reestablish the communication connection between the social application and the server when the time that the social application and the server are in communication interruption reaches a second time threshold.
In the above embodiment, when the terminal runs the social application, the process identifier of the social application is obtained; establishing a communication connection between the social application and the server based on the process identification; when the time that the social application is in communication connection with the server reaches a first time threshold, interrupting the communication connection between the social application and the server; and when the time that the social application and the server are in communication interruption reaches a second time threshold, reestablishing the communication connection between the social application and the server. Therefore, the instant messaging message can be sent and received and data can be updated when the social application is in communication connection with the server, and the sleep is performed when the social application is in communication interruption with the server, so that the power consumption of the terminal is reduced.
In one embodiment, as shown in fig. 7, the apparatus further comprises: an extension time determination module 608; wherein:
an extended time determining module 608, configured to determine, when a time that the social application is in communication connection with the server reaches a first time threshold, an extended time of the communication connection if it is detected that there is information interaction between the social application and the server;
the communication connection establishing module 604 is further configured to prolong the time that the social application is in communication connection with the server according to the extension time.
In the above embodiment, when the time of the social application in communication connection with the server reaches a first time threshold, if it is detected that there is information interaction between the social application and the server, determining the extended time of the communication connection; and prolonging the time for which the social application is in communication connection with the server according to the extension time. Therefore, the timeliness of timely information interaction between the social application and the server is guaranteed while the power consumption of the terminal is reduced.
In one embodiment, the communication connection establishing module 604 is further configured to:
and when the communication between the social application and the server is interrupted, if the message sending operation is detected, reestablishing the communication connection between the social application and the server.
In one embodiment, the communication connection establishing module 604 is further configured to:
and when the communication between the social application and the server is interrupted, if the refreshing operation is detected, reestablishing the communication connection between the social application and the server.
In the embodiment, when the communication between the social application and the server is interrupted, if the terminal detects a message sending operation or a refreshing operation, the communication connection between the social application and the server is reestablished, so that the power consumption of the terminal is reduced, the user requirement can be timely responded, and the timeliness of information interaction between the social application and the server is ensured.
In one embodiment, the apparatus further comprises an interaction data acquisition module 610, a distribution status determination module 612, and a time threshold adjustment module 614; wherein:
the interactive data acquisition module 610 is configured to acquire interactive data of the social application interacting with the server in a historical operation process;
a distribution status determining module 612, configured to determine a distribution status of the interactive data on a time axis;
the time threshold adjusting module 614 is configured to adjust the first time threshold and the second time threshold according to the distribution status.
In the embodiment, the terminal interacts with the server in the historical operation process by acquiring the interaction data of the social application; determining the distribution state of the interactive data on a time axis; according to the distribution state, adjusting the sizes of the first time threshold and the second time threshold, namely optimizing the time of communication connection and the time of communication interruption between the social application and the server, so that when the social application is in communication connection with the server, the terminal detects that information interaction exists between the social application and the server, the extension time of the communication connection needs to be determined, and the number of times of the time of the communication connection between the social application and the server is prolonged according to the extension time; and reducing the times that the terminal detects message sending operation or refreshing operation and reestablishes the communication connection between the social application and the server when the communication between the social application and the server is interrupted. The power consumption of the terminal is more effectively reduced.
In one embodiment, the apparatus further comprises a behavior information acquisition module 616; wherein:
a behavior information obtaining module 616, configured to obtain behavior information of a user using a social application;
the time threshold adjusting module 614 is further configured to adjust the size of the first time threshold and the second time threshold according to the behavior information. In the above embodiment, the terminal adjusts the first time threshold and the second time threshold according to the behavior information by acquiring the behavior information of the user using the social application. The method comprises the steps that the time of communication connection between the social application and a server and the time of communication interruption are optimized, so that when the social application and the server are in communication connection, a terminal detects that information interaction exists between the social application and the server, the communication connection extension time needs to be determined, and the number of times of the communication connection time between the social application and the server is prolonged according to the extension time; and reducing the times that the terminal detects message sending operation or refreshing operation and reestablishes the communication connection between the social application and the server when the communication between the social application and the server is interrupted. The power consumption of the terminal is more effectively reduced.
FIG. 8 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the terminal 110 in fig. 1. As shown in fig. 8, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. The memory comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement a communication connection control method for a social application. The internal memory may also have a computer program stored therein, which when executed by the processor, causes the processor to execute a communication connection control method for a social application. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the communication connection control apparatus of the social application provided in the present application may be implemented in a form of a computer program, and the computer program may be run on a computer device as shown in fig. 8. The memory of the computer device may store various program modules constituting the communication connection control means of the social application, such as a process identification obtaining module 602, a communication connection establishing module 604, and a communication connection interrupting module 606 shown in fig. 6. The computer program constituted by the respective program modules causes the processor to execute the steps in the communication connection control method of the social application of the respective embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 8 may execute S202 by the process identification acquisition module 602 module in the communication connection control apparatus of the social application shown in fig. 6. The computer device may perform step S204 through the communication connection establishing module 604. The computer device may perform S206 through the communication connection interruption module 606. The computer device may also perform step S208 through the communication connection establishing module 604.
In one embodiment, there is provided a computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of: when the social application is operated, acquiring a process identifier of the social application; establishing a communication connection between the social application and the server based on the process identification; when the time that the social application is in communication connection with the server reaches a first time threshold, interrupting the communication connection between the social application and the server; and when the time that the social application and the server are in communication interruption reaches a second time threshold, reestablishing the communication connection between the social application and the server.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: when the time of the communication connection between the social application and the server reaches a first time threshold, if the information interaction between the social application and the server is detected, determining the extension time of the communication connection; and prolonging the time for which the social application is in communication connection with the server according to the extension time.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: and when the communication between the social application and the server is interrupted, if the message sending operation is detected, reestablishing the communication connection between the social application and the server.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: and when the communication between the social application and the server is interrupted, if the refreshing operation is detected, reestablishing the communication connection between the social application and the server.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: acquiring interactive data of the social application interacting with the server in the historical operation process; determining the distribution state of the interactive data on a time axis; and adjusting the size of the first time threshold and the second time threshold according to the distribution state.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: acquiring behavior information of a user using a social application; and adjusting the sizes of the first time threshold and the second time threshold according to the behavior information.
In one embodiment, a computer readable storage medium is provided, storing a computer program that, when executed by a processor, causes the processor to perform the steps of:
when the social application is operated, acquiring a process identifier of the social application; establishing a communication connection between the social application and the server based on the process identification; when the time that the social application is in communication connection with the server reaches a first time threshold, interrupting the communication connection between the social application and the server; and when the time that the social application and the server are in communication interruption reaches a second time threshold, reestablishing the communication connection between the social application and the server.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: when the time of the communication connection between the social application and the server reaches a first time threshold, if the information interaction between the social application and the server is detected, determining the extension time of the communication connection; and prolonging the time for which the social application is in communication connection with the server according to the extension time.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: and when the communication between the social application and the server is interrupted, if the message sending operation is detected, reestablishing the communication connection between the social application and the server.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: and when the communication between the social application and the server is interrupted, if the refreshing operation is detected, reestablishing the communication connection between the social application and the server.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: acquiring interactive data of the social application interacting with the server in the historical operation process; determining the distribution state of the interactive data on a time axis; and adjusting the size of the first time threshold and the second time threshold according to the distribution state.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: acquiring behavior information of a user using a social application; and adjusting the sizes of the first time threshold and the second time threshold according to the behavior information.
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 a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. 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 (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (10)

1. A communication connection control method of a social application, comprising:
when a social application is operated, acquiring a process identifier of the social application;
establishing a communication connection between the social application and a server based on the process identification;
when the time that the social application is in communication connection with the server reaches a first time threshold corresponding to the current time period, interrupting the communication connection between the social application and the server; if the fact that information interaction exists between the social application and the server is detected, determining an information interaction type of the information interaction; obtaining the extension time of communication connection corresponding to the information interaction type; prolonging the time that the social application is in communication connection with the server according to the extension time; the first time threshold is set according to the frequency of message sending and receiving when the user uses the social application historically, and the first time thresholds correspond to different time periods respectively; the information interaction type is a message sending and receiving type or an information acquisition type, and the extension time of the communication connection corresponding to the message sending and receiving type is longer than the extension time of the communication connection of the information acquisition type;
when the time that the communication between the social application and the server is interrupted reaches a second time threshold corresponding to the current time period, reestablishing the communication connection between the social application and the server; the second time threshold is set according to the frequency of message sending and receiving when the user uses the social application historically, and the different time periods correspond to the corresponding second time thresholds respectively.
2. The method of claim 1, wherein the messaging types include a type in which a social application sends messages to other terminals through the server and a type in which messages from other terminals are received through the server.
3. The method of claim 1, further comprising:
and when the communication between the social application and the server is interrupted, if message sending operation is detected, reestablishing the communication connection between the social application and the server.
4. The method of claim 1, further comprising:
and when the communication between the social application and the server is interrupted, if a refresh operation is detected, reestablishing the communication connection between the social application and the server.
5. The method according to any one of claims 1 to 4, further comprising:
acquiring interactive data of the social application interacting with the server in the historical operation process;
determining the distribution state of the interactive data on a time axis;
and adjusting the sizes of the first time threshold and the second time threshold according to the distribution state.
6. The method according to any one of claims 1 to 4, further comprising:
acquiring behavior information of a user using the social application;
and adjusting the sizes of the first time threshold and the second time threshold according to the behavior information.
7. A communication connection control apparatus for a social application, the apparatus comprising:
the process identification acquisition module is used for acquiring the process identification of the social application when the social application is operated;
the communication connection establishing module is used for establishing communication connection between the social application and the server based on the process identification;
the communication connection interruption module is used for interrupting the communication connection between the social application and the server when the time of the communication connection between the social application and the server reaches a first time threshold corresponding to the current time period; the first time threshold is set according to the frequency of message sending and receiving when the user uses the social application historically, and the first time thresholds correspond to different time periods respectively;
the extended time determining module is used for determining the information interaction type of the information interaction if the social application and the server are detected to have the information interaction; obtaining the extension time of communication connection corresponding to the information interaction type; the information interaction type is a message sending and receiving type or an information acquisition type, and the extension time of the communication connection corresponding to the message sending and receiving type is longer than the extension time of the communication connection of the information acquisition type;
the communication connection establishing module is further used for prolonging the time of the social application in communication connection with the server according to the prolonged time; when the time of communication interruption between the social application and the server reaches a second time threshold corresponding to the current time period, reestablishing the communication connection between the social application and the server; the second time threshold is set according to the frequency of message sending and receiving when the user uses the social application historically, and the different time periods correspond to the corresponding second time thresholds respectively.
8. The apparatus of claim 7, wherein the messaging types comprise a type in which a social application sends messages to other terminals through the server and a type in which messages from other terminals are received through the server.
9. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 6.
10. A computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 6.
CN201911009727.5A 2019-10-23 2019-10-23 Communication connection control method, device, equipment and storage medium for social application Active CN110838968B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911009727.5A CN110838968B (en) 2019-10-23 2019-10-23 Communication connection control method, device, equipment and storage medium for social application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911009727.5A CN110838968B (en) 2019-10-23 2019-10-23 Communication connection control method, device, equipment and storage medium for social application

Publications (2)

Publication Number Publication Date
CN110838968A CN110838968A (en) 2020-02-25
CN110838968B true CN110838968B (en) 2022-10-11

Family

ID=69575759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911009727.5A Active CN110838968B (en) 2019-10-23 2019-10-23 Communication connection control method, device, equipment and storage medium for social application

Country Status (1)

Country Link
CN (1) CN110838968B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103327491A (en) * 2012-03-21 2013-09-25 宇龙计算机通信科技(深圳)有限公司 Method for controlling communication connecting process of instant communication tool and communication terminal
CN106791170A (en) * 2017-01-13 2017-05-31 广东欧珀移动通信有限公司 network processing method, device and terminal
CN107132905A (en) * 2017-03-28 2017-09-05 深圳市金立通信设备有限公司 Terminal communication control method and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105676991A (en) * 2015-12-28 2016-06-15 小米科技有限责任公司 Method and apparatus for managing application program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103327491A (en) * 2012-03-21 2013-09-25 宇龙计算机通信科技(深圳)有限公司 Method for controlling communication connecting process of instant communication tool and communication terminal
CN106791170A (en) * 2017-01-13 2017-05-31 广东欧珀移动通信有限公司 network processing method, device and terminal
CN107132905A (en) * 2017-03-28 2017-09-05 深圳市金立通信设备有限公司 Terminal communication control method and terminal

Also Published As

Publication number Publication date
CN110838968A (en) 2020-02-25

Similar Documents

Publication Publication Date Title
CN108449405B (en) Event reminding method and device, computer equipment and storage medium
CN108933993B (en) Short message cache queue selection method and device, computer equipment and storage medium
US10212213B1 (en) Techniques for managing a remote web client from an application on a mobile device
US10491535B2 (en) Adaptive data synchronization
EP3417598B1 (en) Method, apparatus and computer program for communicating state change information
CN111107051A (en) Message transmission method and device, computer equipment and storage medium
CN112422497B (en) Message transmission method and device and computer equipment
CN114205762A (en) Short message flow control method, equipment and storage medium
CN111669468B (en) Network state display method and device in call process, computer equipment and medium
CN113381898B (en) Display module interference removing method and device, computer equipment and storage medium
JP2019503119A (en) Using network-supported protocols to improve network utilization
CN110838968B (en) Communication connection control method, device, equipment and storage medium for social application
CN110392417B (en) Power consumption management method, terminal, computer device, and storage medium
CN112838980B (en) Message processing method, system, device, electronic equipment and storage medium
CN115297105B (en) File transmission method, device, computer equipment and storage medium
CN110784414A (en) Data interaction method and device and electronic equipment
CN108737460B (en) Connection processing method and client
CN114138895A (en) Data synchronization method and device for multiple data sources, computer equipment and storage medium
CN108965426B (en) Data processing method and device for audio system, computer equipment and storage medium
CN110913008B (en) Data transmission method and device
CN113765819A (en) Resource access method, device, electronic equipment and storage medium
CN113691587A (en) Virtual resource processing method and device, electronic equipment and storage medium
CN111988403A (en) Request processing method and system of electronic equipment, storage medium and electronic equipment
CN113840313A (en) Network mode control method and device of mobile terminal and computer equipment
JP6640065B2 (en) Communication device, communication control device, communication method, communication control method, and program

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