Method and device for terminal to establish communication connection
Through the user -defined push and network long connection strategy, combined with the terminal state automatically adjust the heartbeat mechanism, the problem of the mobile terminal is too much consumption of the power consumption under standby state, extended the standby time and improved the user experience.
Patent Information
- Application Number
- CN202411464768.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, mobile terminals need to frequently transmit data and receive push when not in use, resulting in excessive power consumption, reducing device standby time and requiring frequent charging, and unable to intelligently adjust the communication strategy between the terminal and the server to reduce power consumption. .
Based on their own preferences and schedules, the maintenance strategies of push and network long connections are graded, and the heartbeat maintenance mechanism is automatically adjusted in combination with the terminal status.
It extends the standby time of mobile terminals, reduces power consumption, improves user experience, and automatically adjusts the terminal status to adapt to different push strategies by detecting heart rate through smart watches, achieving the effect of saving power and extending standby time.
Smart Images

Figure CN119364556A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method and device for a terminal to establish a communication connection. Background Art
[0002] The use of establishing communication connections at the terminal is multifaceted, mainly including remote access, data transmission, and cloud computing services. By establishing a communication connection between the terminal device and the server, the user can remotely access and operate the resources and data on the server without having to operate it in person next to the server. The user can conveniently transfer files and data between the terminal device and the server, such as upload, download, backup, and synchronization operations. This provides users with great convenience and flexibility. At the same time, the terminal device accesses the cloud server to obtain large-scale, flexible and scalable computing and storage resources to meet the needs of applications and services. This method not only saves costs and management difficulties, but also improves the efficiency of resource utilization. However, at present, mobile terminal devices also need to frequently transmit data and receive push notifications when the user is not operating them, which consumes a lot of power and reduces the standby time of the device. Frequent charging is required.
[0003] After searching, the Chinese patent publication number CN108174460A discloses a method and device for establishing a communication connection, including: dividing a specified communication protocol into multiple protocol groups, so that each protocol group contains one or more communication sub-protocols of the specified communication protocol; when establishing a communication connection based on the specified communication protocol, selecting a target protocol group according to the attributes of the communication connection. The above patent lacks intelligent adjustment of the communication strategy between the terminal and the server in different situations, and cannot reduce the power consumption of the device when in standby mode. Summary of the invention
[0004] The purpose of the present invention is to solve the shortcomings in the prior art and to propose a method and device for a terminal to establish a communication connection.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A method for establishing a communication connection for a terminal, comprising the following steps:
[0007] S1: Users classify push notifications, network long connection maintenance strategies, and device status based on their preferences and schedules;
[0008] S2: Connect the terminal to the cellular mobile network;
[0009] S3: Establish a connection with the server;
[0010] S4: Maintain connection with the server;
[0011] S5: Match the network long connection mechanism with the push strategy.
[0012] Preferably: in the S1 step, the server pushes communication information into four levels. The first level is important information such as natural disasters and emergency calls, which is a forced push type. When the terminal device is connected to the server, it will be forced to push and notify the alarm through sound and light; the second level is important information set by the user, which can be pushed when the user is sleeping, resting and other do not disturb situations, so that the user can obtain important information in time; the third level is pushed only when the user is not in the do not disturb state. When the user device is in the do not disturb state, no communication will be performed, the information will be packaged, and uniformly pushed regularly; the fourth level is unimportant information, which will be packaged and pushed in any state of the terminal to reduce channel occupancy and power consumption. The operator can send customized push strategies to the server according to his own preferences and habits. The server will give priority to referring to the push strategy when pushing information, and the terminal will also selectively receive data push.
[0013] Furthermore: in the S1 step, the device status is divided into three levels. The user sets the time period as the first level status and only receives the first level information actively sent by the server. This automatically disconnects the terminal from the server, effectively reducing power consumption. At the same time, a smart watch-type terminal can be used to monitor the user's heartbeat. When the user's heart rate is in a sleeping state or the heart rate is too high and the user is in a exercising state, the device automatically enters the second level status. The do not disturb state only receives the first and second level information, and the third and fourth level information can be delayed and packaged for reception. In the third level status, the terminal adopts a normal general push strategy, which can effectively reduce the power consumption of the device and extend the use time of the device. Multiple mobile terminals equipped by the user are connected via Bluetooth.
[0014] Further: in the step S2, when communication needs to be established after the terminal is started, the terminal first selects a PLMN (Public Land Mobile Network) to ensure that the mobile terminal can connect to the correct network and obtain necessary network configuration.
[0015] As a preferred solution of the present invention: in the S3 step, after the mobile terminal is connected to the network, an HTTP request including GET, POS, server target YRL, header information and request body content is automatically sent to the server through the cellular mobile network. The HTTP request is transmitted to the target server through the TCP / IP protocol stack. During the communication process, the server device provides permanent service and permanent access address / domain name.
[0016] As a further solution of the present invention: after the server performs the processing operation in the S3 step, it constructs an HTTP response including a status code, a response header and a response body with the processing result. The status code indicates that the processing result of the request is sent to the client via the same network path. After receiving the response from the server, the mobile terminal parses the status code and content of the response; if the status code indicates success, the terminal will further process the data in the response body. When the status code indicates an error, the terminal prompts the user to take other operations. The mobile terminal will visualize the processing result according to the response and send it to the customer to facilitate the customer to perform subsequent operations.
[0017] As a further solution of the present invention: in the step S4, when the terminal and the server need to continuously connect and exchange data, session management technology will be used to maintain the communication status. When the terminal accesses the server for the first time, the server will create a unique session ID for the terminal and store it in the user's browser.
[0018] On the basis of the above scheme: in the S5 step, when the device is in the first-level state, it will actively disconnect from the server and will not send heartbeat information. When the device is in the second-level state, the heartbeat interval is 20 minutes. The GCM mechanism is adopted. After establishing a long connection, if there is no message for ten minutes, it will be actively disconnected and no heartbeat will be performed within the next twenty minutes. Only when package push is required in the future, the server will send GCM information to the terminal to notify re-push.
[0019] On the basis of the above scheme: in the third level state in step S5, the heartbeat information sending interval between the server and the terminal is 15 minutes, and the frequency is intelligently adjusted according to the frequency of information push.
[0020] A device for establishing a communication connection with a terminal comprises a combination of a smart watch for detecting heart rate and a mobile phone.
[0021] The beneficial effects of the present invention are:
[0022] 1. A method and device for establishing a communication connection between a terminal. By using a customized push four-level strategy actively selected by the customer and cooperating with the three-level terminal status, the heartbeat keep-alive mechanism of the terminal and the server can be intelligently changed to extend the standby time of the device and reduce the power consumption of the device. The current state of the terminal can be automatically changed by using an intelligent device that can detect the heart rate and apply different push strategies, which can intelligently save power and extend power consumption.
[0023] 2. A method and device for establishing a communication connection between a terminal and an operator, wherein the operator can send a customized push strategy to the server according to his or her own preferences and habits. When the server pushes information, the push strategy will be given priority, thereby reducing the impact of push interruptions on users and improving the user experience.
[0024] 3. A method and device for establishing a communication connection between a terminal, which has high performance and no delay in the middle layer through the connection between the server and the terminal, so it has a fast response speed and can process large amounts of data and complex business logic; the terminal provides a highly customized user interface and operating experience, and supports more complex graphical interfaces and operating functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flow chart of a method for a terminal to establish a communication connection proposed by the present invention. DETAILED DESCRIPTION
[0026] The technical solution of this patent is further described in detail below in conjunction with specific implementation methods.
[0027] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0028] Embodiment 1:
[0029] A method for establishing a communication connection for a terminal, such as Figure 1 As shown, the following steps are included:
[0030] S1: Users classify push and network long connection maintenance strategies according to their own preferences and work and rest time; the terminal in this application is preferably a mobile communication device that supports wireless network, which can be a portable mobile terminal such as a smart watch, a cellular phone, a mobile phone, a tablet computer, a handheld device, a laptop computer, etc., preferably a device combination of a smart watch that can detect heart rate and a mobile phone, in which the user can classify push and network long connection maintenance strategies and push information on the mobile terminal to adjust the communication connection frequency and different push strategies in different states to reduce the disturbance and power consumption to the user, thereby reducing the power consumption of the terminal and improving the user experience;
[0031] The server push communication information can be divided into four levels. The first level is important information such as natural disasters and emergency calls. It is a forced push type. When the terminal device is connected to the server, it will be forced to push and notify the alarm through sound and light; the second level is important information set by the user, which can be pushed when the user is sleeping or resting in the do not disturb state, so that the user can get important information in time; the third level is only pushed when the user is not in the do not disturb state. When the user device is in the do not disturb state, no communication will be made, and the information will be packaged and pushed uniformly regularly; the fourth level is unimportant information. It will be packaged and pushed in any state of the terminal to reduce channel occupancy and power consumption. The operator can send customized push strategies to the server according to his own preferences and habits. The server will give priority to referring to the push strategy when pushing information, and the terminal will also selectively receive data push;
[0032] The device status can also be divided into three levels. The user can set the time period as the first level state and only receive the first level information actively sent by the server. This can automatically disconnect the terminal from the server and effectively reduce power consumption. At the same time, the user's heartbeat can be monitored using a smart watch-type terminal. When the user's heart rate is in a sleeping state or the heart rate is too high and the user is in a sports state, the device automatically enters the second level state. The do not disturb state only receives the first and second level information, and the third and fourth level information can be delayed and packaged for acceptance. In the third level state, the terminal adopts a normal general push strategy, which can effectively reduce the power consumption of the device and extend the use time of the device. Multiple mobile terminals equipped by the user at the same time are connected via Bluetooth;
[0033] S2: Connect the terminal to the cellular mobile network. When communication needs to be established after the terminal is started, the terminal first selects the PLMN (Public Land Mobile Network) to ensure that the mobile terminal can connect to the correct network and obtain the necessary network configuration. When there is no prior information such as historical user settings, SIM card information, and network operator subscription to PLMN, the terminal will scan all frequencies. If the search fails at the specified frequency or the candidate frequency or the information does not exist, the terminal will perform a full-band scan to search for all cells within the frequency band supported by the UE capability.
[0034] During scanning, the scanning frequency band sent by RRC is divided into multiple small frequency bands of 100KGz for scanning, and sorted according to the possibility of the existence of cells. First, the fcch (frequency correction channel) of the frequency point is monitored to adjust the terminal to the frequency corresponding to the frequency point, and then the sch (synchronization channel) is listened to for time synchronization, and then the ncch (broadcast control channel) and the bisic (base station identification code) and ncc (network color code) in the bcch are listened to. Combined with these data, the frequency point with the strongest signal is selected and reported to the nas layer.
[0035] In order to enable the mobile terminal to transmit data through the network, it needs to access the network through GNB first. At this time, a cell search is required. The cell with the best signal needs to be selected from the PLMN signal selected above. The cell search covers the entire process of the terminal searching for a new campus. Whether it is the initial access stage or when the mobile terminal moves, a cell search will be performed to maintain stable communication. When performing a cell search, the SSB (Synchronization Signal / PBCH Block) function composed of PSS (Primary Synchronization Signal), SSS (Secondary Synchronization Signal) and PBCH (Physical Broadcast Channel) needs to be used;
[0036] First, the 0.5ms time slot pair is determined by the fixed position in the time-frequency resource of the PSS channel. At the same time, the FDD and TDD are distinguished by the different time domain positions of the PSS channel and the SSS channel in the RE matrix.
[0037] Next, the binary m sequence of the SSS channel is used to obtain the high bit of the physical cell PCI and the CP (Cyclic Prefix) length and obtain frame synchronization with the cell; PBCH is used to receive the system MIB message that is repeatedly broadcast by the base station side, so that the terminal can continuously and timely obtain the system SIB message (System Information Block). The terminal can read the SIB system information at the default time-frequency resource of the mib information carried by the PBCH, so that the L1 and L2 of the terminal can be configured through the read information to achieve cell selection and residence; after completing the cell search, the terminal and the cell achieve downlink synchronization and obtain the system information required to initiate random access. However, at this time, due to the transmission delay (Delay Spread) of the wireless channel, the precise time of the uplink is also uncertain, and random access is required to enable the terminal to obtain uplink time synchronization, and when the terminal establishes the initial wireless link (that is, the terminal switches from the RRC_IDLE state to the RRC_CONNECTED state), the user identity - the cell radio network temporary identity (CellRadio Network Temporary Identity) can be obtained through the random access process. Temporary Identifier (C-RNTI) information allows the network side to achieve uplink synchronization and access the cell, after which uplink and downlink data transmission can be normal;
[0038] After the random access is completed, the signaling access process and data access process including RRC connection process, context establishment process, PDU session process, NSA (non-independent networking) initial access are carried out to enable the terminal to access the network connection.
[0039] S3: Establish a connection with the server; after the mobile terminal is connected to the network, it automatically sends an HTTP request containing GET, POS, server target YRL, header information and request body content to the server through the cellular mobile network. The HTTP request is transmitted to the target server through the TCP / IP protocol stack. During the communication process, the server device provides permanent services and permanent access addresses / domain names; after receiving the request from the mobile terminal, the target server will parse the request content, analyze the request method, URL, header and request body, and after the analysis is completed, according to the type and content of the request, the server performs corresponding operations. For example, the server-side device can process database query requests by executing SQL statements to obtain results. The server device can also process the data uploaded by the mobile terminal and store it in a specified location. The server device undertakes tasks such as storing, retrieving, and updating data. The mobile terminal provides a user interface to allow users to perform operations such as querying, updating, and managing databases;
[0040] After the processing operation is performed on the server side, the processing result is constructed into an HTTP response including a status code, a response header and a response body. The status code indicates the processing result of the request. For example, a code starting with 2 means that the request has been successfully received, understood and accepted by the server, a code starting with 3 means that the client needs to take further actions to complete the request for redirection, and a code starting with 4 means that an error may occur in the mobile terminal, affecting the normal processing of the server. The constructed response is sent to the client through the same network path. After receiving the response from the server, the mobile terminal parses the status code and content of the response. If the status code indicates success, the terminal will further process the data in the response body. If the status code indicates an error, the terminal prompts the user to take other actions. The mobile terminal will visualize the processing result according to the response to the client, so that the client can perform subsequent operations.
[0041] S4: Maintain connection with the server; when the terminal and the server need to be continuously connected and exchange data, session management technology is used to maintain the communication status. When the terminal accesses the server for the first time, the server will create a unique session ID for the terminal and store it in the user's browser; after that, each time the user sends a request to the server, the session ID will be included in the request header, so that the server can identify which terminal's request it is and respond quickly and continuously. At the same time, persistent connections (keep-alive connections) can be used, and multiple HTTP requests and responses can be sent on a TCP connection instead of opening a new TCP connection for each request; this can reduce the overhead of establishing and closing connections and improve communication efficiency; in order to confirm whether the terminal and the server are online, the client and the server will periodically exchange small data packets to detect whether the other party is still online. Using this heartbeat mechanism can help both parties to promptly discover that the other party has been disconnected. If a communication interruption occurs, the interruption will automatically try to reconnect. During this process, both the terminal and the server will record error logs for subsequent analysis;
[0042] The connection between the server and the terminal is highly efficient and has no delay in the middle layer, so it has a fast response speed and can handle large amounts of data and complex business logic; the terminal can provide a highly customized user interface and operating experience, and support more complex graphical interfaces and operating functions; the security of data transmission is ensured through custom protocols and multi-layer authentication mechanisms, especially in a LAN environment; the terminal can work offline and then synchronize data to the server, which is suitable for environments without a network or unstable networks; it supports distributed and concurrent environments, which can effectively improve resource utilization and sharing;
[0043] S5: Match the network persistent connection mechanism with the push strategy, and change the persistent connection mechanism and heartbeat mechanism according to the terminal usage status. The heartbeat mechanism is a keep-alive mechanism based on the established persistent connection. The client sends a heartbeat message to the mobile terminal at regular intervals. After receiving the heartbeat message, the server replies with the same heartbeat message to the client. If the client and the terminal do not receive the heartbeat message within a certain period of time, it is considered that the communication is interrupted and needs to be reconnected.
[0044] When the device is in the first-level state, it will actively disconnect from the server and will not send heartbeat information. When the device is in the second-level state, the heartbeat interval is 20 minutes. The GCM mechanism is used. After establishing a long connection, if there is no message for ten minutes, it will be actively disconnected and no heartbeat will be performed within the next twenty minutes. Only when package push is required in the future, the server will send GCM information to the terminal to notify re-push. In the third-level state, the heartbeat information sending interval between the server and the terminal is 15 minutes, and the frequency is intelligently adjusted according to the frequency of information push, which can effectively reduce the power consumption of the device and extend the standby time of the device.
[0045] When this embodiment is in use, the customized push four-level strategy actively selected by the customer is used in conjunction with the three-level terminal status to intelligently change the heartbeat keep-alive mechanism of the terminal and the server, so as to extend the standby time of the device and reduce the power consumption of the device, reduce the charging frequency of the user and improve the user experience, and at the same time allow the user to reduce information push interference when resting, working, exercising, etc. and do not want to be disturbed, and can use a smart device that can detect heart rate to automatically change the current state of the terminal to apply different push strategies, which can intelligently save power and extend power consumption.
[0046] Embodiment 2:
[0047] A method for establishing a communication connection for a terminal, such as Figure 1 As shown, in order to verify a method for establishing a communication connection for a terminal, the standby time of a terminal using the communication connection method and a terminal of the same hardware device using a common communication connection method are compared ten times, and during the test, the terminal using the communication connection method uploads the experimenter's personal customized push strategy; after ten comparisons of power exhaustion, the average standby time of the terminal using the communication connection method exceeds that of the terminal of the same hardware device using the common communication connection method by 6%, indicating that the communication connection method can effectively extend the standby time.
[0048] The above is a preferred specific implementation manner of the present invention, and the protection scope of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by any technician familiar with the field within the technical scope disclosed by the present invention in combination with the prior art or public common sense, within the spirit and principle of the present invention, shall be covered by the protection scope of the present invention.
Claims
1. A method for establishing a communication connection by a terminal, characterized in that: The steps include: S1: Users classify push notifications, network long connection maintenance strategies, and device status based on their preferences and schedules; S2: Connect the terminal to the cellular mobile network; S3: Establish a connection with the server; S4: Maintain connection with the server; S5: Match the network long connection mechanism with the push strategy.
2. A method for establishing a communication connection for a terminal according to claim 1, characterized in that: In the step S1, the server pushes communication information in four levels. The first level is important information about natural disasters and emergency calls, which is a forced push type. When the terminal device is connected to the server, it will be forced to push and notify the alarm through sound and light; the second level is important information set by the user, which can be pushed when the user is sleeping or resting in a non-disturbance state, so that the user can obtain important information in time; Level 3 is for push notifications only when the user is not in the Do Not Disturb mode. When the user's device is in the Do Not Disturb mode, no communication will be performed, and the information will be packaged and pushed uniformly at a regular interval. Level 4 is for unimportant information to be packaged and pushed in any state of the terminal to reduce channel occupancy and power consumption. The operator can send customized push strategies to the server according to his or her own preferences and habits. The server will give priority to the push strategy when pushing information, and the terminal will also selectively receive data pushes.
3. A method for establishing a communication connection for a terminal according to claim 2, characterized in that: The device status in the S1 step can also be divided into three levels. The user sets the time period as the first level status and only receives the first level information actively sent by the server. This automatically disconnects the terminal from the server, effectively reducing power consumption. At the same time, a smart watch-type terminal can be used to monitor the user's heartbeat. When the user's heart rate is in a sleeping state or the heart rate is too high and the user is in a exercising state, the device automatically enters the second level status. The do not disturb state only receives the first and second level information, and the third and fourth level information can be delayed and packaged for acceptance. In the third level status, the terminal adopts a normal general push strategy, which can effectively reduce the power consumption of the device and extend the use time of the device. Multiple mobile terminals equipped by the user are connected via Bluetooth.
4. A method for establishing a communication connection for a terminal according to claim 1, characterized in that: In the step S2, when communication needs to be established after the terminal is started, the terminal first selects a PLMN (Public Land Mobile Network) to ensure that the mobile terminal can connect to the correct network and obtain necessary network configuration.
5. A method for establishing a communication connection for a terminal according to claim 1, characterized in that: In the S3 step, after the mobile terminal is connected to the network, an HTTP request including GET, POS, server target YRL, header information and request body content is automatically sent to the server through the cellular mobile network. The HTTP request is transmitted to the target server through the TCP / IP protocol stack. During the communication process, the server device provides permanent services and permanent access addresses / domain names.
6. A method for establishing a communication connection for a terminal according to claim 5, characterized in that: After the server performs the processing operation in step S3, the processing result is constructed into an HTTP response including a status code, a response header and a response body. The status code indicates that the processing result of the request is sent to the client through the same network path. After receiving the response from the server, the mobile terminal parses the status code and content of the response; If the status code indicates success, the terminal will further process the data in the response body. If the status code indicates an error, the terminal will prompt the user to take other actions. The mobile terminal will visualize the processing results based on the response and send them to the customer to facilitate subsequent operations.
7. A method for establishing a communication connection for a terminal according to claim 1, characterized in that: In the step S4, when the terminal and the server need to continuously connect and exchange data, session management technology is used to maintain the communication state. When the terminal accesses the server for the first time, the server creates a unique session ID for the terminal and stores it in the user's browser.
8. A method for establishing a communication connection for a terminal according to claim 7, characterized in that: In the S5 step, when the device is in the first-level state, it will actively disconnect from the server and will not send heartbeat information. When the device is in the second-level state, the heartbeat interval is 20 minutes. The GCM mechanism is adopted. After establishing a long connection, if there is no message for ten minutes, it will be actively disconnected and no heartbeat will be performed within the next twenty minutes. Only when package push is required later, the server will send GCM information to the terminal to notify re-push.
9. A method for establishing a communication connection for a terminal according to claim 8, characterized in that: In the third level state in step S5, the heartbeat information sending interval between the server and the terminal is 15 minutes, and the frequency is intelligently adjusted according to the frequency of information push.
10. The device for establishing a communication connection for a terminal according to claim 1, characterized in that: The device is connected using the method for establishing a communication connection between a terminal as described in any one of claims 1 to 9, and includes a combination of a smart watch for detecting heart rate and a mobile phone.
Citation Information
Patent Citations
Method and device for establishing communication connection
CN108174460A