WO2021139438A1 - 大数据资源处理方法、装置、终端及存储介质 - Google Patents

大数据资源处理方法、装置、终端及存储介质 Download PDF

Info

Publication number
WO2021139438A1
WO2021139438A1 PCT/CN2020/132352 CN2020132352W WO2021139438A1 WO 2021139438 A1 WO2021139438 A1 WO 2021139438A1 CN 2020132352 W CN2020132352 W CN 2020132352W WO 2021139438 A1 WO2021139438 A1 WO 2021139438A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
queue
resource
historical
duration
Prior art date
Application number
PCT/CN2020/132352
Other languages
English (en)
French (fr)
Inventor
许璐
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021139438A1 publication Critical patent/WO2021139438A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Definitions

  • This application relates to the field of resource allocation, and in particular to a big data resource processing method, a big data resource processing device, a terminal, and a computer-readable storage medium.
  • the inventor realized that the current resource management of big data platforms is a large-scale resource management. It often happens that one queue is busy and the other queues are idle, and a large task will occupy all resources and cause the subsequent tasks to fail. The status of submission.
  • a big data resource processing method big data resource processing device, terminal, and computer-readable storage medium, which can predict the amount of resources consumed by the task, and combine the remaining resource amount of each layer of queues and the queue
  • the performance indicator is used to comprehensively determine the target queue, and the determined target queue can not only complete the task, but also complete the task quickly.
  • the first aspect of the embodiments of the present application provides a big data resource processing method, which is applied to a big data platform, and the big data resource processing method includes:
  • the second aspect of the embodiments of the present application also provides a big data resource processing device, which is applied to a big data platform, and the big data resource processing device includes:
  • the queue initialization module is used to initialize the multi-layer queue corresponding to the big data resource in the big data platform to obtain the initial resource of the queue;
  • a performance identification determining module configured to determine the performance identification of each layer of queues according to the initial resources of the queue
  • the remaining resource amount monitoring module is used to call a preset number of resource amount monitors to monitor the remaining resource amount of each layer of the multi-layer queue when the task processing request output by the client is received;
  • the consumption time prediction module is used to predict the estimated time consumption of the task by using a pre-trained task time consumption model
  • the resource consumption prediction module is used to determine the estimated resource consumption of the task according to the estimated time consumed by the task;
  • a waiting queue determination module configured to determine a queue with a remaining resource amount greater than the estimated resource amount in the multi-layer queue as a waiting queue
  • the target queue matching module is used to match the target queue whose performance identifier is the first performance identifier from the queues to be selected, wherein the initial resource of the queue corresponding to the first performance identifier is greater than the queues corresponding to other performance identifiers Initial resources;
  • the task allocation module is used to allocate the task to the target queue.
  • the third aspect of the embodiments of the present application further provides a terminal, the terminal includes a processor, and the processor is configured to implement the following steps when executing computer-readable instructions stored in a memory:
  • the fourth aspect of the embodiments of the present application also provides a computer-readable storage medium having computer-readable instructions stored on the computer-readable storage medium, and when the computer-readable instructions are executed by a processor, the following steps are implemented:
  • the embodiment of the present application provides a big data resource processing method, a big data resource processing device, a terminal, and a computer-readable storage medium, and initializes the multi-layer queue corresponding to the big data resource in the big data platform to obtain the initial resource of the queue; Determine the performance identifier of each layer of the queue according to the initial resources of the queue; when receiving a task processing request output by the client, call a preset number of resource listeners to monitor the remaining resources of each layer of the queue in the multi-layer queue Use a pre-trained task duration consumption model to predict the expected duration of the task consumption; determine the expected amount of resources consumed by the task according to the expected duration of the task consumption; make the amount of remaining resources in the multi-layer queue greater than all
  • the queue with the estimated resource amount is determined to be the queue to be selected; the target queue whose performance identifier is the first performance identifier is matched from the queue to be selected, wherein the initial resource of the queue corresponding to the first performance identifier is greater than other performance Identify the initial resource
  • the amount of resources consumed by the task is predicted, and the target queue is comprehensively determined by combining the remaining resource amount of each layer of the queue and the performance identifier of the queue, which can allocate resources reasonably, save the running time of the overall task, and improve the cluster resources
  • This application can be applied to various functional modules of smart cities such as smart government affairs and smart transportation, such as the big data resource processing module of smart government affairs, which can promote the rapid development of smart cities.
  • Fig. 1 is a flowchart of a method for processing big data resources provided by the first embodiment of the present application.
  • Fig. 2 is a schematic structural diagram of a terminal according to an embodiment of the present application.
  • Fig. 3 is an exemplary functional block diagram of the terminal shown in Fig. 2.
  • Fig. 1 is a flowchart of a big data resource processing method according to a first embodiment of the present application, and the big data resource processing method can be applied to a big data platform.
  • the big data resource processing method may include the following steps:
  • a server is used as a working node to perform various tasks in each client.
  • the server is connected to the client corresponding to the server, so that the client can communicate with the server connected to it.
  • Obtain resources such as CPU resources and memory resources.
  • the method for processing big data resources is applied to a big data platform, where multi-layer queues are preset for big data resources in the big data platform, and the corresponding big data resources are initialized.
  • Multi-layer queues to get the initial resources of each layer of queues.
  • the number of multi-layer queues can be comprehensively analyzed based on the total amount of resources, the amount of historical tasks, and the amount of resource consumption.
  • the total amount of resources, the amount of historical tasks, and the amount of resource consumption are input into a pre-trained queue setting model to obtain a queue setting result.
  • the queue setting result includes the number of set queues and the initial value corresponding to each queue. Resources.
  • the server is provided with three layers of queues, namely Queue1, Queue2, and Queue3.
  • the initial resource corresponding to Queue1 is 1000C
  • the initial resource corresponding to Queue2 is 800C
  • the initial resource corresponding to Queue3 is 500C.
  • the method before the step of initializing the multi-layer queue corresponding to the big data resource in the big data platform, the method further includes: pre-training a task duration consumption model.
  • the step of pre-training the task duration consumption model includes: collecting multiple tasks and the historical consumption duration of each task in the multi-layer queue; using multiple tasks and the corresponding historical consumption duration as a sample data set; The sample data set is divided into a training set and a test set; the training set is input into a preset neural network for training to obtain a task duration consumption model; the test set is input into the task duration consumption model for testing, and calculation Test pass rate; if the test pass rate is greater than or equal to the preset pass rate threshold, it is determined that the task duration consumption model training is over; if the test pass rate is less than the preset pass rate threshold, increase the training set Re-training the task duration consumption model based on the increased training set.
  • the preset neural network may include, but is not limited to, a convolutional neural network, a
  • the step of determining the performance identifier of each layer of queues based on the initial resources of the queues includes: determining whether the initial resources of each layer of queues are between a preset first resource threshold and a preset first resource threshold.
  • the first resource threshold is greater than the second resource threshold; when the initial resource is greater than the preset first resource threshold, determine the queue corresponding to the initial resource
  • the performance identifier is the first performance identifier; when the initial resource is less than the preset first resource threshold and greater than the preset second resource threshold, it is determined that the performance identifier of the queue corresponding to the initial resource is the second performance Identification; when the initial resource is less than the preset second resource threshold, it is determined that the performance identification of the queue corresponding to the initial resource is a third performance identification.
  • the preset first resource threshold, the preset second resource threshold, and the preset third resource threshold are preset by the user.
  • the first resource threshold is 900C
  • the second resource threshold is 400C
  • the initial number of resources corresponding to Queue1 is 1000C
  • the number of resources corresponding to Queue2 is 800C
  • the number of resources corresponding to Queue3 is 500C.
  • the performance identifier of Queue1 is the first performance identifier, and the priority channel corresponding to Queue1 is set to the fast channel; because the initial resource of Queue2 is less than the first resource threshold 900C and greater than the second If the resource threshold is 400C, it is determined that the performance identifier of Queue2 is the second performance identifier, and the priority channel corresponding to Queue2 is set to the middle channel; since the initial resource of Queue3 is less than the second resource threshold 400C, the performance identifier of Queue3 is determined to be the third performance identifier , The priority channel corresponding to Queue3 is set to the slow channel.
  • a corresponding label can be set, and multiple different task queues can be distinguished by the label to facilitate task management.
  • the client needs to output a task processing request to the server before acquiring resources such as CPU resources and memory resources from the server, and the server needs to output a task processing request according to the received data.
  • resources such as CPU resources and memory resources from the server
  • the server needs to output a task processing request according to the received data.
  • relevant resources are allocated to the client for executing the current task.
  • the user interface program When the user submits a task processing request at the client, he needs to inform the user interface program corresponding to the client of the description information of the task (including but not limited to the task name, command parameters, resource requirements, etc.).
  • the user interface program The description information of the task is passed to the task scheduler on the server side to realize the submission process of the task processing request.
  • the user interface program is a web application program, and the user needs to operate the user interface program through a web browser; the task scheduler is used to analyze and schedule the tasks submitted by the client.
  • the task processing request includes a task description file
  • the task description file refers to a file that complies with the server-side resource scheduling specification and is used to express the task request.
  • the description file of the task is determined according to the description file template of the task preset by the user, and the description file template of the task is a template file used to define the common information organization structure in the description file of the task.
  • the description file template of the task can be written in a dedicated programming language, such as Jinja programming language, or can be a simple text file with replaceable fields, etc., which is not specifically limited here.
  • the description file of the task includes at least one of the following information: task name (job_name, a string field) and resource requirements of the task (attribute_description, a key-value pair field), etc.
  • task name is an identifier of resource scheduling, and one task corresponds to a unique task name; the resource requirement of the task is used to determine the resources that need to be occupied during resource scheduling.
  • a preset number of resource amount listeners are called to monitor the remaining resource amount of each layer of the multi-layer queue.
  • the preset number is preset by the user.
  • the preset number may be one or the number corresponding to the queue.
  • the resource amount monitor may be used to monitor the amount of resources in the queue.
  • the method further includes: calling a task scheduler on the server side to obtain a description file of the task; identifying the task name of the task according to the description file; and according to the task name Determine whether the task is submitted for the first time; when the task is submitted for the first time, select a predetermined queue to run the task; when the task is not submitted for the first time, filter the historical running records to have the same attributes as the task According to the historical time consumed by the historical task, the pre-trained task time consumption model is used to predict the estimated time consumed by the task according to the historical time.
  • the same attribute may include the same task name.
  • the first submission indicates that the client has not output the same task processing request to the server before, and the server has not allocated relevant resources to the current task, so the server cannot obtain the current task
  • the historical running time is long, and it is impossible to determine which queue the current task should be assigned to for execution.
  • the step of judging whether the task is submitted for the first time according to the task name includes: traversing a resource scheduling library according to the task name; judging whether there is a task name that is the same as the task name in the resource scheduling library; If the result is that there is no task name that is the same as the task name, it is determined that the task is submitted for the first time; if the judgment result is that there is a task name that is the same as the task name, it is determined that the task is not submitted for the first time.
  • a historical resource scheduling record is stored in the resource scheduling library, and the historical resource scheduling record includes a task name corresponding to the resource scheduling.
  • the step of filtering historical running records for the historical time consumed by historical tasks with the same attributes as the task includes: obtaining historical tasks with the same attributes as the task
  • the historical duration within the preset number of days is denoted as x 1 , x 2 ...x n ;
  • the average running duration is calculated according to the historical duration within the preset number of days, denoted as Substitute the historical duration and the average running duration into the variance calculation formula to obtain the variance value of the historical duration consumed by the historical task with the same attribute as the task; obtain the task according to the variance value of the historical duration The length of history.
  • the method further includes: determining whether the historical duration of the task exceeds a preset duration threshold; if the determination result is the task If the historical duration exceeds the preset duration threshold, the task is designated to run in Queue3.
  • the preset duration threshold is preset by the user. For example, the preset duration threshold may be 30 minutes. For tasks whose estimated duration consumed by the task exceeds 30 minutes, they are refused to be submitted to Queue1 or Queue2 Run, avoid occupying resources for a long time, and reduce resource utilization and timeliness. If the judgment result is that the historical running duration of the task does not exceed the preset duration threshold, the pre-trained task duration consumption model is used to predict the estimated duration consumed by the task.
  • the variance calculation formula is: S 2 is the sample variance, x is the historical running time, Is the average running time, n is the preset number of days.
  • the historical task having the same attribute as the task refers to the historical task that is the same as the task name of the task, the time period of the task processing request output, and the like. It is understandable that the variance is the amount that indicates the degree of data deviation.
  • the method further includes: selecting a predetermined queue to run the current task.
  • the predetermined queue may be any one of Queue1, Queue2, and Queue3.
  • the predetermined queue may be Queue2.
  • the number of task processing requests output by the client may be one or more.
  • the tasks can be uniformly scheduled and managed according to the unified and standardized task scan files defined for each task.
  • the step of using a pre-trained task duration consumption model to predict the estimated duration of the task consumption includes: inputting the historical consumption duration of the current task and the current resource consumption of the multi-level queue In the pre-trained task duration consumption model; the task duration consumption model is used to calculate the time required for the current task to be allocated to the corresponding queue.
  • the longer the estimated duration consumed by the task the greater the estimated amount of resources consumed by the task.
  • a time length-resource amount consumption correspondence table is set, and the corresponding relationship between the time length consumed by the task and the resource amount consumed by the task is listed in the time length-resource amount consumption correspondence table.
  • the corresponding relationship between the duration of time consumed by the task and the amount of resources consumed by the task is stable.
  • the corresponding relationship between the time consumed by the task and the amount of resources consumed by the task can be obtained through multiple experiments.
  • the step of determining the estimated amount of resources consumed by the task according to the estimated time consumed by the task includes: traversing the time length-resource amount consumption correspondence table according to the estimated time consumed by the task; The corresponding estimated resource consumption of the task is matched in the correspondence table.
  • the remaining resource amount of the multi-layer queue is determined, and it is determined whether there is a multi-layer queue with the remaining resource amount greater than the estimated resource amount. If the result of the judgment is that there is a multi-layer queue with the remaining resource amount greater than the estimated resource amount, then the multi-layer queue larger than the estimated resource amount is obtained and determined as a candidate queue.
  • the target queue whose performance identifier is the first performance identifier is matched from the candidate queues, where , The initial resources of the queue corresponding to the first performance identifier are greater than the initial resources of the queues corresponding to other performance identifiers. For example, when the queues larger than the estimated amount of resources are Queue1 and Queue2, since the performance identifier of Queue1 is the first performance identifier, Queue1 is selected as the target queue.
  • the method further includes: predicting the number of task processing requests received by each layer of queues within a predetermined time period; determining queues whose number is less than or equal to a preset number threshold as idle queues; When a task processing request is received within the predetermined time period, allocating tasks in the task processing request to the idle queue for processing;
  • predicting the number of task processing requests received by each queue in a predetermined time period includes: obtaining task operation data in a historical predetermined time period, and preprocessing the task operation data to achieve task volume data and Separation of queue task allocation data; smoothing analysis and processing of the task volume data to obtain smoothed task volume data, and at the same time using the K-means algorithm to perform clustering analysis processing on the queue task allocation data to obtain clustered data;
  • the stabilization task data is used as the first training data set, the clustered data is used as the second training data set, and the first training data set is trained by a preset model to obtain the first model.
  • the preset model is a model preset by the user according to specific needs, and the preset model can be stored in the target node of the blockchain.
  • the task amount data includes the number of tasks and a time stamp
  • the task amount data is converted into matrix form data and stored in a designated database.
  • the matrix form data of the task amount data may be x i , t i , Where x i represents the number of tasks and t i represents the timestamp.
  • the queue task allocation data includes task name, assigned queue and time stamp.
  • the queue task allocation data is converted into matrix form data and stored in a designated database.
  • the matrix form data of the queue task allocation data may be n i, d i, t i, where, n i represents the task name, d i represents the allocated queue, t i represents the time stamp.
  • the task running data can be preprocessed by data ETL separation technology, and the data format extracted from the source data can be converted into a target data format that is convenient for processing.
  • the K-means algorithm is used to perform clustering analysis processing on the queue task allocation data, and the step of obtaining clustered data may include: obtaining queue task allocation data in matrix form; and determining the queue task allocation data based on a density method.
  • Initial clustering center using the initial clustering center as the initial center point, the distance-based clustering algorithm K-means clusters the queue task assignment data to obtain clustered data.
  • the method further includes: identifying the ID (identification identification) of the client corresponding to the current task; and obtaining the current task And feed back the running status to the client corresponding to the ID of the client.
  • the running status of the task may include statuses such as task running completion and task running failure.
  • the embodiment of the application provides a method for processing big data resources, which initializes the multi-layer queues corresponding to the big data resources in the big data platform to obtain the initial resources of the queue; and determines the performance identifier of each layer of the queue according to the initial resources of the queue
  • a preset number of resource monitors are called to monitor the remaining resource amount of each layer of the multi-layer queue
  • the pre-trained task duration consumption model is used to predict the The estimated time consumed by the task; determine the estimated amount of resources consumed by the task according to the estimated time consumed by the task; determine the queue whose remaining resource amount is greater than the estimated amount of resources in the multi-layer queue as the candidate queue;
  • the target queue whose performance identifier is the first performance identifier is matched from the candidate queue, wherein the initial resources of the queue corresponding to the first performance identifier are greater than the initial resources of the queues corresponding to other performance identifiers; the task is allocated Give the target queue.
  • the amount of resources consumed by the task is predicted, and the target queue is comprehensively determined by combining the remaining resource amount of each layer of the queue and the performance identifier of the queue, which can allocate resources reasonably, save the running time of the overall task, and improve the cluster resources
  • This application can be applied to various functional modules of smart cities such as smart government affairs and smart transportation, such as the big data resource processing module of smart government affairs, which can promote the rapid development of smart cities.
  • the embodiment of the present application also provides a terminal 1, including a memory 10, a processor 30, and computer-readable instructions stored in the memory 10 and running on the processor 30.
  • the processor 30 implements the above-mentioned program when the program is executed. Steps of the big data resource processing method described in any of the embodiments.
  • FIG. 2 is a schematic structural diagram of a terminal according to an embodiment of the present application.
  • the terminal 1 includes a memory 10 in which a big data resource processing device 100 is stored.
  • the terminal 1 may be a computer, a tablet computer, a personal digital assistant, or other electronic equipment with functions such as data processing, analysis, program execution, and display.
  • the terminal may also serve as a server and a client.
  • the big data resource processing device 100 can initialize the multi-layer queue corresponding to the big data resource in the big data platform to obtain the initial resource of the queue; determine the performance identifier of each layer of the queue according to the initial resource of the queue; When a task output by the client processes a request, a preset number of resource monitors are called to monitor the remaining resources of each layer of the multi-layer queue; the pre-trained task duration consumption model is used to predict the expected consumption of the task Duration; determine the expected amount of resources consumed by the task according to the expected duration consumed by the task; determine the queue whose remaining resource amount is greater than the expected amount of resources in the multi-layer queue as a candidate queue; from the candidate queue The target queue whose performance identifier is the first performance identifier is matched from the database, wherein the initial resources of the queue corresponding to the first performance identifier are greater than the initial resources of the queues corresponding to other performance identifiers; the task is allocated to the target queue.
  • the amount of resources consumed by the task is predicted, and the target queue is comprehensively determined by combining the remaining resource amount of each layer of the queue and the performance identifier of the queue, which can allocate resources reasonably, save the running time of the overall task, and improve the cluster resources
  • This application can be applied to various functional modules of smart cities such as smart government affairs and smart transportation, such as the big data resource processing module of smart government affairs, which can promote the rapid development of smart cities.
  • the terminal 1 may further include a display screen 20 and a processor 30.
  • the memory 10 and the display screen 20 may be electrically connected to the processor 30 respectively.
  • the memory 10 may be different types of storage devices for storing various types of data.
  • it can be the memory or internal memory of the terminal 1, or a memory card that can be externally connected to the terminal 1, such as flash memory, SM card (Smart Media Card), SD card (Secure Digital Card, secure digital card) Wait.
  • the memory 10 may include non-volatile and volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a Secure Digital (SD) card, a flash memory card ( Flash Card), at least one magnetic disk storage device, flash memory device, or other storage device.
  • the memory 10 is used to store various types of data, for example, various types of applications (Applications) installed in the terminal 1, and information such as data set and obtained by applying the above-mentioned big data resource processing method.
  • the display screen 20 is installed in the terminal 1 for displaying information.
  • the processor 30 is configured to execute the big data resource processing method and various software installed in the terminal 1, such as an operating system and application display software.
  • the processor 30 includes, but is not limited to, a processor (Central Processing Unit, CPU), a Micro Controller Unit (Micro Controller Unit, MCU), and other devices for interpreting a computer and processing data in computer software.
  • a processor Central Processing Unit, CPU
  • MCU Micro Controller Unit
  • the big data resource processing apparatus 100 may include one or more modules, and the one or more modules are stored in the memory 10 of the terminal 1 and configured to be operated by one or more processors (this embodiment is A processor 30) executes to complete the embodiment of the present application.
  • the terminal 1 may include a queue initialization module 101, a performance identification determination module 102, a remaining resource amount monitoring module 103, a consumption duration prediction module 104, a resource consumption estimation module 105, and a candidate queue determination module 106.
  • the module referred to in the embodiment of the present application may be a program segment that completes a specific function, and is more suitable for describing the execution process of software in the processor 30 than a program.
  • the terminal 1 may include some or all of the functional modules shown in FIG. 3, and the functions of each module will be described in detail below. It should be noted that the same nouns and related nouns and specific explanations in the various implementations of the above big data resource processing method can also be applied to the following functional introduction of each module. To save space and avoid repetition, I won’t repeat them here.
  • the queue initialization module 101 may be used to initialize the multi-layer queue corresponding to the big data resource in the big data platform to obtain the initial resource of the queue.
  • the performance identification determining module 102 may be configured to determine the performance identification of each layer of queues according to the initial resources of the queue.
  • the remaining resource amount monitoring module 103 may be used to call a preset number of resource amount listeners to monitor the remaining resource amount of each layer of the multi-layer queue when the task processing request output by the client is received.
  • the consumption duration prediction module 104 may be configured to use a pre-trained task duration consumption model to predict the estimated duration of the task consumption.
  • the resource consumption prediction module 105 may be used to determine the estimated resource consumption of the task according to the estimated duration of the task consumption.
  • the candidate queue determining module 106 may be configured to determine a queue with a remaining resource amount greater than the estimated resource amount in the multi-layer queue as a candidate queue.
  • the target queue matching module 107 may be used to match the target queue whose performance identifier is the first performance identifier from the candidate queues, wherein the initial resources of the queue corresponding to the first performance identifier are greater than those corresponding to other performance identifiers. The initial resource of the queue.
  • the task allocation module 108 may be used to allocate the task to the target queue.
  • the embodiment of the present application also provides a computer-readable storage medium on which computer-readable instructions are stored.
  • the steps of the big data resource processing method in any of the above embodiments are implemented. .
  • the big data resource processing device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • this application implements all or part of the processes in the above-mentioned implementation methods, and can also be completed by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium.
  • the computer-readable instructions are executed by the processor 30, the steps of the foregoing method embodiments can be implemented.
  • the computer-readable instruction includes computer-readable instruction code
  • the computer-readable instruction code may be in the form of source code, object code, executable file, or some intermediate form.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable storage medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read- Only Memory), random access memory, etc.
  • the so-called processor 30 may be a central processing unit (Central Processing Unit, CPU), other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the processor 30 is the control center of the big data resource processing device 100/terminal 1, and is connected by various interfaces and lines. The entire big data resource processing device 100/each part of the terminal 1.
  • the memory 10 is used to store the computer-readable instructions and/or modules, and the processor 30 executes or executes the computer-readable instructions and/or modules stored in the memory 10, and calls the computer-readable instructions and/or modules stored in the memory 10
  • the data inside realizes various functions of the big data resource processing device 100/terminal 1.
  • the memory 10 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may Data (such as audio data) created according to the use of the terminal 1 and the like are stored.
  • the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Probability & Statistics with Applications (AREA)
  • Telephonic Communication Services (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种大数据资源处理方法及相关设备,包括:初始化多层队列;确定队列的性能标识;接收任务处理请求,监听每层队列的剩余资源量;预测任务消耗的预计时长;确定任务消耗的预计资源量;将所述多层队列中剩余资源量大于预计资源量的队列确定为待选队列;匹配性能标识为第一性能标识的目标队列分配任务。还提供一种大数据资源处理装置、终端及计算机可读存储介质。通过预测任务消耗的资源量,并结合每层队列的剩余资源量及队列的性能标识来综合确定目标队列,节约整体任务的运行时间,提升集群资源的利用率,可应用于智慧政务、智慧交通等智慧城市的各个功能模块中,能够促进智慧城市的快速发展。

Description

大数据资源处理方法、装置、终端及存储介质
本申请要求于2020年01月07日提交中国专利局,申请号为202010015241.9发明名称为“大数据资源处理方法、装置、终端及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及资源分配领域,尤其涉及一种大数据资源处理方法、大数据资源处理装置、终端以及计算机可读存储介质。
背景技术
目前随着数据爆炸式的增长,大数据平台的使用越来越多,大数据平台的资源投入也越来越多。如何通过有效的资源管理提高大数据平台的计算能力是一个很重要的话题。
针对资源管理的情况,发明人意识到目前的大数据平台资源管理都是大范围的资源管理,经常会出现一个队列很繁忙而其他队列很空闲、一个大的任务会占用所有资源导致后面任务无法提交的情况。
因此,有必要提出一种新的资源调度管理方法,以通过有效的资源管理提高大数据平台的计算能力。
发明内容
鉴于以上内容,有必要提出一种大数据资源处理方法、大数据资源处理装置、终端以及计算机可读存储介质,其可以预测任务消耗的资源量,并结合每层队列的剩余资源量及队列的性能标识来综合确定目标队列,确定出的目标队列不仅可以完成任务,还能快速地完成任务。
本申请实施例第一方面提供一种大数据资源处理方法,应用于大数据平台中,所述大数据资源处理方法包括:
初始化所述大数据平台中的大数据资源对应的多层队列,得到队列的初始资源;
根据所述队列的初始资源确定每层队列的性能标识;
当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量;
采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长;
根据所述任务消耗的预计时长确定所述任务消耗的预计资源量;
将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列;
从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源;
将所述任务分配给所述目标队列。
本申请实施例第二方面还提供一种大数据资源处理装置,应用于大数据平台中,所述大数据资源处理装置包括:
队列初始化模块,用于初始化所述大数据平台中的大数据资源对应的多层队 列,得到队列的初始资源;
性能标识确定模块,用于根据所述队列的初始资源确定每层队列的性能标识;
剩余资源量监听模块,用于当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量;
消耗时长预测模块,用于采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长;
资源量消耗预计模块,用于根据所述任务消耗的预计时长确定所述任务消耗的预计资源量;
待选队列确定模块,用于将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列;
目标队列匹配模块,用于从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源;
任务分配模块,用于将所述任务分配给所述目标队列。
本申请实施例第三方面还提供一种终端,所述终端包括处理器,所述处理器用于执行存储器中存储的计算机可读指令时实现以下步骤:
初始化所述大数据平台中的大数据资源对应的多层队列,得到队列的初始资源;
根据所述队列的初始资源确定每层队列的性能标识;
当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量;
采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长;
根据所述任务消耗的预计时长确定所述任务消耗的预计资源量;
将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列;
从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源;
将所述任务分配给所述目标队列。
本申请实施例第四方面还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现以下步骤:
初始化所述大数据平台中的大数据资源对应的多层队列,得到队列的初始资源;
根据所述队列的初始资源确定每层队列的性能标识;
当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量;
采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长;
根据所述任务消耗的预计时长确定所述任务消耗的预计资源量;
将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列;
从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源;
将所述任务分配给所述目标队列。
本申请实施例提供一种大数据资源处理方法、大数据资源处理装置、终端以 及计算机可读存储介质,初始化所述大数据平台中的大数据资源对应的多层队列,得到队列的初始资源;根据所述队列的初始资源确定每层队列的性能标识;当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量;采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长;根据所述任务消耗的预计时长确定所述任务消耗的预计资源量;将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列;从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源;将所述任务分配给所述目标队列。通过本申请实施例,预测任务消耗的资源量,并结合每层队列的剩余资源量及队列的性能标识来综合确定目标队列,可合理分配资源,节约了整体任务的运行时间,提升了集群资源的利用率,本申请可应用于智慧政务、智慧交通等智慧城市的各个功能模块中,比如智慧政务的大数据资源处理模块中,能够促进智慧城市的快速发展。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1是本申请第一实施方式提供的大数据资源处理方法的流程图。
图2是本申请一实施方式的终端的结构示意图。
图3是图2所示的终端的示例性的功能模块图。
如下具体实施方式将结合上述附图进一步说明本申请。
具体实施方式
为了能够更清楚地理解本申请的上述目的、特征和优点,下面结合附图和具体实施例对本申请进行详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本申请,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。
图1是本申请第一实施方式的大数据资源处理方法的流程图,所述大数据资源处理方法可以应用于大数据平台中。如图1所示,所述大数据资源处理方法可以包括如下步骤:
S11、初始化所述大数据平台中的大数据资源对应的多层队列,得到队列的初始资源。
以一个服务器端作为一个工作节点,在各个客户端中执行各项任务,所述服务器端和与该服务器端对应的所述客户端连接,从而所述客户端可以向与其连接的所述服务器端获取CPU资源和内存资源等资源。
在本申请的至少一实施例中,所述大数据资源处理方法应用于大数据平 台中,在所述大数据平台中针对大数据资源预先设置多层队列,并初始化所述大数据资源对应的多层队列,从而得到每层队列的初始资源。其中,多层队列的数量可以根据资源总量、历史任务量及资源消耗量综合分析。具体地,将所述资源总量、历史任务量及资源消耗量输入至预先训练好的队列设置模型中,得到队列设置结果,所述队列设置结果包括设置队列的数量以及每个队列对应的初始资源。通过所述队列设置模型对队列进行动态设置,对于不同时期不同的历史任务量及资源消耗量能够得到相应的队列设置结果,避免固定化队列设置,增加了队列设置的适用性。
示例性地,根据所述队列设置模型,所述服务器端设置有3层队列,分别为Queue1、Queue2与Queue3。其中,Queue1对应的初始资源为1000C;Queue2对应的初始资源为800C;Queue3对应的初始资源为500C。
在本申请的至少一实施例中,在所述初始化所述大数据平台中的大数据资源对应的多层队列的步骤之前,所述方法还包括:预先训练任务时长消耗模型。其中,所述预先训练任务时长消耗模型的步骤包括:采集多个任务及每个任务在多层队列中的历史消耗时长;将多个任务及对应的历史消耗时长作为样本数据集;从所述样本数据集中划分出训练集和测试集;将所述训练集输入至预设神经网络中进行训练,得到任务时长消耗模型;将所述测试集输入至所述任务时长消耗模型中进行测试,计算测试通过率;若所述测试通过率大于或者等于预设通过率阈值,则确定所述任务时长消耗模型训练结束;若所述测试通过率小于所述预设通过率阈值,则增加训练集的数量并基于增加的训练集重新进行任务时长消耗模型的训练。其中,所述预设神经网络可以包括,但不限于卷积神经网络、循环神经网络等。所述预设通过率阈值为用户预先设置的,例如,所述预设通过率阈值为95%。
S12、根据所述队列的初始资源确定每层队列的性能标识。
在本申请的至少一实施例中,所述根据所述队列的初始资源确定每层队列的性能标识的步骤包括:判断每层队列的所述初始资源是否介于预设第一资源阈值与预设第二资源阈值之间,其中,所述第一资源阈值大于所述第二资源阈值;当所述初始资源大于所述预设第一资源阈值时,确定与所述初始资源对应的队列的性能标识为第一性能标识;当所述初始资源小于所述预设第一资源阈值且大于所述预设第二资源阈值时,确定与所述初始资源对应的队列的性能标识为第二性能标识;当所述初始资源小于所述预设第二资源阈值时,确定与所述初始资源对应的队列的性能标识为第三性能标识。其中,所述预设第一资源阈值、预设第二资源阈值与预设第三资源阈值为用户预先设置的。
示例性地,所述第一资源阈值为900C,所述第二资源阈值为400C,Queue1对应的初始资源数为1000C;Queue2对应的资源数为800C;Queue3对应的资源数为500C。由于Queue1的初始资源大于第一资源阈值900C,则确定Queue1的性能标识为第一性能标识,Queue1对应的优先级通道设置为快通道;由于Queue2的初始资源小于第一资源阈值900C且大于第二资源阈值400C,则确定Queue2的性能标识为第二性能标识,Queue2对应的优先级通道设置为中通道;由于Queue3的初始资源小于第二资源阈值400C,则确定Queue3的性能标识为第三性能标识,Queue3对应的优先级通道设置为慢通道。
优选地,对于每一个队列,都可以设置对应的标签,通过标签来区分多 个不同的任务队列,方便任务的管理。
S13、当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量。
在本申请的至少一实施例中,所述客户端在向所述服务器端获取CPU资源和内存资源等资源之前,需向所述服务器端输出任务处理请求,所述服务器端根据接收到的所述任务处理请求,分配相关资源给所述客户端,用于执行当前任务。
用户在所述客户端提交任务处理请求时,需要将任务的描述信息(包括但不限于任务名称、命令参数、资源需求等信息)告知所述客户端对应的用户界面程序,所述用户界面程序会将任务的描述信息传递给所述服务器端的任务调度器,实现任务处理请求的提交过程。其中,所述用户界面程序是一个web应用程序,用户需要通过web浏览器操作用户界面程序;所述任务调度器用于对所述客户端提交的任务进行分析及调度管理。
所述任务处理请求中包括任务的描述文件,所述任务的描述文件是指符合所述服务器端资源调度规范的,用于表达任务请求的文件。所述任务的描述文件是根据用户预先设置任务的描述文件模板确定的,所述任务的描述文件模板是一种用于定义任务的描述文件中的共性信息组织结构的模板文件。所述任务的描述文件模板可以使用专用的编程语言,例如Jinja编程语言进行编写,也可以是带有可替换字段的简单文本文件等等,此处不作具体限定。所述任务的描述文件包括以下信息中的至少一个:任务名称(job_name,为字符串字段)以及任务的资源需求(attribute_description,为键值对字段)等。其中,所述任务名称为资源调度的标识,一个任务对应唯一一个任务名称;所述任务的资源需求用于在资源调度时确定需要占据的资源。
当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量。其中,所述预设个数为用户预先设置的,例如,所述预设个数可以为一个,也可以为队列对应的个数。所述资源量监听器可以用于监听所述队列中的资源量。
当接收到客户端输出的任务处理请求时,所述方法还包括:调用服务器端的任务调度器获取所述任务的描述文件;根据所述描述文件识别所述任务的任务名称;根据所述任务名称判断所述任务是否为首次提交;当所述任务为首次提交时,选择预定队列运行所述任务;当所述任务不为首次提交时,从历史运行记录中筛选出与所述任务具有相同属性的历史任务所消耗的历史时长,并根据所述历史时长采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长,其中,所述相同属性可以包括具有相同的任务名称。
其中,所述首次提交表明所述客户端在此之前未向所述服务器端输出同样的任务处理请求,所述服务器端未对当前任务分配过相关资源,因而所述服务器端无法获取当前任务的历史运行时长,无法判断应将当前任务分配给哪个队列进行执行。所述根据所述任务名称判断所述任务是否为首次提交的步骤包括:根据所述任务名称遍历资源调度库;判断所述资源调度库中是否存在与所述任务名称相同的任务名称;若判断结果为不存在与所述任务名称相同的任务名称,则确定所述任务为首次提交;若判断结果为存在与所述任务名称相同的任务名称,则确定所述任务不为首次提交。其中,所述资源调度库中保存有历史资源调度记录,所述历史资源调度记录中包含资源调度对应的任务名称。
当确定所述任务不为首次提交时,所述从历史运行记录中筛选出与所述任务具有相同属性的历史任务所消耗的历史时长的步骤包括:获取与所述任务具有相同属性的历史任务在预设天数内的历史时长,记为x 1、x 2…x n;根据在所述预设天数内的历史时长计算平均运行时长,记为
Figure PCTCN2020132352-appb-000001
将所述历史时长与所述平均运行时长代入方差计算公式,得到与所述任务具有相同属性的历史任务所消耗的历史时长的方差值;根据所述历史时长的方差值得到所述任务的历史时长。
在所述根据所述历史时长的方差值得到所述任务的历史时长的步骤之后,所述方法还包括:判断所述任务的历史时长是否超出预设时长阈值;若判断结果为所述任务的历史时长超出预设时长阈值,则将所述任务指定到Queue3中运行。其中,所述预设时长阈值为用户预先设置的,例如,所述预设时长阈值可以为30分钟,对于所述任务消耗的预计时长超出30分钟的任务,拒绝将其提交到Queue1或Queue2中运行,避免占用较长时间的资源,降低资源利用率与时效性。若判断结果为所述任务的历史运行时长未超出预设时长阈值,则采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长。
其中,所述方差计算公式为:
Figure PCTCN2020132352-appb-000002
S 2为样本方差,x为历史运行时长,
Figure PCTCN2020132352-appb-000003
为平均运行时长,n为预设天数。与所述任务具有相同属性的历史任务是指与所述任务的任务名称、所述任务处理请求输出的时间段等相同的历史任务。可以理解的是,方差为表示数据偏离程度的量,通过计算当前任务在预设天数内的历史运行时长的方差值,可以舍弃偏离较大的历史运行时长值,从而提高当前任务历史运行时长的准确率。
当确定所述任务为首次提交时,所述方法还包括:选择预定队列运行当前任务。其中,所述预定队列可以为Queue1、Queue2与Queue3中的任意一个,在本实施方式中,所述预定队列可以为Queue2。
在本申请的至少一实施例中,接收到客户端输出的任务处理请求的数量可以为1个,也可以为多个。当接收到客户端输出的任务处理请求的数量为多个时,可以根据对各个任务定义的统一规范化的任务的扫描文件,对各个任务进行统一的调度和管理。
S14、采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长。
在本申请的至少一实施例中,所述采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长的步骤包括:将当前任务的历史消耗时长与多层队列的当前资源消耗量输入至预先训练好的任务时长消耗模型中;通过所述任务时长消耗模型计算出当前任务分配给对应队列所需消耗的时长。
S15、根据所述任务消耗的预计时长确定所述任务消耗的预计资源量。
在本申请的至少一实施例中,所述任务消耗的预计时长越长,所述任务消耗的预计资源量越大。设置一时长-资源量消耗对应表,在所述时长-资源量消耗对应表中,列出了所述任务消耗的时长与所述任务消耗的资源量的对应关系。在系统的性能和运行环境保持不变的情况下,可以认为所述任务消耗的时长与所述任务消耗的资源量的对应关系是稳定的。所述任务消耗的时长与所述任务消耗的资源量的对应关系可以通过多次试验所得。
所述根据所述任务消耗的预计时长确定所述任务消耗的预计资源量的步骤包括:根据所述任务消耗的预计时长遍历所述时长-资源量消耗对应表; 在所述时长-资源量消耗对应表中匹配出对应的所述任务消耗的预计资源量。
S16、将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列。
在本申请的至少一实施例中,确定多层队列的剩余资源量,判断是否存在所述剩余资源量大于所述预计资源量的多层队列。若判断结果为存在所述剩余资源量大于所述预计资源量的多层队列,则获取大于所述预计资源量的多层队列,并确定为待选队列。
S17、从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源。
在本申请的至少一实施例中,当大于所述预计资源量的多层队列的数量超过1个时,则从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源。例如,当大于所述预计资源量的队列分别为Queue1与Queue2,由于Queue1的性能标识为第一性能标识,则选择Queue1作为目标队列。
在本申请的至少一实施例中,所述方法还包括:预测每层队列在预定时间段内接收到的任务处理请求的数量;将数量小于或者等于预设数量阈值的队列确定为空闲队列;当在所述预定时间段内接收到任务处理请求时,将所述任务处理请求中的任务分配给所述空闲队列进行处理;
通过对指定队列未来预定时间段内接收到的任务处理请求的数量进行预测,并将任务分配一些到所述空闲队列进行处理,从而实现队列资源利用最大化。
其中,所述预测每层队列在预定时间段内接收到的任务处理请求的数量包括:获取历史预定时间段内的任务运行数据,并将所述任务运行数据通过预处理,实现任务量数据和队列任务分配数据的分离;对所述任务量数据进行平稳化分析处理,得到平稳化任务量数据,同时使用K-means算法对所述队列任务分配数据进行聚类分析处理,得到聚簇数据;将所述平稳化任务数据作为第一训练数据集,将所述聚簇数据作为第二训练数据集,通过预设模型对所述第一训练数据集进行训练得到第一模型,通过所述预设模型对所述第二训练数据集进行训练,得到第二模型;将所述第一模型与所述第二模型进行混合得到混合模型;将指定队列与时间戳输入至所述混合模型;获取所述混合模型输出的分配到所述指定队列的任务处理请求的数量。其中,所述预设模型为用户根据具体需求预先设置的模型,所述预设模型可存储于区块链的目标节点中。
具体地,所述任务量数据包括任务数量与时间戳,将所述任务量数据转化为矩阵形式数据存放在指定数据库中,例如,所述任务量数据的矩阵形式数据可以为x i,t i,其中,x i表示任务数量,t i表示时间戳。所述队列任务分配数据包括任务名称、分配的队列与时间戳,将所述队列任务分配数据转化为矩阵形式数据存放在指定数据库中,例如,所述队列任务分配数据的矩阵形式数据可以为n i,d i,t i,其中,n i表示任务名称,d i表示分配的队列,t i表示时间戳。在一实施例中,可以通过数据ETL分离技术对所述任务运行数据进行预处理,将源数据抽取的数据格式转换为便于处理的目标数据格式。通过对所述任务量数据进行平稳化分析处理,去除非周期性数据,从而表明历 史任务量数据与未来任务量数据之间差异较小,可以通过历史任务量数据预测未来任务量数据。所述使用K-means算法对所述队列任务分配数据进行聚类分析处理,得到聚簇数据的步骤可以包括:获取矩阵形式的队列任务分配数据;基于密度的方法确定所述队列任务分配数据的初始聚类中心;以所述初始聚类中心为初始中心点,基于距离的聚类算法K-means对所述队列任务分配数据进行聚类得到聚簇数据。
S18、将所述任务分配给所述目标队列。
在本申请的至少一实施例中,在所述将所述任务分配给所述目标队列的步骤之后,所述方法还包括:识别当前任务对应的客户端的ID(身份识别标识);获取当前任务的运行状态并将所述运行状态反馈给所述客户端的ID对应的客户端中。其中,所述任务的运行状态可以包括任务运行完成、任务运行失败等状态。
本申请实施例提供一种大数据资源处理方法,初始化所述大数据平台中的大数据资源对应的多层队列,得到队列的初始资源;根据所述队列的初始资源确定每层队列的性能标识;当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量;采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长;根据所述任务消耗的预计时长确定所述任务消耗的预计资源量;将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列;从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源;将所述任务分配给所述目标队列。通过本申请实施例,预测任务消耗的资源量,并结合每层队列的剩余资源量及队列的性能标识来综合确定目标队列,可合理分配资源,节约了整体任务的运行时间,提升了集群资源的利用率,本申请可应用于智慧政务、智慧交通等智慧城市的各个功能模块中,比如智慧政务的大数据资源处理模块中,能够促进智慧城市的快速发展。
以上是对本申请实施例所提供的方法进行的详细描述。根据不同的需求,所示流程图中方块的执行顺序可以改变,某些方块可以省略。下面对本申请实施例所提供的终端1进行描述。
本申请实施例还提供一种终端1,包括存储器10、处理器30及存储在存储器10上并可在处理器30上运行的计算机可读指令,所述处理器30执行所述程序时实现上述任一实施方式中所述的大数据资源处理方法的步骤。
图2是本申请一实施方式的终端的结构示意图,如图2所示,终端1包括存储器10,存储器10中存储有大数据资源处理装置100。所述的终端1可以是计算机、平板电脑、个人数字助理等具有数据处理、分析、程序执行及显示等功能的电子设备,其中,所述终端还可以作为服务器端及客户端。所述大数据资源处理装置100可以初始化所述大数据平台中的大数据资源对应的多层队列,得到队列的初始资源;根据所述队列的初始资源确定每层队列的性能标识;当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量;采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长;根据所述任务消耗的预计时长确定所述任务消耗的预计资源量;将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列;从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源;将所述任务分配给所述目标队列。通过本申请实施例,预测任务消耗的资源量,并结合 每层队列的剩余资源量及队列的性能标识来综合确定目标队列,可合理分配资源,节约了整体任务的运行时间,提升了集群资源的利用率,本申请可应用于智慧政务、智慧交通等智慧城市的各个功能模块中,比如智慧政务的大数据资源处理模块中,能够促进智慧城市的快速发展。
本实施方式中,终端1还可以包括显示屏20及处理器30。存储器10、显示屏20可以分别与处理器30电连接。
所述的存储器10可以是不同类型存储设备,用于存储各类数据。例如,可以是终端1的存储器、内存,还可以是可外接于该终端1的存储卡,如闪存、SM卡(Smart Media Card,智能媒体卡)、SD卡(Secure Digital Card,安全数字卡)等。此外,存储器10可以包括非易失性和易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、或其他存储器件。存储器10用于存储各类数据,例如,所述终端1中安装的各类应用程序(Applications)、应用上述大数据资源处理方法而设置及获取的数据等信息。
显示屏20安装于终端1,用于显示信息。
处理器30用于执行所述大数据资源处理方法以及所述终端1内安装的各类软件,例如操作系统及应用显示软件等。处理器30包含但不限于处理器(Central Processing Unit,CPU)、微控制单元(Micro Controller Unit,MCU)等用于解释计算机以及处理计算机软件中的数据的装置。
所述的大数据资源处理装置100可以包括一个或多个的模块,所述一个或多个模块被存储在终端1的存储器10中并被配置成由一个或多个处理器(本实施方式为一个处理器30)执行,以完成本申请实施例。例如,参阅图3所示,所述终端1可以包括队列初始化模块101、性能标识确定模块102、剩余资源量监听模块103、消耗时长预测模块104、资源量消耗预计模块105、待选队列确定模块106、目标队列匹配模块107及任务分配模块108。本申请实施例所称的模块可以是完成一特定功能的程序段,比程序更适合于描述软件在处理器30中的执行过程。
可以理解的是,对应上述大数据资源处理方法中的各实施方式,终端1可以包括图3中所示的各功能模块中的一部分或全部,各模块的功能将在以下具体介绍。需要说明的是,以上大数据资源处理方法的各实施方式中相同的名词相关名词及其具体的解释说明也可以适用于以下对各模块的功能介绍。为节省篇幅及避免重复起见,在此就不再赘述。
队列初始化模块101可以用于初始化所述大数据平台中的大数据资源对应的多层队列,得到队列的初始资源。
性能标识确定模块102可以用于根据所述队列的初始资源确定每层队列的性能标识。
剩余资源量监听模块103可以用于当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量。
消耗时长预测模块104可以用于采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长。
资源量消耗预计模块105可以用于根据所述任务消耗的预计时长确定所述任务消耗的预计资源量。
待选队列确定模块106可以用于将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列。
目标队列匹配模块107可以用于从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源。
任务分配模块108可以用于将所述任务分配给所述目标队列。
本申请实施例还提供一种计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器30执行时实现上述任一实施方式中的大数据资源处理方法的步骤。
所述大数据资源处理装置100如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施方式方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读存储介质中,该计算机可读指令在被处理器30执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读存储介质可以是非易失性,也可以是易失性。所述计算机可读存储介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存储器等。
所称处理器30可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器30是所述大数据资源处理装置100/终端1的控制中心,利用各种接口和线路连接整个大数据资源处理装置100/终端1的各个部分。
所述存储器10用于存储所述计算机可读指令和/或模块,所述处理器30通过运行或执行存储在所述存储器10内的计算机可读指令和/或模块,以及调用存储在存储器10内的数据,实现所述大数据资源处理装置100/终端1的各种功能。所述存储器10可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端1的使用所创建的数据(比如音频数据)等。
在本申请所提供的几个具体实施方式中,应该理解到,所揭露的终端和方法,可以通过其它的方式实现。例如,以上所描述的系统实施方式仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
对于本领域技术人员而言,显然本申请实施例不限于上述示范性实施例的细节,而且在不背离本申请实施例的精神或基本特征的情况下,能够以其他的具体形式实现本申请实施例。因此,无论从哪一点来看,均应将实施例看作是示范性 的,而且是非限制性的,本申请实施例的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请实施例内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。本申请中陈述的多个单元、模块或装置也可以由同一个单元、模块或装置通过软件或者硬件来实现。
以上实施方式仅用以说明本申请实施例的技术方案而非限制,尽管参照以上较佳实施方式对本申请实施例进行了详细说明,本领域的普通技术人员应当理解,可以对本申请实施例的技术方案进行修改或等同替换都不应脱离本申请实施例的技术方案的精神和范围。

Claims (20)

  1. 一种大数据资源处理方法,应用于大数据平台中,其中,所述大数据资源处理方法包括:
    初始化所述大数据平台中的大数据资源对应的多层队列,得到队列的初始资源;
    根据所述队列的初始资源确定每层队列的性能标识;
    当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量;
    采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长;
    根据所述任务消耗的预计时长确定所述任务消耗的预计资源量;
    将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列;
    从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源;
    将所述任务分配给所述目标队列。
  2. 根据权利要求1所述的大数据资源处理方法,其中,所述根据所述队列的初始资源确定每层队列的性能标识的步骤包括:
    判断每层队列的所述初始资源是否介于预设第一资源阈值与预设第二资源阈值之间,其中,所述第一资源阈值大于所述第二资源阈值;
    当所述初始资源大于所述预设第一资源阈值时,确定与所述初始资源对应的队列的性能标识为第一性能标识;
    当所述初始资源小于所述预设第一资源阈值且大于所述预设第二资源阈值时,确定与所述初始资源对应的队列的性能标识为第二性能标识;
    当所述初始资源小于所述预设第二资源阈值时,确定与所述初始资源对应的队列的性能标识为第三性能标识。
  3. 根据权利要求1所述的大数据资源处理方法,其中,当接收到客户端输出的任务处理请求时,所述方法还包括:
    调用服务器端的任务调度器获取所述任务的描述文件;
    根据所述描述文件识别所述任务的任务名称;
    根据所述任务名称判断所述任务是否为首次提交;
    当所述任务为首次提交时,选择预定队列运行所述任务;
    当所述任务不为首次提交时,从历史运行记录中筛选出与所述任务具有相同属性的历史任务所消耗的历史时长,并根据所述历史时长采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长。
  4. 根据权利要求3所述的大数据资源处理方法,其中,所述根据所述任务名称判断所述任务是否为首次提交的步骤包括:
    根据所述任务名称遍历资源调度库;
    判断所述资源调度库中是否存在与所述任务名称相同的任务名称;
    若判断结果为不存在与所述任务名称相同的任务名称,则确定所述任务为首次提交;
    若判断结果为存在与所述任务名称相同的任务名称,则确定所述任务不为首次提交。
  5. 根据权利要求3所述的大数据资源处理方法,其中,所述从历史运行记录中筛选出与所述任务具有相同属性的历史任务所消耗的历史时长的步骤包括:
    获取与所述任务具有相同属性的历史任务在预设天数内的历史时长;
    根据在所述预设天数内的历史时长计算平均运行时长;
    将所述历史时长与所述平均运行时长代入方差计算公式,得到与所述任务具有相同属性的历史任务所消耗的历史时长的方差值;
    根据所述历史时长的方差值得到所述任务的历史时长。
  6. 根据权利要求1至5中任意一项所述的大数据资源处理方法,其中,所述方法还包括:
    预测每层队列在预定时间段内接收到的任务处理请求的数量;
    将数量小于或者等于预设数量阈值的队列确定为空闲队列;
    当在所述预定时间段内接收到任务处理请求时,将所述任务处理请求中的任务分配给所述空闲队列进行处理;
    其中,所述预测每层队列在预定时间段内接收到的任务处理请求的数量包括:
    获取历史预定时间段内的任务运行数据,并将所述任务运行数据通过预处理,实现任务量数据和队列任务分配数据的分离;
    对所述任务量数据进行平稳化分析处理,得到平稳化任务量数据,同时使用K-means算法对所述队列任务分配数据进行聚类分析处理,得到聚簇数据;
    将所述平稳化任务数据作为第一训练数据集,将所述聚簇数据作为第二训练数据集,通过预设模型对所述第一训练数据集进行训练得到第一模型,通过所述预设模型对所述第二训练数据集进行训练,得到第二模型;
    将所述第一模型与所述第二模型进行混合得到混合模型;
    将指定队列与时间戳输入至所述混合模型;
    获取所述混合模型输出的分配到所述指定队列的任务处理请求的数量。
  7. 根据权利要求1-5中任意一项所述的大数据资源处理方法,其中,所述任务时长消耗模型的训练过程包括:
    采集多个任务及每个任务在多层队列中的历史消耗时长;
    将多个任务及对应的历史消耗时长作为样本数据集;
    从所述样本数据集中划分出训练集和测试集;
    将所述训练集输入至预设神经网络中进行训练,得到任务时长消耗模型;
    将所述测试集输入至所述任务时长消耗模型中进行测试,计算测试通过率;
    若所述测试通过率大于或者等于预设通过率阈值,则确定所述任务时长消耗模型训练结束;
    若所述测试通过率小于所述预设通过率阈值,则增加训练集的数量并基于增加的训练集重新进行任务时长消耗模型的训练。
  8. 一种大数据资源处理装置,应用于大数据平台中,其中,所述大数据资源处理装置包括:
    队列初始化模块,用于初始化所述大数据平台中的大数据资源对应的多层队列,得到队列的初始资源;
    性能标识确定模块,用于根据所述队列的初始资源确定每层队列的性能标识;
    剩余资源量监听模块,用于当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量;
    消耗时长预测模块,用于采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长;
    资源量消耗预计模块,用于根据所述任务消耗的预计时长确定所述任务消耗的预计资源量;
    待选队列确定模块,用于将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列;
    目标队列匹配模块,用于从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源;
    任务分配模块,用于将所述任务分配给所述目标队列。
  9. 一种终端,其中,所述终端包括处理器,所述处理器用于执行存储器中存储的计算机可读指令以实现以下步骤:
    初始化所述大数据平台中的大数据资源对应的多层队列,得到队列的初始资源;
    根据所述队列的初始资源确定每层队列的性能标识;
    当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量;
    采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长;
    根据所述任务消耗的预计时长确定所述任务消耗的预计资源量;
    将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列;
    从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源;
    将所述任务分配给所述目标队列。
  10. 根据权利要求9所述的终端,其中,所述处理器执行所述计算机可读指令以实现所述根据所述队列的初始资源确定每层队列的性能标识时,包括:
    判断每层队列的所述初始资源是否介于预设第一资源阈值与预设第二资源阈值之间,其中,所述第一资源阈值大于所述第二资源阈值;
    当所述初始资源大于所述预设第一资源阈值时,确定与所述初始资源对应的队列的性能标识为第一性能标识;
    当所述初始资源小于所述预设第一资源阈值且大于所述预设第二资源阈值时,确定与所述初始资源对应的队列的性能标识为第二性能标识;
    当所述初始资源小于所述预设第二资源阈值时,确定与所述初始资源对应的队列的性能标识为第三性能标识。
  11. 根据权利要求9所述的终端,其中,当接收到客户端输出的任务处理请求时,所述处理器执行所述计算机可读指令还用以实现以下步骤:
    调用服务器端的任务调度器获取所述任务的描述文件;
    根据所述描述文件识别所述任务的任务名称;
    根据所述任务名称判断所述任务是否为首次提交;
    当所述任务为首次提交时,选择预定队列运行所述任务;
    当所述任务不为首次提交时,从历史运行记录中筛选出与所述任务具有相同属性的历史任务所消耗的历史时长,并根据所述历史时长采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长。
  12. 根据权利要求11所述的终端,其中,所述处理器执行所述计算机可读指令以实现所述根据所述任务名称判断所述任务是否为首次提交时,包括:
    根据所述任务名称遍历资源调度库;
    判断所述资源调度库中是否存在与所述任务名称相同的任务名称;
    若判断结果为不存在与所述任务名称相同的任务名称,则确定所述任务为首次提交;
    若判断结果为存在与所述任务名称相同的任务名称,则确定所述任务不为首次提交。
  13. 根据权利要求11所述的终端,其中,所述处理器执行所述计算机可读 指令以实现所述从历史运行记录中筛选出与所述任务具有相同属性的历史任务所消耗的历史时长时,包括:
    获取与所述任务具有相同属性的历史任务在预设天数内的历史时长;
    根据在所述预设天数内的历史时长计算平均运行时长;
    将所述历史时长与所述平均运行时长代入方差计算公式,得到与所述任务具有相同属性的历史任务所消耗的历史时长的方差值;
    根据所述历史时长的方差值得到所述任务的历史时长。
  14. 根据权利要求9至13中任意一项所述的终端,其中,所述处理器执行所述计算机可读指令还用以实现以下步骤:
    预测每层队列在预定时间段内接收到的任务处理请求的数量;
    将数量小于或者等于预设数量阈值的队列确定为空闲队列;
    当在所述预定时间段内接收到任务处理请求时,将所述任务处理请求中的任务分配给所述空闲队列进行处理;
    其中,所述预测每层队列在预定时间段内接收到的任务处理请求的数量包括:
    获取历史预定时间段内的任务运行数据,并将所述任务运行数据通过预处理,实现任务量数据和队列任务分配数据的分离;
    对所述任务量数据进行平稳化分析处理,得到平稳化任务量数据,同时使用K-means算法对所述队列任务分配数据进行聚类分析处理,得到聚簇数据;
    将所述平稳化任务数据作为第一训练数据集,将所述聚簇数据作为第二训练数据集,通过预设模型对所述第一训练数据集进行训练得到第一模型,通过所述预设模型对所述第二训练数据集进行训练,得到第二模型;
    将所述第一模型与所述第二模型进行混合得到混合模型;
    将指定队列与时间戳输入至所述混合模型;
    获取所述混合模型输出的分配到所述指定队列的任务处理请求的数量。
  15. 根据权利要求9-13中任意一项所述的终端,其中,所述处理器执行所述计算机可读指令以实现所述任务时长消耗模型的训练过程时,包括:
    采集多个任务及每个任务在多层队列中的历史消耗时长;
    将多个任务及对应的历史消耗时长作为样本数据集;
    从所述样本数据集中划分出训练集和测试集;
    将所述训练集输入至预设神经网络中进行训练,得到任务时长消耗模型;
    将所述测试集输入至所述任务时长消耗模型中进行测试,计算测试通过率;
    若所述测试通过率大于或者等于预设通过率阈值,则确定所述任务时长消耗模型训练结束;
    若所述测试通过率小于所述预设通过率阈值,则增加训练集的数量并基于增 加的训练集重新进行任务时长消耗模型的训练。
  16. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机可读指令,其中,所述计算机可读指令被处理器执行时实现以下步骤:
    初始化所述大数据平台中的大数据资源对应的多层队列,得到队列的初始资源;
    根据所述队列的初始资源确定每层队列的性能标识;
    当接收到客户端输出的任务处理请求时,调用预设个数的资源量监听器监听所述多层队列中每层队列的剩余资源量;
    采用预先训练的任务时长消耗模型预测出所述任务消耗的预计时长;
    根据所述任务消耗的预计时长确定所述任务消耗的预计资源量;
    将所述多层队列中剩余资源量大于所述预计资源量的队列确定为待选队列;
    从所述待选队列中匹配出性能标识为第一性能标识的目标队列,其中,所述第一性能标识所对应的队列的初始资源大于其他性能标识所对应的队列的初始资源;
    将所述任务分配给所述目标队列。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述计算机可读指令被处理器执行以实现所述根据所述队列的初始资源确定每层队列的性能标识时,包括:
    判断每层队列的所述初始资源是否介于预设第一资源阈值与预设第二资源阈值之间,其中,所述第一资源阈值大于所述第二资源阈值;
    当所述初始资源大于所述预设第一资源阈值时,确定与所述初始资源对应的队列的性能标识为第一性能标识;
    当所述初始资源小于所述预设第一资源阈值且大于所述预设第二资源阈值时,确定与所述初始资源对应的队列的性能标识为第二性能标识;
    当所述初始资源小于所述预设第二资源阈值时,确定与所述初始资源对应的队列的性能标识为第三性能标识。
  18. 根据权利要求16所述的计算机可读存储介质,其中,当接收到客户端输出的任务处理请求时,所述计算机可读指令被处理器执行还用以实现以下步骤:
    调用服务器端的任务调度器获取所述任务的描述文件;
    根据所述描述文件识别所述任务的任务名称;
    根据所述任务名称判断所述任务是否为首次提交;
    当所述任务为首次提交时,选择预定队列运行所述任务;
    当所述任务不为首次提交时,从历史运行记录中筛选出与所述任务具有相同属性的历史任务所消耗的历史时长,并根据所述历史时长采用预先训练的任务时 长消耗模型预测出所述任务消耗的预计时长。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述计算机可读指令被处理器执行以实现所述根据所述任务名称判断所述任务是否为首次提交时,包括:
    根据所述任务名称遍历资源调度库;
    判断所述资源调度库中是否存在与所述任务名称相同的任务名称;
    若判断结果为不存在与所述任务名称相同的任务名称,则确定所述任务为首次提交;
    若判断结果为存在与所述任务名称相同的任务名称,则确定所述任务不为首次提交。
  20. 根据权利要求18所述的计算机可读存储介质,其中,所述计算机可读指令被处理器执行以实现所述从历史运行记录中筛选出与所述任务具有相同属性的历史任务所消耗的历史时长时,包括:
    获取与所述任务具有相同属性的历史任务在预设天数内的历史时长;
    根据在所述预设天数内的历史时长计算平均运行时长;
    将所述历史时长与所述平均运行时长代入方差计算公式,得到与所述任务具有相同属性的历史任务所消耗的历史时长的方差值;
    根据所述历史时长的方差值得到所述任务的历史时长。
PCT/CN2020/132352 2020-01-07 2020-11-27 大数据资源处理方法、装置、终端及存储介质 WO2021139438A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010015241.9A CN111198767A (zh) 2020-01-07 2020-01-07 大数据资源处理方法、装置、终端及存储介质
CN202010015241.9 2020-01-07

Publications (1)

Publication Number Publication Date
WO2021139438A1 true WO2021139438A1 (zh) 2021-07-15

Family

ID=70746818

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/132352 WO2021139438A1 (zh) 2020-01-07 2020-11-27 大数据资源处理方法、装置、终端及存储介质

Country Status (2)

Country Link
CN (1) CN111198767A (zh)
WO (1) WO2021139438A1 (zh)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626118A (zh) * 2021-07-30 2021-11-09 中汽创智科技有限公司 能耗实时显示方法、装置及设备
CN113687950A (zh) * 2021-08-31 2021-11-23 平安医疗健康管理股份有限公司 基于优先级的任务分配方法、装置、设备及存储介质
CN113703687A (zh) * 2021-09-01 2021-11-26 平安医疗健康管理股份有限公司 数据入库处理方法、装置、计算机设备和存储介质
CN113703965A (zh) * 2021-07-30 2021-11-26 苏州浪潮智能科技有限公司 一种资源处理方法、系统、设备及计算机可读存储介质
CN113822586A (zh) * 2021-09-27 2021-12-21 深圳威消保科技有限公司 一种任务悬赏方法及系统
CN114338440A (zh) * 2021-12-28 2022-04-12 杭州安恒信息技术股份有限公司 一种抓包方法、装置、系统及计算机可读存储介质
CN115600985A (zh) * 2022-10-27 2023-01-13 深圳标普云科技有限公司(Cn) 一种线上平台任务管理方法及系统
CN115794337A (zh) * 2022-11-14 2023-03-14 北京百度网讯科技有限公司 资源调度方法、装置、云平台、设备及存储介质
CN115914362A (zh) * 2022-11-17 2023-04-04 杉数科技(北京)有限公司 消息推送方法、装置、计算机可读介质及电子设备
CN117093638A (zh) * 2023-10-17 2023-11-21 博智安全科技股份有限公司 一种微服务数据初始化方法、系统、电子设备及存储介质
CN117112231A (zh) * 2023-09-22 2023-11-24 中国人民解放军91977部队 一种多模型协同处理方法及装置
CN117130791A (zh) * 2023-10-26 2023-11-28 南通话时代信息科技有限公司 云客服平台的算力资源分配方法及系统
CN117574148A (zh) * 2023-11-20 2024-02-20 国网冀北电力有限公司信息通信分公司 智能预测模型的训练方法、预测方法及相关设备
CN117806851A (zh) * 2024-02-28 2024-04-02 苏州元脑智能科技有限公司 多主机共享的内存系统、内存访问方法、设备和存储介质

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198767A (zh) * 2020-01-07 2020-05-26 平安科技(深圳)有限公司 大数据资源处理方法、装置、终端及存储介质
CN111582407B (zh) * 2020-06-19 2022-11-04 拉扎斯网络科技(上海)有限公司 任务处理方法、装置、可读存储介质和电子设备
CN113992493A (zh) * 2020-07-08 2022-01-28 阿里巴巴集团控股有限公司 视频处理方法、系统、设备及存储介质
CN111813523A (zh) * 2020-07-09 2020-10-23 北京奇艺世纪科技有限公司 时长预估模型生成方法、系统资源调度方法、装置、电子设备和存储介质
CN112002054B (zh) * 2020-07-28 2022-03-29 东软医疗系统股份有限公司 等待时间的确定方法、装置、存储介质和电子设备
CN112241316A (zh) * 2020-09-18 2021-01-19 武汉迎风聚智科技有限公司 一种分布式调度应用的方法以及装置
CN112114971A (zh) * 2020-09-28 2020-12-22 中国建设银行股份有限公司 一种任务分配方法、装置及设备
CN113760493B (zh) * 2020-11-05 2024-05-17 北京沃东天骏信息技术有限公司 一种作业调度方法和装置
CN112463334B (zh) * 2020-12-04 2023-08-18 苏州浪潮智能科技有限公司 一种训练任务排队原因分析方法、系统、设备以及介质
CN112527501A (zh) * 2020-12-07 2021-03-19 中国平安人寿保险股份有限公司 大数据资源分配方法、装置、设备及介质
CN112269650A (zh) * 2020-12-18 2021-01-26 北京达佳互联信息技术有限公司 任务调度方法、装置、电子设备和存储介质
CN112633842B (zh) * 2020-12-25 2022-06-14 中电金信软件有限公司 任务推送方法、装置及系统
CN112860974A (zh) * 2021-01-28 2021-05-28 北京百度网讯科技有限公司 计算资源的调度方法、装置、电子设备和存储介质
CN113794650A (zh) * 2021-09-16 2021-12-14 平安国际智慧城市科技股份有限公司 并发请求的处理方法、计算机设备和计算机可读存储介质
CN113869739A (zh) * 2021-09-29 2021-12-31 联想(北京)有限公司 一种业务数据处理方法、装置及电子设备
CN114168317A (zh) * 2021-11-08 2022-03-11 山东有人物联网股份有限公司 负载平衡的方法、负载平衡设备和计算机可读存储介质
CN114579268A (zh) * 2022-01-30 2022-06-03 阿里巴巴(中国)有限公司 资源调度方法以及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567086A (zh) * 2010-12-30 2012-07-11 中国移动通信集团公司 一种任务调度的方法、设备和系统
CN104657214A (zh) * 2015-03-13 2015-05-27 华存数据信息技术有限公司 一种基于多队列和多优先级的大数据任务管理系统和方法
US20150355943A1 (en) * 2014-06-05 2015-12-10 International Business Machines Corporation Weighted stealing of resources
CN110166282A (zh) * 2019-04-16 2019-08-23 苏宁易购集团股份有限公司 资源分配方法、装置、计算机设备和存储介质
CN111198767A (zh) * 2020-01-07 2020-05-26 平安科技(深圳)有限公司 大数据资源处理方法、装置、终端及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567086A (zh) * 2010-12-30 2012-07-11 中国移动通信集团公司 一种任务调度的方法、设备和系统
US20150355943A1 (en) * 2014-06-05 2015-12-10 International Business Machines Corporation Weighted stealing of resources
CN104657214A (zh) * 2015-03-13 2015-05-27 华存数据信息技术有限公司 一种基于多队列和多优先级的大数据任务管理系统和方法
CN110166282A (zh) * 2019-04-16 2019-08-23 苏宁易购集团股份有限公司 资源分配方法、装置、计算机设备和存储介质
CN111198767A (zh) * 2020-01-07 2020-05-26 平安科技(深圳)有限公司 大数据资源处理方法、装置、终端及存储介质

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113703965B (zh) * 2021-07-30 2023-08-04 苏州浪潮智能科技有限公司 一种资源处理方法、系统、设备及计算机可读存储介质
CN113703965A (zh) * 2021-07-30 2021-11-26 苏州浪潮智能科技有限公司 一种资源处理方法、系统、设备及计算机可读存储介质
CN113626118A (zh) * 2021-07-30 2021-11-09 中汽创智科技有限公司 能耗实时显示方法、装置及设备
CN113626118B (zh) * 2021-07-30 2023-07-25 中汽创智科技有限公司 能耗实时显示方法、装置及设备
CN113687950A (zh) * 2021-08-31 2021-11-23 平安医疗健康管理股份有限公司 基于优先级的任务分配方法、装置、设备及存储介质
CN113703687A (zh) * 2021-09-01 2021-11-26 平安医疗健康管理股份有限公司 数据入库处理方法、装置、计算机设备和存储介质
CN113703687B (zh) * 2021-09-01 2023-09-05 平安医疗健康管理股份有限公司 数据入库处理方法、装置、计算机设备和存储介质
CN113822586A (zh) * 2021-09-27 2021-12-21 深圳威消保科技有限公司 一种任务悬赏方法及系统
CN113822586B (zh) * 2021-09-27 2023-11-07 深圳威消保科技有限公司 一种任务悬赏方法及系统
CN114338440A (zh) * 2021-12-28 2022-04-12 杭州安恒信息技术股份有限公司 一种抓包方法、装置、系统及计算机可读存储介质
CN115600985B (zh) * 2022-10-27 2023-09-15 深圳标普云科技有限公司 一种线上平台任务管理方法及系统
CN115600985A (zh) * 2022-10-27 2023-01-13 深圳标普云科技有限公司(Cn) 一种线上平台任务管理方法及系统
CN115794337A (zh) * 2022-11-14 2023-03-14 北京百度网讯科技有限公司 资源调度方法、装置、云平台、设备及存储介质
CN115794337B (zh) * 2022-11-14 2023-09-26 北京百度网讯科技有限公司 资源调度方法、装置、云平台、设备及存储介质
CN115914362A (zh) * 2022-11-17 2023-04-04 杉数科技(北京)有限公司 消息推送方法、装置、计算机可读介质及电子设备
CN117112231A (zh) * 2023-09-22 2023-11-24 中国人民解放军91977部队 一种多模型协同处理方法及装置
CN117112231B (zh) * 2023-09-22 2024-04-16 中国人民解放军91977部队 一种多模型协同处理方法及装置
CN117093638B (zh) * 2023-10-17 2024-01-23 博智安全科技股份有限公司 一种微服务数据初始化方法、系统、电子设备及存储介质
CN117093638A (zh) * 2023-10-17 2023-11-21 博智安全科技股份有限公司 一种微服务数据初始化方法、系统、电子设备及存储介质
CN117130791A (zh) * 2023-10-26 2023-11-28 南通话时代信息科技有限公司 云客服平台的算力资源分配方法及系统
CN117130791B (zh) * 2023-10-26 2023-12-26 南通话时代信息科技有限公司 云客服平台的算力资源分配方法及系统
CN117574148A (zh) * 2023-11-20 2024-02-20 国网冀北电力有限公司信息通信分公司 智能预测模型的训练方法、预测方法及相关设备
CN117806851A (zh) * 2024-02-28 2024-04-02 苏州元脑智能科技有限公司 多主机共享的内存系统、内存访问方法、设备和存储介质
CN117806851B (zh) * 2024-02-28 2024-05-10 苏州元脑智能科技有限公司 多主机共享的内存系统、内存访问方法、设备和存储介质

Also Published As

Publication number Publication date
CN111198767A (zh) 2020-05-26

Similar Documents

Publication Publication Date Title
WO2021139438A1 (zh) 大数据资源处理方法、装置、终端及存储介质
CN108776934B (zh) 分布式数据计算方法、装置、计算机设备及可读存储介质
US9430288B2 (en) Job scheduling based on historical job data
US9697045B2 (en) Selecting resource allocation policies and resolving resource conflicts
US10430332B2 (en) System and method for performance tuning of garbage collection algorithms
US10108458B2 (en) System and method for scheduling jobs in distributed datacenters
CN109918184B (zh) 图片处理系统、方法及相关装置和设备
US9811391B1 (en) Load balancing and conflict processing in workflow with task dependencies
US8606905B1 (en) Automated determination of system scalability and scalability constraint factors
WO2021136137A1 (zh) 一种资源调度方法、装置及相关设备
WO2023178958A1 (zh) 线上医疗问诊的医生分配方法、装置、存储介质及设备
CN112463390A (zh) 一种分布式任务调度方法、装置、终端设备及存储介质
CN116755891B (zh) 基于多线程的事件队列处理方法和系统
CN112148468A (zh) 一种资源调度方法、装置、电子设备及存储介质
CN114118433A (zh) 一种设备的配置参数的推荐方法及装置
CN112052082B (zh) 任务属性优化方法、装置、服务器及存储介质
US11856053B2 (en) Systems and methods for hybrid burst optimized regulated workload orchestration for infrastructure as a service
Choi et al. An enhanced data-locality-aware task scheduling algorithm for hadoop applications
CN110780991A (zh) 一种基于优先级的深度学习任务调度方法及装置
CN114356531A (zh) 基于K-means聚类和排队理论的边缘计算任务分类调度方法
CN113391911A (zh) 一种大数据资源动态调度方法、装置和设备
CN116820714A (zh) 一种算力设备的调度方法、装置、设备和存储介质
CN116881003A (zh) 资源分配方法、装置、服务设备及存储介质
CN110247802B (zh) 针对云服务单机环境的资源配置方法及装置
CN114296965A (zh) 特征检索方法、装置、电子设备及计算机存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20912755

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20912755

Country of ref document: EP

Kind code of ref document: A1