Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "object," "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a job acquisition method according to an embodiment of the present invention. The embodiment of the invention can be suitable for acquiring all historical jobs in the specified time period in the scheduling system. The method can be executed by the job acquisition device provided by the embodiment of the invention, and the device can be realized in a software and/or hardware manner and can be generally integrated in the electronic equipment. As shown in fig. 1, the method includes:
step 101, extracting a target time period included in the historical job acquisition request.
Optionally, the job scheduling system may allocate each job submitted by the user to the matched device, and instruct the matched device to start executing each job. And the matched equipment determines that the execution of the job is finished when the execution process of the job is finished. The history job is a job whose execution is ended.
Alternatively, the history job acquisition request is a request for requesting acquisition of a history job within a target specified period in the job scheduling system. The target period is included in the history job acquisition request. The history job in the target period is a job whose execution ended in the target period. The target time period is one or more time periods prior to the current time. Illustratively, the target period is between 8 o 'clock and 12 o' clock on month 1 of 2022.
Optionally, the user sends a historical job obtaining request to the electronic device through the terminal device, and requests to obtain the historical job in the target designated time period in the job scheduling system. The electronic equipment receives a history job acquisition request sent by the terminal equipment and extracts a target time period included in the history job acquisition request.
And 102, sending the target time interval to a first thread, acquiring historical jobs in the target time interval in a scheduling system accounting file through the first thread, and sending the target time interval and the historical jobs acquired by the first thread to a second thread.
Optionally, the scheduling system accounting file is a file generated in the job scheduling system and used for storing the historical jobs which are executed and ended each day in the job scheduling system and the execution process information of the historical jobs which are executed and ended each day in the job scheduling system. The execution procedure information of the history job is information related to the execution procedure of the history job, including but not limited to: job start time, job end time, and job duration. The job start time is the time when the job scheduling system allocates the job to the matching device, which starts executing the job. The job end time is the time when the matched equipment completes the execution process of the job and determines the execution end of the job. The job duration is a time difference between the job end time and the job start time.
Optionally, the job scheduling system may create the file according to a preset time period. The job scheduling system creates a file in each time period, and correspondingly stores the historical jobs which are executed in the time period and the execution process information of the historical jobs which are executed in the time period into the created file to obtain a scheduling system accounting file corresponding to each time period. Each time period corresponds to a scheduling system accounting file. The scheduling system accounting file corresponding to a certain time period stores the historical jobs executed and ended in the time period and the execution process information of the historical jobs executed and ended in the time period in the job scheduling system. The preset time period can be set according to the service requirement. Illustratively, the predetermined time period may be 24 hours, 12 hours, 6 hours, or 1 hour. The preset time period can be set and updated according to different service requirements.
Optionally, the first thread is a thread written and set in the electronic device by the developer for obtaining historical jobs within a specified time period in the scheduling system accounting file. The electronic device may invoke a first thread in the electronic device by sending the target time period to the first thread in the electronic device. After receiving a target time interval sent by the electronic equipment, a first thread in the electronic equipment acquires historical jobs in the target time interval in a scheduling system accounting file, and sends the target time interval and the historical jobs acquired by the first thread to a second thread.
Optionally, the obtaining, by the first thread, the historical job in the target time period in the billing file of the scheduling system, and sending the target time period and the historical job obtained by the first thread to a second thread includes: performing, by the first thread: determining a target scheduling system accounting file corresponding to the time period to which the target time period belongs in all scheduling system accounting files of the scheduling system; acquiring historical jobs with job end time in the target time period from all historical jobs stored in the target scheduling system billing file as the historical jobs in the target time period in the scheduling system billing file; storing the historical jobs in the target time period in the scheduling system billing file into a first historical job list; and sending the target time period and the first historical job list to a second thread.
Thus, the historical jobs in the target period stored in the designated file of the job scheduling system can be automatically acquired by the thread.
Optionally, the job scheduling system creates a file in each time period, and correspondingly stores the historical jobs that are executed and the execution process information of the historical jobs that are executed and ended in the time period into the created file, so as to obtain the scheduling system accounting file corresponding to each time period. Each time period corresponds to a scheduling system accounting file. The scheduling system accounting file corresponding to a certain time period stores the historical jobs executed and ended in the time period and the execution process information of the historical jobs executed and ended in the time period in the job scheduling system. The preset time period can be set according to the service requirement. The execution process information of the history job includes, but is not limited to: a job start time, a job end time, and a job duration.
Optionally, in all the scheduling system accounting files of the scheduling system, the scheduling system accounting file whose time period corresponding to the scheduling system accounting file is the time period to which the target time period belongs is determined as the target scheduling system accounting file corresponding to the time period to which the target time period belongs. The target scheduling system accounting file stores the historical jobs which are executed and ended in the time period of the target time period, the job starting time, the job ending time and the job duration of the historical jobs which are executed and ended in the time period of the target time period in the job scheduling system.
Optionally, the historical jobs with job end time in the target time period stored in the target scheduling system accounting file are the historical jobs in the target time period in the scheduling system accounting file. And storing the historical jobs in the target time period in the scheduling system accounting file into a first historical job list. The first list of historical jobs may be created by the first thread for storing a list of historical jobs for the target time period in a scheduling system accounting file. And sending the target time interval and the first historical job list to a second thread, so that the historical jobs in the target time interval and the target time interval in the scheduling system accounting file are sent to the second thread.
Optionally, if there is no scheduling system accounting file whose time period corresponding to the scheduling system accounting file is the time period to which the target time period belongs among all the scheduling system accounting files of the scheduling system, determining the scheduling system accounting file whose time period corresponding to the scheduling system accounting file is the time period before the time period to which the target time period belongs as the target scheduling system accounting file corresponding to the time period to which the target time period belongs. And arranging all historical jobs stored in the billing file of the target scheduling system according to the time difference between the job ending time and the target time interval from small to large. And acquiring historical jobs at a preset arrangement position as historical jobs in the target time interval in the accounting file of the scheduling system. And storing the historical jobs in the target time period in the scheduling system accounting file into a first historical job list. And sending the target time period and the first historical job list to a second thread. The historical jobs at the preset arrangement position may be the historical jobs at 1 st to 1000 th, so that the 1000 historical jobs whose job end time is closest to the target time period are acquired as the historical jobs in the target time period in the scheduling system accounting file.
103, acquiring the historical jobs in the target time period in the scheduling system database through the second thread, comparing the historical jobs acquired by the second thread with the historical jobs acquired by the first thread, and judging whether the historical jobs acquired by the second thread are lost or not.
Optionally, the scheduling system database is a database in the job scheduling system for storing the historical jobs and the related information of the historical jobs. The job scheduling system can correspondingly store each historical job and the job end time of each historical job to the scheduling system database.
Optionally, the second thread is a thread that is written by a developer and set in the electronic device and used for acquiring historical jobs in a specified time period in the scheduling system database, comparing the acquired historical jobs with the historical jobs acquired by the first thread, determining whether historical jobs are lost in the acquired historical jobs, and when historical jobs are lost in the acquired historical jobs, acquiring the lost historical jobs from the historical jobs acquired by the first thread, and supplementing the lost historical jobs into the acquired historical jobs to obtain all historical jobs in the specified time period.
Optionally, the electronic device may send, by using the first thread, the target period and the historical job acquired by the first thread to the second thread, and call the second thread in the electronic device. After receiving a target time period sent by a first thread and historical jobs acquired by the first thread, a second thread in the electronic equipment acquires the historical jobs in the target time period in a scheduling system database, compares the historical jobs acquired by the second thread with the historical jobs acquired by the first thread, judges whether the historical jobs acquired by the second thread are lost or not, acquires the historical jobs lost in the historical jobs acquired by the second thread from the historical jobs acquired by the first thread through the second thread when the historical jobs acquired by the second thread are lost, supplements the lost historical jobs to the historical jobs acquired by the second thread, and acquires all the historical jobs in the target time period.
Optionally, the obtaining, by the second thread, the historical job in the target time period in the scheduling system database includes: performing, by the second thread: receiving the target time period and the first history job list sent by the first thread; acquiring historical jobs with the job end time within the target time period from all historical jobs stored in the scheduling system database as the historical jobs within the target time period in the scheduling system database; and storing the historical jobs in the target time period in the scheduling system database into a second historical job list.
Thus, the historical jobs in the target period stored in the database of the job scheduling system can be automatically acquired by the thread.
Optionally, the historical jobs whose job end times are stored in the scheduling system database within the target time period are the historical jobs within the target time period in the scheduling system database. And storing the historical jobs in the target time period in the scheduling system database into a second historical job list. The second list of historical jobs may be created by a second thread for storing a list of historical jobs in the scheduling system database for the target time period.
Optionally, the comparing the historical jobs acquired by the second thread with the historical jobs acquired by the first thread, and determining whether there is a historical job loss in the historical jobs acquired by the second thread includes: performing, by the second thread: acquiring the job identifications of all the historical jobs in the first historical job list; acquiring the job identifications of all the historical jobs in the second historical job list; determining whether the job identifications of all the history jobs in the second history job list include the job identifications of all the history jobs in the first history job list; if the job identifications of all the historical jobs in the second historical job list comprise the job identifications of all the historical jobs in the first historical job list, determining that no historical job is lost in the historical jobs acquired by the second thread; and if the job identifications of all the historical jobs in the second historical job list do not include the job identification of the target historical job in the first historical job list, determining that the historical jobs are lost in the historical jobs acquired by the second thread, wherein the target historical jobs are the lost historical jobs in the historical jobs acquired by the second thread.
Therefore, the historical jobs in the target time period acquired from the scheduling system database can be automatically compared with the historical jobs in the target time period acquired from the scheduling system accounting file through threads, and whether the historical jobs are lost in the historical jobs in the target time period acquired from the scheduling system database is judged.
Optionally, the history job includes a job identifier and a job content of the history job. The job identification is identification information for identifying a job. Different jobs have different job identifications. Different history jobs can be distinguished according to the job identification.
Optionally, the acquiring the job identifiers of all the historical jobs in the first historical job list includes: and extracting the job identification of each historical job from each historical job in the first historical job list, thereby obtaining the job identifications of all the historical jobs in the first historical job list.
Optionally, the acquiring the job identifiers of all the history jobs in the second history job list includes: and extracting the job identification of each historical job from each historical job in the second historical job list, thereby obtaining the job identifications of all the historical jobs in the second historical job list.
Optionally, if the job identifiers of all the historical jobs in the second historical job list include the job identifiers of all the historical jobs in the first historical job list, indicating that the historical jobs in the target time period acquired by the second thread include the historical jobs in the target time period acquired by the first thread, it is determined that no historical job is lost in the historical jobs acquired by the second thread.
Optionally, if the job identifiers of all the historical jobs in the second historical job list do not include the job identifier of the target historical job in the first historical job list, indicating that the historical jobs in the target time period acquired by the second thread do not include the target historical job in the target time period, and the target historical jobs are missing from the historical jobs in the target time period acquired by the second thread, it is determined that there is a missing historical job in the historical jobs acquired by the second thread, and the target historical job is the missing historical job in the historical jobs acquired by the second thread.
And step 104, if there is a history job missing in the history jobs acquired by the second thread, acquiring, by the second thread, the missing history job in the history jobs acquired by the second thread from the history jobs acquired by the first thread, and supplementing the missing history job to the history job acquired by the second thread to obtain all history jobs in the target time period.
Optionally, if the job identifiers of all the historical jobs in the second historical job list do not include the job identifier of the target historical job in the first historical job list, it is determined that there is a history job missing in the historical jobs acquired by the second thread, and the target historical job is the history job missing in the historical jobs acquired by the second thread.
Optionally, the obtaining, by the second thread, a missing history job in the history jobs obtained by the second thread from the history jobs obtained by the first thread, and supplementing the missing history job to the history jobs obtained by the second thread to obtain all history jobs in the target time period includes: and acquiring the target historical job from the first historical job list through the second thread, and supplementing the target historical job into the second historical job list to obtain all historical jobs in the target time period.
Therefore, when history jobs in the target time period acquired from the scheduling system database are lost, the lost history jobs can be automatically supplemented to the history jobs in the target time period acquired from the scheduling system database through threads, and all history jobs in the target time period can be obtained.
Optionally, after determining that there is a history job missing in the history jobs acquired by the second thread, the target history job being a history job missing in the history jobs acquired by the second thread, the method further includes: and storing the history jobs lost in the history jobs acquired by the second thread into a lost job list. The lost job list is a list for storing a lost history job.
Therefore, the history jobs lost in the history jobs acquired by the second thread can be stored in the lost job list through the threads, and the lost history jobs can be stored and managed uniformly through the lost job list.
Optionally, after determining that there is a history job missing in the history jobs acquired by the second thread, the target history job being a history job missing in the history jobs acquired by the second thread, the method further includes: and if the time cycle to which the target time interval belongs is the current time cycle, storing the historical jobs lost in the historical jobs acquired by the second thread into a current lost job list. The current lost job list is a list for storing the lost history jobs whose belonging time period is the current time period.
And 105, determining all the historical jobs in the target time period as request feedback results corresponding to the historical job acquisition requests.
Optionally, all the historical jobs in the target time period obtained by the second thread are determined as the request feedback result corresponding to the historical job acquisition request. The request feedback result corresponding to the historical job acquisition request is a historical job acquisition request processing result fed back to a sender of the historical job acquisition request, namely, a historical job in a target specified time period in the job scheduling system requested to be acquired by the sender.
Optionally, the user sends a historical job obtaining request to the electronic device through the terminal device, and requests to obtain the historical job in the target designated time period in the job scheduling system. And the electronic equipment determines all the historical jobs in the target time period obtained by the second thread as request feedback results corresponding to the historical job acquisition requests, and feeds the request feedback results back to the terminal equipment, so that the historical jobs in the target designated time period in the job scheduling system are fed back to the terminal equipment.
Optionally, after comparing the historical jobs acquired by the second thread with the historical jobs acquired by the first thread and determining whether there is a history job missing in the historical jobs acquired by the second thread, the method further includes: and if no history job is lost in the history jobs acquired by the second thread, determining the history jobs acquired by the second thread as request feedback results corresponding to the history job acquisition requests.
Thus, when no historical job is lost in the historical jobs in the target time period acquired from the scheduling system database, the historical jobs in the target time period acquired from the scheduling system database can be automatically determined as a request feedback result corresponding to the historical job acquisition request and fed back to the sender of the historical job acquisition request.
Optionally, if no history job is lost in the history jobs acquired by the second thread, indicating that the history jobs acquired by the second thread are all history jobs in the target time period, the electronic device may directly determine the history jobs acquired by the second thread as a request feedback result corresponding to the history job acquisition request.
According to the technical scheme of the embodiment of the invention, the target time interval included in the request is obtained by extracting the historical operation; then sending the target time interval to a first thread, acquiring historical jobs in the target time interval in a scheduling system accounting file through the first thread, and sending the target time interval and the historical jobs acquired by the first thread to a second thread; then, acquiring historical jobs in a target time period in a scheduling system database by a second thread, comparing the historical jobs acquired by the second thread with the historical jobs acquired by the first thread, and judging whether the historical jobs acquired by the second thread are lost or not; if the historical jobs acquired by the second thread are lost, acquiring the lost historical jobs in the historical jobs acquired by the second thread from the historical jobs acquired by the first thread through the second thread, and supplementing the lost historical jobs to the historical jobs acquired by the second thread to acquire all the historical jobs in the target time period; and finally, all the historical jobs in the target time period are determined as request feedback results corresponding to the historical job acquisition requests, so that the problems that the historical jobs in the specified time period are acquired from a single and fixed data source in the related technology, the acquired historical jobs are incomplete or the acquired historical jobs are wrong are solved, the lost historical jobs are automatically supplemented under the condition that the historical jobs are lost, all the historical jobs in the target time period are acquired, the historical jobs in the specified time period are acquired from multiple dimensions, and the check is performed, so that the problems that the historical jobs in the specified time period are acquired from the single and fixed data source, and the acquired historical jobs are incomplete or the acquired historical jobs are wrong are avoided.
In another optional implementation manner of the embodiment of the present invention, optionally, the job obtaining method includes: extracting a target time period included in the historical job acquisition request; sending the target time interval to a first thread, acquiring historical jobs in the target time interval in a scheduling system database through the first thread, and sending the target time interval and the historical jobs acquired by the first thread to a second thread; acquiring historical jobs in the target time period in a scheduling system billing file through the second thread, comparing the historical jobs acquired by the second thread with the historical jobs acquired by the first thread, and judging whether the historical jobs acquired by the second thread are lost or not; if the historical jobs acquired by the second thread are lost, acquiring the lost historical jobs in the historical jobs acquired by the second thread from the historical jobs acquired by the first thread through the second thread, and supplementing the lost historical jobs to the historical jobs acquired by the second thread to obtain all the historical jobs in the target time period; and determining all the historical jobs in the target time period as request feedback results corresponding to the historical job acquisition requests.
Optionally, in this embodiment of the present invention, the operation of obtaining the historical job in the target time period in the scheduling system accounting file or the scheduling system database through the first thread and the operation of obtaining the historical job in the target time period in the scheduling system database or the scheduling system accounting file through the second thread may be performed in series. The operation of acquiring the historical jobs in the target period in the scheduling system database or the scheduling system accounting file by the second thread may be performed after the execution of the operation of acquiring the historical jobs in the target period in the scheduling system accounting file or the scheduling system database by the first thread is completed. The operation of acquiring the historical jobs in the target time period in the scheduling system billing file or the scheduling system database by the first thread may also be performed after the execution of the operation of acquiring the historical jobs in the target time period in the scheduling system database or the scheduling system billing file by the second thread is completed. The execution sequence of the operation of obtaining the historical operation in the target time period in the scheduling system billing file or the scheduling system database through the first thread and the operation of obtaining the historical operation in the target time period in the scheduling system database or the scheduling system billing file through the second thread is not limited.
Optionally, in the embodiment of the present invention, an operation of acquiring the historical job in the target time period in the scheduling system billing file or the scheduling system database through the first thread and an operation of acquiring the historical job in the target time period in the scheduling system database or the scheduling system billing file through the second thread may be performed in parallel.
Example two
Fig. 2 is a flowchart of a job acquisition method according to a second embodiment of the present invention. Embodiments of the invention may be combined with various alternatives in one or more of the embodiments described above. As shown in fig. 2, the method includes:
step 201, extracting a target time period included in the history job acquisition request.
Step 202, sending the target time interval to a first thread, acquiring historical jobs in the target time interval in a scheduling system accounting file through the first thread, and sending the target time interval and the historical jobs acquired by the first thread to a second thread.
Step 203, acquiring, by the second thread, the historical jobs in the target time period in the scheduling system database, comparing the historical jobs acquired by the second thread with the historical jobs acquired by the first thread, and determining whether there is a historical job loss in the historical jobs acquired by the second thread.
And 204, if no history job is lost in the history jobs acquired by the second thread, determining the history job acquired by the second thread as a request feedback result corresponding to the history job acquisition request.
Optionally, if no history job is lost in the history jobs acquired by the second thread, it indicates that the history jobs acquired by the second thread are all history jobs in the target time period, and the electronic device may directly determine the history jobs acquired by the second thread as a request feedback result corresponding to the history job acquisition request.
Optionally, the user sends a historical job obtaining request to the electronic device through the terminal device, and requests to obtain the historical job in the target designated time period in the job scheduling system. And the electronic equipment determines the historical jobs acquired by the second thread as request feedback results corresponding to the historical job acquisition requests and feeds the request feedback results back to the terminal equipment, so that the historical jobs in a target designated time period in the job scheduling system are fed back to the terminal equipment.
According to the technical scheme of the embodiment of the invention, the historical jobs in the target time period stored in the scheduling system accounting file and the historical jobs in the target time period stored in the scheduling system database can be automatically acquired, the historical jobs in the target time period acquired from the scheduling system database can be automatically compared with the historical jobs in the target time period acquired from the scheduling system accounting file, whether the historical jobs are lost or not is judged, and under the condition that the historical jobs are not lost, the historical jobs in the target time period acquired from the scheduling system database are automatically determined as the request feedback results corresponding to the historical job acquisition requests and are fed back to the sender of the historical job acquisition requests, so that the historical jobs in the designated time period are acquired from multiple dimensions, and the check is carried out, and the problems that the acquired historical jobs are incomplete or the acquired historical jobs are wrong due to the fact that the historical jobs in the designated time period are acquired from a single and fixed data source are avoided.
EXAMPLE III
Fig. 3 is a flowchart of a job acquiring method according to a third embodiment of the present invention, including the following steps:
step 301, extracting a target time period included in the history job acquisition request.
Step 302, sending the target time interval to a first thread, acquiring historical jobs in the target time interval in a scheduling system billing file through the first thread, and sending the target time interval and the historical jobs acquired by the first thread to a second thread.
Step 303, acquiring, by the second thread, the historical jobs in the target time period in the scheduling system database, comparing the historical jobs acquired by the second thread with the historical jobs acquired by the first thread, and determining whether there is a loss of the historical jobs in the historical jobs acquired by the second thread: if there is a history job missing in the history jobs acquired by the second thread, executing step 304; if no history job is lost in the history jobs acquired by the second thread, go to step 306;
and step 304, acquiring, by the second thread, a missing history job in the history jobs acquired by the second thread from the history jobs acquired by the first thread, and supplementing the missing history job to the history jobs acquired by the second thread to obtain all history jobs in the target time period.
And 305, determining all the historical jobs in the target time period as request feedback results corresponding to the historical job acquisition requests.
Step 306, determining the history job acquired by the second thread as a request feedback result corresponding to the history job acquisition request.
According to the technical scheme of the embodiment of the invention, the target time interval included in the request is obtained by extracting the historical operation; then sending the target time interval to a first thread, acquiring historical jobs in the target time interval in a scheduling system accounting file through the first thread, and sending the target time interval and the historical jobs acquired by the first thread to a second thread; then, acquiring historical jobs in a target time period in a scheduling system database by a second thread, comparing the historical jobs acquired by the second thread with the historical jobs acquired by the first thread, and judging whether the historical jobs acquired by the second thread are lost or not; if the historical jobs acquired by the second thread are lost, acquiring the lost historical jobs in the historical jobs acquired by the second thread from the historical jobs acquired by the first thread through the second thread, and supplementing the lost historical jobs to the historical jobs acquired by the second thread to acquire all the historical jobs in the target time period; and finally, all the historical jobs in the target time period are determined as request feedback results corresponding to the historical job acquisition requests, so that the problems that the historical jobs in the specified time period are acquired from a single and fixed data source in the related technology, the acquired historical jobs are incomplete or the acquired historical jobs are wrong are solved, the lost historical jobs are automatically supplemented under the condition that the historical jobs are lost, all the historical jobs in the target time period are acquired, the historical jobs in the specified time period are acquired from multiple dimensions, and the check is performed, so that the problems that the historical jobs in the specified time period are acquired from the single and fixed data source, and the acquired historical jobs are incomplete or the acquired historical jobs are wrong are avoided.
Example four
Fig. 4 is a schematic structural diagram of an operation obtaining apparatus according to a fourth embodiment of the present invention. The apparatus may be configured in a client. As shown in fig. 4, the apparatus includes: a period extraction module 401, a first acquisition module 402, a second acquisition module 403, a job replenishment module 404, and a result determination module 405.
The time interval extraction module 401 is configured to extract a target time interval included in the historical job acquisition request; a first obtaining module 402, configured to send the target time interval to a first thread, obtain, by the first thread, a historical job in the target time interval in a scheduling system accounting file, and send the target time interval and the historical job obtained by the first thread to a second thread; a second obtaining module 403, configured to obtain, through the second thread, historical jobs in the target time period in a scheduling system database, compare the historical jobs obtained by the second thread with the historical jobs obtained by the first thread, and determine whether historical jobs in the historical jobs obtained by the second thread are lost; a job supplementing module 404, configured to, if there is a history job missing in the history jobs acquired by the second thread, acquire, by the second thread, a missing history job in the history jobs acquired by the second thread from the history jobs acquired by the first thread, and supplement the missing history job to the history jobs acquired by the second thread, so as to obtain all history jobs in the target time period; a result determining module 405, configured to determine all the history jobs in the target time period as a request feedback result corresponding to the history job acquisition request.
According to the technical scheme of the embodiment of the invention, the target time interval included in the request is obtained by extracting the historical operation; then, the target time interval is sent to a first thread, historical jobs in the target time interval in a scheduling system billing file are obtained through the first thread, and the target time interval and the historical jobs obtained by the first thread are sent to a second thread; then, acquiring historical jobs in a target time period in a scheduling system database by a second thread, comparing the historical jobs acquired by the second thread with the historical jobs acquired by the first thread, and judging whether the historical jobs acquired by the second thread are lost or not; if the historical jobs acquired by the second thread are lost, acquiring the lost historical jobs in the historical jobs acquired by the second thread from the historical jobs acquired by the first thread through the second thread, and supplementing the lost historical jobs to the historical jobs acquired by the second thread to acquire all the historical jobs in the target time period; and finally, all historical jobs in the target time period are determined as request feedback results corresponding to the historical job acquisition requests, the problems that the historical jobs in the specified time period are acquired from a single and fixed data source, the acquired historical jobs are incomplete or the acquired historical jobs are wrong in the related technology are solved, the historical jobs in the target time period stored in a scheduling system billing file and the historical jobs in the target time period stored in a scheduling system database can be automatically acquired, the historical jobs in the target time period acquired from the scheduling system database and the historical jobs in the target time period acquired from the scheduling system billing file can be automatically compared, whether the historical jobs are lost or not in the historical jobs in the target time period acquired from the scheduling system database can be judged, the lost historical jobs can be automatically supplemented under the condition that the historical jobs are lost, all the historical jobs in the target time period are acquired, the historical jobs in the specified time period are acquired from multiple dimensions, and checking is achieved, and the beneficial effects that the historical jobs in the specified time period are acquired from a single and fixed data source, and the historical jobs which are incomplete or the historical jobs which are acquired in the historical jobs which are wrong in the specified time period are possible are not are avoided.
In an optional implementation manner of the embodiment of the present invention, optionally, the first obtaining module 402 is specifically configured to: performing, by the first thread: determining a target scheduling system accounting file corresponding to the time period to which the target time period belongs in all scheduling system accounting files of the scheduling system; acquiring historical jobs with the job end time within the target time period from all historical jobs stored in the target scheduling system accounting file as the historical jobs within the target time period in the scheduling system accounting file; storing historical jobs in the scheduling system accounting file within the target time period into a first historical job list; and sending the target time period and the first historical job list to a second thread.
In an optional implementation manner of the embodiment of the present invention, optionally, when executing the operation of acquiring, by using the second thread, the historical job in the target time period in the scheduling system database, the second acquiring module 403 is specifically configured to: performing, by the second thread: receiving the target time period and the first history job list sent by the first thread; acquiring historical jobs with the job end time within the target time period from all historical jobs stored in the scheduling system database as the historical jobs within the target time period in the scheduling system database; and storing the historical jobs in the target time period in the scheduling system database into a second historical job list.
In an optional implementation manner of the embodiment of the present invention, optionally, when the second obtaining module 403 performs an operation of comparing the history job obtained by the second thread with the history job obtained by the first thread, and determining whether there is a history job loss in the history jobs obtained by the second thread, the operation is specifically configured to: performing, by the second thread: acquiring the job identifications of all the historical jobs in the first historical job list; acquiring the job identifications of all the historical jobs in the second historical job list; judging whether the job identifications of all the historical jobs in the second historical job list contain the job identifications of all the historical jobs in the first historical job list; if the job identifications of all the historical jobs in the second historical job list comprise the job identifications of all the historical jobs in the first historical job list, determining that no historical job is lost in the historical jobs acquired by the second thread; and if the job identifications of all the historical jobs in the second historical job list do not include the job identification of the target historical job in the first historical job list, determining that the historical jobs are lost in the historical jobs acquired by the second thread, wherein the target historical jobs are the lost historical jobs in the historical jobs acquired by the second thread.
In an optional implementation manner of the embodiment of the present invention, optionally, when the job supplementing module 404 is configured to, when executing an operation of acquiring a missing history job from the history jobs acquired by the second thread from the first thread, supplementing the missing history job to the history jobs acquired by the second thread, and obtaining all history jobs in the target time period, specifically: and acquiring the target historical job from the first historical job list through the second thread, and supplementing the target historical job into the second historical job list to obtain all historical jobs in the target time period.
In an optional implementation manner of the embodiment of the present invention, optionally, the second obtaining module 403 is further configured to: and storing the history jobs lost in the history jobs acquired by the second thread into a lost job list.
In an optional implementation manner of the embodiment of the present invention, optionally, the job obtaining apparatus further includes: and the job determining module is used for determining the historical job acquired by the second thread as a request feedback result corresponding to the historical job acquisition request if no historical job is lost in the historical jobs acquired by the second thread.
The job acquisition device can execute the job acquisition method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the job acquisition method.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
EXAMPLE five
Fig. 5 shows a schematic structural diagram of the electronic device 10 that can be used to implement the job acquisition method according to the embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program built from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 executes the respective methods and processes described above, such as the job acquisition method.
In some embodiments, the job acquisition method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is built into the RAM 13 and executed by the processor 11, one or more steps of the job acquisition method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the job acquisition method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the job acquisition method of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the Internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.