CN109379449B - Data connection method, device, terminal and storage medium - Google Patents

Data connection method, device, terminal and storage medium Download PDF

Info

Publication number
CN109379449B
CN109379449B CN201811648518.0A CN201811648518A CN109379449B CN 109379449 B CN109379449 B CN 109379449B CN 201811648518 A CN201811648518 A CN 201811648518A CN 109379449 B CN109379449 B CN 109379449B
Authority
CN
China
Prior art keywords
terminal
data connection
target server
historical data
configuration file
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
CN201811648518.0A
Other languages
Chinese (zh)
Other versions
CN109379449A (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.)
Longsung Technology Shanghai Co ltd
Original Assignee
Longsung Technology Shanghai 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 Longsung Technology Shanghai Co ltd filed Critical Longsung Technology Shanghai Co ltd
Priority to CN201811648518.0A priority Critical patent/CN109379449B/en
Publication of CN109379449A publication Critical patent/CN109379449A/en
Application granted granted Critical
Publication of CN109379449B publication Critical patent/CN109379449B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • 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
    • 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

Abstract

The invention discloses a data connection method, a data connection device, a terminal and a storage medium. The method comprises the following steps: the method comprises the steps of obtaining a current working mode of a terminal, if the working mode is a non-power-saving mode, determining whether historical data connection exists between the terminal and a target server according to a configuration file of the terminal, and if the terminal is connected with the target server by the historical data, recovering the historical data connection according to the configuration file of the terminal to serve as the current data connection between the terminal and the target server, so that the problem that the terminal and the target server cannot be quickly connected after exiting the power-saving mode due to the fact that the terminal enters a shutdown state when entering the power-saving mode in the prior art is solved, the data connection between the terminal and the target server can be quickly recovered when the terminal exits the power-saving mode, and the response speed of data sending is increased.

Description

Data connection method, device, terminal and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a data connection method, a data connection device, a data connection terminal and a storage medium.
Background
The Internet of Things (IoT) is an important component of new-generation information technology and an important development stage of the information era, and both concepts and technologies are continuously developed and perfected. The narrowband Internet of Things (NB-IoT) is an important branch of the Internet of everything, has the advantages of low cost, low Power consumption, wide coverage and the like, and the Power Saving Mode (PSM) is an expression form of the NB-IoT with low Power consumption.
In some scenarios with high requirements for response and time delay, such as a smoke alarm, it is required that the terminal responds to the requirements in time, i.e. the terminal needs to respond to the uploaded data quickly after exiting the PSM mode. Due to different designs of various chip manufacturers, after part of terminals enter the PSM mode, the terminals similarly enter the power-off state, and after the terminals exit the PSM mode, the terminals cannot quickly upload data.
Disclosure of Invention
The embodiment of the invention provides a data connection method, a data connection device, a terminal and a storage medium, which are used for quickly realizing data connection between the terminal and a target server after the terminal exits from a power-saving mode.
In a first aspect, an embodiment of the present invention provides a data connection method, including:
acquiring a current working mode of a terminal;
if the working mode is a non-power-saving mode, determining whether historical data connection exists between the terminal and a target server according to a configuration file of the terminal;
and if the terminal has historical data connection with the target server, recovering the historical data connection according to the configuration file of the terminal to be used as the current data connection between the terminal and the target server.
Further, the method also comprises the following steps:
and if the terminal does not have historical data connection with the target server, establishing data connection between the terminal and the target server according to a set instruction.
Further, if there is a historical data connection between the terminal and the target server, the recovering the historical data connection as the current data connection between the terminal and the target server includes:
if the terminal is connected with the target server through historical data, reading configuration parameters stored in the configuration file;
and recovering the historical data connection according to the configuration parameters to serve as the current data connection between the terminal and the target server.
Further, after the historical data connection is recovered as the current data connection between the terminal and the target server, the method further includes:
and after the terminal sends data to the target server, storing the parameters of the data to a configuration file of the terminal.
In a second aspect, an embodiment of the present invention further provides a data connection apparatus, including:
the acquisition module is used for acquiring the current working mode of the terminal;
the determining module is used for determining whether historical data connection exists between the terminal and a target server according to the configuration file of the terminal if the working mode is a non-power-saving mode;
and the recovery module is used for recovering the historical data connection as the current data connection between the terminal and the target server according to the configuration file of the terminal if the historical data connection exists between the terminal and the target server.
Further, the apparatus further comprises:
and the creating module is used for creating the data connection between the terminal and the target server according to a set instruction if the historical data connection does not exist between the terminal and the target server.
Further, the recovery module includes:
a reading unit, configured to read a configuration parameter saved in the configuration file if there is a historical data connection between the terminal and the target server;
and the recovery unit is used for recovering the historical data connection as the current data connection between the terminal and the target server according to the configuration parameters.
Further, the apparatus further comprises:
and the storage module is used for storing the parameters of the data to the configuration file of the terminal after the historical data connection is recovered as the current data connection between the terminal and the target server and the terminal sends the data to the target server.
In a third aspect, an embodiment of the present invention further provides a terminal, including:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the data connection method of the first aspect.
In a fourth aspect, an embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the data connection method according to the first aspect.
The embodiment of the invention provides a data connection method, a device, a terminal and a storage medium, by acquiring the current working mode of the terminal, if the working mode is a non-power-saving mode, determining whether historical data connection exists between the terminal and a target server according to the configuration file of the terminal, if the terminal has historical data connection with the target server, the historical data connection is recovered according to the configuration file of the terminal as the current data connection between the terminal and the target server, so that the problem that when the terminal enters a power saving mode in the prior art, similar to entering the power-off state, the problem that the terminal cannot be quickly connected with the target server after exiting the power-saving mode is solved, and when the terminal exits the power-saving mode, the data connection between the terminal and the target server can be quickly recovered, and the response speed of data transmission is accelerated.
Drawings
Fig. 1 is a flowchart of a data connection method according to an embodiment of the present invention;
fig. 2 is a flowchart of a data connection method according to a second embodiment of the present invention;
fig. 3 is a schematic diagram of a terminal in a non-power saving mode, which is in data connection with an OneNET platform;
fig. 4 is a schematic diagram of a terminal in a power saving mode, which is in data connection with an OneNET platform;
fig. 5 is a structural diagram of a data connection device according to a third embodiment of the present invention;
fig. 6 is a structural diagram of a terminal according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a data connection method according to an embodiment of the present invention, where this embodiment is applicable to a situation where a terminal can quickly establish a connection with a target server after exiting a power saving mode, and the method can be executed by a data connection apparatus, and specifically, the method includes the following steps:
and S110, acquiring the current working mode of the terminal.
The NB-IoT network supports three operating modes, which are a power saving mode, a Discontinuous Reception (DRX) mode, and an Extended DRX (EDRX) mode, where the power saving mode is a deep sleep mode during a non-service period of the terminal, does not receive downlink data, can receive downlink data cached by the IoT platform only when the terminal actively sends uplink data, and the power consumption of the terminal in the power saving mode is the lowest. In the discontinuous reception mode, downlink data can reach the terminal at any time, and in each DRX cycle, the terminal detects whether downlink data arrives at one time, and the power consumption is also highest. The extended discontinuous reception mode is an intermittent network opening mode, downlink data can be received when the network is opened, the terminal is in a dormant state and does not receive the downlink data when the network is disconnected, and the mode can balance service delay and power consumption in the next service and is low in power consumption. The embodiment sets and acquires the working mode of the terminal in the NB-IoT network, wherein the terminal can be an intelligent terminal such as a mobile phone, a computer and the like.
And S120, judging whether the working mode is a non-power-saving mode, if so, executing S130, otherwise, executing S140.
It should be noted that, after entering the PSM, some terminals similarly enter the power-off state, so that after exiting the PSM, the user cannot send data to the server through the terminal. Specifically, if the terminal exits the PSM mode, i.e., is in the non-PSM mode, S130 is executed to further determine whether there is a historical data connection between the terminal and the target server, and if the terminal enters the PSM mode, S140 is executed to create a data connection between the terminal and the target server, so as to ensure that the user can quickly send data to the target server.
Specifically, when the terminal exits from the PSM mode, the corresponding software serial substring will have a prompt of the ExitPSM, and therefore, whether the current working mode of the terminal is the power saving mode can be determined by searching whether the software serial substring has the prompt of the ExitPSM.
S130, determining whether historical data connection exists between the terminal and a target server according to the configuration file of the terminal, if so, executing S150, otherwise, executing S140.
The configuration file is used for storing data parameters of connection interaction of the terminal and the target server, such as a registration life cycle, information and number of added object objects, observed information and number and the like, whether historical data connection exists between the terminal and the target server can be determined by judging whether the data parameters stored in the configuration file are complete, namely if the data parameters stored in the configuration file about the connection interaction between the terminal and the target server are complete, the historical data connection exists between the terminal and the target server, S150 is executed, and if the data parameters about the connection interaction between the terminal and the target server in the configuration file are incomplete, the historical data connection does not exist between the terminal and the target server, S140 is executed, and the data connection between the terminal and the target server is created.
The condition indicating the integrity of the data parameter may be set according to actual needs, and the embodiment is not limited, for example, the integrity of the data parameter may be determined by checking whether the parameter indicating the connection and interaction between the terminal and the target server is complete, the historical data connection is a data connection disconnected after the terminal and the target server perform connection and interaction, and when the terminal and the target server have the historical data connection, the related data parameter is stored in a configuration file of the terminal. It should be noted that, when the terminal disconnects from the target server, the data parameters stored in the configuration file about the historical connection interaction between the terminal and the target server are retained.
And S140, establishing data connection between the terminal and the target server according to the setting instruction.
Specifically, when the terminal enters the PSM mode or there is no historical data connection between the terminal and the target server, the historical data connection between the terminal and the target server is created through a specified instruction, wherein the specified instruction can be set according to actual needs.
S150, recovering the historical data connection according to the configuration file of the terminal to serve as the current data connection between the terminal and the target server.
Specifically, after the terminal exits the PSM mode, the data connection between the terminal and the target server is disconnected, so that the connection interaction program between the terminal and the target server cannot run, and the user cannot send data to the server through the terminal. In order to enable the terminal to exit the PSM mode, the data connection between the terminal and the target server can be established quickly, when the historical data connection between the terminal and the target server is determined, the historical data connection is recovered according to the configuration file to serve as the current data connection between the terminal and the target server, wherein the recovery of the historical data connection refers to the recovery of the operation of the historical connection interaction program between the terminal and the target server, and a user can send data to the target server through the terminal.
It can be understood that, if there is a historical data connection between the terminal and the target server, the configuration file of the terminal stores corresponding data parameters, and the historical data connection can be recovered as the current data connection between the terminal and the target server according to the data parameters. Illustratively, according to the parameters of the registration life cycle stored in the configuration file, the registration of the terminal on the target server can be completed, and according to the interaction parameters, the interaction between the terminal and the target server can be realized by adding a corresponding Object and a required instance.
The embodiment of the invention provides a data connection method, which comprises the steps of obtaining a current working mode of a terminal, determining whether historical data connection exists between the terminal and a target server according to a configuration file of the terminal if the working mode is a non-power-saving mode, and recovering the historical data connection as the current data connection between the terminal and the target server according to the configuration file of the terminal if the historical data connection exists between the terminal and the target server.
Example two
Fig. 2 is a flowchart of a data connection method according to a second embodiment of the present invention, which is embodied on the basis of the second embodiment, and specifically, the method includes the following steps:
and S210, acquiring the current working mode of the terminal.
And S220, judging whether the working mode is a non-power-saving mode, if so, executing S230, otherwise, executing S240.
S230, determining whether historical data connection exists between the terminal and a target server according to the configuration file of the terminal, if so, executing S250, otherwise, executing S240.
Specifically, if the terminal has a historical data connection with the target server, S250 is executed, the configuration parameters in the configuration file are read, and the historical data connection between the terminal and the target server is recovered according to the configuration parameters as the current data connection, otherwise, S240 is executed.
S240, establishing data connection between the terminal and the target server according to a setting instruction, and executing S270.
In an embodiment, the setting instruction is an AT instruction, where the AT instruction includes an instruction to create a communication suite, an instruction to add an Object, and an instruction to register a request, where the communication suite is used to implement communication between the terminal and the target server, and specifically, creating the communication suite by using the AT instruction may be represented as: AT + MIPLCREATE ═ totalsize >, < config >, < index >, < currentsize >, < flag >, where totalsize denotes the length of the config portion, counted as ascii, config denotes specific device configuration data, index denotes configuration data fragmentation parameter, currentsize denotes the current fragmentation portion data length, flag denotes the configuration data stream end, it should be noted that only one communication suite is allowed to exist for one terminal AT the same time.
The Object is used for realizing the interaction between the terminal and the target server, and when in actual application, the Object and the required instance thereof are added in the terminal by using an AT instruction, and the using format is as follows: AT + mipladdbj ═ ref >, < obj >, < insCount >, < insBitmap >, < attrCount >, < actCount >, where ref represents the reference ID of the destination server communication instance, obj ID represents the ID of the specific Object, insCount represents the number of instances, insBitmap represents the instance bitmap, string format, each character represents an instance, 1 represents available, 0 represents unavailable, attrCount represents the number of attributes, default is 0, and actCount represents the number of operations, default is 0. For example, creating an Object with Object 3200, 2 instances, available instance bitmap, and 1 attribute number, the AT command can be expressed as: AT + MIPLADDOBJ ═ 0,3200,1, "1", 1, 0.
The registration request is used to implement registration of the terminal on the target server, specifically, the AT command may be represented as AT + MIPLOPEN [ < ref >, < lifetime >, [ < timeout > ], where lifetime represents a lifetime of the target server of this registration, and is in units of seconds, timeout represents a timeout duration of registration, and an optional parameter is default to 30, and is in units of seconds, for example, AT + MIPLOPEN ═ 0,3000, 30.
Specifically, after creating the communication suite and adding the Object and the required instance thereof, the terminal sends a registration request to the target server, and when receiving the "OK" sent by the target server, the terminal can perform registration login on the target server, so that the creation of the data connection between the terminal and the target server is completed.
And S250, reading the configuration parameters stored in the configuration file.
If the configuration parameters stored in the configuration file are complete, the historical data connection between the terminal and the target server is indicated, the configuration parameters stored in the configuration file are read, and the historical data connection between the terminal and the target server is recovered as the current connection according to the specific content of the configuration parameters and the format of the AT instruction, wherein the configuration parameters are the aforementioned data parameters.
S260, recovering the historical data connection according to the configuration parameters to serve as the current data connection between the terminal and the target server.
Specifically, the configuration parameters record complete parameters of connection and interaction between the terminal and the target server, such as values of each parameter when the communication suite is created, and the added specific Object and its required instance, and according to these parameters, the historical data connection between the terminal and the target server can be recovered, and the specific recovery process has been described previously and is not described herein again.
S270, after the terminal sends data to the target server, the parameters of the data are stored in a configuration file of the terminal.
Specifically, after the terminal and the target server recover the historical data connection or create the data connection, the terminal notifies the user that the connection between the terminal and the target server is recovered or successfully created, and after the user knows the information, the user can send data to the target server through the terminal, and after the user sends the data, the corresponding data parameters are stored in the configuration file, so that a basis is provided for recovering the data connection between the terminal and the target server next time.
Exemplarily, taking an example that the target server is a OneNET platform, refer to fig. 3-4, fig. 3 is a schematic diagram of implementing data connection with the OneNET platform when the terminal is in a non-power saving mode, and fig. 4 is a schematic diagram of implementing data connection with the OneNET platform when the terminal is in a power saving mode. Specifically, when the terminal 210 is in the non-power saving mode, if the configuration parameters in the configuration file are complete, the historical data connection between the terminal 210 and the OneNET platform 220 is recovered according to the configuration parameters as the current data connection, and if the configuration parameters are incomplete, the data connection between the terminal 210 and the OneNET platform 220 is created according to the AT instruction. When the terminal 210 is in the power saving mode, the data connection between the terminal 210 and the OneNET platform 220 is created directly according to the AT instruction, and the specific creation process is described above and will not be described herein again.
On the basis of the embodiment, if the terminal is not connected with the target server through the historical data, the data connection between the terminal and the target server is established according to an AT instruction, if the terminal is connected with the target server through the historical data, the historical data connection is recovered according to the configuration parameters stored in the configuration file to serve as the current data connection between the terminal and the target server, and after the connection is successful, the user sends data and then continuously stores the corresponding data parameters to the configuration file, so that the terminal can be quickly connected with the target server after exiting the PSM mode or entering the PSM mode, and the data sent by the user can be responded timely.
EXAMPLE III
Fig. 5 is a structural diagram of a data connection apparatus according to a third embodiment of the present invention, where the apparatus may execute the data connection method according to any of the foregoing embodiments, specifically, the apparatus includes:
an obtaining module 310, configured to obtain a current working mode of the terminal;
a determining module 320, configured to determine whether a historical data connection exists between the terminal and a target server according to a configuration file of the terminal if the operating mode is a non-power saving mode;
a recovering module 330, configured to recover, if there is a historical data connection between the terminal and the target server, the historical data connection as a current data connection between the terminal and the target server according to the configuration file of the terminal.
The third embodiment of the present invention provides a data connection device, which determines whether historical data connection exists between a terminal and a target server according to a configuration file of the terminal by acquiring a current working mode of the terminal, if the working mode is a non-power-saving mode, and if the terminal and the target server have the historical data connection, restores the historical data connection as the current data connection between the terminal and the target server according to the configuration file of the terminal, so as to solve the problem that in the prior art, when the terminal enters the power-saving mode, the terminal enters a shutdown state similarly, so that after exiting the power-saving mode, the rapid connection between the terminal and the target server cannot be realized, ensure that when the terminal exits the power-saving mode, the data connection between the terminal and the target server can be rapidly restored, and accelerate the response speed of data transmission.
On the basis of the above embodiment, the apparatus further includes:
and the creating module is used for creating the data connection between the terminal and the target server according to a set instruction if the historical data connection does not exist between the terminal and the target server.
On the basis of the above embodiment, the recovery module 330 includes:
a reading unit, configured to read a configuration parameter saved in the configuration file if there is a historical data connection between the terminal and the target server;
and the recovery unit is used for recovering the historical data connection as the current data connection between the terminal and the target server according to the configuration parameters.
On the basis of the above embodiment, the apparatus further includes:
and the storage module is used for storing the parameters of the data to the configuration file of the terminal after the historical data connection is recovered as the current data connection between the terminal and the target server and the terminal sends the data to the target server.
The data connection device provided by the embodiment of the invention can be used for executing the data connection method provided by any embodiment, and has corresponding functions and beneficial effects.
Example four
Fig. 6 is a structural diagram of a terminal according to a fourth embodiment of the present invention, specifically, referring to fig. 6, the terminal includes: the number of the processors 410 in the terminal can be one or more, one processor 410 is taken as an example in fig. 6, the processors 410, the memory 420, the input device 430 and the output device 440 in the terminal can be connected by a bus or in other ways, and the connection by the bus is taken as an example in fig. 6.
The memory 420 serves as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the data connection method in the embodiment of the present invention. The processor 410 executes various functional applications of the terminal and data processing, i.e., implements the data connection method of the above-described embodiment, by executing software programs, instructions, and modules stored in the memory 420.
The memory 420 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system and an application program required by at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 420 may further include memory located remotely from the processor 410, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal. The output device 440 may include a display device such as a display screen, and an audio device such as a speaker and a buzzer.
The terminal provided by the embodiment of the present invention and the data connection method provided by the above embodiment belong to the same inventive concept, and the technical details that are not described in detail in the embodiment can be referred to the above embodiment, and the embodiment has the same beneficial effects as the data connection method.
EXAMPLE five
Fifth, an embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the data connection method according to any embodiment of the present invention.
Of course, the storage medium provided by the embodiment of the present invention includes computer-executable instructions, and the computer-executable instructions are not limited to the operations in the data connection method described above, and may also perform related operations in the data connection method provided by any embodiment of the present invention, and have corresponding functions and advantages.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a robot, a personal computer, a server, or a network device) to execute the data connection method according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (8)

1. A method for data connection, comprising:
acquiring the current working mode of the terminal, and determining whether the working mode is a non-power-saving mode according to the prompt of whether the software serial port substring exits the power-saving mode;
if the working mode is a non-power-saving mode, determining whether historical data connection exists between the terminal and a target server according to a configuration file of the terminal, wherein the configuration file is used for storing data parameters of connection interaction between the terminal and the target server, and determining whether historical data connection exists between the terminal and the target server according to the configuration file of the terminal specifically comprises the following steps: if the data parameters of the interactive connection between the terminal and the target server stored in the configuration file are complete, determining that the terminal and the target server have historical data connection, and if the data parameters of the interactive connection between the terminal and the target server stored in the configuration file are incomplete, determining that the terminal and the target server do not have historical data connection;
if the terminal has historical data connection with the target server, recovering the historical data connection according to the configuration file of the terminal to be used as the current data connection between the terminal and the target server;
and if the terminal does not have historical data connection with the target server, establishing data connection between the terminal and the target server according to a set instruction.
2. The method according to claim 1, wherein if there is a historical data connection between the terminal and the target server, the restoring the historical data connection as the current data connection between the terminal and the target server according to the configuration file of the terminal comprises:
if the terminal is connected with the target server through historical data, reading configuration parameters stored in the configuration file;
and recovering the historical data connection according to the configuration parameters to serve as the current data connection between the terminal and the target server.
3. The method according to claim 1, further comprising, after restoring the historical data connection as the current data connection of the terminal with the target server according to the terminal's profile:
and after the terminal sends data to the target server, storing the parameters of the data to a configuration file of the terminal.
4. A data connection device, comprising:
the acquisition module is used for acquiring the current working mode of the terminal and determining whether the working mode is a non-power-saving mode according to the prompt of whether the software serial port substring exits the power-saving mode;
a determining module, configured to determine, according to a configuration file of the terminal, whether historical data connection exists between the terminal and a target server if the operating mode is a non-power saving mode, where the configuration file is used to store data parameters of connection interaction between the terminal and the target server, and the determining, according to the configuration file of the terminal, whether historical data connection exists between the terminal and the target server, specifically including: if the data parameters of the interactive connection between the terminal and the target server stored in the configuration file are complete, determining that the terminal and the target server have historical data connection, and if the data parameters of the interactive connection between the terminal and the target server stored in the configuration file are incomplete, determining that the terminal and the target server do not have historical data connection;
the recovery module is used for recovering the historical data connection as the current data connection between the terminal and the target server according to the configuration file of the terminal if the historical data connection exists between the terminal and the target server;
and the creating module is used for creating the data connection between the terminal and the target server according to a set instruction if the historical data connection does not exist between the terminal and the target server.
5. The apparatus of claim 4, wherein the recovery module comprises:
a reading unit, configured to read a configuration parameter saved in the configuration file if there is a historical data connection between the terminal and the target server;
and the recovery unit is used for recovering the historical data connection as the current data connection between the terminal and the target server according to the configuration parameters.
6. The apparatus of claim 4, further comprising:
and the storage module is used for storing the parameters of the data to the configuration file of the terminal after the historical data connection is recovered as the current data connection between the terminal and the target server and the terminal sends the data to the target server.
7. A terminal, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the data connection method of any one of claims 1-3.
8. A storage medium on which a computer program is stored, which program, when being executed by a processor, carries out the data connection method according to any one of claims 1 to 3.
CN201811648518.0A 2018-12-30 2018-12-30 Data connection method, device, terminal and storage medium Active CN109379449B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811648518.0A CN109379449B (en) 2018-12-30 2018-12-30 Data connection method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811648518.0A CN109379449B (en) 2018-12-30 2018-12-30 Data connection method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109379449A CN109379449A (en) 2019-02-22
CN109379449B true CN109379449B (en) 2022-04-05

Family

ID=65372312

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811648518.0A Active CN109379449B (en) 2018-12-30 2018-12-30 Data connection method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109379449B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112543514A (en) * 2020-11-09 2021-03-23 深圳市广和通无线股份有限公司 Method and device for link recovery processing under narrowband Internet of things

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101013340A (en) * 2007-03-02 2007-08-08 中兴通讯股份有限公司 Method for reducing power consumption of wireless network interface card
CN101801071A (en) * 2008-12-31 2010-08-11 英特尔公司 Power-saving in the peer communications devices
CN102761941A (en) * 2011-04-28 2012-10-31 北京云天创科技有限公司 Wireless intelligent network protocol with ultra-low power consumption
CN104244381A (en) * 2013-06-17 2014-12-24 华为终端有限公司 Method, device and terminal device for awakening control
CN105162849A (en) * 2015-08-11 2015-12-16 北京奇虎科技有限公司 Intelligent camera device and off-network access control method thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003303014A (en) * 2002-04-09 2003-10-24 Toshiba Corp Maintenance management method for plant equipment and device
CN102595577B (en) * 2012-03-13 2017-12-26 深圳市中兴物联科技有限公司 Network connection processing method and AP and BP after a kind of terminal standby wakes up
WO2018119855A1 (en) * 2016-12-29 2018-07-05 哈尔滨海能达科技有限公司 Information reporting method, terminal mode switching method, and digital communication system
WO2018186846A1 (en) * 2017-04-05 2018-10-11 Nokia Technologies Oy Facilitating connection establishment to wireless network
CN108040292B (en) * 2017-11-21 2021-01-12 深圳创维-Rgb电子有限公司 Television standby starting method, television and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101013340A (en) * 2007-03-02 2007-08-08 中兴通讯股份有限公司 Method for reducing power consumption of wireless network interface card
CN101801071A (en) * 2008-12-31 2010-08-11 英特尔公司 Power-saving in the peer communications devices
CN102761941A (en) * 2011-04-28 2012-10-31 北京云天创科技有限公司 Wireless intelligent network protocol with ultra-low power consumption
CN104244381A (en) * 2013-06-17 2014-12-24 华为终端有限公司 Method, device and terminal device for awakening control
CN105162849A (en) * 2015-08-11 2015-12-16 北京奇虎科技有限公司 Intelligent camera device and off-network access control method thereof

Also Published As

Publication number Publication date
CN109379449A (en) 2019-02-22

Similar Documents

Publication Publication Date Title
CN110493858B (en) Method and device for reducing power consumption and mobile terminal
CN110018901B (en) Memory recovery method and device, computer equipment and computer readable storage medium
JP6226348B2 (en) Method for transmitting heartbeat message and portable terminal
CN110708696B (en) Network data recovery method and device, storage medium and electronic equipment
US10075920B2 (en) Method and apparatus for controlling traffic in electronic device
CN110493892B (en) Network connection method and device, storage medium and communication terminal
CN109982355B (en) Method for saving and restoring network path, apparatus, terminal and storage medium thereof
CN108881781B (en) Method and device for determining resolution in video call process
EP3531676B1 (en) Task processing apparatus, intelligent device, task processing method, and baseband processor
CN110677899A (en) Data transmission method and device, terminal equipment and storage medium
CN113965993A (en) Direct communication starting control method and related equipment
CN109379449B (en) Data connection method, device, terminal and storage medium
CN112367409B (en) Internet of things node data transmission control method and device
CN110392412B (en) Network distribution method, device, equipment and medium for Internet of things equipment
CN111638871A (en) Equipment information processing method, device, equipment and medium
US10772041B2 (en) Beacon signal processing system
CN109511139B (en) WIFI control method and device, mobile device and computer-readable storage medium
CN115175375A (en) Network connection method, electronic device, readable storage medium and chip
CN115529654A (en) Method, apparatus, storage medium, and relay device for standby communication
CN110045812B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
CN111857324A (en) Method and device for reducing power consumption of terminal, mobile terminal and storage medium
CN110913022A (en) Method, device and system for downloading network file of mobile terminal and storage medium
CN110958641B (en) WIFI data receiving and transmitting control method and device for mobile terminal
CN112866079B (en) Method, device and equipment for transmitting regular messages based on Internet of things and storage medium
CN111355782B (en) Equipment management method and device, storage medium and electronic equipment

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