CN111797110B - Method, device, computer equipment and storage medium for generating scheduling model - Google Patents
Method, device, computer equipment and storage medium for generating scheduling model Download PDFInfo
- Publication number
- CN111797110B CN111797110B CN202010579183.2A CN202010579183A CN111797110B CN 111797110 B CN111797110 B CN 111797110B CN 202010579183 A CN202010579183 A CN 202010579183A CN 111797110 B CN111797110 B CN 111797110B
- Authority
- CN
- China
- Prior art keywords
- scheduling unit
- scheduling
- priority
- database
- task
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000004590 computer program Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 13
- 238000012545 processing Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and a device for generating a scheduling model, and relates to the field of computers. The method comprises the following steps: determining the priority of each scheduling unit according to the task to be executed based on at least one scheduling unit stored in the database; selecting a target scheduling unit from at least one scheduling unit according to the priority; acquiring characteristic data of a target scheduling unit, and generating a scheduling model according to the characteristic data to complete a task to be executed; the characteristic data at least comprises identification information and state information. The invention can control the dispatching of the data in the database with finer granularity, thereby improving the precision and efficiency of the dispatching of the data in the database.
Description
Technical Field
The present invention relates to the field of computers, and in particular, to a method and apparatus for scheduling a database, a computer device, and a storage medium.
Background
At present, big data brings about massive, diverse and unstructured data, which can be accurately displayed, based on a single streaming task of processing the data at the back. However, the conventional task scheduling method can only design a streaming task separately for a specific problem, which has low universality, is difficult to control all data in the database in a fine granularity, and particularly when facing a large number of complex tasks, has low multiplexing rate, thus leading to increased cost and greatly reducing data processing efficiency and stability.
Disclosure of Invention
In view of the above, the embodiment of the invention provides a method and a device for generating a scheduling model, which can improve the precision and efficiency of data scheduling in a database, and are easy to manage and high in universality.
To achieve the above object, according to one aspect of an embodiment of the present invention, there is provided a method of generating a scheduling model.
The method for generating the scheduling model comprises the following steps:
determining the priority of each scheduling unit according to the task to be executed based on at least one scheduling unit stored in the database;
selecting a target scheduling unit from at least one scheduling unit according to the priority;
acquiring characteristic data of a target scheduling unit, and generating a scheduling model according to the characteristic data to complete a task to be executed; the characteristic data at least comprises identification information and state information.
Optionally, determining the priority of each scheduling unit according to the task to be performed based on at least one scheduling unit stored in the database includes:
determining the initial priority of each scheduling unit in a database according to the task to be executed;
receiving and analyzing the temporary scheduling instruction to adjust the priority of the scheduling unit corresponding to the temporary scheduling instruction;
and updating the priority of each scheduling unit in the database according to the initial priority and the priority of the scheduling unit corresponding to the adjusted temporary scheduling instruction.
Optionally, the step of acquiring the feature data of the target scheduling unit includes:
determining identification information of a target scheduling unit;
positioning the storage position of the target scheduling unit in the database according to the identification information;
and acquiring the state information of the target dispatching unit according to the storage position.
Optionally, before acquiring the characteristic data of the target scheduling unit, the method further includes:
configuring an initial identifier for each scheduling unit in the at least one scheduling unit;
encrypting the initial identifier of each scheduling unit to obtain an encrypted identifier thereof;
and determining the storage position and the identification information of each scheduling unit according to the encryption identification.
Optionally, after obtaining the feature data of the target scheduling unit and generating a scheduling model according to the feature data to complete the task to be executed, the method further includes:
acquiring a scheduling result and updating state information of a target scheduling unit, wherein the scheduling result at least comprises data of the target scheduling unit after completing a task to be executed and attribute data of the task to be executed;
storing the scheduling result and the updated state information into a database;
and updating the priority of at least one scheduling unit according to the scheduling result.
Optionally, before determining the priority of each scheduling unit according to the task to be executed based on at least one scheduling unit stored in the database, the method further includes:
determining a number of at least one scheduling unit and a number of stored tables in a database;
determining a storage strategy of at least one scheduling unit according to the number of the at least one scheduling unit and the number of the storage tables in the database;
and storing at least one scheduling unit into a storage table in a database according to the storage strategy.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided an apparatus for generating a scheduling model.
The device for generating the scheduling model comprises the following steps:
and (3) a setting module: the scheduling unit is used for determining the priority of each scheduling unit according to the task to be executed based on at least one scheduling unit stored in the database;
and (3) selecting a module: the target scheduling unit is used for selecting from at least one scheduling unit according to the priority;
the generation module is used for: the method comprises the steps of acquiring characteristic data of a target scheduling unit, and generating a scheduling model according to the characteristic data to complete a task to be executed; the characteristic data at least comprises identification information and state information.
Optionally, the setting module is further configured to determine an initial priority of each scheduling unit in the database according to the task to be executed; receiving and analyzing the temporary scheduling instruction to adjust the priority of the scheduling unit corresponding to the temporary scheduling instruction; and updating the priority of each scheduling unit in the database according to the initial priority and the priority of the scheduling unit corresponding to the adjusted temporary scheduling instruction.
Optionally, the generating module is further configured to: determining identification information of a target scheduling unit; positioning the storage position of the target scheduling unit in the database according to the identification information; and acquiring the state information of the target scheduling unit according to the storage position.
Optionally, generating the scheduling model further includes: the configuration module is used for configuring an initial identifier for each scheduling unit in at least one scheduling unit, carrying out encryption processing to obtain an encrypted identifier, and determining the storage position and the identifier information of each scheduling unit according to the encrypted identifier.
Optionally, generating the scheduling model further includes:
and an updating module: the method comprises the steps of acquiring a scheduling result, updating state information of the target scheduling unit, storing the scheduling result and the updated state information into a database, and updating the priority of at least one scheduling unit according to the scheduling result;
the scheduling result at least comprises data of a target scheduling unit after the task to be executed is completed and attribute data of the task to be executed.
Optionally, generating the scheduling model further includes:
and a storage module: for determining a number of at least one scheduling unit and a number of stored tables in a database; determining a storage strategy of at least one scheduling unit according to the number of the at least one scheduling unit and the number of the storage tables in the database; and storing the at least one scheduling unit into a storage table in the database according to the storage policy.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
The electronic equipment of the embodiment of the invention comprises: one or more processors; and a storage means for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the method of generating a scheduling model of any of the above.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the method of generating a scheduling model of any one of the above.
One embodiment of the above invention has the following advantages or benefits:
(1) The invention takes the dispatching unit as a basic unit of data dispatching, and can control the dispatching of the data in the database with the finest granularity, thereby improving the precision and the efficiency of the data dispatching in the database and being easy to manage;
(2) The invention can realize the scheduling work required by different tasks by adjusting the priority of each scheduling unit according to the task to be processed, is widely applicable to various application scenes with task scheduling requirements, and has higher universality.
(3) According to the invention, each scheduling unit has own identification information, so that the state of each scheduling unit can be easily inquired in real time; and the scheduling results of each scheduled unit including state information, attribute data and the like are stored in the database, so that the scheduling history of the database can be conveniently checked, the life cycle of one scheduling task can be traced back, and when problems are found in the scheduling process, the problems can be easily checked according to the scheduling history.
(4) According to the invention, each scheduling unit is stored in each data table of the database according to a certain storage strategy, so that the scheduling speed and the scheduling accuracy are improved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main flow of a method of generating a scheduling model according to an embodiment of the invention;
FIG. 2 is a schematic diagram of the main flow of a method for a scheduling model to update priorities of individual scheduling units according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main modules of an apparatus for generating a scheduling model according to an embodiment of the invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 5 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of main flow of a method for generating a scheduling model according to an embodiment of the present invention, and as shown in fig. 1, the method for generating a scheduling model according to an embodiment of the present invention mainly includes:
step S101: determining the priority of each scheduling unit according to the task to be executed based on at least one scheduling unit stored in the database;
step S102: selecting a target scheduling unit from at least one scheduling unit according to the priority;
step S103: acquiring characteristic data of a target scheduling unit, and generating a scheduling model according to the characteristic data to complete a task to be executed; the characteristic data at least comprises identification information and state information.
According to the embodiment of the invention, the scheduling unit is used as a basic unit of data scheduling, and the scheduling of the data in the database can be controlled with the finest granularity, so that the precision and the efficiency of the data scheduling in the database are improved, and the management is easy; and the scheduling work required by different tasks can be realized by adjusting the priority of each scheduling unit according to the task to be processed, so that the method is widely applicable to various application scenes with task scheduling requirements and has higher universality.
In step S101, the present embodiment is applied to a database, and the scheduling unit is used as a basic unit of data scheduling, so that the scheduling of data in the database is controlled with the finest granularity. In addition, as the demands of the tasks to be executed are different, the scheduling units to be scheduled are different, so that the priority of each scheduling unit is determined according to the tasks to be executed, the scheduling demands of various tasks can be realized by adjusting the priority according to the different tasks to be executed, and a new model can be designed only for a specific problem without the need of a traditional scheduling model.
In determining the priority of each scheduling unit according to the task to be executed based on at least one scheduling unit stored in the database, the priority ordering of the at least one scheduling unit is utilized as a necessary condition for selecting the target scheduling unit. In general, the model screens top N with the highest current priority, and then aggregates the top N together as a task to be selected once. Specifically, the priority of the scheduling unit is different depending on the actual application scenario, for example, incremental update is required for a batch of companies, but since the update capability is limited, it is impossible to traverse all companies, a policy can be customized, and the priority of a batch of companies with a high probability of making business changes is increased, so that more change data is covered with limited update capability. This policy of setting priority is flexible and can be set according to the actual application scenario.
In step S102, a target scheduling unit is selected from the at least one scheduling unit according to the priority of the priorities of the respective scheduling units determined in step S101. The target scheduling unit is generally a scheduling unit according to topN with highest priority required by the task.
In an embodiment of the present invention, selecting a target scheduling unit from at least one scheduling unit according to the priority level may specifically include:
step S201: determining the initial priority of each scheduling unit in a database according to the task to be executed;
step S202: receiving and analyzing the temporary scheduling instruction to adjust the priority of the scheduling unit corresponding to the temporary scheduling instruction;
step S203: and updating the priority of each scheduling unit in the database according to the initial priority and the priority of the scheduling unit corresponding to the adjusted temporary scheduling instruction.
In the embodiment of the invention, the scheduling model starts to determine only an initial priority, and before the target scheduling unit is selected, if a temporary scheduling instruction appears, the scheduling model can timely receive and analyze the scheduling instruction, namely, the priority of each scheduling unit in the final database is updated and formed according to the priority of the scheduling unit corresponding to the temporary scheduling instruction, and the priority of the corresponding scheduling unit is timely adjusted according to the temporary scheduling instruction, so that the flexibility of the scheduling model is reflected. Wherein the temporary scheduling instruction only adjusts the priority of the new target scheduling unit, and determines the final priority (i.e. the updated priority) and also needs to combine the initial priority determined before. The temporary schedule instruction generally includes: the priority of the scheduling units that need to be scheduled temporarily is adjusted to the highest and/or the priority of the scheduling units that need not to be scheduled temporarily is adjusted to the lowest.
Preferably, in step S103, the feature data of the target scheduling unit is acquired, including, but not limited to, identification information and status information, where the identification information is data that uniquely identifies the target scheduling unit, and may be a location identifier or an identifier code of the scheduling unit. The state information indicates that the state of the target scheduling unit is scheduling, idle or other. And generating a scheduling model according to the characteristic data to perform scheduling operation, thereby completing the task to be executed.
The obtaining the feature data of the target scheduling unit may specifically include: step S301: determining identification information of a target scheduling unit; step S302: positioning the storage position of the target scheduling unit in the database according to the identification information; step S303: and acquiring the state information of the target dispatching unit according to the storage position.
In an embodiment of the present invention, before obtaining the feature data of the target scheduling unit and generating the scheduling model according to the feature data, the method may further include: step S111: configuring an initial identifier for each scheduling unit in the at least one scheduling unit; step S112: encrypting the initial identifier of each scheduling unit to obtain an encrypted identifier thereof; step S113: and determining the storage position and the identification information of each scheduling unit according to the encryption identification.
In an embodiment of the present invention, the storage location and the identification information of each scheduling unit in at least one scheduling unit are unique, and assuming that the unique identification of each scheduling unit is a string of numbers, the string of numbers may be encrypted by md5 and then taken as the location index of the scheduling unit stored in the database, for example, "11233" has a value of "60e4ac6a656ef4b4fd82aaaf25f14736" after making md5 and the two bits are taken as "36", and then it may be determined that the scheduling unit is stored in the No. 3 library No. 6 table. The storage position and the unique identification information of each scheduling unit are beneficial to the state inquiry of each scheduling unit, and the associated scheduling history is convenient to trace back.
Fig. 2 is a schematic diagram of main flow of a method for updating priorities of scheduling units by using a scheduling model according to an embodiment of the present invention, as shown in fig. 2, after feature data of a target scheduling unit is acquired and a scheduling model is generated according to the feature data, the method may further update priorities of scheduling units in the scheduling model, and specifically includes:
step S104: acquiring a scheduling result and updating state information of a target scheduling unit, wherein the scheduling result at least comprises data of the target scheduling unit after completing a task to be executed and attribute data of the task to be executed;
step S105: storing the scheduling result and the updated state information into a database;
step S106: and updating the priority of at least one scheduling unit according to the scheduling result.
In the embodiment of the invention, the state information includes: in the scheduling operation, not in the scheduling operation; the attribute data includes task identification, execution time, associated task information, and the like. Therefore, according to the state information, whether the dispatching unit is in a dispatching state or not can be determined, and in the dispatching state, the dispatching unit can be dispatched again after the dispatching unit finishes dispatching, namely, the state information of the dispatching unit is updated to be not in dispatching operation. In the embodiment of the invention, the related data of task execution can be determined through the attribute data, so that a developer can know the task execution state conveniently.
In step S105, the scheduling results of each scheduled unit including the state information, the attribute data, and the like are stored in the database, so that the scheduling history of the database can be conveniently checked, the life cycle of one scheduled task can be traced back, and when a problem is found in the scheduling process, the problem can be easily checked according to the scheduling history.
In step S106, the scheduling result of each scheduling unit after the previous scheduling changes the relevant data of the target scheduling unit, so that the priority of each scheduling unit corresponding to the next task to be processed changes.
In an embodiment of the present invention, before determining the priority of each scheduling unit according to the task to be performed based on at least one scheduling unit stored in the database, the method may further include: step S1001: determining the number of at least one scheduling unit and the number of data tables in the database; step S1002: determining a storage strategy of at least one scheduling unit according to the number of the at least one scheduling unit and the number of the data tables in the database; step S1003: and storing at least one scheduling unit into a data table in a database according to the storage strategy.
In this embodiment, each scheduling unit is stored in each data table of the database according to a certain storage policy, so as to improve the scheduling speed and accuracy. Preferably, the storage strategy is that each scheduling unit is uniformly stored in the database, so that the scheduling units can be selected for scheduling according to the speed of the actual processing task, and further, the equal probability selection of all the scheduling units is ensured.
Fig. 3 is a schematic diagram of main modules of an apparatus for generating a scheduling model according to an embodiment of the present invention, and as shown in fig. 3, an apparatus 300 for generating a scheduling model according to an embodiment of the present invention includes a setting module 301, a selecting module 302, and a generating module 303.
A setting module 301, configured to determine, based on at least one scheduling unit stored in the database, a priority of each scheduling unit according to a task to be executed;
a selecting module 302, configured to select a target scheduling unit from at least one scheduling unit according to the priority;
the generating module 303 is configured to obtain feature data of the target scheduling unit, and generate a scheduling model according to the feature data, so as to complete a task to be executed; the characteristic data at least comprises identification information and state information.
According to the scheduling model provided by the embodiment of the invention, the scheduling operation can be performed, and the scheduling of the data in the database can be controlled in the finest granularity, so that the precision and the efficiency of the data scheduling in the database are improved, and the management is easy; and the scheduling work required by different tasks can be realized, the method is widely applicable to various application scenes with task scheduling requirements, and the universality is higher.
In an embodiment of the present invention, the setting module is further configured to determine an initial priority of each scheduling unit in the database according to the task to be executed; receiving and analyzing the temporary scheduling instruction to adjust the priority of the scheduling unit corresponding to the temporary scheduling instruction; and updating the priority of each scheduling unit in the database according to the initial priority and the priority of the scheduling unit corresponding to the adjusted temporary scheduling instruction.
In an embodiment of the present invention, the generating module is further configured to: determining identification information of a target scheduling unit; positioning the storage position of the target scheduling unit in the database according to the identification information; and acquiring the state information of the target scheduling unit according to the storage position.
In an embodiment of the present invention, the apparatus for generating a scheduling model further includes a configuration module, configured to configure an initial identifier for each scheduling unit in at least one scheduling unit, perform encryption processing to obtain an encrypted identifier, and determine a storage location and identification information of each scheduling unit according to the encrypted identifier.
In an embodiment of the present invention, the apparatus for generating a scheduling model further includes an updating module, configured to obtain a scheduling result and update status information of a target scheduling unit, store the scheduling result and the updated status information in a database, and update a priority of at least one scheduling unit according to the scheduling result. The scheduling result at least comprises data of a target scheduling unit after the task to be executed is completed and attribute data of the task to be executed.
In an embodiment of the present invention, the apparatus for generating a scheduling model further includes a storage module configured to determine a number of at least one scheduling unit and a number of tables stored in a database; determining a storage strategy of at least one scheduling unit according to the number of the at least one scheduling unit and the number of the storage tables in the database; and storing the at least one scheduling unit into a storage table in the database according to the storage policy.
Fig. 4 illustrates an exemplary system architecture 400 of a method of generating a scheduling model or an apparatus of generating a scheduling model to which embodiments of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 is used as a medium to provide communication links between the terminal devices 401, 402, 403 and the server 405. The network 404 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 405 via the network 404 using the terminal devices 401, 402, 403 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 401, 402, 403.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using the terminal devices 401, 402, 403. The background management server can analyze and other data of the received product information inquiry request and feed back the processing result to the terminal equipment.
It should be noted that, the method for generating the scheduling model provided in the embodiment of the present invention is generally executed by the server 405, and accordingly, the device for generating the scheduling model is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, there is illustrated a schematic diagram of a computer system 500 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 501.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having 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 portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, as: a processor includes an acquisition settings module, a selection module, and a generation module. The names of these modules do not constitute a limitation on the module itself in some cases, and for example, the setting module may also be described as "a module that determines priorities of individual scheduling units according to tasks to be performed".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: determining the priority of each scheduling unit according to the task to be executed based on at least one scheduling unit stored in the database; selecting a target scheduling unit from at least one scheduling unit according to the priority; acquiring characteristic data of a target scheduling unit, and generating a scheduling model according to the characteristic data to complete a task to be executed; the characteristic data at least comprises identification information and state information.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.
Claims (9)
1. A method of generating a scheduling model, comprising:
determining the priority of each scheduling unit according to the task to be executed based on at least one scheduling unit stored in a database, including:
determining the initial priority of each scheduling unit in the database according to the task to be executed;
receiving and analyzing a temporary scheduling instruction to adjust the priority of a scheduling unit corresponding to the temporary scheduling instruction;
updating the priority of each scheduling unit in the database according to the initial priority and the adjusted priority of the scheduling unit corresponding to the temporary scheduling instruction;
selecting a target scheduling unit from the at least one scheduling unit according to the priority;
acquiring characteristic data of the target scheduling unit, and generating a scheduling model according to the characteristic data to complete the task to be executed; wherein, the characteristic data at least comprises identification information and state information.
2. The method of claim 1, wherein the step of obtaining the characteristic data of the target dispatch unit comprises:
determining the identification information of the target scheduling unit;
positioning the storage position of the target scheduling unit in the database according to the identification information;
and acquiring the state information of the target scheduling unit according to the storage position.
3. The method of claim 2, further comprising, prior to said obtaining the characteristic data of the target dispatch unit:
configuring an initial identifier for each scheduling unit in the at least one scheduling unit;
encrypting the initial identifier of each scheduling unit to obtain an encrypted identifier thereof;
and determining the storage positions and the identification information of each scheduling unit according to the encryption identification.
4. The method of claim 1, further comprising, after the obtaining the characteristic data of the target scheduling unit and generating a scheduling model according to the characteristic data to complete the task to be performed:
acquiring a scheduling result and updating state information of the target scheduling unit, wherein the scheduling result at least comprises data of the target scheduling unit after the task to be executed is completed and attribute data of the task to be executed;
storing the scheduling result and the updated state information into the database;
and updating the priority of the at least one scheduling unit according to the scheduling result.
5. The method according to any of claims 1-4, further comprising, before determining the priority of each scheduling unit according to the task to be performed, based on at least one scheduling unit stored in the database:
determining a number of the at least one scheduling unit and a number of data tables in the database;
determining a storage strategy of the at least one scheduling unit according to the number of the at least one scheduling unit and the number of the data tables in the database;
and storing the at least one scheduling unit into a data table in the database according to the storage strategy.
6. An apparatus for generating a scheduling model, comprising:
and (3) a setting module: the method is used for determining the priority of each scheduling unit according to the task to be executed based on at least one scheduling unit stored in a database, and comprises the following steps:
determining the initial priority of each scheduling unit in the database according to the task to be executed;
receiving and analyzing a temporary scheduling instruction to adjust the priority of a scheduling unit corresponding to the temporary scheduling instruction;
updating the priority of each scheduling unit in the database according to the initial priority and the adjusted priority of the scheduling unit corresponding to the temporary scheduling instruction;
and (3) selecting a module: the target scheduling unit is selected from the at least one scheduling unit according to the priority;
the generation module is used for: the scheduling model is used for acquiring the characteristic data of the target scheduling unit and generating a scheduling model according to the characteristic data so as to complete the task to be executed; wherein, the characteristic data at least comprises identification information and state information.
7. The apparatus as recited in claim 6, further comprising:
and a storage module: for determining the number of said at least one scheduling unit and the number of data tables in said database;
determining a storage strategy of the at least one scheduling unit according to the number of the at least one scheduling unit and the number of the data tables in the database; and storing the at least one scheduling unit into a data table in the database according to the storage strategy.
8. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-5.
9. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010579183.2A CN111797110B (en) | 2020-06-23 | 2020-06-23 | Method, device, computer equipment and storage medium for generating scheduling model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010579183.2A CN111797110B (en) | 2020-06-23 | 2020-06-23 | Method, device, computer equipment and storage medium for generating scheduling model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111797110A CN111797110A (en) | 2020-10-20 |
CN111797110B true CN111797110B (en) | 2024-01-26 |
Family
ID=72803087
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010579183.2A Active CN111797110B (en) | 2020-06-23 | 2020-06-23 | Method, device, computer equipment and storage medium for generating scheduling model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111797110B (en) |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105512027A (en) * | 2015-11-26 | 2016-04-20 | 珠海多玩信息技术有限公司 | Process state monitor method and device |
CN107016480A (en) * | 2016-01-28 | 2017-08-04 | 五八同城信息技术有限公司 | Method for scheduling task, apparatus and system |
CN107102894A (en) * | 2017-04-07 | 2017-08-29 | 百度在线网络技术(北京)有限公司 | Method for scheduling task, device and system |
CN107391198A (en) * | 2017-07-25 | 2017-11-24 | 广东欧珀移动通信有限公司 | Method for scheduling task and device, computer-readable recording medium, mobile terminal |
CN107977268A (en) * | 2017-10-13 | 2018-05-01 | 北京百度网讯科技有限公司 | Method for scheduling task, device and the computer-readable recording medium of the isomerization hardware of artificial intelligence |
CN108132837A (en) * | 2018-01-02 | 2018-06-08 | 中国工商银行股份有限公司 | A kind of distributed type assemblies dispatch system and method |
CN108717378A (en) * | 2018-04-20 | 2018-10-30 | 中国气象局气象探测中心 | A kind of task processing method and device of sonde |
CN108804211A (en) * | 2018-04-27 | 2018-11-13 | 西安华为技术有限公司 | Thread scheduling method, device, electronic equipment and storage medium |
CN109308212A (en) * | 2017-07-26 | 2019-02-05 | 上海华为技术有限公司 | A kind of task processing method, task processor and task processing equipment |
CN110119305A (en) * | 2019-05-13 | 2019-08-13 | 北京达佳互联信息技术有限公司 | Task executing method, device, computer equipment and storage medium |
CN110489217A (en) * | 2019-07-11 | 2019-11-22 | 新华三大数据技术有限公司 | A kind of method for scheduling task and system |
CN110837410A (en) * | 2019-10-30 | 2020-02-25 | 北京奇艺世纪科技有限公司 | Task scheduling method and device, electronic equipment and computer readable storage medium |
CN110955502A (en) * | 2018-09-27 | 2020-04-03 | 北京国双科技有限公司 | Task scheduling method and device |
CN110990142A (en) * | 2019-12-13 | 2020-04-10 | 上海智臻智能网络科技股份有限公司 | Concurrent task processing method and device, computer equipment and storage medium |
CN111309372A (en) * | 2020-01-15 | 2020-06-19 | 中国平安财产保险股份有限公司 | Timed task execution method and device, computer equipment and storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7107340B2 (en) * | 2002-05-31 | 2006-09-12 | Microsoft Corporation | System and method for collecting and storing event data from distributed transactional applications |
US8479207B2 (en) * | 2011-02-25 | 2013-07-02 | Qualcomm Incorporated | Priority inheritance in multithreaded systems |
US9229716B2 (en) * | 2011-12-12 | 2016-01-05 | International Business Machines Corporation | Time-based task priority boost management using boost register values |
US10374975B2 (en) * | 2015-11-13 | 2019-08-06 | Raytheon Company | Dynamic priority calculator for priority based scheduling |
-
2020
- 2020-06-23 CN CN202010579183.2A patent/CN111797110B/en active Active
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105512027A (en) * | 2015-11-26 | 2016-04-20 | 珠海多玩信息技术有限公司 | Process state monitor method and device |
CN107016480A (en) * | 2016-01-28 | 2017-08-04 | 五八同城信息技术有限公司 | Method for scheduling task, apparatus and system |
CN107102894A (en) * | 2017-04-07 | 2017-08-29 | 百度在线网络技术(北京)有限公司 | Method for scheduling task, device and system |
CN107391198A (en) * | 2017-07-25 | 2017-11-24 | 广东欧珀移动通信有限公司 | Method for scheduling task and device, computer-readable recording medium, mobile terminal |
CN109308212A (en) * | 2017-07-26 | 2019-02-05 | 上海华为技术有限公司 | A kind of task processing method, task processor and task processing equipment |
CN107977268A (en) * | 2017-10-13 | 2018-05-01 | 北京百度网讯科技有限公司 | Method for scheduling task, device and the computer-readable recording medium of the isomerization hardware of artificial intelligence |
CN108132837A (en) * | 2018-01-02 | 2018-06-08 | 中国工商银行股份有限公司 | A kind of distributed type assemblies dispatch system and method |
CN108717378A (en) * | 2018-04-20 | 2018-10-30 | 中国气象局气象探测中心 | A kind of task processing method and device of sonde |
CN108804211A (en) * | 2018-04-27 | 2018-11-13 | 西安华为技术有限公司 | Thread scheduling method, device, electronic equipment and storage medium |
CN110955502A (en) * | 2018-09-27 | 2020-04-03 | 北京国双科技有限公司 | Task scheduling method and device |
CN110119305A (en) * | 2019-05-13 | 2019-08-13 | 北京达佳互联信息技术有限公司 | Task executing method, device, computer equipment and storage medium |
CN110489217A (en) * | 2019-07-11 | 2019-11-22 | 新华三大数据技术有限公司 | A kind of method for scheduling task and system |
CN110837410A (en) * | 2019-10-30 | 2020-02-25 | 北京奇艺世纪科技有限公司 | Task scheduling method and device, electronic equipment and computer readable storage medium |
CN110990142A (en) * | 2019-12-13 | 2020-04-10 | 上海智臻智能网络科技股份有限公司 | Concurrent task processing method and device, computer equipment and storage medium |
CN111309372A (en) * | 2020-01-15 | 2020-06-19 | 中国平安财产保险股份有限公司 | Timed task execution method and device, computer equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
ETL任务集群调度方法;李磊;;计算机技术与发展(第11期);第41-44页 * |
基于用户评价的集群作业优先级调度;曹宗雁;赵毅;牛铁;朱鹏;迟学斌;;华中科技大学学报(自然科学版)(第S1期);第139-143页 * |
Also Published As
Publication number | Publication date |
---|---|
CN111797110A (en) | 2020-10-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11762697B2 (en) | Method and apparatus for scheduling resource for deep learning framework | |
US11036696B2 (en) | Resource allocation for database provisioning | |
CN109446274B (en) | Method and device for managing BI metadata of big data platform | |
KR101283019B1 (en) | Method of generating saas appication and server performing the same | |
CN112148711A (en) | Processing method and device for batch processing tasks | |
CN110795147A (en) | Interface protocol file management method and device | |
CN109960212B (en) | Task sending method and device | |
CN112667368B (en) | Task data processing method and device | |
CN112597126A (en) | Data migration method and device | |
CN110795328A (en) | Interface testing method and device | |
CN115357350A (en) | Task configuration method and device, electronic equipment and computer readable medium | |
CN111461583B (en) | Inventory checking method and device | |
CN112905225A (en) | Method and device for creating continuous integration tool construction task | |
CN111062572A (en) | Task allocation method and device | |
CN113190517A (en) | Data integration method and device, electronic equipment and computer readable medium | |
CN113190558A (en) | Data processing method and system | |
CN112395337B (en) | Data export method and device | |
CN111797110B (en) | Method, device, computer equipment and storage medium for generating scheduling model | |
CN111415262A (en) | Service processing method and device | |
CN110362297B (en) | Element ordering method and device | |
CN111782351A (en) | Distributed task scheduling method and device | |
CN113626472B (en) | Method and device for processing order data | |
CN113505131A (en) | Method and device for adjusting data sorting | |
CN110866002B (en) | Method and device for processing sub-table data | |
CN111158649A (en) | Method and device for configuring multi-level parameters |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |