CN104750579B - The method and apparatus for making memory mirror - Google Patents
The method and apparatus for making memory mirror Download PDFInfo
- Publication number
- CN104750579B CN104750579B CN201510174738.4A CN201510174738A CN104750579B CN 104750579 B CN104750579 B CN 104750579B CN 201510174738 A CN201510174738 A CN 201510174738A CN 104750579 B CN104750579 B CN 104750579B
- Authority
- CN
- China
- Prior art keywords
- memory mirror
- terminal device
- memory
- database
- 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
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the present invention provides a kind of method and apparatus for making memory mirror, and this method includes:Terminal device judges terminal device state in which, if terminal device is in memory mirror and makes state, then terminal device is before first application file starts, memory mirror making processing is carried out under the triggering opening pattern of database service, terminal device starts first application file after memory mirror completes.The method and apparatus provided in an embodiment of the present invention for making memory mirror can improve the reliability of system.
Description
Technical field
The present embodiments relate to the communication technology, more particularly to a kind of method and apparatus for making memory mirror.
Background technology
Memory mirror is that two parts of copies are made to internal storage data, is individually placed in main memory and mirror memory, to prevent because
Internal memory breaks down and causes the permanent loss of data, and therefore, terminal device utilizes this characteristic, can be by by a certain moment
Internal storage state do a memory mirror, and in-situ FTIR spectroelectrochemitry is carried out according to the memory mirror, so as to reach the purpose of quick turn-on.
In the prior art, when realizing quick turn-on using memory mirror technology, if memory mirror is in user's using terminal
Completed before equipment, and after user's using terminal equipment, because some operations may cause system, using shape
State or arranges value are changed, and these changes will be stored in storage medium by file system, if user's using terminal equipment
After a period of time, then quick turn-on realized using memory mirror technology, now, the data in memory mirror may be with storage medium
In data it is inconsistent, will result in file system and directly collapse, cause file system no longer available.Asked to solve this
Topic, it is in the prior art, general using before equipment of closing a terminal every time, an internal memory mirror is made to newest internal storage state
Picture, to ensure that the data in memory mirror and storage medium are consistent.
However, due to during memory mirror is made every time, it is necessary to ensure the powered stable of terminal device, if
Power-off suddenly, then memory mirror can be made to make failure, cause memory mirror to make failure, can not be used when causing to start shooting next time
Memory mirror technology realizes quick turn-on so that the reliability of system is not high.
The content of the invention
The embodiment of the present invention provides a kind of method and apparatus for making memory mirror, to improve the reliability of system.
In a first aspect, the embodiment of the present invention provides a kind of method for making memory mirror, including:
Terminal device judges the terminal device state in which;
If the terminal device is in memory mirror and makes state, the terminal device is starting first application file
Before, memory mirror making processing is carried out under the triggering opening pattern of database service;
The terminal device starts first application file after the memory mirror completes.
With reference in a first aspect, in the first possible implementation of first aspect, the triggering opening pattern be
The terminal device opens database file when detecting database manipulation request, and is not detected by the terminal device described
Database manipulation closes the place of the database file at the end of asking or detecting the access of the database manipulation request
Reason pattern.
With reference to the possible implementation of the first of first aspect or first aspect, second in first aspect is possible
In implementation, before carrying out memory mirror making processing under the triggering opening pattern in database service, the side
Method also includes:
The terminal device is compiled the configuration of item to system file, to release in data and storage medium in internal memory
Data between coupling;
The then progress memory mirror making processing under the triggering opening pattern of database service, including:
After coupling between data of the terminal device in the data and storage medium in releasing internal memory, described
Memory mirror making processing is carried out under the triggering opening pattern of database service.
With reference to first aspect, first aspect the first to first aspect second of any possible implementation,
It is described that internal memory mirror is carried out under the triggering opening pattern of database service in the third possible implementation of first aspect
Before making processing, methods described also includes:
The terminal device judges whether the mode of operation of the database service is long-term opening pattern;
If the mode of operation of the database service opens pattern to be long-term, by the mode of operation of the database service
By the long-term pattern switching of opening for the triggering opening pattern.
With reference in a first aspect, in the 4th kind of possible implementation of first aspect, methods described also includes:
If the terminal device is in image recovery state, by the mode of operation of the database service by the triggering
Open pattern switching and open pattern to be long-term;
The terminal device reads the memory mirror under the long-term opening pattern of the database service, to start
Locally applied file.
With reference to the 4th kind of possible implementation of first aspect, in the 5th kind of possible implementation of first aspect
In, it is described to read the memory mirror, to start locally applied file, specifically include:
The terminal device triggers the background service for memory mirror recovery to except the backstage recovered for memory mirror
Other background services outside service send a notification message, so that other described background services are identifying that the notification message is
When memory mirror recovers message, the memory mirror is read;
The terminal device starts locally applied file according to the memory mirror of reading.
Second aspect, the embodiment of the present invention provide a kind of method for making memory mirror, including:
Terminal device judges the terminal device state in which;
If the terminal device is in memory mirror and makes state, the terminal device is starting first application file
Before, and before log-on data storehouse services, memory mirror making processing is carried out;
The terminal device starts first application file after the memory mirror completes.
The third aspect, the embodiment of the present invention provide a kind of device for making memory mirror, including:
Judge module, for judging the state described in the terminal device;
Processing module, for the judge module judge the terminal device be in memory mirror make state when,
Before first application file is started, mirror image making processing is carried out under the triggering opening pattern of database service;
Starting module, after being completed in the memory mirror, start first application file.
With reference to the third aspect, in the first possible implementation of the third aspect, described device also includes:Detect mould
Block, for detecting whether database manipulation request be present, or whether the access of the detection database manipulation request terminates;
Wherein, the triggering opening pattern is to open database when the detection module detects database manipulation request
File, and be not detected by the database manipulation request in the detection module or detect the database manipulation request
The tupe of the database file is closed at the end of access.
With reference to the possible implementation of the first of the third aspect or the third aspect, second in the third aspect is possible
In implementation, the processing module is additionally operable to be compiled system file the configuration of item, with release the data in internal memory with
The coupling between data in storage medium;
The processing module is additionally operable to after the coupling between the data in the data and storage medium in releasing internal memory,
Memory mirror making processing is carried out under the triggering opening pattern of the database service.
With reference to the third aspect, the third aspect the first to the third aspect second of any possible implementation,
In the third possible implementation of the third aspect, described device also includes handover module;Wherein,
The judge module, whether the mode of operation for being additionally operable to judge the database service is long-term opening pattern;
The handover module, for the database service mode of operation for it is long-term open pattern when, by the number
According to the mode of operation of storehouse service by the long-term pattern switching of opening for the triggering opening pattern.
With reference to the third aspect, in the 4th kind of possible implementation of the third aspect, described device also includes switching mould
Block;Wherein,
The handover module, if for judging that the terminal device is in image recovery state in the judge module,
The mode of operation of the database service is then opened into pattern switching by the triggering and opens pattern to be long-term;
The starting module, it is additionally operable under the long-term opening pattern of the database service, reads the memory mirror,
To start locally applied file.
With reference to the 4th kind of possible implementation of the third aspect, in the 5th kind of possible implementation of the third aspect
In, the starting module includes:
Trigger element, the background service of memory mirror recovery to be used for for triggering to except the backstage recovered for memory mirror
Other background services outside service send a notification message, so that other described background services are identifying that the notification message is
When memory mirror recovers message, the memory mirror is read;
Start unit, for the memory mirror according to reading, start locally applied file.
Fourth aspect, the embodiment of the present invention provide a kind of device for making memory mirror, including:
Judge module, for judging the terminal device state in which;
Processing module, for the judge module judge the terminal device be in memory mirror make state when,
Before first application file is started, and before log-on data storehouse services, memory mirror making processing is carried out;
Starting module, after being completed in the memory mirror, start first application file.
The method and apparatus provided in an embodiment of the present invention for making memory mirror, terminal device is by judging the shape residing for it
State, if judge the terminal device be in memory mirror make state, terminal device before first application file is started,
Mirror image making processing is carried out under the triggering opening pattern of database service, the terminal device completes it in memory mirror
Afterwards, first application file is started.Due to being under the triggering opening pattern of database service, and in first application file
Memory mirror is made before starting, thus can effectively release data coupling, relieve in internal memory the data of file system with
The dependence between data in storage medium, so as to improve the reliability of system.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are this hairs
Some bright embodiments, for those of ordinary skill in the art, without having to pay creative labor, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the schematic flow sheet for the embodiment of the method one that the present invention makes memory mirror;
Fig. 2 is the schematic flow sheet for the embodiment of the method two that the present invention makes memory mirror;
Fig. 3 is the schematic flow sheet for the embodiment of the method three that the present invention makes memory mirror;
Fig. 4 is the structural representation for the device embodiment one that the present invention makes memory mirror;
Fig. 5 is the structural representation for the device embodiment two that the present invention makes memory mirror;
Fig. 6 is the structural representation for the device embodiment three that the present invention makes memory mirror;
Fig. 7 is the structural representation for the device embodiment four that the present invention makes memory mirror;
Fig. 8 is the structural representation of terminal device embodiment one of the present invention;
Fig. 9 is the structural representation of terminal device embodiment two of the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Fig. 1 is the schematic flow sheet for the embodiment of the method one that the present invention makes memory mirror.The embodiments of the invention provide
A kind of method for making memory mirror, this method can be performed by any device for performing the method for making memory mirror, should
Device can be realized by software and/or hardware.In the present embodiment, the device can be integrated in terminal device.Such as Fig. 1 institutes
Show, the method for the present embodiment can include:
Step 101, terminal device judge terminal device state in which.
In the present embodiment, after powering, it is to make state in memory mirror to be in that can judge it to terminal device
Image recovery state.In actual applications, can be by setting a Configuration Values in systems, to judge residing for terminal device
State, such as:If by judging, it is 0 to know the Configuration Values, then can show that terminal device is in mirror image and makes state, if matching somebody with somebody
It is 1 to put value, then can show that terminal device is in image recovery state.It is worth noting that, residing for Configuration Values and terminal device
State between corresponding relation, can be configured according to being actually needed, the invention is not limited in this regard.
If step 102, terminal device are in memory mirror and make state, terminal device is starting first application file
Before, memory mirror making processing is carried out under the triggering opening pattern of database service.
In the present embodiment, after terminal device start, guiding mini system is typically first started, guiding mini system starts successfully
Afterwards, hardware device can be initialized, then restarts main system, application file, including loading are loaded by main system successively
Database service, application manager etc..Such as:In embedded OS, typically first start guiding mini system
BootLoader, with initiating hardware equipment, memory headroom mapping graph etc. is established, so as to take the hardware environment of system to one
Individual proper states, prepared for loading main system and other application file.Wherein, alternatively, terminal device can be that intelligence is whole
End equipment, such as smart mobile phone, PAD etc..
It should be noted that conventionally, as after database service startup, will continue to open data library text
Part and documentary handle is held for a long time, to carry out the operation such as the inquiry of data, insertion or deletion.Now, when have backstage should
During with file start, system, application state or arranges value may be caused to change, and be opened because database file is in
State, therefore, these data changed will be stored in database file so that the data of file system and storage in internal memory
Dependence is produced between data in medium.In order to solve this problem, in the present embodiment, it is necessary to make the work of database service
Pattern is triggering opening pattern.In actual applications, the database service directly can open pattern with the triggering of acquiescence and start,
Can also be when database service start, by terminal device by being detected to whole system, if knowing, now system is in
The state of memory mirror is made, then by the mode of operation of database service by opening pattern switching for a long time as triggering opening pattern.
It is worth noting that, the mode of operation in the present embodiment for database service can use default behavior, can also use
Follow-up set-up mode, but other modes can also be used, as long as ensureing its mode of operation for triggering opening pattern, the present invention
This is not any limitation as.In addition, storage medium include database, disk etc. can with the system or equipment of data storage, for
The concrete form of storage medium, the present embodiment are not particularly limited herein.
For example, it is described in detail by taking android system as an example, after android system starts for the first time, initially
(Init) process of change can start service managerZ-HU (Service Manager), and service managerZ-HU will start other successively
Background service, including database service (Sqlite) etc., wherein it is possible to directly open mode startup data storehouse with the triggering of acquiescence
Service, can also be when database service starts, by terminal device by being detected to whole system, if knowing now system
In the state for making memory mirror, then the mode of operation of the database service is opened by opening pattern switching for a long time for triggering
Pattern.
In the present embodiment, after terminal device, which scans all application files, to be completed, the application in terminal device
Management service can then trigger memory mirror manufacturing process, so as to make memory mirror when preparing to start first application file.
Now, because all application files do not start, and the mode of operation of database service is still triggering opening pattern,
I.e. database manipulation is in loose coupling state, therefore, between the data in internal memory in the data and storage medium of file system not
Dependence can be produced.Simultaneously as the All Files required for now starting shooting all is ready for ready, and system is in and will started
At the time of first application file, therefore, this moment be make memory mirror Best Times, and make memory mirror
Meet the time requirement of quick turn-on.Such as:In android system, service managerZ-HU is by application manager
After (Application Manager) starts, application manager will prepare to start application file, start the in application server
Before one application file, memory mirror manufacturing process can be triggered first, to complete the making of memory mirror.
Step 103, terminal device start first application file after memory mirror completes.
In the present embodiment, after memory mirror completes, terminal device will start first application file, and from
One application file starts to start locally applied file successively, including desktop starter and other applications preloaded, with complete
Into starting procedure.
Need to illustrate, under the triggering opening pattern of database service, and first application file starts
After making memory mirror before, hereafter when terminal device re-powers or turns back on, this memory mirror can be utilized
In-situ FTIR spectroelectrochemitry is carried out, reaches the purpose of quick turn-on, in addition, in the follow-up course of work, if being carried out using this memory mirror
During in-situ FTIR spectroelectrochemitry, it is only necessary to platform service is done to the data value synchronous refresh of some last states, in concrete implementation mistake
Cheng Zhong, being responsible for the background service of image recovery can send a notification message to other background services, and other background services are receiving
After the notification message, if it is to carry out in-situ FTIR spectroelectrochemitry from memory mirror to be identified according to the notification message, it need to only re-read
Data in database, using the data value of last state.Wherein, platform service includes being present in memory mirror
The system background service of startup, such as network service, power service etc..And for application file, due to making internal memory mirror
During picture, all application files are all not actuated, so application file need not make any modification, can use newest data value
Loaded, it can be seen that, it memory mirror is made using this mode not only avoid and close a terminal and set every time in the prior art
Before standby, it is required for making newest internal storage state the phenomenon of memory mirror, and improves the practicality of system.
It is provided in an embodiment of the present invention make memory mirror method, terminal device by judging its state in which, if
Judge that the terminal device is in memory mirror and makes state, then terminal device is before first application file is started, in number
According to memory mirror making processing is carried out under the triggering opening pattern of storehouse service, after memory mirror completes, start first
Application file.Due to being under the triggering opening pattern of database service, and made before first application file starts
Memory mirror, thus data coupling can be effectively released, relieve in internal memory in the data and storage medium of file system
Dependence between data, so as to improve the reliability of system.
Alternatively, it is to open database file when terminal device detects database manipulation request to trigger opening pattern,
And it is not detected by database manipulation request in terminal detection or detects that database manipulation request closes database at the end of accessing
The tupe of file.
Specifically, when having detected specifically database manipulation request, terminal device just opens database file, and works as
Do not detect that database manipulation request or database manipulation are asked at the end of having accessed, then close database file at once
Close, dependence of the data for a long time to storage medium can be released using triggering opening pattern, wherein, database manipulation request for example may be used
Think that inquiry, addition, deletion etc. operate.
Alternatively, terminal device is compiled the configuration of item to system file, is situated between with releasing the data in internal memory with storage
The coupling between data in matter;
Memory mirror making processing is then carried out under the triggering opening pattern of database service, including:
After coupling between data of the terminal device in the data and storage medium in releasing internal memory, taken in database
Memory mirror making processing is carried out under the triggering opening pattern of business.
Specifically, if the phenomenon that coupling is not produced by database between some function choosing-items be present, at this point it is possible to
Compilation phase releases caused coupling.In actual applications, terminal device can be by being compiled item to system file
Configuration, some function choosing-items for producing data coupling are closed, the compiling option relied on is produced to remove, so as to release in internal memory
The coupling between data in data and storage medium, reach the number released in internal memory in the data and storage medium of file system
The purpose of dependence between.Such as:For android system, user pattern compilers can be used to carry out static compilation,
Then in the case where operation does not produce eng patterns, dalvik virtual machines are to debug and caused odex files.Release and produce in the compilation phase
Data coupling after, under the triggering opening pattern of database service carry out memory mirror making processing.
Alternatively, before carrying out memory mirror making processing under the triggering opening pattern of database service, methods described
Also include:Terminal device judges whether the mode of operation of database service is long-term opening pattern;If the work of database service
Pattern opens pattern to be long-term, then by the mode of operation of database service by opening pattern switching for a long time as triggering opening pattern.
It is provided in an embodiment of the present invention make memory mirror method, terminal device by judging its state in which, if
Judge that the terminal device is in memory mirror and makes state, then terminal device is before first application file is started, in number
Memory mirror is made under triggering opening pattern according to storehouse service, after memory mirror completes, starts first application file.
Due to being under the triggering opening pattern of database service, and memory mirror is made before first application file starts,
Data coupling thus can be effectively released, is relieved between the data in internal memory in the data and storage medium of file system
Rely on, so as to improve the reliability of system.In addition, terminal device is by when being compiled the configuration of item to system file,
The compiling option for producing and relying on can also be removed, to release the coupling of data, ensure that the data in memory mirror are situated between with storage
The uniformity of data in matter.
Fig. 2 is the schematic flow sheet for the embodiment of the method two that the present invention makes memory mirror, and the present embodiment is making internal memory
On the basis of the embodiment of the method one of mirror image, the embodiment of quick turn-on is realized using memory mirror to terminal device, is done in detail
Explanation.As shown in Fig. 2 the method for the present embodiment can include:
Step 201, terminal device judge terminal device state in which.
Step 201 is similar with step 101, and here is omitted.
If step 202, terminal device are in image recovery state, the mode of operation of database service is opened by triggering
Pattern switching opens pattern to be long-term.
In the present embodiment, when user re-powers terminal device, and in-situ FTIR spectroelectrochemitry is carried out from memory mirror, terminal is set
It is standby by judging, if knowing, now system be in the state of image recovery, and the mode of operation of database service is beaten by triggering
On-mode switches to long-term opening pattern again, and now, database service is by lasting opening and holds documentary handle for a long time, i.e.,
The performance recovery of database service is operated to the state of normal use with completing the inquiry of data, insertion or deletion etc..Such as:
In android system, after user re-powers terminal device, BootLoader can carry out image recovery, now, number
The mode of operation of (Sqlite) is serviced according to storehouse will be switched to long-term opening pattern, and database again by triggering opening pattern
Service will hold db file handles for a long time.
Step 203, terminal device read memory mirror, to start local under the long-term opening pattern of database service
Application file.
In the present embodiment, after the mode of operation of database service being switched into long-term opening pattern, terminal device can
With the memory mirror according to making, memory mirror is read, to complete the start process of terminal device, in specifically implementation process
In, terminal device only needs to do platform service into the data value synchronous refresh of some last states, in concrete implementation mistake
Cheng Zhong, the background service for being responsible for image recovery can be to other background services in addition to the background service recovered except responsible memory mirror
Send a notification message, other background services are after the notification message is received, if it is from interior to be identified according to the notification message
Deposit mirror image and carry out in-situ FTIR spectroelectrochemitry, then the data in database need to be only re-read, using the data value of last state.Its
In, platform service includes being present in the system background service having been started up in memory mirror, such as network service, power service
Deng.And for application file, because when making memory mirror, all application files are all not actuated, so application file
Any modification need not be made, can be loaded using newest data value.Further, since data and storage in memory mirror
Data in medium are in loose coupling state, thus collapse phenomenon will not occur for system during quick turn-on.Therefore, terminal
Equipment can successfully start desktop application and other be defined as preload business, for example, desktop starter Launcher
And the application of other preloadings.
It is provided in an embodiment of the present invention make memory mirror method, terminal device by judging its state in which, if
Judge that the terminal device is in memory mirror and makes state, then terminal device is before first application file is started, in number
Memory mirror is made under triggering opening pattern according to storehouse service, after the memory mirror completes, starts first practical writing
Part.Due to being under the triggering opening pattern of database service, and internal memory mirror is made before first application file starts
Picture, thus can effectively release data coupling, relieve data in internal memory in the data and storage medium of file system it
Between dependence, so as to improve the reliability of system.In addition, when terminal device is in image recovery state, database is taken
The mode of operation of business switches to long-term opening pattern, and under this mode of operation, reads memory mirror, internal memory mirror is utilized to reach
Purpose as carrying out quick turn-on.
Fig. 3 is the schematic flow sheet for the embodiment of the method three that the present invention makes memory mirror.The embodiments of the invention provide
A kind of method for making memory mirror, this method can be performed by any device for performing the method for making memory mirror, should
Device can be realized by software and/or hardware.In the present embodiment, the device can be integrated in terminal device.Such as Fig. 3 institutes
Show, the method for the present embodiment can include:
Step 301, terminal device judge terminal device state in which.
In the present embodiment, after powering, it is to make state in memory mirror to be in that can judge it to terminal device
Image recovery state.In actual applications, can be by setting a Configuration Values in systems, to judge residing for terminal device
State, such as:If by judging, it is 0 to know the Configuration Values, then can show that terminal device is in mirror image and makes state, if matching somebody with somebody
It is 1 to put value, then can show that terminal device is in image recovery state.It is worth noting that, residing for Configuration Values and terminal device
State between corresponding relation, can be configured according to being actually needed, the invention is not limited in this regard.
If step 302, terminal device are in memory mirror and make state, terminal device is starting first application file
Before, and before log-on data storehouse services, memory mirror making processing is carried out.
Conventionally, as after database service starts, it will continue to open database file and hold for a long time
Documentary handle, to carry out the operation such as the inquiry of data, insertion or deletion, now, when the application file for having backstage starts,
System, application state or arranges value may be caused to change, and because database file is in open mode, therefore, this
The data changed a bit will be stored in database file so that the data in internal memory in the data and storage medium of file system
Between produce dependence.In order to solve this problem, in the present embodiment, if terminal device is in memory mirror making state,
After terminal device, which scans all application files, to be completed, before first application file is started, and in database
Before service starts, memory mirror manufacturing process is triggered, so as to make memory mirror.Now, because all application files are equal
Do not start, and database service does not also start, therefore, the data in internal memory in the data and storage medium of file system
Between will not produce dependence.
Step 303, terminal device start first application file after memory mirror completes.
In the present embodiment, after memory mirror completes, terminal device will start first application file, and from
One application file starts to start locally applied file successively, including desktop starter and other applications preloaded, with complete
Into starting procedure.
It is provided in an embodiment of the present invention make memory mirror method, terminal device by judging its state in which, if
Judge the terminal device be in memory mirror make state, then terminal device before first application file is started, and
Memory mirror making processing is carried out before database service startup, after memory mirror completes, starts first application
File.And it is to make memory mirror before database service startup due to being before first application file starts, because
And can effectively release data coupling, relieve between the data in internal memory in the data and storage medium of file system according to
Rely, so as to improve the reliability of system.
Fig. 4 is the structural representation for the device embodiment one that the present invention makes memory mirror.As shown in figure 4, the present invention is real
Applying the device 400 of the making memory mirror of example offer includes judge module 401, processing module 402 and starting module 403.
Wherein, judge module 401 is used to judge the state described in the terminal device;Processing module 402 is used for described
When judge module 401 judges that the terminal device is in memory mirror making state, before first application file is started,
Memory mirror making processing is carried out under the triggering opening pattern of database service;Starting module 403 is used in the internal memory mirror
As after completing, starting first application file.
The device provided in an embodiment of the present invention for making memory mirror, by judging terminal device state in which, if sentencing
Break the terminal device be in memory mirror make state, then before first application file is started, in database service
Trigger and memory mirror making processing is carried out under opening pattern, after memory mirror completes, start first application file.By
Then under the triggering opening pattern of database service, and memory mirror is made before first application file starts, because
And can effectively release data coupling, relieve between the data in internal memory in the data and storage medium of file system according to
Rely, so as to improve the reliability of system.
Fig. 5 is the structural representation for the device embodiment two that the present invention makes memory mirror, as shown in figure 5, the present embodiment
On the basis of embodiment illustrated in fig. 4, described device 400 also includes detection module 404.
Wherein, for detecting whether there is database manipulation request, or detect the database manipulation in detection module 404
Whether the access of request terminates;The triggering opening pattern is when the detection module 404 detects database manipulation request
Database file is opened, and is not detected by the database manipulation request in the detection module 404 or detects the number
The tupe of the database file is closed at the end of access according to storehouse operation requests.
Alternatively, the processing module 402 is additionally operable to be compiled system file the configuration of item, to release in internal memory
The coupling between data in data and storage medium;
The processing module 402 is additionally operable to data between the data in the data and storage medium in releasing the internal memory
Coupling after, under the triggering opening pattern of the database service carry out memory mirror making processing.
Alternatively, described device 400 also includes handover module 405, wherein,
The judge module 401 is additionally operable to judge whether the mode of operation of the database service is long-term opening pattern;
The handover module 405 is used to judge that the mode of operation of the database service is in the judge module 401
During long-term opening pattern, by the mode of operation of the database service by the long-term pattern switching of opening for the triggering opening
Pattern.
The device of the making memory mirror of the present embodiment, can be used for performing the making that any embodiment of the present invention is provided
The technical scheme of the method for memory mirror, its implementing principle and technical effect is similar, and here is omitted.
Fig. 6 is the structural representation for the device embodiment three that the present invention makes memory mirror, as shown in fig. 6, the present embodiment
On the basis of embodiment illustrated in fig. 4, described device 400 also includes handover module 406.
Wherein, the handover module 406 is extensive for judging that the terminal device is in mirror image in the judge module 401
Multiple state, then the mode of operation of the database service is opened into pattern switching by the triggering and open pattern to be long-term;
The starting module 403 is additionally operable under the long-term opening pattern of the database service, reads the internal memory mirror
Picture, to start locally applied file.
Alternatively, the starting module 403 includes:
Trigger element 4031, which is used to triggering, is used for background service that memory mirror recovers to except recovering for memory mirror
Other background services outside background service send a notification message so that other described background services identify it is described notice disappear
Cease for memory mirror recover message when, read the memory mirror;
Start unit 4032 is used for the memory mirror according to reading, starts locally applied file.
The device of the making memory mirror of the present embodiment, can be used for performing the making that any embodiment of the present invention is provided
The technical scheme of the method for memory mirror, its implementing principle and technical effect is similar, and here is omitted.
Fig. 7 is the structural representation for the device embodiment four that the present invention makes memory mirror.As shown in fig. 7, the present invention is real
Applying the device 700 of the making memory mirror of example offer includes judge module 701, processing module 702 and starting module 703.
Wherein, judge module 701 is used to judge the terminal device state in which;Processing module 702 is used for described
When judge module 701 judges that the terminal device is in memory mirror making state, before first application file is started,
And before log-on data storehouse services, carry out memory mirror making processing;Starting module 703 is used to make in the memory mirror
After completion, start first application file.
The device provided in an embodiment of the present invention for making memory mirror, by judging terminal device state in which, if sentencing
Break the terminal device be in memory mirror make state, then before first application file is started, and in log-on data storehouse
Before service, memory mirror making processing is carried out, after memory mirror completes, starts first application file.Due to being
Before first application file starts, and memory mirror is made before database service startup, thus can effectively solved
Except data couple, the dependence between the data in internal memory in the data and storage medium of file system is relieved, so as to improve
The reliability of system.
Fig. 8 is the structural representation of terminal device embodiment one of the present invention.As shown in figure 8, the terminal that the present embodiment provides
Equipment 800 includes processor 801 and memory 802, wherein, memory 802 stores execute instruction, when terminal device is run,
Communicated between processor 801 and memory 802, processor 801 calls the execute instruction in memory 802, following for performing
Operation:
Judge the terminal device state in which;
If the terminal device is in memory mirror and makes state, before first application file is started, in data
Memory mirror making processing is carried out under the triggering opening pattern of storehouse service;
After the memory mirror completes, start first application file.
Alternatively, the triggering opening pattern is that database file is opened when detecting database manipulation request, and
It is not detected by the database manipulation request or closes the number at the end of detecting the access that the database manipulation is asked
According to the tupe of library file.
Alternatively, before carrying out memory mirror making processing under the triggering opening pattern in database service, institute
Stating method also includes:
The configuration of item is compiled to system file, to release between the data in data and storage medium in internal memory
Coupling;
It is then described that memory mirror making processing is carried out under the triggering opening pattern of database service, specifically include:
After the coupling between data in the data and storage medium in releasing internal memory, in the database service
Trigger and memory mirror making processing is carried out under opening pattern.
Alternatively, it is described under the triggering opening pattern of database service carry out memory mirror making processing before, it is described
Method also includes:
Whether the mode of operation for judging the database service is long-term opening pattern;
If the mode of operation of the database service opens pattern to be long-term, by the mode of operation of the database service
By the long-term pattern switching of opening for the triggering opening pattern.
Alternatively, methods described also includes:
If the terminal device is in image recovery state, by the mode of operation of the database service by the triggering
Open pattern switching and open pattern to be long-term;
The terminal device reads the memory mirror under the long-term opening pattern of the database service, to start
Locally applied file.
Alternatively, it is described to read the memory mirror, to start locally applied file, specifically include:
Trigger for the background service that memory mirror recovers to its in addition to the background service recovered for memory mirror
He sends a notification message at background service, so that other described background services are identifying the notification message for memory mirror recovery
During message, the memory mirror is read;
According to the memory mirror of reading, start locally applied file.
The terminal device that the present embodiment provides, can be used for performing the making internal memory mirror that any embodiment of the present invention is provided
The technical scheme of the device of picture, its implementing principle and technical effect is similar, and here is omitted.
Fig. 9 is the structural representation of terminal device embodiment two of the present invention.As shown in figure 9, the terminal that the present embodiment provides
Equipment 900 includes processor 901 and memory 902, wherein, memory 902 stores execute instruction, when terminal device is run,
Communicated between processor 901 and memory 902, processor 901 calls the execute instruction in memory 902, following for performing
Operation:
Judge the terminal device state in which;
If the terminal device is in memory mirror and makes state, before first application file is started, and opening
Before dynamic database service, memory mirror making processing is carried out;
After the memory mirror completes, start first application file.
The terminal device that the present embodiment provides, can be used for performing the making internal memory mirror that any embodiment of the present invention is provided
The technical scheme of the device of picture, its implementing principle and technical effect is similar, and here is omitted.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above-mentioned each method embodiment can lead to
The related hardware of programmed instruction is crossed to complete.Foregoing program can be stored in a computer read/write memory medium.The journey
Sequence upon execution, execution the step of including above-mentioned each method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or
Person's CD etc. is various can be with the medium of store program codes.
Finally it should be noted that:Various embodiments above is merely illustrative of the technical solution of the present invention, rather than its limitations;To the greatest extent
The present invention is described in detail with reference to foregoing embodiments for pipe, it will be understood by those within the art that:Its according to
The technical scheme described in foregoing embodiments can so be modified, either which part or all technical characteristic are entered
Row equivalent substitution;And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technology
The scope of scheme.
Claims (14)
- A kind of 1. method for making memory mirror, it is characterised in that including:Terminal device judges the terminal device state in which;If the terminal device is in memory mirror and makes state, the terminal device start first application file it Before, memory mirror making processing is carried out under the triggering opening pattern of database service;The terminal device starts first application file after the memory mirror completes.
- 2. according to the method for claim 1, it is characterised in that the triggering opening pattern is to be detected in the terminal device Open database file when being asked to database manipulation, and the terminal device be not detected by the database manipulation request or Person closes the tupe of the database file at the end of detecting the access of the database manipulation request.
- 3. method according to claim 1 or 2, it is characterised in that open pattern in the triggering in database service Before lower progress memory mirror making processing, methods described also includes:The terminal device is compiled the configuration of item to system file, to release the number in data and storage medium in internal memory Coupling between;The then progress memory mirror making processing under the triggering opening pattern of database service, including:After coupling between data of the terminal device in the data and storage medium in releasing the internal memory, described Memory mirror making processing is carried out under the triggering opening pattern of database service.
- 4. method according to claim 1 or 2, it is characterised in that described under the triggering opening pattern of database service Before carrying out memory mirror making processing, methods described also includes:The terminal device judges whether the mode of operation of the database service is long-term opening pattern;If the mode of operation of the database service opens pattern to be long-term, by the mode of operation of the database service by institute Long-term pattern switching of opening is stated as the triggering opening pattern.
- 5. according to the method for claim 1, it is characterised in that methods described also includes:If the terminal device is in image recovery state, the mode of operation of the database service is opened by the triggering Pattern switching opens pattern to be long-term;The terminal device reads the memory mirror, to start local under the long-term opening pattern of the database service Application file.
- 6. according to the method for claim 5, it is characterised in that the reading memory mirror, it is locally applied to start File, specifically include:The terminal device triggers the background service for memory mirror recovery to except the background service recovered for memory mirror Outside other background services send a notification message so that other described background services are identifying that the notification message is internal memory During image recovery message, the memory mirror is read;The terminal device starts locally applied file according to the memory mirror of reading.
- A kind of 7. method for making memory mirror, it is characterised in that including:Terminal device judges the terminal device state in which;If the terminal device is in memory mirror and makes state, the terminal device start first application file it Before, and before log-on data storehouse services, carry out memory mirror making processing;The terminal device starts first application file after the memory mirror completes.
- A kind of 8. device for making memory mirror, it is characterised in that including:Judge module, for judging terminal device state in which;Processing module, for when the judge module judges that the terminal device is in memory mirror making state, opening Before moving first application file, memory mirror making processing is carried out under the triggering opening pattern of database service;Starting module, after being completed in the memory mirror, start first application file.
- 9. device according to claim 8, it is characterised in that described device also includes:Detection module, for detecting whether Database manipulation request be present, or whether the access of the detection database manipulation request terminates;Wherein, the triggering opening pattern is to open data library text when the detection module detects database manipulation request Part, and be not detected by the database manipulation request in the detection module or detect the visit of the database manipulation request The tupe of the database file is closed at the end of asking.
- 10. device according to claim 8 or claim 9, it is characterised in that the processing module is additionally operable to carry out system file The configuration of item is compiled, to release the coupling between the data in data and storage medium in internal memory;The processing module is additionally operable to after the coupling between the data in the data and storage medium in releasing the internal memory, Memory mirror making processing is carried out under the triggering opening pattern of the database service.
- 11. device according to claim 8 or claim 9, it is characterised in that described device also includes handover module;Wherein,The judge module, whether the mode of operation for being additionally operable to judge the database service is long-term opening pattern;The handover module, mould is opened to be long-term for judging the mode of operation of the database service in the judge module During formula, by the mode of operation of the database service by the long-term pattern switching of opening for the triggering opening pattern.
- 12. device according to claim 8, it is characterised in that described device also includes handover module;Wherein,The handover module, for judging that the terminal device is in image recovery state in the judge module, then by institute It is long-term opening pattern to state the mode of operation of database service and open pattern switching by the triggering;The starting module, it is additionally operable under the long-term opening pattern of the database service, the memory mirror is read, to open Move locally applied file.
- 13. device according to claim 12, it is characterised in that the starting module includes:Trigger element, the background service of memory mirror recovery to be used for for triggering to except the background service recovered for memory mirror Outside other background services send a notification message so that other described background services are identifying that the notification message is internal memory During image recovery message, the memory mirror is read;Start unit, for the memory mirror according to reading, start locally applied file.
- A kind of 14. device for making memory mirror, it is characterised in that including:Judge module, for judging terminal device state in which;Processing module, for when the judge module judges that the terminal device is in memory mirror making state, opening Before moving first application file, and before log-on data storehouse services, memory mirror making processing is carried out;Starting module, after being completed in the memory mirror, start first application file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510174738.4A CN104750579B (en) | 2015-04-14 | 2015-04-14 | The method and apparatus for making memory mirror |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510174738.4A CN104750579B (en) | 2015-04-14 | 2015-04-14 | The method and apparatus for making memory mirror |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104750579A CN104750579A (en) | 2015-07-01 |
CN104750579B true CN104750579B (en) | 2017-12-29 |
Family
ID=53590316
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510174738.4A Active CN104750579B (en) | 2015-04-14 | 2015-04-14 | The method and apparatus for making memory mirror |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104750579B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105718263B (en) * | 2016-01-19 | 2018-11-13 | 合肥联宝信息技术有限公司 | A kind of method and system for realizing distributed computer based on cloud |
US10474653B2 (en) * | 2016-09-30 | 2019-11-12 | Oracle International Corporation | Flexible in-memory column store placement |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101794232A (en) * | 2009-06-23 | 2010-08-04 | 深圳市朗科科技股份有限公司 | Method for quickly starting system |
CN102207881A (en) * | 2011-07-07 | 2011-10-05 | 电子科技大学 | Quick operation system start-up method based on Android |
US8959321B1 (en) * | 2009-11-25 | 2015-02-17 | Sprint Communications Company L.P. | Fast restart on a virtual machine |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7694177B2 (en) * | 2003-07-15 | 2010-04-06 | International Business Machines Corporation | Method and system for resynchronizing data between a primary and mirror data storage system |
-
2015
- 2015-04-14 CN CN201510174738.4A patent/CN104750579B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101794232A (en) * | 2009-06-23 | 2010-08-04 | 深圳市朗科科技股份有限公司 | Method for quickly starting system |
US8959321B1 (en) * | 2009-11-25 | 2015-02-17 | Sprint Communications Company L.P. | Fast restart on a virtual machine |
CN102207881A (en) * | 2011-07-07 | 2011-10-05 | 电子科技大学 | Quick operation system start-up method based on Android |
Also Published As
Publication number | Publication date |
---|---|
CN104750579A (en) | 2015-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103198122B (en) | Restart the method and apparatus of memory database | |
CN106951345B (en) | Consistency test method and device for disk data of virtual machine | |
TW201102924A (en) | Embedded electronic device and method for updating firmware thereof | |
CN1545654A (en) | Method of rapid computer start-up | |
CN103902399B (en) | Software system repair processing method and software system repair processing device | |
WO2014183534A1 (en) | Method and apparatus of automatically backing up application data and performing restoration as required | |
WO2018006587A1 (en) | File storage method, terminal, and storage medium | |
CN103677862A (en) | Upgrading method and device of EPLD program | |
CN104750579B (en) | The method and apparatus for making memory mirror | |
CN103237118A (en) | Mobile terminal startup method and system, and mobile terminal | |
CN102880530B (en) | Terminal and terminal backup and restoration methods | |
CN107179934B (en) | Method and system for automatically restoring virtual machine in cloud computing environment | |
CN105868047A (en) | Repairing method and device of data partition, and terminal | |
CN110427296A (en) | A kind of method being monitored based on hardware WDT, equipment and readable medium | |
CN116450244B (en) | Chip starting method, device, computer equipment and storage medium | |
CN108762987A (en) | Data reconstruction method and device for double copies microcontroller flash memory | |
CN102256275A (en) | Method and mobile communication terminal for power failure protection in factory resetting process | |
CN107193603A (en) | The upgrade method and device of a kind of intelligent appliance | |
CN107357682A (en) | A kind of method and device for recovering to go back original system | |
CN102308287B (en) | Replicated file system for electronic devices | |
CN110704243A (en) | Data recovery method and device, terminal equipment and storage medium | |
CN105335248B (en) | Information processing method and electronic equipment | |
CN102236748A (en) | Computer software protection method | |
CN101201882B (en) | Operating system protection method | |
CN109783150A (en) | A kind of anti-brick method and device of embedded system starting |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |