CN109240994A - A kind of document handling method and device - Google Patents

A kind of document handling method and device Download PDF

Info

Publication number
CN109240994A
CN109240994A CN201810865540.4A CN201810865540A CN109240994A CN 109240994 A CN109240994 A CN 109240994A CN 201810865540 A CN201810865540 A CN 201810865540A CN 109240994 A CN109240994 A CN 109240994A
Authority
CN
China
Prior art keywords
task
file
tested
test
timing
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
Application number
CN201810865540.4A
Other languages
Chinese (zh)
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.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201810865540.4A priority Critical patent/CN109240994A/en
Publication of CN109240994A publication Critical patent/CN109240994A/en
Pending legal-status Critical Current

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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a kind of document handling method and devices.This method comprises: establishing the timed backup task of file, fixed time test task and timing release tasks;According to the scheduled one or more file directorys of timed backup task timing scan, the determining current file of scanning is backuped to mention and is surveyed in platform, and proposes survey task for current file creation, sets to be tested for the state for proposing survey task;The state that scanning meets test order in mentioning survey platform according to the timing of fixed time test task is that the survey task that mentions to be tested is tested, if the test result of current test assignment meets default result, set to be released for the state of the corresponding tested file of current test assignment;The state for meeting issue rules according to timing release tasks timing scan is file to be released, by the file distribution to be released scanned to file distribution platform.The embodiment of the present invention realizes the automation for proposing and surveying link, improves the efficiency of file process, reduces the probability of human error.

Description

A kind of document handling method and device
Technical field
The present invention relates to field of computer technology, especially a kind of document handling method, document handling apparatus, computer are deposited Storage media and calculating equipment.
Background technique
In a computer, file is the information aggregate using computer storage medium as carrier storage on computers, it with Realize the unit defined for the purpose of the partial function of certain function or some software.File can be text document, figure Piece, program etc..
File test in file process, is for judging the correctness of file, integrality and the process of safety.In phase In the technology of pass, mainly come locating file by way of manual hand manipulation, and then file is tested, and is completed in test Afterwards by manually removing file publishing.However, manual hand manipulation can bring the problem that treatment effeciency is low, error probability is high.Cause And, it would be highly desirable to solve this technical problem.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind State document handling method, document handling apparatus, computer storage medium and the calculating equipment of problem.
One side according to an embodiment of the present invention provides a kind of document handling method, comprising:
Establish the timed backup task, fixed time test task and timing release tasks of file;
According to the scheduled one or more file directorys of the timed backup task timing scan, by the current of scanning determination File backup to mention survey platform in, and for current file creation propose survey task, set to be tested for the state for proposing survey task;
Mention that survey scanning in platform to meet the state of test order be to be measured described according to fixed time test task timing The survey task that mentions of examination is tested, if the test result of current test assignment meets default result, by current test assignment pair The state for the tested file answered is set as to be released;
The state for meeting issue rules according to the timing release tasks timing scan is file to be released, and scanning is arrived File distribution to be released to file distribution platform.
Optionally, if the current file of present scan determination is different from the determining current file of last scanning, basis The scheduled one or more file directorys of the timed backup task timing scan, comprising:
According to the scheduled one or more file directorys of the timed backup task timing scan, every scanning is to one or more A file obtains the unique identification of one or more of files;
The unique identification that file has been backed up in the unique identification of one or more of files and scan database is carried out It compares, if the unique identification of file is not present in the scan database in one or more of files, this document is made The current file determined for present scan;Conversely, the current file then determined not as present scan.
Optionally, according to the fixed time test task timing in the state for mentioning and surveying scanning in platform and meeting test order It is tested for the survey task that mentions to be tested, comprising:
Mention that survey scanning in platform to meet the state of test order be to be measured described according to fixed time test task timing Examination proposes survey task;
If scanning to be tested proposes survey task, by scan it is to be tested propose survey task and submit to test case hold Capable uniform resource position mark URL is tested.
Optionally, according to the fixed time test task timing in the state for mentioning and surveying scanning in platform and meeting test order It is tested for the survey task that mentions to be tested, comprising:
Mention that survey scanning in platform to meet the state of test order be to be measured described according to fixed time test task timing Examination proposes survey task, and determines one or more test cases according to the fixed time test task;
The survey task that mentions to be tested scanned is tested using one or more of test cases.
Optionally, the issue rules include the entitled specified file name of file or fileversion number is indicated release number.
Optionally, after the file distribution to be released to file distribution platform that will be scanned, the method also includes:
Receive the address information that the file distribution platform returns;
The address information is imported into file and updates platform, with by the file update platform to the file of client into Row updates.
Optionally, described after the timed backup task, fixed time test task and timing release tasks for establishing file Method further include:
Timed task trigger is constructed, the timed backup task, timing are executed by timed task trigger triggering Test assignment and timing release tasks.
Optionally, described after the timed backup task, fixed time test task and timing release tasks for establishing file Method further include:
Using the timed backup task, fixed time test task and timing release tasks as each timed task, according to The execution time of each timed task, calculate the weighted value of each timed task;
According to the weighted value of each timed task, each timed task is ranked up;
According to the ordering scenario of each timed task, each timed task, corresponding execution time and weighted value are deposited It stores up in ordered set;
Newly-built thread pool, each timed task in the ordered set is sequentially executed by the thread pool.
Optionally, each timed task in the ordered set is sequentially executed by the thread pool, comprising:
The most preceding timed task that sorts in the ordered set is pulled by the thread pool every time, when the timed task reaches When executing the time, the timed task is executed.
Optionally, the most preceding timed task that sorts in the ordered set is pulled by the thread pool every time, when the timing When task reaches the execution time, the timed task is executed, comprising:
It is pulled every time by the thread pool when sorting most preceding timed task in the ordered set, judges the timed task Whether arrival executes the time;
If so, executing the timed task, and the timed task is deleted from the ordered set;
If it is not, the duration to be specified such as then, pulls the most preceding timed task that sorts in the ordered set, and execute and sentence again Disconnected operation.
According to another aspect of an embodiment of the present invention, a kind of document handling apparatus is provided, comprising:
Module is established, the timed backup task, fixed time test task and timing release tasks of file are adapted to set up;
Backup module is suitable for according to the scheduled one or more file directorys of the timed backup task timing scan, will The determining current file of scanning is backuped to mention and be surveyed in platform, and proposes survey task for current file creation, this is mentioned to the shape of survey task State is set as to be tested;
Test module, suitable for surveying scanning in platform in described mention according to fixed time test task timing and meeting test order State be that the survey task that mentions to be tested is tested, if the test result of current test assignment meets default result, will work as The state of the corresponding tested file of preceding test assignment is set as to be released;
Release module, the state suitable for meeting issue rules according to the timing release tasks timing scan are to be released File, by the file distribution to be released scanned to file distribution platform.
Optionally, the backup module is further adapted for:
If the current file that present scan determines is different from the determining current file of last scanning, standby according to the timing The scheduled one or more file directorys of part task timing scan, every scanning to one or more files, obtain it is one or The unique identification of multiple files;
The unique identification that file has been backed up in the unique identification of one or more of files and scan database is carried out It compares, if the unique identification of file is not present in the scan database in one or more of files, this document is made The current file determined for present scan;Conversely, the current file then determined not as present scan.
Optionally, the test module is further adapted for:
Mention that survey scanning in platform to meet the state of test order be to be measured described according to fixed time test task timing Examination proposes survey task;
If scanning to be tested proposes survey task, by scan it is to be tested propose survey task and submit to test case hold Capable uniform resource position mark URL is tested.
Optionally, the test module is further adapted for:
Mention that survey scanning in platform to meet the state of test order be to be measured described according to fixed time test task timing Examination proposes survey task, and determines one or more test cases according to the fixed time test task;
The survey task that mentions to be tested scanned is tested using one or more of test cases.
Optionally, the issue rules include the entitled specified file name of file or fileversion number is indicated release number.
Optionally, described device further include:
Import modul, suitable for the release module by the file distribution to be released scanned to file distribution platform it Afterwards, the address information that the file distribution platform returns is received;
The address information is imported into file and updates platform, with by the file update platform to the file of client into Row updates.
Optionally, described device further include:
Module is constructed, suitable for establishing the timed backup task of file, fixed time test task and fixed in the module of establishing When release tasks after, construct timed task trigger, the timed backup executed by timed task trigger triggering and is appointed Business, fixed time test task and timing release tasks.
Optionally, described device further include:
Processing module, suitable for establishing the timed backup task of file, fixed time test task and fixed in the module of establishing When release tasks after, using the timed backup task, fixed time test task and timing release tasks as each timing appoint Business, according to the execution time of each timed task, calculates the weighted value of each timed task;
According to the weighted value of each timed task, each timed task is ranked up;
According to the ordering scenario of each timed task, each timed task, corresponding execution time and weighted value are deposited It stores up in ordered set;
Newly-built thread pool, each timed task in the ordered set is sequentially executed by the thread pool.
Optionally, the processing module is further adapted for:
The most preceding timed task that sorts in the ordered set is pulled by the thread pool every time, when the timed task reaches When executing the time, the timed task is executed.
Optionally, the processing module is further adapted for:
It is pulled every time by the thread pool when sorting most preceding timed task in the ordered set, judges the timed task Whether arrival executes the time;
If so, executing the timed task, and the timed task is deleted from the ordered set;
If it is not, the duration to be specified such as then, pulls the most preceding timed task that sorts in the ordered set, and execute and sentence again Disconnected operation.
According to another aspect of an embodiment of the present invention, a kind of computer storage medium, the computer storage are additionally provided Media storage has computer program code, when the computer program code is run on the computing device, leads to the calculating Equipment is executed according to above-mentioned document handling method.
Another aspect according to an embodiment of the present invention additionally provides a kind of calculating equipment, comprising: processor;And storage There is the memory of computer program code;When the computer program code is run by the processor, lead to the calculating Equipment is executed according to above-mentioned document handling method.
The embodiment of the invention provides a kind of document handling method and devices, in method, establish the timed backup of file Task, fixed time test task and timing release tasks;According to the scheduled one or more texts of timed backup task timing scan The determining current file of scanning is backuped to mention and be surveyed in platform, and proposes survey task for current file creation by part catalogue, this is proposed survey The state of task is set as to be tested;The state surveyed scanning in platform and meet test order is being proposed according to the timing of fixed time test task It is tested for the survey task that mentions to be tested, if the test result of current test assignment meets default result, will currently be tested The state of the corresponding tested file of task is set as to be released;Meet issue rules according to timing release tasks timing scan State is file to be released, by the file distribution to be released scanned to file distribution platform.It can be seen that the present invention is implemented Example based on timed task by file backup, test, issue these three processes and decoupled, it is only necessary to meet corresponding timed task It begins to, allows mention and survey link realization automation, improve the efficiency of file process, reduce the probability of human error.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention, And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
According to the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will be brighter The above and other objects, advantages and features of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows the flow chart of document handling method according to an embodiment of the invention;
Fig. 2 shows the flow charts of the method according to an embodiment of the invention for executing each timed task;
Fig. 3 shows the structure chart of document handling apparatus according to an embodiment of the invention;And
Fig. 4 shows the structure chart of document handling apparatus according to another embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure It is fully disclosed to those skilled in the art.
In order to solve the above-mentioned technical problem, the embodiment of the present invention proposes a kind of document handling method.Fig. 1 shows basis The flow chart of the document handling method of one embodiment of the invention.Referring to Fig. 1, this method may comprise steps of S102 to step S108。
Step S102 establishes the timed backup task, fixed time test task and timing release tasks of file.
Step S104 determines scanning according to the scheduled one or more file directorys of timed backup task timing scan Current file backup to mention survey platform in, and for current file creation propose survey task, set the state for proposing survey task to It is to be tested.
Step S106, the state that scanning meets test order in mentioning survey platform according to the timing of fixed time test task is to be measured The survey task that mentions of examination is tested, if the test result of current test assignment meets default result, by current test assignment pair The state for the tested file answered is set as to be released.
Step S108 is file to be released according to the state that timing release tasks timing scan meets issue rules, will The file distribution to be released scanned is to file distribution platform.
The embodiment of the present invention be based on timed task by file backup, test, issue these three processes and decoupled, it is only necessary to Meet corresponding timed task to begin to, allows mention and survey link realization automation, improve the efficiency of file process, reduce and manually go out Wrong probability.
May include in the timed backup task for the file established in above step S102 time of file backup, the frequency, One or more file directorys of scanning etc..Similarly, the fixed time test task of file may include file test time, The frequency, test case, test condition etc., the timing release tasks of file may include the time of file distribution, the frequency, publication Condition, releasing position etc., the embodiment of the present invention to this with no restriction.
In alternative embodiment of the invention, file can be not repeated backup, to improve subsequent testing efficiency, be The current file for determining present scan is different from the determining current file of upper primary scanning, then walks Rapid S104 can specifically be scanned by following steps A1 to step A2.
Step A1, according to the scheduled one or more file directorys of timed backup task timing scan, every scanning is to one Or multiple files, obtain the unique identification of one or more files.
Step A2, will have been backed up in the unique identification of one or more files and scan database the unique identification of file into Row compares, if the unique identification of file is not present in scan database in one or more files, using this document as this Scan determining current file;Conversely, the current file then determined not as present scan.
In above step, the unique identification of file can be SHA1 or MD5 value etc., can also be other unique certainly Mark, the embodiment of the present invention to this with no restriction.
In alternative embodiment of the invention, multiple subdirectories can be created under one or more file directorys, it is each The title of subdirectory is fileversion number.Because some files are obtained less than version number, such as some non-PE (Portable Executable, transplantable execution body) file, the embodiment of the present invention, can when multiple subdirectories are arrived in scanning To extract the version number for the file that the name of each subdirectory is referred to as in multiple subdirectories.
The state surveyed scanning in platform and meet test order is being mentioned according to the timing of fixed time test task in above step S106 It is tested for the survey task that mentions to be tested, the embodiment of the invention provides following two schemes, will carry out respectively below detailed It introduces.
In scheme one, according to the timing of fixed time test task mention survey scanning in platform meet test order state be to Test proposes survey task, if scanning proposes survey task to be tested, the survey task that mentions to be tested scanned is submitted to survey The URL (Uniform Resource Locator, uniform resource locator) that example on probation executes is tested.It specifically, can be with The mission bit stream for proposing survey task to be tested scanned, the file information, ID mark etc. are submitted into URL, test is utilized by URL Use-case is tested.Finally, receiving the test result that URL is returned.
In scheme two, according to the timing of fixed time test task mention survey scanning in platform meet test order state be to Test proposes survey task, and determines one or more test cases according to fixed time test task;Then, one or more is utilized Test case tests the survey task that proposes to be tested scanned.Here one or more test cases, which can be located at, to be used To be tested can be mentioned survey task and use-case after the use-case that one or more test cases have been determined identifies by example platform Mark submits to use-case platform, identifies corresponding one or more test cases using use-case by use-case platform and mentions to be tested Survey task is tested.
In above-mentioned scheme, test order can such as propose time range, the priority of survey task, can be according to reality Border demand flexible setting, the embodiment of the present invention to this with no restriction.
The issue rules referred in above step S108 may include the entitled specified file name of file or fileversion number For indicated release number.
The state of issue rules is met for file to be released according to timing release tasks timing scan in step S108, is incited somebody to action After the file distribution to be released to file distribution platform scanned, the embodiment of the present invention can also receive file distribution platform and return Address information is then imported into file and updates platform by the address information returned, to update platform to the file of client by file It is updated.
In alternative embodiment of the invention, timed backup task, the fixed time test task of file are established in step S102 And after timing release tasks, execution for each timed task, the embodiment of the present invention can use timed task triggering Device or ordered set are realized, will be described in detail respectively below.
Mode one utilizes timed task trigger.Timed task trigger is specifically constructed, is touched by timed task trigger Hair executes timed backup task, fixed time test task and timing release tasks.Here a timed task triggering can be constructed Device executes timed backup task, fixed time test task and timing release tasks to trigger, and can also construct multiple timed tasks Trigger executes timed backup task, fixed time test task and timing release tasks to trigger.
Mode two, in the way of ordered set.It specifically can be timed backup task, fixed time test task and determine When release tasks as each timed task the weight of each timed task is calculated according to the execution time of each timed task Value;Then, according to the weighted value of each timed task, each timed task is ranked up;According to the row of each timed task Sequence situation, by the storage of each timed task, corresponding execution time and weighted value into ordered set;Later, thread is created Pond is sequentially executed each timed task in ordered set by thread pool.Here ordered set can be storage system Redis Zset ordered set, weighted value corresponds to the score in zset.
In alternative embodiment of the invention, when sequentially executing each timed task in ordered set by thread pool, It specifically can be and pull the most preceding timed task that sorts in ordered set every time by thread pool, when the timed task, which reaches, to be executed Between when, execute the timed task.
In another alternative embodiment of the invention, most preceding timing of sorting in ordered set is being pulled every time by thread pool Task executes the timed task, as shown in Fig. 2, can specifically include following steps when the timed task, which reaches, executes the time S202 to step S206.
Step S202 is pulled by thread pool every time when sorting most preceding timed task in ordered set, judges that the timing is appointed Whether business, which reaches, executes the time, if so, continuing to execute step S204;If it is not, then continuing to execute step S206.
Step S204 executes the timed task, and the timed task is deleted from ordered set.
Step S206, waits duration to be specified, pulls the most preceding timed task that sorts in ordered set again, and execute judgement Operation.
In the step, specified duration can be configured according to actual needs, the embodiment of the present invention to this with no restriction.
The embodiment of the present invention two can be realized the purpose for more accurately executing each timed task through the above way, into One step improves the efficiency of file process, reduces the probability of human error.
It should be noted that above-mentioned all optional embodiments can be any group by the way of combining in practical application It closes, forms alternative embodiment of the invention, this is no longer going to repeat them.
Based on the same inventive concept, the embodiment of the invention also provides a kind of document handling apparatus, for supporting above-mentioned Document handling method provided by one embodiment of anticipating or combinations thereof.Fig. 3 is shown at file according to an embodiment of the invention Manage the structure chart of device.Referring to Fig. 3, the apparatus may include: establish module 310, backup module 320, test module 330 and Release module 340.
Now introduce the company between each composition of the document handling apparatus of the embodiment of the present invention or the function and each section of device Connect relationship:
Module 310 is established, the timed backup task, fixed time test task and timing release tasks of file are adapted to set up;
Backup module 320 is coupled with module 310 is established, and is suitable for predetermined according to the timed backup task timing scan One or more file directorys, the determining current file of scanning is backuped to mention and is surveyed in platform, and is mentioned for current file creation Survey task sets to be tested for the state for proposing survey task;
Test module 330, with establish module 310, backup module 320 is coupled, be suitable for according to the fixed time test task Timing mentions that survey scanning in platform to meet the state of test order be that the survey task that mentions to be tested is tested described, if current survey The test result of trial business meets default result, then sets pending for the state of the corresponding tested file of current test assignment Cloth;
Release module 340, with establish module 310, test module 330 is coupled, be suitable for according to the timing release tasks The state that timing scan meets issue rules is file to be released, and the file distribution to be released scanned is put down to file distribution Platform.
In alternative embodiment of the invention, the backup module 320 is further adapted for:
If the current file that present scan determines is different from the determining current file of last scanning, standby according to the timing The scheduled one or more file directorys of part task timing scan, every scanning to one or more files, obtain it is one or The unique identification of multiple files;
The unique identification that file has been backed up in the unique identification of one or more of files and scan database is carried out It compares, if the unique identification of file is not present in the scan database in one or more of files, this document is made The current file determined for present scan;Conversely, the current file then determined not as present scan.
In alternative embodiment of the invention, the test module 330 is further adapted for:
Mention that survey scanning in platform to meet the state of test order be to be measured described according to fixed time test task timing Examination proposes survey task;
If scanning to be tested proposes survey task, by scan it is to be tested propose survey task and submit to test case hold Capable uniform resource position mark URL is tested.
In alternative embodiment of the invention, the test module 330 is further adapted for:
Mention that survey scanning in platform to meet the state of test order be to be measured described according to fixed time test task timing Examination proposes survey task, and determines one or more test cases according to the fixed time test task;
The survey task that mentions to be tested scanned is tested using one or more of test cases.
In alternative embodiment of the invention, the issue rules include the entitled specified file name of file or FileVersion Number be indicated release number.
In alternative embodiment of the invention, as shown in figure 4, the device that figure 3 above is shown can also include:
Import modul 410 is coupled with release module 340, suitable for be released by what is scanned in the release module 340 After file distribution to file distribution platform, the address information that the file distribution platform returns is received;
The address information is imported into file and updates platform, with by the file update platform to the file of client into Row updates.
In alternative embodiment of the invention, as shown in figure 4, the device that figure 3 above is shown can also include:
Construct module 420, be coupled with module 310 is established, suitable for it is described establish module 310 establish file timing it is standby After part task, fixed time test task and timing release tasks, timed task trigger is constructed, is triggered by the timed task Device triggering executes the timed backup task, fixed time test task and timing release tasks.
In alternative embodiment of the invention, as shown in figure 4, the device that figure 3 above is shown can also include:
Processing module 430 is coupled with module 310 is established, suitable for it is described establish module 310 establish file timing it is standby After part task, fixed time test task and timing release tasks, by the timed backup task, fixed time test task and determine When release tasks as each timed task the weight of each timed task is calculated according to the execution time of each timed task Value;
According to the weighted value of each timed task, each timed task is ranked up;
According to the ordering scenario of each timed task, each timed task, corresponding execution time and weighted value are deposited It stores up in ordered set;
Newly-built thread pool, each timed task in the ordered set is sequentially executed by the thread pool.
In alternative embodiment of the invention, the processing module 430 is further adapted for:
The most preceding timed task that sorts in the ordered set is pulled by the thread pool every time, when the timed task reaches When executing the time, the timed task is executed.
In alternative embodiment of the invention, the processing module 430 is further adapted for:
It is pulled every time by the thread pool when sorting most preceding timed task in the ordered set, judges the timed task Whether arrival executes the time;
If so, executing the timed task, and the timed task is deleted from the ordered set;
If it is not, the duration to be specified such as then, pulls the most preceding timed task that sorts in the ordered set, and execute and sentence again Disconnected operation.
Based on the same inventive concept, the embodiment of the invention also provides a kind of computer storage mediums.Computer storage Media storage has computer program code, when computer program code is run on the computing device, causes to calculate equipment execution The document handling method according to any one above-mentioned embodiment or combinations thereof.
Based on the same inventive concept, the embodiment of the invention also provides a kind of calculating equipment.The calculating equipment may include: Processor;And it is stored with the memory of computer program code;When the computer program code is run by processor, cause The calculating equipment executes the document handling method according to any one above-mentioned embodiment or combinations thereof.
According to the combination of any one above-mentioned alternative embodiment or multiple alternative embodiments, the embodiment of the present invention can reach It is following the utility model has the advantages that
The embodiment of the invention provides a kind of document handling method and devices, establish timed backup task, the timing of file Test assignment and timing release tasks;It, will according to the scheduled one or more file directorys of timed backup task timing scan The determining current file of scanning is backuped to mention and be surveyed in platform, and proposes survey task for current file creation, this is mentioned to the shape of survey task State is set as to be tested;The state that scanning meets test order in mentioning survey platform according to the timing of fixed time test task is to be tested The survey task that mentions tested, it is if the test result of current test assignment meets default result, current test assignment is corresponding The state of tested file be set as to be released;According to timing release tasks timing scan meet issue rules state be to The file of publication, by the file distribution to be released scanned to file distribution platform.It can be seen that the embodiment of the present invention is based on determining When task by file backup, test, issue these three processes and decoupled, it is only necessary to meet corresponding timed task and begin to, It allows mention and surveys link realization automation, improve the efficiency of file process, reduce the probability of human error.
It is apparent to those skilled in the art that the specific work of the system of foregoing description, device and unit Make process, can refer to corresponding processes in the foregoing method embodiment, for brevity, does not repeat separately herein.
In addition, each functional unit in each embodiment of the present invention can be physically independent, can also two or More than two functional units integrate, and can be all integrated in a processing unit with all functional units.It is above-mentioned integrated Functional unit both can take the form of hardware realization, can also be realized in the form of software or firmware.
Those of ordinary skill in the art will appreciate that: if the integrated functional unit is realized and is made in the form of software It is independent product when selling or using, can store in a computer readable storage medium.Based on this understanding, Technical solution of the present invention is substantially or all or part of the technical solution can be embodied in the form of software products, The computer software product is stored in a storage medium comprising some instructions, with so that calculating equipment (such as Personal computer, server or network equipment etc.) various embodiments of the present invention the method is executed when running described instruction All or part of the steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM), random access memory Device (RAM), the various media that can store program code such as magnetic or disk.
Alternatively, realizing that all or part of the steps of preceding method embodiment can be (all by the relevant hardware of program instruction Such as personal computer, the calculating equipment of server or network equipment etc.) it completes, described program instruction can store in one In computer-readable storage medium, when described program instruction is executed by the processor of calculating equipment, the calculating equipment is held The all or part of the steps of row various embodiments of the present invention the method.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Present invention has been described in detail with reference to the aforementioned embodiments for pipe, those skilled in the art should understand that: at this Within the spirit and principle of invention, it is still possible to modify the technical solutions described in the foregoing embodiments or right Some or all of the technical features are equivalently replaced;And these are modified or replaceed, and do not make corresponding technical solution de- From protection scope of the present invention.
One side according to an embodiment of the present invention provides a kind of document handling method of A1., comprising:
Establish the timed backup task, fixed time test task and timing release tasks of file;
According to the scheduled one or more file directorys of the timed backup task timing scan, by the current of scanning determination File backup to mention survey platform in, and for current file creation propose survey task, set to be tested for the state for proposing survey task;
Mention that survey scanning in platform to meet the state of test order be to be measured described according to fixed time test task timing The survey task that mentions of examination is tested, if the test result of current test assignment meets default result, by current test assignment pair The state for the tested file answered is set as to be released;
The state for meeting issue rules according to the timing release tasks timing scan is file to be released, and scanning is arrived File distribution to be released to file distribution platform.
A2. method according to a1, wherein if the current file that present scan determines scans determining work as with last Preceding document is different, then according to the scheduled one or more file directorys of the timed backup task timing scan, comprising:
According to the scheduled one or more file directorys of the timed backup task timing scan, every scanning is to one or more A file obtains the unique identification of one or more of files;
The unique identification that file has been backed up in the unique identification of one or more of files and scan database is carried out It compares, if the unique identification of file is not present in the scan database in one or more of files, this document is made The current file determined for present scan;Conversely, the current file then determined not as present scan.
A3. method according to a1 or a2, wherein surveyed in platform according to the fixed time test task timing in described mention The state that scanning meets test order is that the survey task that mentions to be tested is tested, comprising:
Mention that survey scanning in platform to meet the state of test order be to be measured described according to fixed time test task timing Examination proposes survey task;
If scanning to be tested proposes survey task, by scan it is to be tested propose survey task and submit to test case hold Capable uniform resource position mark URL is tested.
A4. method according to a1 or a2, wherein surveyed in platform according to the fixed time test task timing in described mention The state that scanning meets test order is that the survey task that mentions to be tested is tested, comprising:
Mention that survey scanning in platform to meet the state of test order be to be measured described according to fixed time test task timing Examination proposes survey task, and determines one or more test cases according to the fixed time test task;
The survey task that mentions to be tested scanned is tested using one or more of test cases.
A5. the method according to any one of A1-A4, wherein the issue rules include the entitled specified file of file Name or fileversion number are indicated release number.
A6. the method according to any one of A1-A5, wherein in the file distribution to be released that will be scanned to file After distribution platform, the method also includes:
Receive the address information that the file distribution platform returns;
The address information is imported into file and updates platform, with by the file update platform to the file of client into Row updates.
A7. the method according to any one of A1-A6, wherein establish file timed backup task, fixed time test After task and timing release tasks, the method also includes:
Timed task trigger is constructed, the timed backup task, timing are executed by timed task trigger triggering Test assignment and timing release tasks.
A8. the method according to any one of A1-A6, wherein establish file timed backup task, fixed time test After task and timing release tasks, the method also includes:
Using the timed backup task, fixed time test task and timing release tasks as each timed task, according to The execution time of each timed task, calculate the weighted value of each timed task;
According to the weighted value of each timed task, each timed task is ranked up;
According to the ordering scenario of each timed task, each timed task, corresponding execution time and weighted value are deposited It stores up in ordered set;
Newly-built thread pool, each timed task in the ordered set is sequentially executed by the thread pool.
A9. the method according to A8, wherein each timing in the ordered set is sequentially executed by the thread pool Task, comprising:
The most preceding timed task that sorts in the ordered set is pulled by the thread pool every time, when the timed task reaches When executing the time, the timed task is executed.
A10. the method according to A9, wherein pulled every time by the thread pool before sorting most in the ordered set Timed task, when the timed task reach execute the time when, execute the timed task, comprising:
It is pulled every time by the thread pool when sorting most preceding timed task in the ordered set, judges the timed task Whether arrival executes the time;
If so, executing the timed task, and the timed task is deleted from the ordered set;
If it is not, the duration to be specified such as then, pulls the most preceding timed task that sorts in the ordered set, and execute and sentence again Disconnected operation.
According to another aspect of an embodiment of the present invention, a kind of document handling apparatus of B11. is additionally provided, comprising:
Module is established, the timed backup task, fixed time test task and timing release tasks of file are adapted to set up;
Backup module is suitable for according to the scheduled one or more file directorys of the timed backup task timing scan, will The determining current file of scanning is backuped to mention and be surveyed in platform, and proposes survey task for current file creation, this is mentioned to the shape of survey task State is set as to be tested;
Test module, suitable for surveying scanning in platform in described mention according to fixed time test task timing and meeting test order State be that the survey task that mentions to be tested is tested, if the test result of current test assignment meets default result, will work as The state of the corresponding tested file of preceding test assignment is set as to be released;
Release module, the state suitable for meeting issue rules according to the timing release tasks timing scan are to be released File, by the file distribution to be released scanned to file distribution platform.
B12. the device according to B11, wherein the backup module is further adapted for:
If the current file that present scan determines is different from the determining current file of last scanning, standby according to the timing The scheduled one or more file directorys of part task timing scan, every scanning to one or more files, obtain it is one or The unique identification of multiple files;
The unique identification that file has been backed up in the unique identification of one or more of files and scan database is carried out It compares, if the unique identification of file is not present in the scan database in one or more of files, this document is made The current file determined for present scan;Conversely, the current file then determined not as present scan.
B13. the device according to B11 or B12, wherein the test module is further adapted for:
Mention that survey scanning in platform to meet the state of test order be to be measured described according to fixed time test task timing Examination proposes survey task;
If scanning to be tested proposes survey task, by scan it is to be tested propose survey task and submit to test case hold Capable uniform resource position mark URL is tested.
B14. the device according to B11 or B12, wherein the test module is further adapted for:
Mention that survey scanning in platform to meet the state of test order be to be measured described according to fixed time test task timing Examination proposes survey task, and determines one or more test cases according to the fixed time test task;
The survey task that mentions to be tested scanned is tested using one or more of test cases.
B15. the device according to any one of B11-B14, wherein the issue rules include the entitled specified text of file Part name or fileversion number are indicated release number.
B16. the device according to any one of B11-B15, wherein further include:
Import modul, suitable for the release module by the file distribution to be released scanned to file distribution platform it Afterwards, the address information that the file distribution platform returns is received;
The address information is imported into file and updates platform, with by the file update platform to the file of client into Row updates.
B17. the device according to any one of B11-B16, wherein further include:
Module is constructed, suitable for establishing the timed backup task of file, fixed time test task and fixed in the module of establishing When release tasks after, construct timed task trigger, the timed backup executed by timed task trigger triggering and is appointed Business, fixed time test task and timing release tasks.
B18. the device according to any one of B11-B16, wherein further include:
Processing module, suitable for establishing the timed backup task of file, fixed time test task and fixed in the module of establishing When release tasks after, using the timed backup task, fixed time test task and timing release tasks as each timing appoint Business, according to the execution time of each timed task, calculates the weighted value of each timed task;
According to the weighted value of each timed task, each timed task is ranked up;
According to the ordering scenario of each timed task, each timed task, corresponding execution time and weighted value are deposited It stores up in ordered set;
Newly-built thread pool, each timed task in the ordered set is sequentially executed by the thread pool.
B19. the device according to B18, wherein the processing module is further adapted for:
The most preceding timed task that sorts in the ordered set is pulled by the thread pool every time, when the timed task reaches When executing the time, the timed task is executed.
B20. the device according to B19, wherein the processing module is further adapted for:
It is pulled every time by the thread pool when sorting most preceding timed task in the ordered set, judges the timed task Whether arrival executes the time;
If so, executing the timed task, and the timed task is deleted from the ordered set;
If it is not, the duration to be specified such as then, pulls the most preceding timed task that sorts in the ordered set, and execute and sentence again Disconnected operation.
Another aspect according to an embodiment of the present invention additionally provides a kind of computer storage medium of C21., the computer Storage medium is stored with computer program code, when the computer program code is run on the computing device, causes described It calculates equipment and executes the document handling method according to any one of A1-A10.
Another aspect according to an embodiment of the present invention additionally provides a kind of calculating equipment of D22., comprising:
Processor;And
It is stored with the memory of computer program code;
When the computer program code is run by the processor, the calculating equipment is caused to execute according to A1-A10 Any one of described in document handling method.

Claims (10)

1. a kind of document handling method, comprising:
Establish the timed backup task, fixed time test task and timing release tasks of file;
According to the scheduled one or more file directorys of the timed backup task timing scan, by the determining current file of scanning It backups to mention and survey in platform, and propose survey task for current file creation, set to be tested for the state for proposing survey task;
Mention that survey scanning in platform to meet the state of test order be to be tested described according to fixed time test task timing Survey task is proposed to be tested, it is if the test result of current test assignment meets default result, current test assignment is corresponding The state of tested file is set as to be released;
Be file to be released according to the state that the timing release tasks timing scan meets issue rules, will scan to File publishing is published to file distribution platform.
2. according to the method described in claim 1, wherein, if current file and last scanning that present scan determines are determining Current file is different, then according to the scheduled one or more file directorys of the timed backup task timing scan, comprising:
According to the scheduled one or more file directorys of the timed backup task timing scan, every scanning to one or more texts Part obtains the unique identification of one or more of files;
The unique identification that file has been backed up in the unique identification of one or more of files and scan database is compared, If the unique identification of file is not present in the scan database in one or more of files, using this document as this Scan determining current file;Conversely, the current file then determined not as present scan.
3. method according to claim 1 or 2, wherein mention survey platform described according to the fixed time test task timing The state that middle scanning meets test order is that the survey task that mentions to be tested is tested, comprising:
Mention that survey scanning in platform to meet the state of test order be to be tested described according to fixed time test task timing Propose survey task;
If scanning proposes survey task to be tested, the survey task that mentions to be tested scanned is submitted into test case execution Uniform resource position mark URL is tested.
4. method according to claim 1 or 2, wherein mention survey platform described according to the fixed time test task timing The state that middle scanning meets test order is that the survey task that mentions to be tested is tested, comprising:
Mention that survey scanning in platform to meet the state of test order be to be tested described according to fixed time test task timing Survey task is proposed, and one or more test cases are determined according to the fixed time test task;
The survey task that mentions to be tested scanned is tested using one or more of test cases.
5. method according to any of claims 1-4, wherein the issue rules include the entitled specified file of file Name or fileversion number are indicated release number.
6. method according to any one of claims 1-5, wherein in the file distribution to be released that will be scanned to file After distribution platform, the method also includes:
Receive the address information that the file distribution platform returns;
The address information is imported into file and updates platform, the file of client is carried out more with updating platform by the file Newly.
7. method according to claim 1 to 6, wherein in the timed backup task for establishing file, periodically survey After trial business and timing release tasks, the method also includes:
Timed task trigger is constructed, the timed backup task, fixed time test are executed by timed task trigger triggering Task and timing release tasks.
8. a kind of document handling apparatus, comprising:
Module is established, the timed backup task, fixed time test task and timing release tasks of file are adapted to set up;
Backup module is suitable for be scanned according to the scheduled one or more file directorys of the timed backup task timing scan Determining current file is backuped to mention and be surveyed in platform, and proposes survey task for current file creation, which is set It is set to be tested;
Test module, suitable for mentioning the shape surveyed scanning in platform and meet test order described according to the fixed time test task timing State is that the survey task that mentions to be tested is tested, if the test result of current test assignment meets default result, will currently be surveyed The be engaged in state of corresponding tested file of trial is set as to be released;
Release module, the state suitable for meeting issue rules according to the timing release tasks timing scan are text to be released Part, by the file distribution to be released scanned to file distribution platform.
9. a kind of computer storage medium, the computer storage medium is stored with computer program code, when the computer When program code is run on the computing device, the calculating equipment is caused to execute according to claim 1 described in any one of -7 Document handling method.
10. a kind of calculating equipment, comprising:
Processor;And
It is stored with the memory of computer program code;
When the computer program code is run by the processor, cause the calculating equipment execute according to claim 1- Document handling method described in any one of 7.
CN201810865540.4A 2018-08-01 2018-08-01 A kind of document handling method and device Pending CN109240994A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810865540.4A CN109240994A (en) 2018-08-01 2018-08-01 A kind of document handling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810865540.4A CN109240994A (en) 2018-08-01 2018-08-01 A kind of document handling method and device

Publications (1)

Publication Number Publication Date
CN109240994A true CN109240994A (en) 2019-01-18

Family

ID=65073470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810865540.4A Pending CN109240994A (en) 2018-08-01 2018-08-01 A kind of document handling method and device

Country Status (1)

Country Link
CN (1) CN109240994A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113779471A (en) * 2021-07-27 2021-12-10 浙江大学 Network page and App test task management method for barrier-free detection

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2508643A (en) * 2012-12-07 2014-06-11 Ibm Method for Performing a Regression Test after Modifying Source Code File
CN104834602A (en) * 2015-05-20 2015-08-12 广州华多网络科技有限公司 Program issuing method, device and system
CN107040504A (en) * 2016-02-04 2017-08-11 北京京东尚科信息技术有限公司 Method of testing and device
CN107273286A (en) * 2017-06-02 2017-10-20 携程计算机技术(上海)有限公司 For the scene automatic test platform and method of task application
CN107621963A (en) * 2017-09-21 2018-01-23 深圳市买买提乐购金融服务有限公司 A kind of software deployment method, software deployment system and electronic equipment
CN108279971A (en) * 2018-01-26 2018-07-13 中国银行股份有限公司 A kind of timing executes the method and device of task

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2508643A (en) * 2012-12-07 2014-06-11 Ibm Method for Performing a Regression Test after Modifying Source Code File
CN104834602A (en) * 2015-05-20 2015-08-12 广州华多网络科技有限公司 Program issuing method, device and system
CN107040504A (en) * 2016-02-04 2017-08-11 北京京东尚科信息技术有限公司 Method of testing and device
CN107273286A (en) * 2017-06-02 2017-10-20 携程计算机技术(上海)有限公司 For the scene automatic test platform and method of task application
CN107621963A (en) * 2017-09-21 2018-01-23 深圳市买买提乐购金融服务有限公司 A kind of software deployment method, software deployment system and electronic equipment
CN108279971A (en) * 2018-01-26 2018-07-13 中国银行股份有限公司 A kind of timing executes the method and device of task

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
唐成华, 西安电子科技大学出版社 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113779471A (en) * 2021-07-27 2021-12-10 浙江大学 Network page and App test task management method for barrier-free detection
CN113779471B (en) * 2021-07-27 2023-11-07 浙江大学 Network page and App test task management method for barrier-free detection

Similar Documents

Publication Publication Date Title
CN104838377B (en) It is handled using mapping reduction integration events
CN102982396B (en) Universal process modeling framework
US20040199417A1 (en) Assessing information technology products
US8296615B2 (en) System and method for generating data migration plan
CN111226238A (en) Prediction method, terminal and server
US8713554B1 (en) Automated hotfix handling model
CN110520871A (en) Training machine learning model
CN112036577B (en) Method and device for applying machine learning based on data form and electronic equipment
US20040230464A1 (en) Designing information technology products
US20040230506A1 (en) Information technology portfolio management
Mitchell et al. Exploration of workflow management systems emerging features from users perspectives
CN108776643B (en) Target code merging control method and system based on version control process
CN107193607A (en) Method and apparatus, storage medium, processor and terminal for updating code file
US20220284286A1 (en) Method and apparatus for providing recommendations for completion of an engineering project
CN109189564A (en) A kind of task processing method and device
Graham et al. Microsoft recommenders: tools to accelerate developing recommender systems
Kummer et al. A biased random‐key genetic algorithm for the home health care problem
CN109240994A (en) A kind of document handling method and device
CN113312457B (en) Method, computing system, and computer readable medium for problem resolution
CN109241042A (en) Data processing method, device and electronic equipment
Yin et al. A new algorithmic model for graph analysis of streaming data
Marques-Neto et al. A quantitative approach for evaluating software maintenance services
CN117035065A (en) Model evaluation method and related device
CN104407848B (en) A kind of data processing method and device
CN109816450A (en) A kind of content promotion method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190118