CN110083373A - Method, apparatus, computer equipment and the storage medium of more new data - Google Patents
Method, apparatus, computer equipment and the storage medium of more new data Download PDFInfo
- Publication number
- CN110083373A CN110083373A CN201910218760.2A CN201910218760A CN110083373A CN 110083373 A CN110083373 A CN 110083373A CN 201910218760 A CN201910218760 A CN 201910218760A CN 110083373 A CN110083373 A CN 110083373A
- Authority
- CN
- China
- Prior art keywords
- xml file
- software
- time
- memory
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
Abstract
This application discloses method, apparatus, computer equipment and the storage mediums of a kind of more new data, and wherein method includes: to judge whether current time reaches preset time conditions when software operation;If so, the first XML file in the memory of the JVM where scanning software;Obtain the first renewable time of the first XML file in the memory of the JVM;Access the second renewable time of the second XML file corresponding with first XML file in server;Judge whether first renewable time and the second renewable time are consistent;If it is not, first XML file and the corresponding operating file of the first XML file are deleted, and second XML file is loaded into the memory of the JVM, is updated with the data to the software.The application automatically compares the XML file XML file corresponding with the software in server in software, and different when the renewal time of the two, then the XML file in automatic download server is to be updated software.
Description
Technical field
This application involves big data technical field is arrived, method, apparatus, the computer of a kind of more new data are especially related to
Equipment and storage medium.
Background technique
In the process of running, SSM frame is stored in JVM present software.When software upgrading, in SSM frame
Some XML file changed, need for entire SSM frame to be updated when updating, when spending very much in this way
Between.And the time that the data of software update is not fixed, and sometimes staff does not notice that the data of software have more in time
Newly without in time updating the data of software, the operational effect of software is influenced.
So the problem of a kind of method for providing new more new data is urgent need to resolve.
Summary of the invention
The main purpose of the application is to provide a kind of self-timing to obtain the specified file data that the needs in software update
And it is updated method, apparatus, computer equipment and the storage medium of the more new data of the data of software.
In order to achieve the above-mentioned object of the invention, a kind of method that the application proposes more new data, comprising:
When software operation, judge whether current time reaches preset time conditions;
If so, the first XML file in the memory of the JVM where scanning software;
Obtain the first renewable time of the first XML file in the memory of the JVM;
Access the second renewable time of the second XML file corresponding with first XML file in server;
Judge whether first renewable time and the second renewable time are consistent;
If first renewable time and the second renewable time are inconsistent, by first XML file and the first XML text
The corresponding operating file of part is deleted, and second XML file is loaded into the memory of the JVM, to the software
Data be updated.
It is further, described that the step of whether current time reaches preset time conditions judged, comprising:
The history for obtaining the first XML file in the memory of the JVM where last scanning software scans the moment;
Judge whether current time and the time difference at history scanning moment reach preset time span threshold value;
If so, determining that current time reaches preset time conditions.
Further, described to delete first XML file and the corresponding operating file of the first XML file, and will
Second XML file is loaded into after the step in the memory of the JVM, comprising:
Second XML file is parsed, obtains executable file, the software is at runtime according to the executable text
Part operation.
Further, described to delete first XML file and the corresponding operating file of the first XML file, and will
Second XML file is loaded into after the step in the memory of the JVM, comprising:
The current time is loaded on the icon of the software.
Further, it is described when software operation when, judge the step of whether current time reaches preset time conditions it
Before, comprising:
Judge whether the software is in the state of operation;
If so, generating the instruction for updating the data of software.
Further, described to delete first XML file and the corresponding operating file of the first XML file, and will
Second XML file is loaded into before the step in the memory of the JVM, comprising:
Whether judgement is that WiFi is connect with the connection type of the server;
If the connection type with the server is that WiFi is connect, the instruction for updating the data of software is generated;
If not being that WiFi is connect with the connection type of the server, load confirmation updates the instruction of the data of software, with
It selects to generate the instruction for updating the data of software after confirming for staff.
Further, if the connection type with the server is that WiFi is connect, the data for updating software are generated
After the step of instruction, comprising:
Obtain the memory size of second XML file and the network speed of download of the WiFi;
With the memory size divided by the network speed of download, obtain updating duration;
On an output device by update duration load.
The application also provides a kind of device of more new data, comprising:
Time module is judged, for judging whether current time reaches preset time conditions when software operation;
Scan module, if reaching preset time conditions for current time, in the memory of the JVM where scanning software
The first XML file;
Obtain module, the first renewable time of the first XML file in memory for obtaining the JVM;
Access modules, for accessing second of the second XML file corresponding with first XML file in server more
The new moment;
Moment module is judged, for judging whether first renewable time and the second renewable time are consistent;
Update module, if inconsistent for first renewable time and the second renewable time, by first XML file
And first the corresponding operating file of XML file delete, and second XML file is loaded into the memory of the JVM,
It is updated with the data to the software.
The application also provides a kind of computer equipment, including memory and processor, and the memory is stored with computer
The step of program, the processor realizes any of the above-described the method when executing the computer program.
The application also provides a kind of computer readable storage medium, is stored thereon with computer program, the computer journey
The step of method described in any of the above embodiments is realized when sequence is executed by processor.
Method, apparatus, computer equipment and the storage medium of the more new data of the application, automatically by the XML text in software
Part XML file corresponding with the software in server compares, different when the renewal time of the two, then automatic download service
XML file in device is to be updated software.Virtual machine accesses server automatically at regular intervals, is updated with reaching timing
The effect of software does not go manually to operate.After software is updated, by load at the time of update on the icon of software,
In order to which staff is intuitively apparent from the renewable time of software.Ensure that virtual machine is connect with WiFi when updating software,
Guarantee the unobstructed of network, avoids suspension when update half and break down.
Detailed description of the invention
Fig. 1 is the flow diagram of the method for the more new data of one embodiment of the application;
Fig. 2 is the structural schematic block diagram of the device of the more new data of one embodiment of the application;
Fig. 3 is the structural schematic block diagram of the judgement time module of the device of the more new data of one embodiment of the application;
Fig. 4 is the structural schematic block diagram of the device of the more new data of one embodiment of the application;
Fig. 5 is the structural schematic block diagram of the device of the more new data of one embodiment of the application;
Fig. 6 is the structural schematic block diagram of the device of the more new data of one embodiment of the application;
Fig. 7 is the structural schematic block diagram of the device of the more new data of one embodiment of the application;
Fig. 8 is the structural schematic block diagram of the computer equipment of one embodiment of the application.
The embodiments will be further described with reference to the accompanying drawings for realization, functional characteristics and the advantage of the application purpose.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Referring to Fig.1, the embodiment of the present application provides a kind of method of more new data, comprising steps of
S1, when software operation when, judge whether current time reaches preset time conditions;
S2, if so, the first XML file in the memory of the JVM where scanning software;
S3, the first renewable time for obtaining the first XML file in the memory of the JVM;
S4, access server in the second XML file corresponding with first XML file the second renewable time;
S5, judge whether first renewable time and the second renewable time are consistent;
If S6, first renewable time and the second renewable time are inconsistent, by first XML file and first
The corresponding operating file of XML file is deleted, and second XML file is loaded into the memory of the JVM, to described
The data of software are updated.
As described in above-mentioned steps S1, the executing subject of this method is the JVM for being mounted with software to be tested, i.e., above-mentioned virtual
Machine.JVM is the abbreviation of Java Virtual Machine (Java Virtual Machine), subsequent abbreviation virtual machine.Virtual machine is a kind of use
In calculate equipment specification, it be one fabricate come out computer, be by actual computer analogue simulation it is various
Computer function is realized.Virtual machine access network gets current time or the timer of virtual machine call itself obtains
Current time is got, then virtual machine checks whether current time crosses to preset time conditions according to preset time conditions.
Wherein, preset time conditions are that backstage personnel are arranged in virtual machine according to the concrete condition of the software.
As described in above-mentioned steps S2, after virtual machine determines that current time reaches preset time conditions, access in JVM
It deposits, JVM memory, that is, memory, is stored in the memory and shuts the operation program for stating software, operation data, configuration parameter, match
Set each equal kind of electronic data information relevant to software of file.XML file is extensible markup language, standard generalized markup language
Subset, be a kind of for marking electronic document to make it have structural markup language.XML file can obtain after parsing
To mappedStatements, caches, resultMaps, parameterMaps, keyGenerators, sqlFragments
Etc. various operating files.Virtual machine scans memory, reads the All Files in memory, finds the software corresponding first
XML file, in order to judge whether first XML file needs to update.
As described in above-mentioned steps S3, after virtual machine finds the first XML file, first XML file is read
First renewable time of LastModified timestamp, i.e. the first XML last time upgrading.Background work personnel are right every time
After software is upgraded, when modifying the corresponding XML file of software after upgrading outside virtual machine, and adding modification after modification
Between mark, i.e., XML file is loaded into virtual machine by LastModified timestamp later as the attribute of the XML file
When memory forms the first XML file, the attribute of the corresponding XML file is also loaded into memory together.Virtual machine obtains
To after the first XML file, the attribute of first XML file is read, gets the first renewable time.
As described in above-mentioned steps S4, server refers to the server-side of software, i.e., the port being managed to the software, work
Personnel carry out data exchange by backstage and server.Staff uploads corresponding second XML file of updated software
To server, convenient for virtual machine from server downloading installation to update software.Virtual machine according to the title of software in the server
Search the second XML file corresponding with the software.After virtual machine finds the second XML file, the second XML file of same reading
Attribute gets the second renewable time of the second XML file.It should be noted that the first XML file is stored in virtually
In machine, the second XML file is stored in server, unrelated with the version number of XML file.
As described in above-mentioned steps S5, after virtual machine gets the first renewable time and the second renewable time, compare the two
Whether the moment is synchronization.The specific format of renewable time are as follows: Year/Month/Day/when/point.When virtual machine reads the two updates
It carves, judges whether the number of two renewable times is completely the same.First renewable time can be subtracted to the second renewable time, obtained
It is poor to renewal time, judge whether the first renewable time is consistent with the second renewable time according to whether renewal time difference is zero.
Here, do not need must be the first renewable time the second renewable time it is small (the first renewable time the second renewable time it
Before) only need the two inconsistent.It is bigger than the second renewable time because being also likely to be present the first renewable time, this is because testing
In software process, the software version of operation can deposit the version debugged before the use, and staff is straight by XML file before
Connect and upload onto the server to form the second XML file, so when the second XML file the second renewable time also than the first renewable time
It is early.
As described in above-mentioned steps S6, if the first renewable time and the second renewable time are inconsistent, illustrate to transport in virtual machine
Capable software upgrading, corresponding first XML file needs are updated, therefore, the first XML file of virtual machine are deleted
It removes, while also deleting the operating file that the first XML parsing generates, while the second XML file is downloaded into void from server
In the memory of quasi- machine, to form the first new XML file, the update to the operating file of software is completed.If the data of software
Failure is updated, then is closed software, then into step S2, to update the data of software again.
In one embodiment, above-mentioned to judge that the step of whether current time reaches preset time conditions includes:
S11, the history for obtaining the first XML file in the memory of the JVM where last scanning software scan the moment;
S12, judge whether current time and the time difference at history scanning moment reach preset time span threshold value;
S13, if so, generate scanning software where JVM memory in the first XML file instruction.
In the present embodiment, virtual machine is scanned reading once in every memory, will record scanning record, and will scanning
Record fills in preset scanning log, wherein scanning record includes scanning moment, scanning duration, scan path, scanning knot
Fruit etc., scanning log are stored in a certain memory space in the memory of virtual machine.Virtual machine accesses the memory space, and calling is swept
Log is retouched, the last history scanning record is read, gets the history scanning moment in history scanning record, then adjust
With in virtual machine timer or access network get current time, then with current time subtract above-mentioned history scanning when
It carves, the time difference for obtaining the two compares time difference and preset time span threshold value that is, apart from the time of last scan
Compared with, judge the size of two numbers, if the time difference be greater than or equal to time span threshold value, illustrate when apart from last scan
Between it is too long, need to be scanned again, to update software, thus, generate scanning software where JVM memory in first
The instruction of XML file.
In one embodiment, above-mentioned to delete first XML file and the corresponding operating file of the first XML file
It removes, and second XML file is loaded into after the step in the JVM memory, comprising:
S7, second XML file is parsed, obtains executable file, the software can be held according at runtime
Row running paper.
In the present embodiment, the second XML file is parsed into object by XMLMapperBuilder object by virtual machine, again
Generate the files such as mappedStatements, caches, resultMaps.The executable file is used for when software operation
It is run, to call data processing data etc. to run corresponding task.
In one embodiment, above-mentioned to delete first XML file and the corresponding operating file of the first XML file
After the step removed, and second XML file is loaded into the memory of the JVM, comprising:
S8, the current time is loaded on the icon of the software.
In the present embodiment, the icon of software is the picture file that a format is .ico, the storage being stored in virtual machine
In device.Virtual machine finds the icon of the software according to the title of software, then will load at current time in the picture file
On, to form the new icon of software.After the completion of update, the icon of software also changes, by display at the time of changing
On icon, more convenient staff gets information about the renewable time of software.In one embodiment, when by software icon
After being loaded with current time, the standby signal of variation is exported on the output device of virtual machine, to remind staff to pay attention to.It is defeated
Device refers to the display screen or loudspeaker of virtual machine out, corresponding standby signal be for show update the text information completed or
Issue the voice signal for updating and completing.
In one embodiment, above-mentioned when software operation, judge whether current time reaches preset time conditions
Before step, comprising:
S101, judge whether the software is in the state of operation;
S102, if so, generate update software data instruction.
It, can be rapidly comprehensively to the data of software in more new data when software is in operating status in the present embodiment
It is updated, if being updated when software not running to the data of software, is likely to result in the loss of data or update of software
Not exclusively.Therefore, whether virtual machine call task list, checking in task list has the task of the software, if so, then illustrating soft
Part is in operating status, then generates the instruction for updating the data of software, then virtual machine determines that current time reaches preset again
After time conditions, the data of software are updated, achieve the purpose that rapidly completely to be updated the data of software.If task list
In there is no the task of the software, then virtual machine wait user open software after the data of software are updated again.
In one embodiment, above-mentioned to delete first XML file and the corresponding operating file of the first XML file
Before the step removed, and second XML file is loaded into the memory of the JVM, comprising:
Whether S601, judgement are that WiFi is connect with the connection type of the server;
If with the connection type of the server being S602, that WiFi is connect, the instruction for updating the data of software is generated;
If not being S603, that WiFi is connect with the connection type of the server, load confirmation updates the finger of the data of software
It enables, to select to generate the instruction for updating the data of software after confirming for staff.
In the present embodiment, virtual machine and server are connected with diversified forms, since virtual machine is mounted in a computer
On, with there are many connection types of server, 4G, bluetooth, WiFi, data line etc., wherein the mode of WiFi connection compares 4G company
Connect cheaper, compare bluetooth connection transmission data faster, compare data line connection it is more stable, virtual machine passes through with server
WiFi connection is best connection type.Therefore, when automatically updating, for the number by software for ensuring economic immediate stability
According to being updated, it is ensured that virtual machine with server is connect by WiFi.Virtual machine obtains the interface connecting with server, root
According to the type of interface to determine whether being WiFi connection.If it is, directly generating the instruction for updating the data of software, then institute
It states the first XML file and the corresponding operating file of the first XML file is deleted, and second XML file is loaded into described
In the memory of JVM, it is updated with the data to the software.If not WiFi connection, then loads confirmation and update software
Instruction, determine for staff, in order to which staff safeguards the JA(junction ambient) between virtual machine and server, then select
It selects confirmation and updates software, then virtual machine is again updated the software.
In one embodiment, it if the above-mentioned connection type with the server is that WiFi is connect, generates and updates software
After the step of instruction of data, comprising:
The network speed of download of S604, the memory size for obtaining second XML file and the WiFi;
S605, with the memory size divided by the network speed of download, obtain updating duration;
S606, the update duration is loaded on an output device.
In the present embodiment, after virtual machine access server finds the second XML file, its attribute information is read, category is extracted
Memory size in property information, that is, get the memory size of the second XML file.Virtual machine is connect also by with server simultaneously
Interface get WiFi information, read the details of WiFi, extract speed of download therein.The unit of speed of download
It is memory size/time, the unit of speed of download and the unit of memory size is unified, then by memory size divided by downloading speed
Degree obtains updating duration, that is, downloads time span required for second XML file.Then the update duration is loaded defeated
Out on device, time span required for updating is understood convenient for staff.For example, the memory that certain second XML file occupies is
3.2Mb, speed of download are 200Kb/s, then 3.2Mb are converted into 3200Kb first, are then obtained with 3200Kb divided by 200Kb/s
To 16s, i.e., 16 seconds.Then on an output device by load in 16 seconds, the time required for updating is understood convenient for staff, rationally
Arrange the work of oneself.
In conclusion the method for the more new data of the application, automatically by the software in the XML file and server in software
Corresponding XML file compares, different when the renewal time of the two, then the XML file in automatic download server is with right
Software is updated.Virtual machine accesses server automatically at regular intervals, to achieve the effect that timing updates software, not employment
Work goes to operate.After being updated software, it will be loaded on the icon of software at the time of update, in order to which staff is intuitive
It is apparent from the renewable time of software.Ensure that virtual machine is connect with WiFi when updating software, guarantees the unobstructed of network, avoid
Update half when suspension and break down.
Referring to Fig. 2, a kind of device of more new data is also provided in the embodiment of the present application, comprising:
Time module 1 is judged, for judging whether current time reaches preset time conditions when software operation;
Scan module 2, if reaching preset time conditions, the memory of the JVM where scanning software for current time
In the first XML file;
Obtain module 3, the first renewable time of the first XML file in memory for obtaining the JVM;
Access modules 4, for accessing second of the second XML file corresponding with first XML file in server
Renewable time;
Moment module 5 is judged, for judging whether first renewable time and the second renewable time are consistent;
Update module 6, if inconsistent for first renewable time and the second renewable time, by the first XML text
Part and the corresponding operating file of the first XML file are deleted, and second XML file is loaded into the memory of the JVM
In, it is updated with the data to the software.
In the present embodiment, the executing subject of this method is the JVM for being mounted with software to be tested, i.e., above-mentioned virtual machine.JVM is
The abbreviation of Java Virtual Machine (Java Virtual Machine), subsequent abbreviation virtual machine.Virtual machine is that one kind is set for calculating
Standby specification, it is one and fabricates the computer come out, is by the various computer function of analogue simulation on actual computer
It can realize.The judgement time module 1 of virtual machine accesses network and gets current time, or judges that time module 1 is called
The timer of itself gets current time, then judges that time module 1 according to preset time conditions, checks that current time is
No mistake is to preset time conditions.Wherein, preset time conditions are that backstage personnel exist according to the setting of the concrete condition of the software
In virtual machine.
After judging that time module 1 determines that current time reaches preset time conditions, scan module 2 accesses JVM's
Memory is stored in the memory and shuts the kinds such as the operation program for stating software, operation data, configuration parameter, configuration file be each
Electronic data information relevant to software.XML file is extensible markup language, and the subset of standard generalized markup language is one
Kind is for marking electronic document to make it have structural markup language.XML file is available after parsing
MappedStatements, caches, resultMaps, parameterMaps, keyGenerators, sqlFragments etc.
Various operating files.Scan module 2 scans memory, reads the All Files in memory, finds the software corresponding first
XML file, in order to judge whether first XML file needs to update.
After scan module 2 finds the first XML file, the LastModified that module 3 reads first XML file is obtained
First renewable time of timestamp, i.e. the first XML last time upgrading.Background work personnel are every time upgrading software
Afterwards, the corresponding XML file of software outside virtual machine after modification upgrading, and marked after modification plus modification time, i.e.,
LastModified timestamp, as the attribute of the XML file, the memory shape that is later loaded into XML file in virtual machine
When at the first XML file, the attribute of the corresponding XML file is also loaded into memory together.Virtual machine gets the first XML
After file, the attribute of first XML file is read, gets the first renewable time.
Server refers to the server-side of software, i.e., the port being managed to the software, and staff passes through backstage and clothes
Business device carries out data exchange.Staff uploads onto the server corresponding second XML file of updated software, convenient for virtual
Machine is from server downloading installation to update software.Access modules 4 are searched and the software pair in the server according to the title of software
The second XML file answered.After access modules 4 find the second XML file, the same attribute for reading the second XML file is got
Second renewable time of the second XML file.It should be noted that the first XML file is stored in virtual machine, second
XML file is stored in server, unrelated with the version number of XML file.
After virtual machine gets the first renewable time and the second renewable time, judge that moment module 5 compares the two moment
It whether is synchronization.The specific format of renewable time are as follows: Year/Month/Day/when/point.Virtual machine reads the two renewable times,
Judge whether the number of two renewable times is completely the same.First renewable time can be subtracted into the second renewable time, got
Renewal time is poor, judges whether the first renewable time is consistent with the second renewable time according to whether renewal time difference is zero.This
In, it does not need be that the first renewable time is small (the first renewable time is before the second renewable time) in the second renewable time
Only need the two inconsistent.It is bigger than the second renewable time because being also likely to be present the first renewable time, this is because soft testing
During part, the software version of operation can deposit the version debugged before the use, and staff is direct by XML file before
Upload onto the server to form the second XML file, so when the second XML file the second renewable time than the first renewable time also than
It is early.
If the first renewable time and the second renewable time are inconsistent, illustrate the software upgrading run in virtual machine, it is right
The the first XML file needs answered are updated, and therefore, update module 6 deletes the first XML file of virtual machine, simultaneously also
The operating file that first XML parsing generates is deleted, while the second XML file being downloaded to the storage of virtual machine from server
In device, to form the first new XML file, the update to the operating file of software is completed.
Referring to Fig. 3, in one embodiment, above-mentioned judgement time module 1 includes:
Scanning element 11 is obtained, the first XML file in memory for obtaining the JVM where last scanning software
History scan the moment;
Judging unit 12, when for judging whether the time difference at current time and history scanning moment reaches preset
Between length threshold;
Judging unit 13, if the time difference for current time and history scanning moment reaches preset time span
Threshold value, the instruction of the first XML file in JVM memory where generation scanning software.
In the present embodiment, virtual machine is scanned reading once in every memory, will record scanning record, and will scanning
Record fills in preset scanning log, wherein scanning record includes scanning moment, scanning duration, scan path, scanning knot
Fruit etc., scanning log are stored in a certain memory space in the memory of virtual machine.It obtains scanning element 11 and accesses storage sky
Between, scanning log is called, the last history scanning record is read, when getting the history scanning in history scanning record
It carves, then judging unit 12 calls timer or access network in virtual machine to get current time, then judging unit 12
The above-mentioned history scanning moment is subtracted with current time, obtains the time difference of the two, i.e., apart from the time of last scan, by the time difference
It is compared with preset time span threshold value, judges the size of two numbers, if the time difference is greater than or equal to time span threshold
Value, then when the overlong time apart from last scan, judging unit 13 needs to be scanned again explanation, to update software, because
And the instruction of the first XML file in the JVM memory where the generation scanning software of judging unit 13.
Referring to Fig. 4, in one embodiment, the device of above-mentioned more new data further include:
Parsing module 7, for will second XML file parsing, obtain executable file, software root at runtime
It is run according to the executable file.
In the present embodiment, the second XML file is parsed into object by XMLMapperBuilder object by parsing module 7,
Regenerate the files such as mappedStatements, caches, resultMaps.What the executable file was used to run in software
When run, to call data processing data etc. to run corresponding task.
Referring to Fig. 5, in one embodiment, the device of above-mentioned more new data further include:
First loading module 8, for loading the current time on the icon of the software.
In the present embodiment, the icon of software is the picture file that a format is .ico, the storage being stored in virtual machine
In device.First loading module 8 finds the icon of the software according to the title of software, then will load at current time in the figure
On piece file, to form the new icon of software.After the completion of update, the icon of software also changes, when will be changed
Quarter is shown on icon, and more convenient staff gets information about the renewable time of software.In one embodiment, when will be soft
After part icon is loaded with current time, the standby signal of variation is exported on the output device of virtual machine, to remind staff
Pay attention to.Output device refers to the display screen or loudspeaker of virtual machine, and corresponding standby signal is for showing the text for updating and completing
Word information issues the voice signal for updating and completing.
Referring to Fig. 6, in one embodiment, the device of above-mentioned more new data further include:
Block of state 101 is judged, for judging whether the software is in the state of operation;
Instruction module 102 is generated, if being in the state of operation for the software, generates the finger for updating the data of software
It enables.
It, can be rapidly comprehensively to the data of software in more new data when software is in operating status in the present embodiment
It is updated, if being updated when software not running to the data of software, is likely to result in the loss of data or update of software
Not exclusively.Therefore, the judgement block of state 101 of virtual machine calls task list, checks in task list whether there is the software
Task then generates instruction module 102 and generates the instruction for updating the data of software, so if so, then illustrating that software is in operating status
After virtual machine determines that current time reaches preset time conditions again afterwards, the data of software are updated, are reached rapidly completely to soft
The purpose that the data of part are updated.If not having the task of the software in task list, virtual machine waits user to open software
The data of software are updated again afterwards.
Referring to Fig. 7, in one embodiment, the device of above-mentioned more new data further include:
Link block 601 is judged, for judging whether with the connection type of the server be that WiFi is connect;
First determination module 602, if generating for being that WiFi is connect with the connection type of the server and updating software
The instruction of data;
Second determination module 603, if load confirmation updates for not being that WiFi is connect with the connection type of the server
The instruction of the data of software, to select to generate the instruction for updating the data of software after confirming for staff.
In the present embodiment, virtual machine and server are connected with diversified forms, since virtual machine is mounted in a computer
On, with there are many connection types of server, 4G, bluetooth, WiFi, data line etc., wherein the mode of WiFi connection compares 4G company
Connect cheaper, compare bluetooth connection transmission data faster, compare data line connection it is more stable, virtual machine passes through with server
WiFi connection is best connection type.Therefore, when automatically updating, for the number by software for ensuring economic immediate stability
According to being updated, it is ensured that virtual machine with server is connect by WiFi.Judge that link block 601 obtains the connection with server
Interface, according to the type of interface to determine whether being WiFi connection.If so, the first determination module 602 then directly generates more
The instruction of the data of new software, then first XML file and the corresponding operating file of the first XML file are deleted, and will
Second XML file is loaded into the memory of the JVM, is updated with the data to the software.If not
WiFi connection, the second determination module 603 then load the instruction that confirmation updates software, determine for staff, in order to work
Personnel safeguard the JA(junction ambient) between virtual machine and server, and then selection confirmation updates software, and then virtual machine is soft to this again
Part is updated.
In one embodiment, the device of above-mentioned more new data further include:
Acquisition speed module 604, for obtaining under the memory size of second XML file and the network of the WiFi
Carry speed;
Computing module 605, for, divided by the network speed of download, obtaining updating duration with the memory size;
Second loading module 606, for loading on an output device the update duration.
In the present embodiment, after the access server of acquisition speed module 604 finds the second XML file, its attribute information is read,
The memory size in attribute information is extracted, that is, gets the memory size of the second XML file.Acquisition speed module 604 simultaneously
WiFi information is got also by the interface connecting with server, reads the details of WiFi, extracts downloading therein
Speed.The unit of speed of download is memory size/time, and computing module 605 is by the list of the unit of speed of download and memory size
Position is unified, then by memory size divided by speed of download, obtains updating duration, that is, when downloading required for second XML file
Between length.Then the second loading module 606 loads the update duration on an output device, understands convenient for staff and updates institute
The time span needed.For example, the memory that certain second XML file occupies is 3.2Mb, speed of download is 200Kb/s, then first will
3.2Mb is converted into 3200Kb, then obtains 16s, i.e., 16 seconds divided by 200Kb/s with 3200Kb.Then load in 16 seconds is being exported
On device, time required for updating, the work of reasonable arrangement oneself are understood convenient for staff.
In conclusion the device of the more new data of the application, automatically by the software in the XML file and server in software
Corresponding XML file compares, different when the renewal time of the two, then the XML file in automatic download server is with right
Software is updated.Virtual machine accesses server automatically at regular intervals, to achieve the effect that timing updates software, not employment
Work goes to operate.After being updated software, it will be loaded on the icon of software at the time of update, in order to which staff is intuitive
It is apparent from the renewable time of software.Ensure that virtual machine is connect with WiFi when updating software, guarantees the unobstructed of network, avoid
Update half when suspension and break down.
Referring to Fig. 8, a kind of computer equipment is also provided in the embodiment of the present application, which can be server,
Its internal structure can be as shown in Figure 8.The computer equipment includes processor, the memory, network connected by system bus
Interface and database.Wherein, the processor of the Computer Design is for providing calculating and control ability.The computer equipment is deposited
Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program
And database.The internal memory provides environment for the operation of operating system and computer program in non-volatile memory medium.It should
The database of computer equipment is for storing the data such as preset time conditions.The network interface of the computer equipment be used for it is outer
The terminal in portion passes through network connection communication.A kind of method when the computer program is executed by processor to realize more new data.
Above-mentioned processor executes the step of method of above-mentioned more new data: when software operation, whether judging current time
Reach preset time conditions;If so, the first XML file in the memory of the JVM where scanning software;Obtain the JVM
Memory in the first XML file the first renewable time;Access corresponding with first XML file the in server
Second renewable time of two XML files;Judge whether first renewable time and the second renewable time are consistent;If described first
Renewable time and the second renewable time are inconsistent, and first XML file and the corresponding operating file of the first XML file are deleted
It removes, and second XML file is loaded into the memory of the JVM, be updated with the data to the software.
Further, above-mentioned processor execution judges the step of whether current time reaches preset time conditions, comprising:
The history for obtaining the first XML file in the memory of the JVM where last scanning software scans the moment;Judge current time
Whether reach preset time span threshold value with the time difference at history scanning moment;If so, determining that current time reaches
Preset time conditions.
Further, above-mentioned processor is executed first XML file and the corresponding operating file of the first XML file
It deletes, and after the step that second XML file is loaded into the memory of the JVM, comprising: by the 2nd XML
Document analysis, obtains executable file, and the software is run according to the executable file at runtime.
Further, above-mentioned processor is executed first XML file and the corresponding operating file of the first XML file
It deletes, and after the step that second XML file is loaded into the memory of the JVM, comprising: in the figure of the software
Put on the load current time.
Further, above-mentioned processor is executed when software operation, judges whether current time reaches preset timeline
Before the step of part, comprising: judge whether the software is in the state of operation;If so, generating the finger for updating the data of software
It enables.
Further, above-mentioned processor is executed first XML file and the corresponding operating file of the first XML file
It deletes, and before the step that second XML file is loaded into the memory of the JVM, comprising: judgement and the service
Whether the connection type of device is WiFi connection;If the connection type with the server is that WiFi is connect, generates and update software
The instruction of data;If not being that WiFi is connect with the connection type of the server, load confirmation updates the instruction of the data of software,
To select to generate the instruction for updating the data of software after confirming for staff.
Further, if it is that WiFi is connect that above-mentioned processor, which is executed with the connection type of the server, it is soft to generate update
After the step of instruction of the data of part, comprising: obtain the memory size of second XML file and the network of the WiFi
Speed of download;With the memory size divided by the network speed of download, obtain updating duration;Update duration load is existed
On output device.
In conclusion the computer equipment of the application, automatically corresponding with the software in server by the XML file in software
XML file compare, different when the renewal time of the two, then the XML file in automatic download server is to software
It is updated.Virtual machine accesses server automatically at regular intervals, to achieve the effect that timing updates software, does not go manually
Operation.After being updated software, it will be loaded on the icon of software at the time of update, in order to which staff is intuitively clear
Understanding software renewable time.Ensure that virtual machine is connect with WiFi when updating software, guarantee the unobstructed of network, avoids updating
Suspension when half and break down.
It will be understood by those skilled in the art that structure shown in Fig. 8, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme.
One embodiment of the application also provides a kind of computer readable storage medium, is stored thereon with computer program, calculates
A kind of machine program realizes more new data method when being executed by processor, specifically: when software operation, judge that current time is
It is no to reach preset time conditions;If so, the first XML file in the memory of the JVM where scanning software;Described in acquisition
First renewable time of the first XML file in the memory of JVM;It accesses corresponding with first XML file in server
The second XML file the second renewable time;Judge whether first renewable time and the second renewable time are consistent;If described
First renewable time and the second renewable time are inconsistent, by first XML file and the corresponding operation text of the first XML file
Part is deleted, and second XML file is loaded into the memory of the JVM, is updated with the data to the software.
Further, above-mentioned processor execution judges the step of whether current time reaches preset time conditions, comprising:
The history for obtaining the first XML file in the memory of the JVM where last scanning software scans the moment;Judge current time
Whether reach preset time span threshold value with the time difference at history scanning moment;If so, determining that current time reaches
Preset time conditions.
Further, above-mentioned processor is executed first XML file and the corresponding operating file of the first XML file
It deletes, and after the step that second XML file is loaded into the memory of the JVM, comprising: by the 2nd XML
Document analysis, obtains executable file, and the software is run according to the executable file at runtime.
Further, above-mentioned processor is executed first XML file and the corresponding operating file of the first XML file
It deletes, and after the step that second XML file is loaded into the memory of the JVM, comprising: in the figure of the software
Put on the load current time.
Further, above-mentioned processor is executed when software operation, judges whether current time reaches preset timeline
Before the step of part, comprising: judge whether the software is in the state of operation;If so, generating the finger for updating the data of software
It enables.
Further, above-mentioned processor is executed first XML file and the corresponding operating file of the first XML file
It deletes, and before the step that second XML file is loaded into the memory of the JVM, comprising: judgement and the service
Whether the connection type of device is WiFi connection;If the connection type with the server is that WiFi is connect, generates and update software
The instruction of data;If not being that WiFi is connect with the connection type of the server, load confirmation updates the instruction of the data of software,
To select to generate the instruction for updating the data of software after confirming for staff.
Further, if it is that WiFi is connect that above-mentioned processor, which is executed with the connection type of the server, it is soft to generate update
After the step of instruction of the data of part, comprising: obtain the memory size of second XML file and the network of the WiFi
Speed of download;With the memory size divided by the network speed of download, obtain updating duration;Update duration load is existed
On output device.
In conclusion the computer readable storage medium of the application, it automatically will be in the XML file and server in software
The corresponding XML file of software compares, different when the renewal time of the two, then the XML file in automatic download server
To be updated to software.Virtual machine accesses server automatically at regular intervals, to achieve the effect that timing updates software, no
It manually goes to operate.After being updated software, it will be loaded on the icon of software at the time of update, in order to staff
Intuitively it is apparent from the renewable time of software.Ensure that virtual machine is connect with WiFi when updating software, guarantee the unobstructed of network,
It avoids suspension when update half and breaks down.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
Any reference used in provided herein and embodiment to memory, storage, database or other media,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double speed are according to rate SDRAM (SSRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, device, article or the method that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, device, article or method institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, device of element, article or method.
The foregoing is merely preferred embodiment of the present application, are not intended to limit the scope of the patents of the application, all utilizations
Equivalent structure or equivalent flow shift made by present specification and accompanying drawing content is applied directly or indirectly in other correlations
Technical field, similarly include in the scope of patent protection of the application.
Claims (10)
1. a kind of method of more new data characterized by comprising
When software operation, judge whether current time reaches preset time conditions;
If so, the first XML file in the memory of the JVM where scanning software;
Obtain the first renewable time of the first XML file in the memory of the JVM;
Access the second renewable time of the second XML file corresponding with first XML file in server;
Judge whether first renewable time and the second renewable time are consistent;
If first renewable time and the second renewable time are inconsistent, by first XML file and the first XML file pair
The operating file answered is deleted, and second XML file is loaded into the memory of the JVM, with the number to the software
According to being updated.
2. the method for more new data as described in claim 1, which is characterized in that described to judge whether current time reaches default
Time conditions the step of, comprising:
The history for obtaining the first XML file in the memory of the JVM where last scanning software scans the moment;
Judge whether current time and the time difference at history scanning moment reach preset time span threshold value;
If so, determining that current time reaches preset time conditions.
3. the method for more new data as described in claim 1, which is characterized in that described by first XML file and the
The corresponding operating file of one XML file is deleted, and second XML file is loaded into the step in the memory of the JVM
Later, comprising:
Second XML file is parsed, executable file is obtained, the software is transported according to the executable file at runtime
Row.
4. the method for more new data as described in claim 1, which is characterized in that described by first XML file and the
The corresponding operating file of one XML file is deleted, and second XML file is loaded into the step in the memory of the JVM
Later, comprising:
The current time is loaded on the icon of the software.
5. the method for more new data as described in claim 1, which is characterized in that it is described when software operation, when judging current
Before the step of whether quarter reaches preset time conditions, comprising:
Judge whether the software is in the state of operation;
If so, generating the instruction for updating the data of software.
6. the method for more new data as described in claim 1, which is characterized in that described by first XML file and the
The corresponding operating file of one XML file is deleted, and second XML file is loaded into the step in the memory of the JVM
Before, comprising:
Whether judgement is that WiFi is connect with the connection type of the server;
If the connection type with the server is that WiFi is connect, the instruction for updating the data of software is generated;
If not being that WiFi is connect with the connection type of the server, load confirmation updates the instruction of the data of software, to be used for
Staff generates the instruction for updating the data of software after selecting confirmation.
7. the method for more new data as claimed in claim 6, which is characterized in that if the connection type with the server
After the step of being WiFi connection, generating the instruction for updating the data of software, comprising:
Obtain the memory size of second XML file and the network speed of download of the WiFi;
With the memory size divided by the network speed of download, obtain updating duration;
On an output device by update duration load.
8. a kind of device of more new data characterized by comprising
Time module is judged, for judging whether current time reaches preset time conditions when software operation;
Scan module, if reaching preset time conditions for current time, in the memory of the JVM where scanning software
One XML file;
Obtain module, the first renewable time of the first XML file in memory for obtaining the JVM;
Access modules, when being updated for accessing second of the second XML file corresponding with first XML file in server
It carves;
Moment module is judged, for judging whether first renewable time and the second renewable time are consistent;
Update module, if inconsistent for first renewable time and the second renewable time, by first XML file and
The corresponding operating file of first XML file is deleted, and second XML file is loaded into the memory of the JVM, with right
The data of the software are updated.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists
In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910218760.2A CN110083373A (en) | 2019-03-21 | 2019-03-21 | Method, apparatus, computer equipment and the storage medium of more new data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910218760.2A CN110083373A (en) | 2019-03-21 | 2019-03-21 | Method, apparatus, computer equipment and the storage medium of more new data |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110083373A true CN110083373A (en) | 2019-08-02 |
Family
ID=67413391
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910218760.2A Pending CN110083373A (en) | 2019-03-21 | 2019-03-21 | Method, apparatus, computer equipment and the storage medium of more new data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110083373A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115421859A (en) * | 2022-09-13 | 2022-12-02 | 科东(广州)软件科技有限公司 | Dynamic loading method and device of configuration file, computer equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102118500A (en) * | 2010-12-27 | 2011-07-06 | 清华大学 | Software package-based online automatic updating method for open source operating system of mobile terminal |
CN104199666A (en) * | 2014-09-09 | 2014-12-10 | 北京京东尚科信息技术有限公司 | Dynamic configuration method and device for application program |
CN106201660A (en) * | 2016-07-14 | 2016-12-07 | 浪潮电子信息产业股份有限公司 | A kind of method of virtual machine automatic upgrading virtual hardware and software |
CN108845824A (en) * | 2018-07-10 | 2018-11-20 | 平安科技(深圳)有限公司 | Using update method and device and computer readable storage medium |
-
2019
- 2019-03-21 CN CN201910218760.2A patent/CN110083373A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102118500A (en) * | 2010-12-27 | 2011-07-06 | 清华大学 | Software package-based online automatic updating method for open source operating system of mobile terminal |
CN104199666A (en) * | 2014-09-09 | 2014-12-10 | 北京京东尚科信息技术有限公司 | Dynamic configuration method and device for application program |
CN106201660A (en) * | 2016-07-14 | 2016-12-07 | 浪潮电子信息产业股份有限公司 | A kind of method of virtual machine automatic upgrading virtual hardware and software |
CN108845824A (en) * | 2018-07-10 | 2018-11-20 | 平安科技(深圳)有限公司 | Using update method and device and computer readable storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115421859A (en) * | 2022-09-13 | 2022-12-02 | 科东(广州)软件科技有限公司 | Dynamic loading method and device of configuration file, computer equipment and storage medium |
CN115421859B (en) * | 2022-09-13 | 2024-02-13 | 科东(广州)软件科技有限公司 | Dynamic loading method and device for configuration file, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106951233B (en) | Mixed-mode smart phone application development framework system | |
CN103559065B (en) | Method and system for OTA (Over-the-Air Technology) upgrade | |
CN108768728A (en) | O&M task processing method, device, computer equipment and storage medium | |
US20120324376A1 (en) | Apparatus for implementing web-based user interface for communication terminal and method thereof | |
CN110377360A (en) | Method, display terminal and the computer readable storage medium that webview is quickly loaded | |
CN106873952B (en) | Data processing system and method for mobile terminal webpage development and application device | |
CN103577599A (en) | Method and device for storing local data through mobile terminal | |
CN110069264A (en) | Construct method, apparatus, computer equipment and the storage medium of resource packet | |
CN101937335B (en) | Method for generating Widget icon, method for generating Widget summary document and Widget engine | |
CN111930354B (en) | Framework component system for software development and construction method thereof | |
CN103186463B (en) | Determine the method and system of the test specification of software | |
CN111026638A (en) | Webpage automatic testing method and device, electronic equipment and storage medium | |
CN110083373A (en) | Method, apparatus, computer equipment and the storage medium of more new data | |
CN117527896A (en) | Method and system for interfacing multi-system data with third party electronic files | |
CN111880990A (en) | Exception handling method and device | |
CN101272279B (en) | Method and device for implementing local maintenance terminal management multi-version network element | |
CN115794214A (en) | Application module metadata management method, device, storage medium and device | |
CN113608831B (en) | Plug-in instance management method, system, storage medium and equipment | |
CN114745146B (en) | Jump interception method, apparatus, readable storage medium and device | |
US10838716B1 (en) | Automated dependency detection and response | |
CN114721681A (en) | Configuration file updating method, device, equipment and storage medium | |
CN111770487B (en) | Access Point Name (APN) information configuration method, equipment and medium | |
CN114816437A (en) | Method, system and equipment for reversely generating Java entity class | |
CN103150292A (en) | Method and device for replacing system font file | |
CN113220592A (en) | Processing method and device for automated testing resources, server 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 |