CN108540977B - Network information synchronization control method and device, computer equipment and storage medium - Google Patents

Network information synchronization control method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN108540977B
CN108540977B CN201810224901.7A CN201810224901A CN108540977B CN 108540977 B CN108540977 B CN 108540977B CN 201810224901 A CN201810224901 A CN 201810224901A CN 108540977 B CN108540977 B CN 108540977B
Authority
CN
China
Prior art keywords
network information
screen
message
modem
synchronization
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
CN201810224901.7A
Other languages
Chinese (zh)
Other versions
CN108540977A (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.)
Oneplus Technology Shenzhen Co Ltd
Original Assignee
Oneplus Technology Shenzhen 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 Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN201810224901.7A priority Critical patent/CN108540977B/en
Publication of CN108540977A publication Critical patent/CN108540977A/en
Application granted granted Critical
Publication of CN108540977B publication Critical patent/CN108540977B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
    • H04W8/183Processing at user equipment or user record carrier
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application relates to a network information synchronization control method, a network information synchronization control device, computer equipment and a storage medium. The method comprises the following steps: detecting a screen on/off message; when the bright screen message is detected, starting a modem network information synchronization process; and when the screen-off message is detected, continuously detecting the screen-on and screen-off message. By adopting the method, the standby power consumption can be reduced, and the service life of the battery can be prolonged.

Description

Network information synchronization control method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for controlling network information synchronization, a computer device, and a storage medium.
Background
With the development of computer technology and communication technology, the applicable network types of the mobile terminal are more and more, the supportable functions are more and more, the data transmission rate is faster and faster, and a great deal of convenience is brought to the life of people. A common network type is, for example, an LTE (Long Term Evolution) network or a 4G (the 4th Generation mobile communication technology) network. When the mobile terminal resides in the network, the network information may frequently change due to poor network environment or fast movement of the mobile terminal, which may cause inconsistency between the cache and the corresponding network information in the file system, thereby frequently triggering the synchronization process.
However, in the current network information synchronous updating mode of the mobile terminal, the network information in the cache is synchronously updated to the file system in real time according to the frequent change of the network information, so that the standby power consumption of the mobile terminal is large, the power consumption is fast, and the service life of the battery is reduced.
Disclosure of Invention
In view of the above, it is necessary to provide a network information synchronization control method, apparatus, computer device and storage medium capable of reducing standby power consumption of a mobile terminal and prolonging battery life.
A network information synchronization control method, the method comprising:
detecting a screen on/off message;
when the bright screen message is detected, starting a modem network information synchronization process;
and when the screen-off message is detected, continuously detecting the screen-on and screen-off message.
In one embodiment, the initiating the modem network information synchronization process includes:
reading first network information monitored in real time from a cache of a modem;
comparing the first network information with second network information corresponding to the first network information in a file system of the modem;
and when the first network information is inconsistent with the second network information, updating the second network information in the file system to the first network information.
In one embodiment, the method further comprises:
and after the screen-on message is detected and the screen-off message is not detected, repeatedly executing the step of reading the first network information monitored in real time from the cache of the modem according to a preset period.
In one embodiment, the method further comprises:
monitoring first network information in a cache of a modem in real time after detecting a screen-on message and before detecting a screen-off message;
and when the first network information is monitored to be changed, the step of reading the first network information monitored in real time from the cache of the modem is executed.
In one embodiment, the reading the first network information monitored in real time from the cache of the modem includes:
querying a preconfigured synchronization control flag;
when the inquired synchronous control mark indicates that the synchronous control function is started, judging whether the synchronous control mark is in a normal working state or not;
and if the modem is in a normal working state, reading the first network information monitored in real time from a cache of the modem.
In one embodiment, the first network information includes at least one of a registration status, cell information, and a network type.
A network information synchronization control apparatus, the apparatus comprising:
the synchronous control module is used for detecting the screen on/off message and sending a synchronous function starting instruction when the screen on/off message is detected;
the synchronous module is used for receiving the synchronous function starting instruction and starting a modem network information synchronous flow according to the synchronous function starting instruction;
and the synchronous control module is also used for detecting the screen-off message and continuously detecting the screen-on and screen-off message when the screen-off message is detected.
In one embodiment, the apparatus further comprises: the system comprises a cache module, a file system module and an updating module;
the synchronization module is further used for reading the first network information from the cache module according to the synchronization function starting instruction; further for comparing the first network information with the second network information; sending a network information synchronization message when the first network information is inconsistent with the second network information;
the cache module is used for detecting and caching the first network information in real time; the cache module is deployed on the modem;
the file system module is used for storing second network information corresponding to the first network information; the file system module is deployed on a modem;
and the updating module is used for receiving the network information synchronization message and updating the second network information in the file system into the first network information according to the network information synchronization message.
In one embodiment, the synchronization module is further configured to repeatedly read, according to a preset period, the first network information monitored in real time from the cache of the modem after the bright-screen message is detected and when the dead-screen message is not detected.
In one embodiment, the synchronization control module is further configured to query a preconfigured synchronization control flag; the synchronous control device is also used for judging whether the current state is in a normal working state or not when the inquired synchronous control mark indicates that the synchronous control function is started; and if the modem is in a normal working state, reading the first network information monitored in real time from a cache of the modem.
A computer device comprising a memory, the memory storing a computer program, a processor implementing the following steps when the processor executes the computer program:
detecting a screen on/off message;
when the bright screen message is detected, starting a modem network information synchronization process;
and when the screen-off message is detected, continuously detecting the screen-on and screen-off message.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
detecting a screen on/off message;
when the bright screen message is detected, starting a modem network information synchronization process;
and when the screen-off message is detected, continuously detecting the screen-on and screen-off message.
The network information synchronous control method, the network information synchronous control device, the computer equipment and the storage medium detect the on-off screen information in real time, and execute corresponding operation according to the detected on-off screen information so as to realize the network information synchronous control of the modem. When the screen-on message is detected, the network information synchronization process of the modem is started to ensure the normal synchronization of the network information, and when the screen-off message is detected, the synchronization process is not started, the screen-on and screen-off message is continuously detected, so that the standby power consumption is reduced, and the service life of a battery is prolonged.
Drawings
FIG. 1 is a flow chart illustrating a method for controlling network information synchronization according to an embodiment;
FIG. 2a is a flow diagram illustrating a modem network information synchronization process according to one embodiment;
FIG. 2b is a flowchart illustrating a network information synchronization control method according to another embodiment;
FIG. 3 is a schematic diagram of viewing network information in a file system in one embodiment;
FIG. 4 is a schematic diagram of a view synchronization flow in one embodiment;
FIG. 5 is a diagram of viewing network registration information updated in real time in one embodiment;
FIG. 6 is a diagram of viewing real-time updated cell information in one embodiment;
FIG. 7 is a flowchart illustrating a method for controlling network information synchronization according to an embodiment;
FIG. 8 is a flow diagram illustrating the internal flow of the synchronization control module initiation, according to one embodiment;
FIG. 9 is a block diagram showing the construction of a network information synchronization control apparatus according to an embodiment;
fig. 10 is a block diagram showing the construction of a network information synchronization control apparatus according to another embodiment;
FIG. 11 is a diagram illustrating an internal structure 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 the present application and are not intended to limit the present application.
The network information synchronization control method can be applied to the terminal. The terminal may be, but is not limited to, a smartphone, a tablet, a personal digital assistant, and a portable wearable device.
In an embodiment, as shown in fig. 1, a network information synchronization control method is provided, which is described by taking an example that the method is applied to a terminal, and includes the following steps:
s102, the screen on/off message is detected.
The on-off screen message is a message generated by triggering when the screen of the terminal is lighted on or off. Specifically, the terminal can detect the corresponding on-off screen message in real time through detecting the trigger operation. In one embodiment, the on-off screen message may be generated and broadcast by a corresponding application when a screen of the terminal is lit or extinguished.
In one embodiment, the on-off screen message may be triggered to be generated when a touch operation corresponding to the power key is detected. Specifically, when the terminal detects touch operation on the power key, the on-off state of the screen is switched. And generating a corresponding on-off screen message. For example, when the terminal detects a touch operation, the terminal determines a current on-off state of the screen, lights the screen to generate a screen-on message when the screen is in an off state, and lights the screen to generate a screen-off message when the screen is in the on state.
S102, when the bright screen message is detected, starting a modem network information synchronization process.
Wherein the bright screen message is a message generated by triggering when the screen of the terminal is lighted. The bright screen message may be triggered to be generated when a touch operation corresponding to the power key is detected. The bright screen message may also be triggered to be generated when a trigger operation for lighting another screen is acquired, for example, when a phone connection request is received. The bright screen message may be generated by a corresponding application when the screen of the terminal is lit. The bright screen message may be generated and broadcast by the application program accordingly.
A modem, which may also be referred to as a modem chip, is a type of computer hardware. The modem can realize the interconversion between the analog signal and the digital signal, thereby realizing the intercommunication between the terminals. The modem can improve the connectivity between the terminal and the base station and intelligently identify the switching of the working modes of the terminal. The network information is a network parameter that may be involved in the system operation of the terminal. The network information may specifically include at least one of a network type, a registration state, cell information, and the like.
In one embodiment, the terminal detects a trigger operation of turning on or off a screen in real time, and when the trigger operation of turning on the screen is detected, the terminal turns on the screen, and generates and broadcasts a corresponding screen-on message. The terminal receives the broadcast bright screen information through a synchronous control module on the modem and starts a synchronous function, so that the synchronous module starts a modem network information synchronous process.
And S104, when the screen-off message is detected, continuously detecting the screen-on and screen-off message.
The screen off message is a message generated by triggering when the screen of the terminal is turned off. The screen-off message may be triggered to be generated when a touch operation corresponding to the power key is detected. The screen-off message may be generated by the terminal according to a pre-configured trigger condition, and the pre-configured trigger condition may be that the terminal does not detect a specific operation within a preset time length. Specifically, when the terminal detects the screen-off message, the modem network information synchronization process is not started, and the screen-on and screen-off message continues to be detected until the screen-on message is detected again, and the modem network information synchronization process is started.
The network information synchronous control method detects the on-off screen message in real time, and executes corresponding operation according to the detected on-off screen message so as to realize the network information synchronous control of the modem. When the screen-on message is detected, the network information synchronization process of the modem is started to ensure the normal synchronization of the network information, and when the screen-off message is detected, the synchronization process is not started, the screen-on and screen-off message is continuously detected, so that the standby power consumption is reduced, and the service life of a battery is prolonged.
As shown in fig. 2a, in an embodiment, the method for controlling network information synchronization starts a modem network information synchronization process, and specifically includes the following steps:
s1042, reading the first network information monitored in real time from the buffer of the modem.
Wherein the buffer is a buffer for data exchange. The cache is used to temporarily store data that is lost upon power down or restart. Specifically, when the bright screen message is detected, the terminal reads the first network information monitored in real time from the cache of the modem.
In one embodiment, when the network environment where the terminal is currently located is network weak coverage or the terminal is in a fast moving process, a cell where the terminal resides frequently changes, cell information corresponding to the terminal is frequently switched, and the terminal also frequently performs network heterogeneous reselection. In other words, the network information corresponding to the terminal is continuously updated, and the terminal monitors the updated network information in real time and stores the monitored network information into the cache of the modem as the first network information updated and stored in the cache.
S1044, comparing the first network information with second network information corresponding to the first network information in the file system of the modem.
Wherein the file system is a file system of a modem. The file system is used for storing relevant network parameters involved when the modem realizes corresponding functions. And the file system stores second network information corresponding to the first network information in the cache. When the second network information in the file system is inconsistent with the first network information in the cache, the terminal can correspondingly update the second network information in the file system according to the first network information. The file system also stores static parameters which are not updated with the updating of the first network information, such as configuration parameters of each processor of the terminal. The data stored in the file system is persistent storage and is not lost with the power-off or restart of the terminal.
Specifically, when the terminal detects the bright screen message, the second network information is read from the file system of the modem, and the read second network information corresponds to the first network information read from the cache. And after the terminal respectively reads the corresponding first network information and second network information from the cache and the file system, the read first network information and second network information are correspondingly compared, so as to determine whether the first network information and the second network information are consistent according to the comparison result.
S1046, when the first network information is inconsistent with the second network information, updating the second network information in the file system to the first network information.
Specifically, when the first network information in the cache is determined to be inconsistent with the second network information in the file system through comparison, it indicates that the first network information in the cache changes, that is, indicates that the network information currently corresponding to the terminal changes. In other words, the cell information, the registration state, or the network type corresponding to the terminal currently changes. And the terminal correspondingly updates corresponding second network information in the file system according to the first network information in the cache.
In one embodiment, when the terminal compares that the first network information in the cache is inconsistent with the second network information in the file system, the terminal correspondingly determines the network information inconsistent with the corresponding network information in the second network information from the first network information. And updating corresponding information in the second network information into the determined network information. In other words, the terminal determines the network information changed relative to the second network information in the first network information according to the first network information and the second network information which are correspondingly compared, and correspondingly updates the corresponding network information in the second network information according to the determined changed network information.
In the above embodiment, when the bright-screen message is detected, the first network information in the cache of the modem and the second network information in the file system are compared, and when the first network information and the second network information are not consistent, the second network information in the file system is updated to the first network information in the cache. And when the screen-off message is detected, the second network information in the file system of the modem cannot be updated, and the screen-on message is continuously detected, so that the second network information of the file cannot be updated in the screen-off state, the standby power consumption is reduced, and the service life of the battery is prolonged.
In one embodiment, the network information synchronization control method further includes: and after the bright screen message is detected and the screen off message is not detected, repeatedly executing the step of reading the first network information monitored in real time from the cache of the modem according to a preset period.
The preset period is a preset time interval. The preset period is a time interval in which a specific step is repeatedly performed. In other words, the preset period is a time interval in which the same step is performed two times in succession. The preset period may be set according to actual conditions, and may be 5 seconds, for example.
Specifically, when the terminal lights up the screen according to the trigger operation, the corresponding screen-lighting message is acquired. Similarly, when the terminal extinguishes the screen according to the trigger operation, the terminal acquires a corresponding screen extinguishment message. The terminal keeps a screen on state after lighting the screen according to the trigger operation until the screen is turned off when the trigger operation of triggering the screen off message is detected, namely the screen on state is converted into the screen off state. In other words, the terminal maintains the bright screen state after detecting the bright screen message and when not detecting the screen-off message.
Further, the terminal accumulatively calculates a length of time for which the bright screen state is maintained from when the bright screen message is detected. When the time length of the accumulated calculation reaches a preset period, the terminal reads first network information monitored in real time from a cache of the modem, reads second network information corresponding to the first network information from a file system of the modem, compares the first network information and the second network information which are respectively obtained, and updates the second network information in the file system to the corresponding first network information when the first network information and the second network information are not consistent. And when the time length of the accumulative calculation reaches a preset period and the steps are executed, the terminal accumulatively calculates the time length of keeping the bright screen state again. And when the time length of the re-accumulated calculation reaches a preset period, the terminal repeatedly executes the relevant steps again. In other words, when the terminal keeps the bright screen state, the above-mentioned related step of correspondingly updating the second network information in the file system according to the first network information in the cache is repeatedly executed according to the preset time period.
In the above embodiment, when the terminal keeps the bright screen state, the relevant step of updating the second network information in the file system according to the first network information in the cache is repeatedly executed according to the preset period, and when the network information corresponding to the terminal changes in the bright screen state, effective updating of the second network information is ensured. And when the terminal is in the screen-off state, the updating process is not executed, so that the standby power consumption of the terminal is reduced, and the service life of the battery is prolonged.
In one embodiment, the network information synchronization control method further includes: monitoring first network information in a cache of a modem in real time after detecting a screen-on message and before detecting a screen-off message; and when the first network information is monitored to be changed, reading the first network information monitored in real time from a cache of the modem.
Specifically, the terminal maintains the bright screen state after detecting the bright screen message and before detecting the screen-off message. When the terminal is in a bright screen state, monitoring first network information in a cache of the modem in real time, namely monitoring current corresponding network information in real time by the terminal. When the first network information in the cache is monitored to be changed, the fact that the network information corresponding to the terminal at present is changed is indicated. The changed network information may specifically be at least one of network type different-type reselection, cell information handover, registration state change, and the like.
Further, when the terminal monitors that the first network information changes, it indicates that the first network information in the cache may not be consistent with the second network information in the file system. And the terminal reads the corresponding first network information and second network information from the cache and the file system respectively, and when the first network information and the second network information are determined to be inconsistent through corresponding comparison, the second network information in the file system is updated correspondingly according to the first network information in the cache.
In one embodiment, the first network information in the cache is monitored in real time while the terminal keeps a bright screen state. When the first network information is monitored to be changed, the first network information in the cache is not consistent with the second network information in the file system, and the terminal updates the second network information in the file system according to the currently monitored first network information.
In the above embodiment, when the terminal is in the bright screen state, whether the current corresponding network information changes is correspondingly determined by monitoring the first network information in the cache of the modem in real time. When the change occurs, if the current first network information in the cache is inconsistent with the second network information in the file system, the corresponding second network information is updated in time according to the currently monitored first network information, so that the updating efficiency of the second network information in the file system is improved, and the integrity of the network information is ensured.
In one embodiment, step S1042 includes the steps of: querying a preconfigured synchronization control flag; when the inquired synchronous control mark indicates that the synchronous control function is started, judging whether the synchronous control mark is in a normal working state or not; and if the modem is in a normal working state, reading the first network information monitored in real time from a cache of the modem.
Wherein, the pre-configuration means that the configuration process is completed in advance. The synchronization control flag is a flag indicating that the synchronization control function is turned on or turned off. The synchronization control mark may specifically be a character string composed of at least one character of a number, a symbol, and a letter. For example, the synchronization control flag corresponding to turning on the synchronization control function may be denoted as flag0, and correspondingly, the synchronization control flag corresponding to turning off the synchronization control function may be denoted as flag 1. It is worth mentioning that the representation of the synchronization control flag is not limited to the illustration. The normal working state refers to a state that the terminal is in normal working. The normal working state may be that the operation mode of the terminal is the system operation mode online.
Specifically, the terminal detects the trigger operation of configuring the synchronous control mark in real time, and when the trigger operation of configuring the synchronous control mark is detected, the synchronous control mark is correspondingly configured according to the detected trigger operation. And when the bright screen message is detected, the terminal inquires a synchronous control mark which is configured in advance according to the triggering operation. And when the inquired synchronous control mark indicates that the synchronous control function is started, judging whether the terminal is in a normal working state currently. And when the inquired synchronous control mark indicates that the synchronous control function is closed, the relevant step of correspondingly updating the second network information according to the first network information is not executed.
Further, when the terminal is determined to be in the normal working state through judgment, it is indicated that the corresponding second network information can be correspondingly updated when the first network information changes. In other words, when in a normal operating state, the terminal reads the first network information monitored in real time from the buffer of the modem.
In the above embodiment, whether the synchronization control function is started is determined by querying the preconfigured synchronization control flag, when the synchronization control function is determined to be started and is in a normal working state, the first network information detected in real time is read from the cache, and then the related step of updating the second network information according to the first network information is executed, so that controllability of the synchronization control function is realized, the update times of the second network information in the file system is effectively controlled, power consumption is reduced, and the service life of the battery is prolonged.
In one embodiment, the first network information includes at least one of a registration status, cell information, and a network type.
The registration state refers to a state in which the terminal is registered in the network. The registration status may be status information of whether the terminal has successfully registered in the network. The registration status may also include relevant registration information generated when the terminal successfully registers in the network. A cell refers to a base station or the coverage area of a base station. The cell information refers to network information corresponding to the base station, for example, channel and frequency band information. In a network environment with weak network coverage or in a process of fast movement of a terminal, a cell where the terminal resides is constantly changed, and in order to ensure that communication is not interrupted, the terminal can frequently perform cell switching, acquire corresponding cell information, and constantly update first network information in a cache.
The network type is the type of network. The terminal has a plurality of different network systems, and the different network systems have respective corresponding characteristics. For example, when the terminal is a Mobile phone, the network systems commonly used by the terminal include, but are not limited to, an LTE (Long Term Evolution) network, a 4G (the 4th Generation Mobile Communication technology, fourth Generation Mobile Communication technology) network, a GSM (Global System for Mobile Communication) network, a CDMA (Code Division Multiple Access) network, a WCDMA (Wideband Code Division Multiple Access) network, a TDCDMA (Time Division-Synchronous Code Division Multiple Access) network, and a CDMA2000(Code Division Multiple Access 2000) network. The terminal can simultaneously support one or more of the network systems.
In the above embodiment, at least one of the registration state, the cell information, and the network type corresponding to the terminal is stored in the cache of the modem, and when the current network information corresponding to the terminal changes, the changed network information is updated to the cache in real time, so as to ensure normal operation of the terminal.
As shown in fig. 2b, in an embodiment, a method for controlling network information synchronization is provided, which specifically includes the following steps:
s202, the screen on/off message is detected.
S204, when the bright screen message is detected, the pre-configured synchronous control mark is inquired.
S206, when the inquired synchronous control mark indicates that the synchronous control function is started, judging whether the synchronous control function is in a normal working state or not.
And S208, if the first network information is in a normal working state, reading the first network information monitored in real time from the cache of the modem.
S210, comparing the first network information with second network information corresponding to the first network information in a file system of the modem.
S212, when the first network information is inconsistent with the second network information, updating the second network information in the file system to the first network information.
S214, when the screen-off message is detected, the screen-on and screen-off message is continuously detected.
In the above embodiment, the screen on/off message is detected in real time, when the screen on message is detected, it is first determined whether the synchronization control flag indicates that the synchronization control function is turned on and whether the synchronization control flag is in a normal operating state, when the determination results are yes, the first network information and the second network information corresponding to each other are respectively obtained from the cache and the file system, and when the first network information and the second network information are not consistent, the second network information in the file system is updated according to the first network information. And when the screen-off message is detected, the second network information cannot be updated correspondingly, and the screen-on message is continuously detected, so that the standby power consumption of the terminal is reduced, and the service life of the battery is prolonged.
In a specific embodiment, in the network information synchronization control method provided in each of the above embodiments, a File system of the modem may be referred to as efs (encryption File system), and a process of updating the second network information in the File system according to the first network information in the cache may be referred to as efs synchronization. The NV of the modem (for storing parameter values that may be used by the various modules during system operation) is stored in the efs of the modem in the form of a single file.
As shown in fig. 3, network information in the file system of the modem can be viewed by means of QPST (Qualcomm Product Support Tool, transport software for high-pass chip), for example, acq _ db (historical frequency point information for recording network standard) in NV related to network registration can be viewed. When acq _ db in the cache changes, the terminal can correspondingly update the acq _ db in the file system.
As shown in fig. 4, when the NV value NV1 in the efs is inconsistent with the NV value NV2 in the buffer, the terminal updates the NV value NV1 in the efs to the NV value NV2 in the buffer through the updating module (rmt module). The terminal performs the above updating step according to a preset period, for example, the terminal updates the NV value NV1 in the efs to the current NV value NV2 in the buffer again at an interval of 150 seconds.
As shown in fig. 5, when the network environment is poor, the network registration information corresponding to the terminal frequently changes, and the network coverage signal is unstable, so that the first network information in the cache frequently changes. Similarly, as shown in fig. 6, when the cell information where the terminal resides is unstable, the efs synchronization process is frequently triggered, and in the efs synchronization process, the update module frequently wakes up the upper module, so that the mobile phone is not in standby, and thus standby current is high and power consumption is fast.
As shown in fig. 7, in a specific embodiment, a network information synchronization control method is provided, and is applied to a terminal, where the following modules are deployed on the terminal: the method specifically comprises the following processes of:
and when the terminal turns on or off the screen according to the trigger operation, correspondingly generating a corresponding broadcast (a screen turning-on message or a screen turning-off message), wherein the broadcast is recorded as msg 1. And when the synchronous control module detects the msg1, starting an internal flow, correspondingly starting or closing an efs synchronous function according to the detected broadcast, and correspondingly generating a corresponding message msg 2. The synchronization module correspondingly determines whether the synchronization function is turned on or off according to the received message msg2, for example, a value of msg2 is true to indicate that the synchronization function is turned off, and a value of msg2 is false to indicate that the synchronization function is turned on.
Further, when the value of msg2 received by the synchronization module is false, the first network information (denoted as msg3) and the second network information (denoted as msg4) corresponding to each other are respectively obtained from the cache module and the file system module. And transmitting a message msg5 when the acquired msg3 and msg4 are inconsistent. And when the update module receives the msg5, the update module starts an efs synchronization process, updates the msg4 in the file system module to the msg3 in the cache module, and receives a message msg6 fed back by the file system module after the update is completed.
As shown in fig. 8, in a specific embodiment, when the synchronization control module receives the msg1, the internal process started specifically includes the following processing flows:
the synchronization control module inquires a preconfigured synchronization control FLAG UPDATE _ NV _ SYNC _ FLAG, judges whether an OPRT _ MODE is equal to SYS _ OPRT _ MODE _ ONLINE or not when the inquired synchronization control FLAG indicates that a synchronization control function is started, indicates that the synchronization control function is in a normal running state when the inquired synchronization control FLAG is equal to the SYS _ OPRT _ MODE _ ONLINE, calls an ap2modem _ resp _ message _ data method, and sets the value of NV _ SYNC _ FLAG to data _ ptr _ content [0 ]. Wherein nv _ sync _ flag represents a flag for turning on or off the synchronization function. The value of the global object reject _ efs _ sync is set to the value of nv _ sync _ flag. The reject _ efs _ sync is used to indicate whether to execute efs synchronization flow, for example, when the reject _ efs _ sync is 0, it indicates to execute efs synchronization flow, otherwise, it does not execute efs synchronization flow.
It should be understood that, although the steps in the flowcharts corresponding to the embodiments are shown in sequence according to the arrow, the steps are not necessarily executed in sequence according to the sequence indicated by the arrow. 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 a part of the steps in the flowcharts of the above embodiments may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or the stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least a part of the sub-steps or the stages of other steps.
In one embodiment, as shown in fig. 9, there is provided a network information synchronization control apparatus 900, including: a synchronization control module 901 and a synchronization module 902.
And the synchronization control module 901 is configured to detect a screen on/off message, and send a synchronization function start instruction when the screen on message is detected.
The synchronization module 902 is configured to receive a synchronization function start instruction, and start a modem network information synchronization process according to the synchronization function start instruction.
The synchronization control module 901 is further configured to detect a screen-off message, and when the screen-off message is detected, continue to detect a screen-on/off message.
The network information synchronous control device detects the on-off screen message in real time, and executes corresponding operation according to the detected on-off screen message so as to realize the network information synchronous control of the modem. When the screen-on message is detected, the network information synchronization process of the modem is started to ensure the normal synchronization of the network information, and when the screen-off message is detected, the synchronization process is not started, the screen-on and screen-off message is continuously detected, so that the standby power consumption is reduced, and the service life of a battery is prolonged.
As shown in fig. 10, in one embodiment, the network information synchronization control apparatus 900 further includes: a cache module 903, a file system module 904, and an update module 905;
the synchronization module 902 is further configured to read the first network information from the cache module according to the synchronization function start instruction; and further for comparing the first network information with the second network information; and sending the network information synchronization message when the first network information is inconsistent with the second network information.
A caching module 903, configured to detect and cache the first network information in real time; the cache module is disposed on the modem.
A file system module 904 for storing second network information corresponding to the first network information; the file system module is disposed on the modem.
The updating module 905 is configured to receive the network information synchronization message, and update the second network information in the file system to the first network information according to the network information synchronization message.
In the above embodiment, when the bright-screen message is detected, the first network information in the cache of the modem and the second network information in the file system are compared, and when the first network information and the second network information are not consistent, the second network information in the file system is updated to the first network information in the cache. And when the screen-off message is detected, the second network information in the file system of the modem cannot be updated, and the screen-on message is continuously detected, so that the second network information of the file cannot be updated in the screen-off state, the standby power consumption is reduced, and the service life of the battery is prolonged.
In one embodiment, the synchronization module 902 is further configured to repeatedly read the first network information monitored in real time from the cache of the modem according to a preset period after the bright-screen message is detected and when the dead-screen message is not detected.
In the above embodiment, when the terminal keeps the bright screen state, the relevant step of updating the second network information in the file system according to the first network information in the cache is repeatedly executed according to the preset period, and when the network information corresponding to the terminal changes in the bright screen state, effective updating of the second network information is ensured. And when the terminal is in the screen-off state, the updating process is not executed, so that the standby power consumption of the terminal is reduced, and the service life of the battery is prolonged.
In one embodiment, the synchronization module 902 is further configured to monitor, in real time, the first network information in the cache of the modem after detecting the on-screen message and before detecting the off-screen message; and when the first network information is monitored to be changed, reading the first network information monitored in real time from a cache of the modem.
In the above embodiment, when the terminal is in the bright screen state, whether the current corresponding network information changes is correspondingly determined by monitoring the first network information in the cache of the modem in real time. When the change occurs, if the current first network information in the cache is inconsistent with the second network information in the file system, the corresponding second network information is updated in time according to the currently monitored first network information, so that the updating efficiency of the second network information in the file system is improved, and the integrity of the network information is ensured.
In one embodiment, the synchronization control module 901 is further configured to query a preconfigured synchronization control flag; the synchronous control device is also used for judging whether the current state is in a normal working state or not when the inquired synchronous control mark indicates that the synchronous control function is started; and if the modem is in a normal working state, reading the first network information monitored in real time from a cache of the modem.
In the above embodiment, whether the synchronization control function is started is determined by querying the preconfigured synchronization control flag, when the synchronization control function is determined to be started and is in a normal working state, the first network information detected in real time is read from the cache, and then the related step of updating the second network information according to the first network information is executed, so that controllability of the synchronization control function is realized, the update times of the second network information in the file system is effectively controlled, power consumption is reduced, and the service life of the battery is prolonged.
In one embodiment, the first network information includes at least one of a registration status, cell information, and a network type.
In the above embodiment, at least one of the registration state, the cell information, and the network type corresponding to the terminal is stored in the cache of the modem, and when the current network information corresponding to the terminal changes, the changed network information is updated to the cache in real time, so as to ensure normal operation of the terminal.
For specific limitations of the network information synchronization control device, reference may be made to the above limitations of the network information synchronization control method, which is not described herein again. All or part of each module in the network information synchronization control device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 11. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a network information synchronization control method. 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. 11 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, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program: detecting a screen on/off message; when the bright screen message is detected, starting a modem network information synchronization process; and when the screen-off message is detected, continuously detecting the screen-on and screen-off message.
In one embodiment, initiating a modem network information synchronization procedure comprises: reading first network information monitored in real time from a cache of a modem; comparing the first network information with second network information corresponding to the first network information in a file system of the modem; and when the first network information is inconsistent with the second network information, updating the second network information in the file system to be the first network information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and after the bright screen message is detected and the screen off message is not detected, repeatedly executing the step of reading the first network information monitored in real time from the cache of the modem according to a preset period.
In one embodiment, the processor, when executing the computer program, further performs the steps of: monitoring first network information in a cache of a modem in real time after detecting a screen-on message and before detecting a screen-off message; and when the first network information is monitored to be changed, reading the first network information monitored in real time from a cache of the modem.
In one embodiment, reading the first network information monitored in real time from the cache of the modem includes: querying a preconfigured synchronization control flag; when the inquired synchronous control mark indicates that the synchronous control function is started, judging whether the synchronous control mark is in a normal working state or not; and if the modem is in a normal working state, reading the first network information monitored in real time from a cache of the modem.
In one embodiment, the first network information includes at least one of a registration status, cell information, and a network type.
The computer equipment detects the on-off screen message in real time, and executes corresponding operation according to the detected on-off screen message so as to realize network information synchronous control of the modem. When the screen-on message is detected, the network information synchronization process of the modem is started to ensure the normal synchronization of the network information, and when the screen-off message is detected, the synchronization process is not started, the screen-on and screen-off message is continuously detected, so that the standby power consumption is reduced, and the service life of a battery is prolonged.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: detecting a screen on/off message; when the bright screen message is detected, starting a modem network information synchronization process; and when the screen-off message is detected, continuously detecting the screen-on and screen-off message.
In one embodiment, initiating a modem network information synchronization procedure comprises: reading first network information monitored in real time from a cache of a modem; comparing the first network information with second network information corresponding to the first network information in a file system of the modem; and when the first network information is inconsistent with the second network information, updating the second network information in the file system to be the first network information.
In one embodiment, the computer program when executed by the processor further performs the steps of: and after the bright screen message is detected and the screen off message is not detected, repeatedly executing the step of reading the first network information monitored in real time from the cache of the modem according to a preset period.
In one embodiment, the computer program when executed by the processor further performs the steps of: monitoring first network information in a cache of a modem in real time after detecting a screen-on message and before detecting a screen-off message; and when the first network information is monitored to be changed, reading the first network information monitored in real time from a cache of the modem.
In one embodiment, reading the first network information monitored in real time from the cache of the modem includes: querying a preconfigured synchronization control flag; when the inquired synchronous control mark indicates that the synchronous control function is started, judging whether the synchronous control mark is in a normal working state or not; and if the modem is in a normal working state, reading the first network information monitored in real time from a cache of the modem.
In one embodiment, the first network information includes at least one of a registration status, cell information, and a network type.
The computer readable storage medium detects the on-off screen message in real time, and executes corresponding operation according to the detected on-off screen message, so as to realize network information synchronous control of the modem. When the screen-on message is detected, the network information synchronization process of the modem is started to ensure the normal synchronization of the network information, and when the screen-off message is detected, the synchronization process is not started, the screen-on and screen-off message is continuously detected, so that the standby power consumption is reduced, and the service life of a battery is prolonged.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification 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 more specific and detailed, but not construed as limiting the scope of the invention. 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 shall be subject to the appended claims.

Claims (10)

1. A network information synchronization control method, the method comprising:
detecting a screen on/off message;
when the bright screen message is detected, starting a modem network information synchronization process, wherein the modem network information synchronization process is used for synchronizing network information in a cache of a modem and network information in a file system;
when the screen-off message is detected, the synchronous flow of the modem network information is not started, and the screen-on and screen-off message is continuously detected;
the process of starting the modem network information synchronization comprises the following steps:
reading first network information monitored in real time from a cache of a modem, wherein the first network information can be lost along with the power failure or the restart of a terminal;
comparing the first network information with second network information corresponding to the first network information in a file system of the modem, wherein the second network information cannot be lost along with the power failure or the restart of the terminal;
and when the first network information is inconsistent with the second network information, updating the second network information in the file system to the first network information.
2. The method of claim 1, further comprising:
and after the screen-on message is detected and the screen-off message is not detected, repeatedly executing the step of reading the first network information monitored in real time from the cache of the modem according to a preset period.
3. The method of claim 1, further comprising:
monitoring first network information in a cache of a modem in real time after detecting a screen-on message and before detecting a screen-off message;
and when the first network information is monitored to be changed, the step of reading the first network information monitored in real time from the cache of the modem is executed.
4. The method of claim 1, wherein reading the first network information monitored in real time from a cache of the modem comprises:
querying a preconfigured synchronization control flag;
when the inquired synchronous control mark indicates that the synchronous control function is started, judging whether the synchronous control mark is in a normal working state or not;
and if the modem is in a normal working state, reading the first network information monitored in real time from a cache of the modem.
5. The method according to any one of claims 1 to 4, wherein the first network information comprises at least one of registration status, cell information and network type.
6. A network information synchronization control apparatus, characterized in that the apparatus comprises:
the synchronous control module is used for detecting the screen on/off message and sending a synchronous function starting instruction when the screen on/off message is detected;
the synchronization module is used for receiving the synchronization function starting instruction and starting a modem network information synchronization process according to the synchronization function starting instruction, wherein the modem network information synchronization process is used for synchronizing network information in a cache of a modem and network information in a file system;
the synchronous control module is also used for detecting the screen-off message, and when the screen-off message is detected, the synchronous flow of the modem network information is not started, and the screen-on and screen-off message is continuously detected;
the device further comprises: the system comprises a cache module, a file system module and an updating module;
the cache module is used for detecting and caching first network information in real time, wherein the first network information is lost along with the power failure or restart of the terminal; the cache module is deployed on the modem;
the file system module is used for storing second network information corresponding to the first network information, and the second network information cannot be lost along with the power failure or the restart of the terminal; the file system module is deployed on a modem;
the synchronization module is further used for reading the first network information from the cache module according to the synchronization function starting instruction; further for comparing the first network information with the second network information; sending a network information synchronization message when the first network information is inconsistent with the second network information;
and the updating module is used for receiving the network information synchronization message and updating the second network information in the file system into the first network information according to the network information synchronization message.
7. The apparatus of claim 6, wherein the synchronization module is further configured to repeatedly read the first network information monitored in real time from the cache of the modem according to a preset period after the bright-screen message is detected and when the screen-off message is not detected.
8. The apparatus of claim 6, wherein the synchronization control module is further configured to query a preconfigured synchronization control flag; the synchronous control device is also used for judging whether the current state is in a normal working state or not when the inquired synchronous control mark indicates that the synchronous control function is started; and if the modem is in a normal working state, reading the first network information monitored in real time from a cache of the modem.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 5.
CN201810224901.7A 2018-03-19 2018-03-19 Network information synchronization control method and device, computer equipment and storage medium Active CN108540977B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810224901.7A CN108540977B (en) 2018-03-19 2018-03-19 Network information synchronization control method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810224901.7A CN108540977B (en) 2018-03-19 2018-03-19 Network information synchronization control method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108540977A CN108540977A (en) 2018-09-14
CN108540977B true CN108540977B (en) 2022-02-18

Family

ID=63484736

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810224901.7A Active CN108540977B (en) 2018-03-19 2018-03-19 Network information synchronization control method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108540977B (en)

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8548520B2 (en) * 2007-01-26 2013-10-01 Wi-Lan Inc. Multiple network access system and method
CN101895650B (en) * 2010-07-21 2012-07-04 广州中道电子科技有限公司 Integrated access server system and implementation method thereof
US20140321302A1 (en) * 2013-04-26 2014-10-30 Htc Corporation Mobile device and method for data synchronization
CN106162821A (en) * 2015-04-27 2016-11-23 中兴通讯股份有限公司 NetFind method and device
CN105813180A (en) * 2016-03-14 2016-07-27 福州瑞芯微电子股份有限公司 Modem intelligent dormancy method and system
CN106445072B (en) * 2016-09-27 2019-10-25 依偎科技(南昌)有限公司 Realize that mobile terminal reduces the method, apparatus and mobile terminal of power consumption
CN106793026B (en) * 2016-11-29 2020-04-14 努比亚技术有限公司 Method and terminal for realizing event reporting processing
CN106843454A (en) * 2017-02-28 2017-06-13 宇龙计算机通信科技(深圳)有限公司 Display control method and display device
CN107094303B (en) * 2017-06-09 2021-01-15 努比亚技术有限公司 Terminal network registration method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN108540977A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
CN110913504B (en) Network connection method, terminal device and storage medium
CN116233987A (en) Bandwidth part switching method and device
CN111132378B (en) Method and device for enhancing inactive state, user equipment and storage medium
CN108616979B (en) Dual-card network system control method and device, computer equipment and storage medium
WO2017049734A1 (en) Network mode switching protection method and apparatus
CN109804662B (en) Bandwidth part switching method and device
CN109496451B (en) Network parameter configuration method, device and computer readable storage medium
CN111372305B (en) Method, device and equipment for switching connection modes
CN107277872B (en) Network switching method, device, mobile terminal and computer readable storage medium
CN108401525B (en) Power headroom report transmission method and device
US20230397162A1 (en) Information sending method and apparatus, and storage medium
CN111866976B (en) Network switching method and device
CN112533261A (en) Network switching method and device and electronic equipment
CN110677869A (en) Network connection control method, terminal and storage medium
CN112929481A (en) Incoming call processing method and device, electronic equipment and computer readable storage medium
CN108540977B (en) Network information synchronization control method and device, computer equipment and storage medium
US11445412B2 (en) Access control method, apparatus and storage medium
CN112671978B (en) Call control method, device and storage medium
WO2024078476A1 (en) Network switching method and apparatus
JP2022514901A (en) Methods and devices for transmitting configuration information related to measurement control
CN112423369A (en) Method, device and medium for controlling residence
CN109511139B (en) WIFI control method and device, mobile device and computer-readable storage medium
JP2004094577A (en) Information terminal equipment
CN113630851B (en) Communication mode state switching method and device, computer equipment and storage medium
CN113596967A (en) WIFI dormancy control method and device for MIFI equipment, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant