CN105468379B - A kind of script file execution method and device - Google Patents

A kind of script file execution method and device Download PDF

Info

Publication number
CN105468379B
CN105468379B CN201510997966.1A CN201510997966A CN105468379B CN 105468379 B CN105468379 B CN 105468379B CN 201510997966 A CN201510997966 A CN 201510997966A CN 105468379 B CN105468379 B CN 105468379B
Authority
CN
China
Prior art keywords
script file
file
script
information
identification information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510997966.1A
Other languages
Chinese (zh)
Other versions
CN105468379A (en
Inventor
李文靖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Baoqu Technology Co Ltd
Original Assignee
Zhuhai Seal Interest Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Seal Interest Technology Co Ltd filed Critical Zhuhai Seal Interest Technology Co Ltd
Priority to CN201510997966.1A priority Critical patent/CN105468379B/en
Publication of CN105468379A publication Critical patent/CN105468379A/en
Application granted granted Critical
Publication of CN105468379B publication Critical patent/CN105468379B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Abstract

The embodiment of the invention provides a kind of script files to execute method and device, applied to terminal device, the described method includes: obtaining the corresponding identification information of the script file saved at least one node included by the terminal device and executing frequency information, wherein, the script file that server issues is stored in the node, and the corresponding identification information of issued script file and frequency information is executed, and node and script file have unique correspondence;Judge in file destination with the presence or absence of the relevant temporal information of script file corresponding to the identification information, wherein, the corresponding relationship for the temporal information that the script file last time that the identification information of the script file being performed was performed with this is performed is preserved in the file destination;If so, according to the corresponding execution frequency information of the script file and current time, it is determined whether execute the script file;Otherwise, the script file is executed.The embodiment of the present invention can be realized easily perform script file.

Description

A kind of script file execution method and device
Technical field
The present invention relates to field of terminal technology, execute method and device more particularly to a kind of script file.
Background technique
Lua script is a small and exquisite scripting language, can be embedded in application program, provides flexible expansion for application program Exhibition and customization function.In practical application, any application program being installed in terminal can receive some lua that server issues Script file, and the lua script file is executed in the application program, itself to provide corresponding function.
Existing lua script file executes method, after application program receives the lua script file that server issues, The lua script file can be immediately performed.Also, after the lua script file is performed, application program will be deleted the lua script File.
As it can be seen that existing lua script file executes method, for each lua script file, no matter the lua script file Whether it was performed, an application program lua script of every execution, was required by downloading, execution, deletion in the application Operation, process are more complicated.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of script file execution method and device, is easily executed with realizing Script file.Specific technical solution is as follows:
In a first aspect, the present invention provides a kind of script files to execute method, it is applied to terminal device, the method packet It includes:
Obtain the corresponding identification information of the script file saved at least one node included by the terminal device and Execute frequency information, wherein the script file that server issues is stored in the node, and issued script file corresponds to Identification information and execute frequency information, and node and script file have unique correspondence;
Judge in file destination with the presence or absence of the relevant temporal information of script file corresponding to the identification information, In, the script file last time that the identification information for the script file being performed was performed with this is preserved in the file destination The corresponding relationship for the temporal information being performed;
If so, according to the corresponding execution frequency information of the script file and current time, it is determined whether execute the foot This document;
Otherwise, the script file is executed.
Further, it is performed at the scheduled time when the execution frequency information identifies the script file, described According to the corresponding execution frequency information of the script file and current time, it is determined whether executing the script file includes:
Judge whether current time is the predetermined instant, if it is, executing the script file;Otherwise, it does not execute The script file.
Further, it is periodically performed when the execution frequency information identifies the script file according to scheduled duration When, it is described according to the corresponding execution frequency information of the script file and current time, it is determined whether to execute the script file Before, the method also includes:
From the file destination, the temporal information that the identification information corresponding script file last time is performed is obtained;
It is described according to the corresponding execution frequency information of the script file and current time, it is determined whether execute the script File, comprising:
The temporal information that was performed according to the identification information corresponding script file last time and acquired execute frequency Scheduled duration in rate information determines that the target for executing the script file executes the moment;
Judge whether current time and target execution moment are consistent;
If it is, executing the script file;Otherwise, the script file is not executed.
Further, when the execution frequency information, which identifies the script file, to be executed once daily, the basis The corresponding execution frequency information of the script file and current time, it is determined whether before executing the script file, the side Method further include:
From the file destination, the date that the identification information corresponding script file last time is performed is obtained;
It is described according to the corresponding execution frequency information of the script file and current time, it is determined whether execute the script File, comprising:
Whether the date for judging that corresponding date at the current time and the script file last time are performed is identical;
If identical, the script file is not executed;Otherwise, the script file is executed.
Further, the method also includes:
When temporal information relevant there are the corresponding script file of the identification information in file destination, the foot is executed After this document, time information renovation that the corresponding script file of identification information described in file destination corresponding last time is performed For the current time.
Further, the method also includes:
When temporal information relevant there is no the corresponding script file of the identification information in file destination, described in execution After script file, the corresponding identification information of the script file is saved in the file destination, and will be determined as at current time The temporal information that the script file corresponding last time is performed.
Further, the method also includes:
At set time intervals, the script file and the corresponding mark of the script file that server issues are received Information and execution frequency information.
Further, the script file is Lua script file.
Second aspect, the present invention provides a kind of script file executive devices, are applied to terminal device, described device packet It includes:
Module is obtained, it is corresponding for obtaining the script file saved at least one node included by the terminal device Identification information and execute frequency information, wherein be stored with the script file that server issues in the node, and issued The corresponding identification information of script file and execution frequency information, and node and script file have unique correspondence;
Judgment module, it is relevant with the presence or absence of script file corresponding to the identification information in file destination for judging Temporal information, wherein preserve the identification information of the script file being performed in the file destination and be performed with this The corresponding relationship for the temporal information that script file last time is performed;
Determining module, for when the judgment module judging result be when, according to the corresponding execution of the script file Frequency information and current time, it is determined whether execute the script file;
Execution module, for executing the script file when the judgment module judging result is no.
Further, the determining module is specifically used for identifying the script file pre- when the execution frequency information Timing is carved and is performed, and judges whether current time is the predetermined instant, if it is, executing the script file;Otherwise, The script file is not executed.
Further, described device further include:
First obtains module, for obtaining the identification information corresponding script file last time from the file destination The temporal information being performed;
The determining module includes:
Submodule is determined, for identifying the script file according to scheduled duration periodicity quilt when the execution frequency information When execution, the temporal information and acquired execution frequency that were performed according to the identification information corresponding script file last time Scheduled duration in information determines that the target for executing the script file executes the moment;
First judging submodule, for judging that it is whether consistent that current time and the target execute the moment;
First implementation sub-module, for when the first judging submodule judging result, which is, is, executing the script text Part;When the first judging submodule judging result is no, the script file is not executed.
Further, described device further include:
Second obtains module, for obtaining the identification information corresponding script file last time from the file destination The date being performed;
The determining module includes:
Second judgment submodule, for being executed once daily when the execution frequency information identifies the script file When, whether the date for judging that corresponding date at the current time and the script file last time are performed is identical;
Second implementation sub-module, for not executing the script when the second judgment submodule judging result, which is, is File;When the second judgment submodule judging result is no, the script file is executed.
Further, described device further include:
Update module, for when there are the relevant temporal informations of the corresponding script file of the identification information in file destination When, it is after the determining module executes the script file, the corresponding script file of identification information described in file destination is corresponding The time information renovation that is performed of last time be the current time.
Further, described device further include:
Memory module, for when there is no the relevant time letters of the corresponding script file of the identification information in file destination When breath, after the execution module executes the script file, the corresponding mark of the script file is saved in the file destination Know information, and current time is determined as the temporal information that the script file corresponding last time is performed.
Further, described device further include:
Receiving module, at set time intervals, receiving script file and the script that server issues The corresponding identification information of file and execution frequency information.
Further, the script file is Lua script file.
The embodiment of the invention provides a kind of script files to execute method and device, is applied to terminal device, can be preparatory The script that server issues is received to set a file, parsing obtains the identification information of each script file and executes frequency information, and Correspondence is stored in each node of terminal device, is then directed to each node, the script text saved in the available node The identification information of part and frequency information is executed, it then can be according to whether there is the corresponding foot of the identification information in file destination The data of this document execute the script file to determine how, when there are the corresponding scripts of the identification information in file destination It, can be according to the corresponding execution frequency information of the script file and current time, it is determined whether execute the foot when data of file This document;When the data of the corresponding script file of the identification information are not present in file destination, script text can be determined It was not performed in terminal device before part, terminal device can execute the script file.In the embodiment of the present invention, terminal is set It is standby to determine whether to execute the script according to the relevant information of the script file for each script file itself saved File all downloads the script file when without each perform script file first, therefore, can be realized and easily executes Script file.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the flow chart that a kind of script file provided in an embodiment of the present invention executes method;
Fig. 2 is another flow chart that a kind of script file provided in an embodiment of the present invention executes method;
Fig. 3 is another flow chart that a kind of script file provided in an embodiment of the present invention executes method;
Fig. 4 is a kind of structural schematic diagram of script file executive device provided in an embodiment of the present invention;
Fig. 5 is a kind of another structural schematic diagram of script file executive device provided in an embodiment of the present invention;
Fig. 6 is a kind of another structural schematic diagram of script file executive device provided in an embodiment of the present invention.
Specific embodiment
In order to realize easily perform script file, the embodiment of the invention provides a kind of script files to execute method And device.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the present invention can phase Mutually combination.The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
In order to realize easily perform script file, the embodiment of the invention provides a kind of script files to execute method Process, as shown in Figure 1, the process the following steps are included:
S101 obtains the corresponding mark letter of the script file saved at least one node included by the terminal device Breath and execution frequency information, wherein the script file that server issues, and issued script file are stored in the node Corresponding identification information and execution frequency information, and node and script file have unique correspondence.
This method can be applied to terminal device, specifically, can be applied to be installed on the application program in terminal device. Above-mentioned application program can be mounted to any application program in terminal device, such as kill virus application program, calendar applications Deng this is not limited by the present invention.Terminal device can be mobile phone, smart phone, laptop, digital broadcasting transmitter, Personal digital assistant (PDA), tablet computer (PAD), portable media player (PMP), navigation device, desktop computer etc. are eventually End equipment.
In practical applications, any application program being installed in terminal device can receive some foot that server issues This document, and the script file is executed in the application program, itself to provide corresponding function.Specifically, above-mentioned script text Part can be Lua script file.
In the present embodiment, perform script file, terminal device can receive in advance what server issued for simplicity Script file set may include multiple script files and the corresponding mark of each script file in the script file set Information and execution frequency information.The execution frequency information of each script file can be used to identify the script in terminal device when It is performed.For example, execution frequency information can be performed for given time or periodically execution etc..
After terminal device receives script file set, it can parse the script file set, obtain each script file And corresponding identification information and execute frequency information.Also, in order to effectively be managed each script file, eventually End equipment can store each script file respectively.For example, multiple nodes, each node can be created in terminal device One script file of middle preservation and its corresponding identification information and execution frequency information.
Corresponding script file and the corresponding identification information of the script file are saved in each node and execute frequency After information, terminal device can be directed to each script file, periodically obtain the related data of the script file, and according to this The related data of script file, it is determined whether execute the script file.
Specifically, terminal device can obtain first the corresponding identification information of the script file saved in any one node and Frequency information is executed, according to the corresponding identification information of the script file and execution frequency information, it is determined whether execute the script File.
S102 judges in file destination with the presence or absence of script file corresponding to the identification information relevant time letter Breath.
Under normal circumstances, when terminal receives a new script file, terminal can execute the script file at once.On Stating new script file can be the script file that terminal device did not received for script name, script mark, for example, newly opening The script file of hair;Alternatively, can be had not been changed for script name, the script file that script mark changes, for example, script file Upgrade or improved, script name has not been changed, but its script identifies the script file changed.It requires emphasis It is that the script of script file is identified as the identification information based on determined by the file content in script file.
In the present embodiment, in order to identify whether each script file is new script file, to determine whether to set in terminal Standby middle horse back executes the script file, can create a file destination, in terminal device for saving the foot being performed The corresponding relationship for the temporal information that the script file last time that the identification information of this document was performed with this is performed.Namely It says, the corresponding script file of the identification information saved in the file destination is the script file executed, if a script text The identification information of part is not saved in file destination, then the script file is new script file.
When terminal device gets the corresponding identification information of script file saved in a node and executes frequency information Afterwards, it can be determined that whether there is the relevant temporal information of script file corresponding with the identification information in file destination.Namely It says, judges whether the corresponding script file of the identification information was performed in terminal device, and can further basis Judging result determines whether to execute the script file.
S103, when temporal information relevant in the presence of script file corresponding to the identification information in file destination, root According to the corresponding execution frequency information of the script file and current time, it is determined whether execute the script file.
When temporal information relevant there are script file corresponding with the identification information in file destination, show the script File is executed in terminal device, terminal device can further according to the execution frequency information of the script file and Current time, to determine whether to execute the script file.
Specifically, according to the corresponding execution frequency information of the script file and current time, it is determined whether described in execution The specific implementation of script file understands that subsequent citing is introduced several specific there are a variety of to be laid out clear and scheme Implementation.
S104, when temporal information relevant there is no script file corresponding to the identification information in file destination, Execute the script file.
When temporal information relevant there is no script file corresponding with the identification information in file destination, show the foot This document was not performed in terminal device, that is to say, that the script file is the new script text that terminal device receives Part, in this case, terminal device can execute the script file.
Script file provided in this embodiment executes method, can receive the script that server issues in advance and set a file, Parsing obtains the identification information of each script file and executes frequency information, and the corresponding each node for being stored in terminal device In, it is then directed to each node, the identification information of the script file saved in the available node and executes frequency information, so It can be somebody's turn to do afterwards according to the data that whether there is the corresponding script file of the identification information in file destination to determine how to execute Script file, when in file destination there are when the data of the corresponding script file of the identification information, can be according to script text The corresponding execution frequency information of part and current time, it is determined whether execute the script file;When there is no described in file destination When the data of the corresponding script file of identification information, it was not performed in terminal device before can determining the script file, Terminal device can execute the script file.In the embodiment of the present invention, terminal device can be for each script itself saved File determines whether to execute the script file according to the relevant information of the script file, without each perform script text When part, the script file is all downloaded first, therefore, can be realized easily perform script file.
Further, it when temporal information relevant there are the corresponding script file of the identification information in file destination, holds After the row script file, terminal device can be held the corresponding script file of the identification information corresponding last time in file destination Capable time information renovation is current time, so that when terminal device judges whether to execute the script file next time, Ke Yigen According to updated last time be performed between accurately determine whether execute the script file.
Further, when temporal information relevant there is no the corresponding script file of the identification information in file destination, After executing the script file, terminal device can save the corresponding identification information of the script file in file destination, and will work as The preceding moment is determined as the temporal information being performed the script file corresponding last time, so that terminal device judges whether to hold next time When the row script file, which can be accurately determined according to the identification information of the script file saved in file destination File is the script file executed, and according to the last time of the script file saved in file destination be performed between determine Whether the script file is executed.
Further, server can receive the script file and be somebody's turn to do that server issues at set time intervals The corresponding identification information of script file and execution frequency information are newest script text with guarantee to save in terminal device Part promotes user experience so that the application program to install in terminal device provides more abundant function.
It should be noted that each script file executes frequency in each script file that terminal device pre-saves Rate information may have biggish difference.Specifically, some script files can be performed periodically by preset duration, and And for different script files, even if being all periodically to be performed, the corresponding preset duration of each script file may not also Together;Other script files can also be with Exactly-once.
For example, realize the difference of function according to each script file, each script file, which can correspond to, different executes frequency Rate information.Such as, for the script file of killing virus, it may be necessary to it is performed a number of times in terminal device, it such as can be by default Duration be performed periodically, to ensure the safety of terminal device;And it is used to collect the script file of data, when the data When remaining unchanged within some time, which only needs to be executed once in terminal device.
Specifically, when the corresponding script file of the identification information existed in file destination with terminal device is obtained from node When relevant temporal information, terminal device can be determined according to the corresponding execution frequency information of the script file and current time Whether the script file is executed.
In one implementation, exist when the execution frequency information that terminal device is obtained from node identifies the script file Predetermined instant is performed, and shows that the script file is only performed in the predetermined instant.Terminal device is judging whether to execute When the script file, it can be determined that whether current time is the predetermined instant, if it is, executing the script file;Otherwise, The script file is not executed.
Further, in another implementation, when the execution frequency information obtained from node identifies the script File is periodically performed according to scheduled duration, as shown in Fig. 2, a kind of script file execution provided by the embodiment of the present invention Method can also include: before step S103
S104 obtains the time that the identification information corresponding script file last time is performed from the file destination Information.
In the present embodiment, the corresponding execution frequency information of the script file that terminal device is obtained from node identifies the foot This document is periodically performed according to scheduled duration.That is, the time interval that the script file is performed twice is that this is pre- Timing is long, which for example can be 4 hours, 6 hours, 12 hours etc..
It is periodically performed when the corresponding execution frequency information of script file identifies the script file according to scheduled duration, Terminal device can obtain script file last time quilt first from file destination when judging whether to execute the script file The temporal information of execution, so can according to the temporal information that the script file last time is performed and its execute frequency information come Determine whether to execute the script file.
For example, the temporal information that is performed of script file last time that obtains of terminal device can be with are as follows: 2015.12.02.7: 32。
Further, step S103 may include:
S1031, the temporal information being performed according to the identification information corresponding script file last time and acquired The scheduled duration in frequency information is executed, determines that the target for executing the script file executes the moment.
After getting the temporal information that script file last time is performed, terminal device can be according to the script file last time quilt The temporal information of execution and the acquired scheduled duration executed in frequency information, determine that the target for executing the script file is held The row moment.
For example, as described above, the temporal information being performed when the script file last time that terminal device obtains are as follows: It 2015.12.02.7:32, can be true when also, the corresponding scheduled duration executed in frequency information of the script file is 6 hours Surely the target for executing the script file executes the moment are as follows: 2015.12.02.13:32.
S1032 judges whether current time and target execution moment are consistent.If current time and the target execute Moment is consistent, thens follow the steps S104, executes the script file.
After determining that the target of script file executes the moment, terminal device may determine that current time and the target execute the moment It is whether consistent, if unanimously, thening follow the steps S104, execute the script file.
If current time and target execution moment are inconsistent, S1033 is thened follow the steps, does not execute the script file.
That is, the script file is just performed when only current time is accurate 2015.12.02.13:32, He is not performed the moment script file.
Further, in another implementation, when the execution frequency information obtained from node identifies the script When file is executed once daily, as shown in figure 3, a kind of script file execution method provided by the embodiment of the present invention, in step Before rapid S103, can also include:
S105 obtains the date that the identification information corresponding script file last time is performed from the file destination.
In the present embodiment, the corresponding execution frequency information of the script file that terminal device is obtained from node identifies the foot This document is executed once daily.That is, the script file is executed once daily, and specifically what in one day Moment, which is performed, to be not construed as limiting.
It is performed daily when the corresponding execution frequency information of script file identifies the script file, terminal device is judging When whether executing the script file, the date that script file last time is performed can be obtained, in turn first from file destination The date and current date that can be performed according to the script file last time determine whether to execute the script file.
For example, date for being performed script file last time for obtaining of terminal device can be with are as follows: 2015.12.02.
Also, S103 may include:
S1034, judge date that the corresponding date at the current time was performed with the script file last time whether phase Together.If corresponding date at current time and the date that the script file last time is performed be not identical, S104 is thened follow the steps, is held The row script file.
After getting the date that script file last time is performed, terminal device may determine that the corresponding date at current time with Whether the date that the script file last time is performed is identical.If the corresponding date at current time was performed with the script file last time Date it is not identical, show not to be performed on the day of the script file, then terminal device can execute the script file.
If the corresponding date at current time is identical as the date that the script file last time is performed, S1033 is thened follow the steps, The script file is not executed.
When the corresponding date at current time is identical as the date that the script file last time is performed, show that the script file is worked as It had been performed, then terminal device can not execute the script file.
Fig. 4 is a kind of script file executive device provided in an embodiment of the present invention, is applied to terminal device, described device packet It includes:
Module 410 is obtained, for obtaining the script file saved at least one node included by the terminal device Corresponding identification information and execution frequency information, wherein the script file that server issues, Yi Jisuo are stored in the node It issues the corresponding identification information of script file and executes frequency information, and node and script file have unique correspondence;
Judgment module 420, for judging in file destination with the presence or absence of script file phase corresponding with the identification information The temporal information of pass, wherein the identification information that the script file being performed is preserved in the file destination is performed with this The corresponding relationship for the temporal information that the script file last time crossed is performed;
Determining module 430, for being held according to the script file is corresponding when the judgment module judging result, which is, is Line frequency information and current time, it is determined whether execute the script file;
Execution module 440, for executing the script file when the judgment module judging result is no.
Script file executive device provided in this embodiment can receive the script that server issues in advance and set a file, Parsing obtains the identification information of each script file and executes frequency information, and the corresponding each node for being stored in terminal device In, it is then directed to each node, the identification information of the script file saved in the available node and executes frequency information, so It can be somebody's turn to do afterwards according to the data that whether there is the corresponding script file of the identification information in file destination to determine how to execute Script file, when in file destination there are when the data of the corresponding script file of the identification information, can be according to script text The corresponding execution frequency information of part and current time, it is determined whether execute the script file;When there is no described in file destination When the data of the corresponding script file of identification information, it was not performed in terminal device before can determining the script file, Terminal device can execute the script file.In the embodiment of the present invention, terminal device can be for each script itself saved File determines whether to execute the script file according to the relevant information of the script file, without each perform script text When part, the script file is all downloaded first, therefore, can be realized easily perform script file.
Further, the determining module 430 is specifically used for existing when the execution frequency information identifies the script file Predetermined instant is performed, and judges whether current time is the predetermined instant, if it is, executing the script file;It is no Then, the script file is not executed.
Further, described device further include:
Update module (not shown), for when there are the corresponding script file phases of the identification information in file destination It is after the determining module executes the script file, identification information described in file destination is corresponding when the temporal information of pass The time information renovation that script file corresponding last time is performed is the current time.
Further, described device further include:
Memory module (not shown), for when there is no the corresponding script files of the identification information in file destination When relevant temporal information, after the execution module executes the script file, the script is saved in the file destination The corresponding identification information of file, and current time is determined as the temporal information that the script file corresponding last time is performed.
Further, described device further include:
Receiving module (not shown), at set time intervals, receiving the script file that server issues And the corresponding identification information of the script file and execute frequency information.
Further, the script file is Lua script file.
Further, as shown in figure 5, described device further include:
First obtains module 450, for obtaining on the corresponding script file of the identification information from the file destination The secondary temporal information being performed;
The determining module 430 includes:
Submodule 4301 is determined, for identifying the script file according to the scheduled duration period when the execution frequency information Property is performed, the temporal information and acquired execution being performed according to the identification information corresponding script file last time Scheduled duration in frequency information determines that the target for executing the script file executes the moment;
First judging submodule 4302, for judging that it is whether consistent that current time and the target execute the moment;
First implementation sub-module 4303, for executing the foot when the first judging submodule judging result, which is, is This document;When the first judging submodule judging result is no, the script file is not executed.
Further, as shown in fig. 6, described device further include:
Second obtains module 460, for obtaining on the corresponding script file of the identification information from the file destination The secondary date being performed;
The determining module 430 includes:
Second judgment submodule 4304, for being performed one daily when the execution frequency information identifies the script file When secondary, whether the date for judging that corresponding date at the current time and the script file last time are performed is identical;
Second implementation sub-module 4305, it is described for not executing when the second judgment submodule judging result, which is, is Script file;When the second judgment submodule judging result is no, the script file is executed.
The embodiment of the invention provides a kind of script files to execute method and device, is applied to terminal device, can be preparatory The script that server issues is received to set a file, parsing obtains the identification information of each script file and executes frequency information, and Correspondence is stored in each node of terminal device, is then directed to each node, the script text saved in the available node The identification information of part and frequency information is executed, it then can be according to whether there is the corresponding foot of the identification information in file destination The data of this document execute the script file to determine how, when there are the corresponding scripts of the identification information in file destination It, can be according to the corresponding execution frequency information of the script file and current time, it is determined whether execute the foot when data of file This document;When the data of the corresponding script file of the identification information are not present in file destination, script text can be determined It was not performed in terminal device before part, terminal device can execute the script file.In the embodiment of the present invention, terminal is set It is standby to determine whether to execute the script according to the relevant information of the script file for each script file itself saved File all downloads the script file when without each perform script file first, therefore, can be realized and easily executes Script file.
For systems/devices embodiment, since it is substantially similar to the method embodiment, so the comparison of description is simple Single, the relevent part can refer to the partial explaination of embodiments of method.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (14)

1. a kind of script file executes method, which is characterized in that be applied to terminal device, which comprises
Obtain the corresponding identification information of the script file saved at least one node included by the terminal device and execution Frequency information, wherein the script file that server issues, and the corresponding mark of issued script file are stored in the node Know information and execute frequency information, and node and script file have unique correspondence;
Judge in file destination with the presence or absence of the relevant temporal information of script file corresponding to the identification information, wherein institute It states and preserves the script file last time that the identification information of the script file being performed was performed with this in file destination and held The corresponding relationship of capable temporal information;
If so, according to the corresponding execution frequency information of the script file and current time, it is determined whether execute the script text Part;
Otherwise, it determines the script file is the new script file that the terminal device receives, and execute the script file;
When temporal information relevant there are the corresponding script file of the identification information in file destination, the script text is executed It is institute by the time information renovation that the corresponding script file of identification information described in file destination corresponding last time is performed after part State current time.
2. the method according to claim 1, wherein existing when the execution frequency information identifies the script file Predetermined instant is performed, described according to the corresponding execution frequency information of the script file and current time, it is determined whether to hold The row script file includes:
Judge whether current time is the predetermined instant, if it is, executing the script file;Otherwise, it does not execute described Script file.
3. the method according to claim 1, wherein being pressed when the execution frequency information identifies the script file It is periodically performed according to scheduled duration, it is described according to the corresponding execution frequency information of the script file and current time, really Before determining whether to execute the script file, the method also includes:
From the file destination, the temporal information that the identification information corresponding script file last time is performed is obtained;
It is described according to the corresponding execution frequency information of the script file and current time, it is determined whether execute script text Part, comprising:
The temporal information being performed according to the identification information corresponding script file last time and acquired execution frequency letter Scheduled duration in breath determines that the target for executing the script file executes the moment;
Judge whether current time and target execution moment are consistent;
If it is, executing the script file;Otherwise, the script file is not executed.
4. the method according to claim 1, wherein when the execution frequency information mark script file is every It is described according to the corresponding execution frequency information of the script file and current time when it is executed once, it is determined whether to execute Before the script file, the method also includes:
From the file destination, the date that the identification information corresponding script file last time is performed is obtained;
It is described according to the corresponding execution frequency information of the script file and current time, it is determined whether execute script text Part, comprising:
Whether the date for judging that corresponding date at the current time and the script file last time are performed is identical;
If identical, the script file is not executed;Otherwise, the script file is executed.
5. the method according to claim 1, wherein the method also includes:
When temporal information relevant there is no the corresponding script file of the identification information in file destination, the script is executed After file, the corresponding identification information of the script file is saved in the file destination, and will be determined as at current time described The temporal information that script file corresponding last time is performed.
6. the method according to claim 1, wherein the method also includes:
At set time intervals, script file and the corresponding identification information of the script file that server issues are received With execution frequency information.
7. the method according to claim 1, wherein the script file is Lua script file.
8. a kind of script file executive device, which is characterized in that be applied to terminal device, described device includes:
Module is obtained, for obtaining the corresponding mark of script file saved at least one node included by the terminal device Know information and execute frequency information, wherein is stored with the script file that server issues, and issued script in the node The corresponding identification information of file and execution frequency information, and node and script file have unique correspondence;
Judgment module, for judging in file destination with the presence or absence of script file corresponding to the identification information relevant time Information, wherein the identification information and the script being performed of the script file being performed are preserved in the file destination The corresponding relationship for the temporal information that file last time is performed;
Determining module, for when the judgment module judging result be when, according to the corresponding execution frequency of the script file Information and current time, it is determined whether execute the script file;
Execution module, for when the judgment module judging result is no, determining that the script file is the terminal device The new script file received, and execute the script file;
Update module, for when temporal information relevant there are the corresponding script file of the identification information in file destination, After the determining module executes the script file, by the corresponding script file of identification information described in file destination it is corresponding on The secondary time information renovation being performed is the current time.
9. device according to claim 8, which is characterized in that the determining module is specifically used for working as the execution frequency Script file described in message identification is performed at the scheduled time, judges whether current time is the predetermined instant, if so, Then execute the script file;Otherwise, the script file is not executed.
10. device according to claim 8, which is characterized in that described device further include:
First obtains module, is held for from the file destination, obtaining the identification information corresponding script file last time Capable temporal information;
The determining module includes:
Submodule is determined, for being periodically performed when the execution frequency information identifies the script file according to scheduled duration When, the temporal information being performed according to the identification information corresponding script file last time and acquired execution frequency information In scheduled duration, determine that the target for executing the script file executes the moment;
First judging submodule, for judging that it is whether consistent that current time and the target execute the moment;
First implementation sub-module, for executing the script file when the first judging submodule judging result, which is, is;When When the first judging submodule judging result is no, the script file is not executed.
11. device according to claim 8, which is characterized in that described device further include:
Second obtains module, is held for from the file destination, obtaining the identification information corresponding script file last time The capable date;
The determining module includes:
Second judgment submodule, for sentencing when the execution frequency information identifies the script file and is executed once daily Whether date that corresponding date at the current time and the script file last time are performed of breaking is identical;
Second implementation sub-module, for not executing the script file when the second judgment submodule judging result, which is, is; When the second judgment submodule judging result is no, the script file is executed.
12. device according to claim 8, which is characterized in that described device further include:
Memory module, for when there is no the relevant temporal informations of the corresponding script file of the identification information in file destination When, after the execution module executes the script file, the corresponding mark of the script file is saved in the file destination Information, and current time is determined as the temporal information that the script file corresponding last time is performed.
13. device according to claim 8, which is characterized in that described device further include:
Receiving module, at set time intervals, receiving script file and the script file that server issues Corresponding identification information and execution frequency information.
14. device according to claim 8, which is characterized in that the script file is Lua script file.
CN201510997966.1A 2015-12-25 2015-12-25 A kind of script file execution method and device Active CN105468379B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510997966.1A CN105468379B (en) 2015-12-25 2015-12-25 A kind of script file execution method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510997966.1A CN105468379B (en) 2015-12-25 2015-12-25 A kind of script file execution method and device

Publications (2)

Publication Number Publication Date
CN105468379A CN105468379A (en) 2016-04-06
CN105468379B true CN105468379B (en) 2019-06-14

Family

ID=55606122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510997966.1A Active CN105468379B (en) 2015-12-25 2015-12-25 A kind of script file execution method and device

Country Status (1)

Country Link
CN (1) CN105468379B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109117246B (en) * 2018-07-06 2022-05-10 网宿科技股份有限公司 Server and command execution method and control method thereof
CN112597131A (en) * 2020-12-25 2021-04-02 广州趣丸网络科技有限公司 Distributed script control method and related device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104423953A (en) * 2013-09-04 2015-03-18 中国石油天然气股份有限公司 Timing data processing script execution system and method of supervisory control and data acquisition (SCADA) system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102501B (en) * 2013-04-03 2018-12-04 南京中兴新软件有限责任公司 A kind of mobile terminal and its upgrade method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104423953A (en) * 2013-09-04 2015-03-18 中国石油天然气股份有限公司 Timing data processing script execution system and method of supervisory control and data acquisition (SCADA) system

Also Published As

Publication number Publication date
CN105468379A (en) 2016-04-06

Similar Documents

Publication Publication Date Title
AU2016359508B2 (en) Page jumping method and apparatus
KR102162872B1 (en) Multi-task scheduling method, system, application server and computer-readable storage medium
US8830913B1 (en) Location-based software updates
CN112214260B (en) Method and device for loading APP (application) of terminal
EP2651106A1 (en) Method and device for automatic classification of applications in mobile terminal
CN109818848B (en) Session display method and device, storage medium and electronic device
CN107729014B (en) Page jump method and structure based on Android
CN111708557B (en) Method, device and storage medium for updating configuration file
CN103533011A (en) Intelligent terminal data configuration method and system based on cloud terminal
WO2014035931A1 (en) Branded computer devices and apparatus to connect user and enterprise
CN102968337A (en) Application program cleaning method and system
CN105468379B (en) A kind of script file execution method and device
CN109617950B (en) Data updating method, device, equipment and readable storage medium
CN106020917B (en) A kind of software installation method and device, user terminal
CN110784347A (en) Node management method, system, equipment and storage medium for container cluster
CN110750244A (en) Code synchronization method and device, electronic equipment and storage medium
CN105159692B (en) Identification method, device and the server of application
CN108958808A (en) Method for starting terminal and device, terminal and storage medium
CN105975321A (en) Application program installation package icon replacing method and device
CN104239333B (en) Carry out the method and terminal device of browser Web side navigation
CN102932513B (en) A kind of business card maintaining method, device and equipment
CN105530140A (en) Cloud scheduling system, method and device for removing tight coupling of use case and environment
CN103729255B (en) Information processing method and device and electronic equipment
JP2017049804A (en) Message transmission system and management server
CN105262775A (en) Alarm clock controlling method and device, alarm clock and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20181217

Address after: Room 105-53811, No. 6 Baohua Road, Hengqin New District, Zhuhai City, Guangdong Province

Applicant after: Zhuhai Leopard Technology Co.,Ltd.

Address before: 100085 East District, Second Floor, 33 Xiaoying West Road, Haidian District, Beijing

Applicant before: BEIJING KINGSOFT INTERNET SECURITY SOFTWARE Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant