CN114153581A - Data processing method, data processing device, computer equipment and storage medium - Google Patents
Data processing method, data processing device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN114153581A CN114153581A CN202111433575.9A CN202111433575A CN114153581A CN 114153581 A CN114153581 A CN 114153581A CN 202111433575 A CN202111433575 A CN 202111433575A CN 114153581 A CN114153581 A CN 114153581A
- Authority
- CN
- China
- Prior art keywords
- target
- task
- data
- priority
- reading
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 18
- 238000000034 method Methods 0.000 claims abstract description 28
- 238000004590 computer program Methods 0.000 claims description 15
- 235000004936 Bromus mango Nutrition 0.000 description 7
- 241001093152 Mangifera Species 0.000 description 7
- 235000014826 Mangifera indica Nutrition 0.000 description 7
- 235000009184 Spondias indica Nutrition 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 230000009471 action Effects 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- 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
-
- 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
-
- 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/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation 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/505—Allocation 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 load
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application relates to a data processing method, a data processing device, computer equipment and a storage medium. The method comprises the following steps: a target node acquires a target task of a target terminal, wherein the target task is a data task generated based on a data request of the target terminal, and the data request carries a data label for indicating a data service quality requirement; and under the condition that the resource utilization rate of the target node is greater than or equal to a preset threshold value, determining the processing priority of the target task according to the data label to obtain the target priority, storing the target task into a task queue, and executing the target task under the condition that the data tasks with the processing priority greater than the target priority are all executed.
Description
Technical Field
The present application relates to the field of cloud computing technologies, and in particular, to a data processing method and apparatus, a computer device, and a storage medium.
Background
A CDN (Content Delivery Network) is an intelligent virtual Network constructed on the basis of an existing Network, and by means of edge servers (i.e., edge nodes) deployed in various places, users can obtain required Content nearby through functional modules of load balancing, Content Delivery, scheduling, and the like of a central platform, thereby reducing Network congestion and improving user access response speed and hit rate.
Because the clients with different service types have different requirements on the data service quality, the service quality required by the video service is generally higher than that required by the downloading service, and the service quality required by the short video service is higher than that required by the long video service. However, when the resource utilization of the edge node is about to exceed the standard or exceeds the standard, an urgent data request cannot be made to respond in time, which results in poor service quality of important services.
Disclosure of Invention
In order to solve the technical problem, the application provides a data processing method, a data processing device, a computer device and a storage medium.
In a first aspect, the present application provides a data processing method, applied to an edge node, including:
acquiring a target task of a target terminal, wherein the target task is used for providing target data stored in a target node for the target terminal, the target task is a data task generated based on a data request of the target terminal, and the data request carries a data tag used for indicating a data service quality requirement;
determining a target priority corresponding to the target task according to the data label under the condition that the resource utilization rate of the target node is greater than or equal to a preset threshold, wherein the target priority is the processing priority of the target task;
storing the target task to a task queue;
and executing the target task under the condition that the execution of the data task with the processing priority higher than the target priority in the task queue is completed.
In a second aspect, the present application provides a data processing apparatus comprising:
the task obtaining module is used for obtaining a target task of a target terminal, wherein the target task is used for providing target data stored in a target node for the target terminal, the target task is a data task generated based on a data request of the target terminal, and the data request carries a data tag used for indicating a data service quality requirement;
a priority determining module, configured to determine a target priority corresponding to the target task according to the data tag when a resource usage rate of the target node is greater than or equal to a preset threshold, where the target priority is a processing priority of the target task;
the task storage module is used for storing the target task to a task queue;
and the task execution module is used for executing the target task under the condition that the execution of the data task with the processing priority higher than the target priority in the task queue is completed.
In a third aspect, the present application provides a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring a target task of a target terminal, wherein the target task is used for providing target data stored in a target node for the target terminal, the target task is a data task generated based on a data request of the target terminal, and the data request carries a data tag used for indicating a data service quality requirement;
determining a target priority corresponding to the target task according to the data label under the condition that the resource utilization rate of the target node is greater than or equal to a preset threshold, wherein the target priority is the processing priority of the target task;
storing the target task to a task queue;
and executing the target task under the condition that the execution of the data task with the processing priority higher than the target priority in the task queue is completed.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring a target task of a target terminal, wherein the target task is used for providing target data stored in a target node for the target terminal, the target task is a data task generated based on a data request of the target terminal, and the data request carries a data tag used for indicating a data service quality requirement;
determining a target priority corresponding to the target task according to the data label under the condition that the resource utilization rate of the target node is greater than or equal to a preset threshold, wherein the target priority is the processing priority of the target task;
storing the target task to a task queue;
and executing the target task under the condition that the execution of the data task with the processing priority higher than the target priority in the task queue is completed.
Based on the data processing method, a target node acquires a target task of a target terminal, wherein the target node is used for indicating any edge node, the target task is used for providing target data stored in the target node for the target terminal, the target task is a data task generated based on a data request of the target terminal, and the data request carries a data tag used for indicating a data service quality requirement; when the resource utilization rate of a target node is greater than or equal to a preset threshold value, the processing priority of a target task is determined according to a data label to obtain the target priority, the target task is stored in a task queue, the data tasks in the task queue are sequentially executed according to the processing priority, the data tasks with high priority are processed preferentially, the target task is executed when the data tasks with the processing priority greater than the target priority are executed completely, the data tasks received by the target node are graded according to different data service quality requirements in the mode, and the data request of the important service with high priority can be responded in time when the resource utilization rate of an edge node exceeds the standard.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a diagram of an application environment of a data processing method in one embodiment;
FIG. 2 is a flow diagram illustrating a data processing method according to one embodiment;
FIG. 3 is a block diagram of a data processing apparatus according to an embodiment;
FIG. 4 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
FIG. 1 is a diagram of an application environment of a data processing method in one embodiment. Referring to fig. 1, the data processing method is applied to a data processing system. The data processing system includes a terminal 110, an edge node 120, and a dispatch center 130. The terminal 110, the edge node 120, and the dispatch center 130 are connected via a network. The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The edge node 120 may be implemented as a stand-alone server or a server cluster comprised of multiple servers. The edge node 120 may be specifically a CDN node or a home node, where the home node is a router or a set-top box that provides a download service for a common user home by using an idle bandwidth. The CDN node is a node in a content delivery network, wherein the CDN node is a network node which has fewer intermediate links from the access of an end user, has better response capability and connection speed for the end user, and can be used as a cache server to provide data service.
After receiving the data request of the terminal 110, the dispatch center 130 matches the edge node 120 storing the target data for the edge node according to the target data requested by the data request, returns the access address of the matched edge node 120 to the terminal 110, the terminal 110 sends the data request to the edge node 120 storing the target data according to the access address, and the edge node 120 provides the data service of the target data for the terminal 110 according to the data request.
In one embodiment, referring to FIG. 2, a data processing method is provided. The present embodiment is mainly exemplified by applying the method to the edge node in fig. 1, and the data processing method specifically includes the following steps:
step S210, acquiring a target task of the target terminal.
In this embodiment, the target task is used to provide target data stored in a target node for the target terminal, the target node is any edge node, the target task is a data task generated based on a data request of the target terminal, that is, the target node generates a corresponding data task when receiving the data request, the data request carries a data tag used for indicating a data quality of service requirement, the data tag specifically includes an application tag and a service tag, the application tag is used for indicating an application plugin initiating the data request in the target terminal, for example, the application tag may be used for indicating an application plugin such as an Tencent video, a mango TV, or a fast hand live broadcast, and the application tag is specifically a unique identifier of the indicated application plugin, such as an application identifier character string.
Step S220, determining a target priority corresponding to the target task according to the data label under the condition that the resource utilization rate of the target node is greater than or equal to a preset threshold value.
In this embodiment, the target priority is a processing priority of the target task, the resource utilization rate of the target node is greater than or equal to a preset threshold, which indicates that the access amount of the target node is large, and all data requests cannot be responded in time, and only part of the data requests that need to be responded in time are selected according to the importance degree and the urgency degree, that is, the processing priorities of the target task and other unexecuted data tasks are determined under the condition, where a higher processing priority indicates a higher importance degree and urgency degree of the data tasks, and a task to be executed with a higher processing priority is to be processed preferentially.
Step S230, saving the target task to a task queue.
In this embodiment, the task queue is configured to store data tasks corresponding to all data requests that are not responded by the target node, and the data tasks in the task queue are arranged in a descending order according to the processing priority, and the target tasks are correspondingly stored according to an order in which the target priority is located in the task queue.
Step S240, executing the target task when the data task with the processing priority greater than the target priority in the task queue is completed.
In this embodiment, the target node sequentially processes the data tasks in the task queue according to the descending order of the processing priorities, and the target task is executed only when the execution of the data tasks in the task queue with the processing priorities greater than the target priority is completed.
In an embodiment, the determining, when the resource usage rate of the target node is greater than or equal to a preset threshold, a target priority corresponding to the target task according to the data tag includes: and under the condition that the disk reading rate of the target node is greater than or equal to a reading threshold value, determining a target reading priority corresponding to a data reading task according to the data tag.
Specifically, the resource utilization rate includes the disk reading rate, the disk reading rate is used for indicating the disk reading performance of the target node, the preset threshold includes the reading threshold, the target priority includes a target reading priority, the target task includes the data reading task, the reading threshold is used for indicating an upper limit of data reading performed by the disk, the disk reading rate is greater than or equal to the reading threshold, the disk reading performance reaches the upper limit of data reading, that is, the target node receives more data requests, and the disk cannot be read, the target reading priority of the data reading task is determined according to the data tag, so that the priorities of the data tasks to be read are distinguished, and the target node can subsequently select the data task with higher priority to read.
In one embodiment, after determining a target reading priority corresponding to a data reading task according to the data tag, the saving the target task to a task queue includes: storing the data reading task into a reading task queue; the executing the target task under the condition that the data task with the processing priority higher than the target priority in the task queue is executed completely comprises the following steps: and executing the data reading task under the condition that the data task with the reading priority higher than the target reading priority in the reading task queue is executed.
Specifically, the task queue comprises a reading task queue, the reading task queue is used for storing data tasks to be read of the disks of all target nodes, the data reading tasks are stored into the reading task queue according to the descending order of the reading priority, the data tasks to be read in the reading task queue are arranged according to the descending order of the reading priority, the target nodes preferentially execute the data tasks to be read with high reading priority in the reading task queue, and the data reading tasks corresponding to the target terminals are not executed until the data tasks with the reading priority higher than the target priority in the reading task queue are executed, so that the data tasks with higher priority reading importance degree and higher emergency degree of the edge nodes are realized.
In an embodiment, the determining, according to the data tag, a target priority corresponding to the data task when the resource usage rate of the target node is greater than or equal to a preset threshold includes: and under the condition that the bandwidth utilization rate of the target node is greater than or equal to a bandwidth threshold, determining a target sending priority corresponding to the data sending task according to the data label.
Specifically, the resource utilization rate further includes a bandwidth utilization rate, the preset threshold includes a bandwidth threshold, the target priority includes a target sending priority, and the data task includes a data sending task. The bandwidth utilization rate is greater than or equal to the bandwidth threshold, which indicates that the smaller the available bandwidth of the edge node is, that is, the more data to be sent of the edge node is, but the bandwidth is insufficient, and the edge node is in a state of not sending, the data to be sent needs to be prioritized, that is, the target sending priority corresponding to the data sending task is determined according to the data tag, and in this way, the sending priority corresponding to each data task is determined, so that the edge node can preferentially send the data to be sent corresponding to the data task with higher priority, and the data request with higher priority response importance and urgency is realized.
In one embodiment, after determining the target sending priority corresponding to the data sending task according to the data tag, the method further includes: acquiring target data corresponding to the data sending task; the saving the target task to a task queue includes: storing target data corresponding to the data sending task to a sending task queue, wherein the task queue comprises a sending task queue; the executing the target task under the condition that the data task with the processing priority higher than the target priority in the task queue is executed completely comprises the following steps: and under the condition that the execution of the data task with the sending priority greater than the target sending priority in the sending task queue is finished, sending the target data to the target terminal.
Specifically, after the target node executes the data reading task, target data required by the data request of the target terminal is searched locally, the data sending task is used for sending the target data required by the data request to the target terminal, but due to the high bandwidth utilization rate of the target node, the target data corresponding to the data sending task needs to be stored in a sending task queue to be sent, the sending task queue comprises all data to be sent, the data to be sent are arranged in a descending order according to the sending priority, the target node sends the data to be sent in sequence according to the sending priority, the data task with the sending priority greater than the target sending priority in the sending task queue is executed completely, that is, the data to be sent with the sending priority greater than the target sending priority in the sending task queue is sent to the target terminal successfully, therefore, when the bandwidth utilization rate of the edge node reaches the bottleneck, the data corresponding to the data request with higher importance degree and emergency degree is sent preferentially, and therefore the data service quality of the important service is guaranteed not to be deteriorated due to the fact that the resource utilization rate of the edge node is increased.
In one embodiment, the determining the target priority corresponding to the target task according to the data tag includes: determining a first value corresponding to the application tag; determining a second numerical value corresponding to the service label; determining a third numerical value corresponding to the first packet label; and performing weighted summation on the first numerical value, the second numerical value and the third numerical value to obtain a fourth numerical value, wherein the fourth numerical value is used for indicating a target priority corresponding to the target task, and the target task is a data task generated based on first packet data or non-first packet data in a data request of the target terminal.
Specifically, the first value is used to indicate a customer requirement level corresponding to the application label, the edge node locally stores in advance a priority matching rule, specifically including priority values for quality of service requirements of different application labels, priority values for quality of service requirements of different service labels, and priority values for quality of service requirements of different data types, the application label is used to indicate an application customer, for example, application clients such as mango TV, Tencent video, and royal glory, have different requirements for data quality of service, for example, the application label is mango TV, and locally searching a priority value corresponding to the mango TV at the edge node, and determining that the mango TV has a high requirement on the service quality if the first value is 30 and is within a first value interval and the first value interval is 0-30.
The second numerical value is used to indicate a service requirement level corresponding to the service label, the service label is used to indicate a service type of the data request, and the service type specifically includes a long video service, a short video service, a file download service, a game service, and the like, and based on the above example, the application label is a mango TV, the service label is a long video service, the priority value corresponding to the long video service is locally searched at the edge node, the second numerical value is found to be 20, the second numerical value is located in a second numerical value interval, and if the second numerical value interval is 0 to 40, it is determined that the long video service of the mango TV has a general requirement for the service quality.
The third value is used to indicate a service requirement level corresponding to first packet data or non-first packet data in a data request of the target terminal, the data request includes first packet data and non-first packet data, the target task includes a first task and a second task, the edge node generates a corresponding first task according to the first packet data in the data request and generates a corresponding second task according to the non-first packet data in the data request, the first packet tag includes a first packet identifier and a non-first packet identifier, the first packet identifier is used to indicate that the first task is generated based on the first packet data in the data request, the non-first packet identifier is used to indicate that the second task is generated based on the non-first packet data in the data request, the third value is located in a third value interval, the third value interval can be set to any value interval according to an actual situation, in this embodiment, the third value interval is assumed to be 0 to 10, under the condition that the first packet label is the first packet identifier, locally searching a priority numerical value corresponding to the first packet identifier at the edge node, and searching a third numerical value of 10; and under the condition that the first packet label is the non-first packet identifier, the third numerical value is found to be 0, and the processing priority of the first task is greater than that of the second task.
The weight corresponding to each tag may be customized according to the actual situation, for example, the first value is 30, the second value is 20, the third value is 10, and the weight corresponding to each tag is 1, and the first value, the second value, and the third value are summed in a weighted manner, that is, the fourth value is 30+20+10 ═ 60, and this value is used to indicate the target priority corresponding to the first task.
In one embodiment, after the performing the target task, the method further comprises: and under the condition that the target task is taken as the head task in the task queue to be executed, increasing a preset level for the processing priority corresponding to each data task in the task queue.
Specifically, the head-of-queue task refers to a data task located at the head of a task queue, the preset level is used for indicating a level numerical value of any positive integer, when the head-of-queue task is executed, the preset level is added to the processing priorities of all data tasks in the task queue, that is, the same level numerical value is added to the priority numerical value corresponding to each data task, for example, the preset level is 10, when one head-of-queue task is executed in the task queue, the value corresponding to the processing priority of the remaining data tasks in the task queue is added to 10, in this way, the numerical values corresponding to the processing priorities of the remaining data tasks in the task queue are accumulated, that is, the processing priorities of the data tasks are iteratively increased, and the data tasks with lower priority numerical values cannot be processed for a long time is avoided.
In one embodiment, the flow of the data processing method is shown in FIG. 2. It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 3, there is provided a data processing apparatus including:
a task obtaining module 310, configured to obtain a target task of a target terminal, where the target task is used to provide target data stored in a target node for the target terminal, the target task is a data task generated based on a data request of the target terminal, and the data request carries a data tag used for indicating a data service quality requirement;
a priority determining module 320, configured to determine, according to the data tag, a target priority corresponding to the target task when a resource usage rate of the target node is greater than or equal to a preset threshold, where the target priority is a processing priority of the target task;
the task saving module 330 is configured to save the target task to a task queue;
the task execution module 340 is configured to execute the target task when the data task with the processing priority greater than the target priority in the task queue is completely executed.
In one embodiment, in the case that the resource usage rate of the target node is greater than or equal to a preset threshold, the priority determination module 320 is further configured to:
and under the condition that the disk reading rate of the target node is greater than or equal to a reading threshold, determining a target reading priority corresponding to a data reading task according to the data tag, wherein the resource utilization rate comprises the disk reading rate, the preset threshold comprises the reading threshold, the target priority comprises a target reading priority, and the target task comprises the data reading task.
In an embodiment, after determining a target reading priority corresponding to a data reading task according to the data tag, the task saving module 330 is further configured to:
storing the data reading task into a reading task queue, wherein the task queue comprises the reading task queue;
the task execution module 340 is further configured to:
and executing the data reading task under the condition that the data task with the reading priority higher than the target reading priority in the reading task queue is executed.
In one embodiment, the priority determination module 320 is further configured to:
and under the condition that the bandwidth utilization rate of the target node is greater than or equal to a bandwidth threshold, determining a target sending priority corresponding to a data sending task according to the data label, wherein the resource utilization rate comprises the bandwidth utilization rate, the preset threshold comprises the bandwidth threshold, the target priority comprises the target sending priority, and the data task comprises the data sending task.
In an embodiment, after determining a target sending priority corresponding to the data sending task according to the data tag, the apparatus further includes a data obtaining module, configured to:
acquiring target data corresponding to the data sending task;
the task saving module 330 is further configured to: storing target data corresponding to the data sending task to a sending task queue, wherein the task queue comprises a sending task queue;
the task execution module 340 is further configured to: and under the condition that the execution of the data task with the sending priority greater than the target sending priority in the sending task queue is finished, sending the target data to the target terminal.
In one embodiment, the data tag includes an application tag, a service tag, and a first packet tag, and the priority determination module 320 is further configured to:
determining a first numerical value corresponding to the application label, wherein the first numerical value is used for indicating the customer requirement level corresponding to the application label;
determining a second numerical value corresponding to the service label, wherein the second numerical value is used for indicating the service requirement grade corresponding to the service label;
determining a third numerical value corresponding to the first packet label, wherein the third numerical value is used for indicating a service requirement level corresponding to first packet data or non-first packet data in the data request of the target terminal;
and performing weighted summation on the first numerical value, the second numerical value and the third numerical value to obtain a fourth numerical value, wherein the fourth numerical value is used for indicating a target priority corresponding to the target task, and the target task is a data task generated based on first packet data or non-first packet data in a data request of the target terminal.
In one embodiment, after the target task is executed, the priority determination module 320 is further configured to:
and under the condition that the target task is taken as the head task in the task queue to be executed, increasing a preset level for the processing priority corresponding to each data task in the task queue.
As shown in fig. 4, the computer device may specifically be the edge node 120 in fig. 1. As shown in fig. 4, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program which, when executed by the processor, causes the processor to implement the data processing method. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform a data processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the data processing apparatus provided herein may be implemented in the form of a computer program that is executable on a computer device such as that shown in fig. 4. The memory of the computer device may store therein various program modules constituting the data processing apparatus, such as the task acquiring module 310, the priority determining module 320, the task saving module 330, and the task executing module 340 shown in fig. 3. The computer program constituted by the respective program modules causes the processor to execute the steps in the data processing method of the respective embodiments of the present application described in the present specification.
The computer device shown in fig. 4 may execute, by using a task obtaining module 310 in the data processing apparatus shown in fig. 3, a target task for obtaining a target terminal, where the target task is used to provide target data stored in a target node for the target terminal, the target task is a data task generated based on a data request of the target terminal, and the data request carries a data tag used for indicating a data quality of service requirement. The computer device may determine, by the priority determination module 320, a target priority corresponding to the target task according to the data tag when the resource utilization of the target node is greater than or equal to a preset threshold, where the target priority is a processing priority of the target task. The computer device may perform the saving of the target task to the task queue via the task saving module 330. The computer device may execute the target task through the task execution module 340 in case that the execution of the data task having the processing priority greater than the target priority in the task queue is completed.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the above embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the method of any of the above embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by instructing the relevant hardware through a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (10)
1. A data processing method applied to an edge node, the method comprising:
acquiring a target task of a target terminal, wherein the target task is used for providing target data stored in a target node for the target terminal, the target task is a data task generated based on a data request of the target terminal, and the data request carries a data tag used for indicating a data service quality requirement;
determining a target priority corresponding to the target task according to the data label under the condition that the resource utilization rate of the target node is greater than or equal to a preset threshold, wherein the target priority is the processing priority of the target task;
storing the target task to a task queue;
and executing the target task under the condition that the execution of the data task with the processing priority higher than the target priority in the task queue is completed.
2. The method according to claim 1, wherein the determining a target priority corresponding to the target task according to the data tag when the resource usage rate of the target node is greater than or equal to a preset threshold includes:
and under the condition that the disk reading rate of the target node is greater than or equal to a reading threshold, determining a target reading priority corresponding to a data reading task according to the data tag, wherein the resource utilization rate comprises the disk reading rate, the preset threshold comprises the reading threshold, the target priority comprises a target reading priority, and the target task comprises the data reading task.
3. The method of claim 2, wherein after determining a target read priority corresponding to a data read task according to the data tag, the saving the target task to a task queue comprises:
storing the data reading task into a reading task queue, wherein the task queue comprises the reading task queue;
the executing the target task under the condition that the data task with the processing priority higher than the target priority in the task queue is executed completely comprises the following steps:
and executing the data reading task under the condition that the data task with the reading priority higher than the target reading priority in the reading task queue is executed.
4. The method according to claim 1, wherein determining the target priority corresponding to the data task according to the data tag when the resource utilization of the target node is greater than or equal to a preset threshold includes:
and under the condition that the bandwidth utilization rate of the target node is greater than or equal to a bandwidth threshold, determining a target sending priority corresponding to a data sending task according to the data label, wherein the resource utilization rate comprises the bandwidth utilization rate, the preset threshold comprises the bandwidth threshold, the target priority comprises the target sending priority, and the data task comprises the data sending task.
5. The method of claim 4, wherein after determining the target sending priority corresponding to the data sending task according to the data tag, the method further comprises:
acquiring target data corresponding to the data sending task;
the saving the target task to a task queue includes: storing target data corresponding to the data sending task to a sending task queue, wherein the task queue comprises a sending task queue;
the executing the target task under the condition that the data task with the processing priority higher than the target priority in the task queue is executed completely comprises the following steps: and under the condition that the execution of the data task with the sending priority greater than the target sending priority in the sending task queue is finished, sending the target data to the target terminal.
6. The method of claim 1, wherein the data tag comprises an application tag, a service tag, and a first packet tag, and wherein determining the target priority corresponding to the target task according to the data tag comprises:
determining a first numerical value corresponding to the application label, wherein the first numerical value is used for indicating the customer requirement level corresponding to the application label;
determining a second numerical value corresponding to the service label, wherein the second numerical value is used for indicating the service requirement grade corresponding to the service label;
determining a third numerical value corresponding to the first packet label, wherein the third numerical value is used for indicating a service requirement level corresponding to first packet data or non-first packet data in the data request of the target terminal;
and performing weighted summation on the first numerical value, the second numerical value and the third numerical value to obtain a fourth numerical value, wherein the fourth numerical value is used for indicating a target priority corresponding to the target task, and the target task is a data task generated based on first packet data or non-first packet data in a data request of the target terminal.
7. The method of claim 1, wherein after the target task is performed, the method further comprises:
and under the condition that the target task is taken as the head task in the task queue to be executed, increasing a preset level for the processing priority corresponding to each data task in the task queue.
8. A data processing apparatus, characterized in that the apparatus comprises:
the task obtaining module is used for obtaining a target task of a target terminal, wherein the target task is used for providing target data stored in a target node for the target terminal, the target task is a data task generated based on a data request of the target terminal, and the data request carries a data tag used for indicating a data service quality requirement;
a priority determining module, configured to determine a target priority corresponding to the target task according to the data tag when a resource usage rate of the target node is greater than or equal to a preset threshold, where the target priority is a processing priority of the target task;
the task storage module is used for storing the target task to a task queue;
and the task execution module is used for executing the target task under the condition that the execution of the data task with the processing priority higher than the target priority in the task queue is completed.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111433575.9A CN114153581A (en) | 2021-11-29 | 2021-11-29 | Data processing method, data processing device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111433575.9A CN114153581A (en) | 2021-11-29 | 2021-11-29 | Data processing method, data processing device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114153581A true CN114153581A (en) | 2022-03-08 |
Family
ID=80454400
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111433575.9A Pending CN114153581A (en) | 2021-11-29 | 2021-11-29 | Data processing method, data processing device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114153581A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116225639A (en) * | 2022-12-13 | 2023-06-06 | 深圳市迈科龙电子有限公司 | Task allocation method and device, electronic equipment and readable storage medium |
WO2023226716A1 (en) * | 2022-05-24 | 2023-11-30 | 华为技术有限公司 | Packet transmission method, forwarding node, transmission end and storage medium |
CN117651075A (en) * | 2024-01-25 | 2024-03-05 | 腾讯科技(深圳)有限公司 | Task message transmission method, device, computer equipment and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108769254A (en) * | 2018-06-25 | 2018-11-06 | 星环信息科技(上海)有限公司 | Resource-sharing application method, system and equipment based on preemption scheduling |
CN109684069A (en) * | 2017-10-13 | 2019-04-26 | 华为技术有限公司 | The method and terminal device of resource management |
CN112256417A (en) * | 2020-10-23 | 2021-01-22 | 上海豹云网络信息服务有限公司 | Data request processing method and device and computer readable storage medium |
-
2021
- 2021-11-29 CN CN202111433575.9A patent/CN114153581A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109684069A (en) * | 2017-10-13 | 2019-04-26 | 华为技术有限公司 | The method and terminal device of resource management |
CN108769254A (en) * | 2018-06-25 | 2018-11-06 | 星环信息科技(上海)有限公司 | Resource-sharing application method, system and equipment based on preemption scheduling |
CN112256417A (en) * | 2020-10-23 | 2021-01-22 | 上海豹云网络信息服务有限公司 | Data request processing method and device and computer readable storage medium |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023226716A1 (en) * | 2022-05-24 | 2023-11-30 | 华为技术有限公司 | Packet transmission method, forwarding node, transmission end and storage medium |
CN116225639A (en) * | 2022-12-13 | 2023-06-06 | 深圳市迈科龙电子有限公司 | Task allocation method and device, electronic equipment and readable storage medium |
CN116225639B (en) * | 2022-12-13 | 2023-10-27 | 深圳市迈科龙电子有限公司 | Task allocation method and device, electronic equipment and readable storage medium |
CN117651075A (en) * | 2024-01-25 | 2024-03-05 | 腾讯科技(深圳)有限公司 | Task message transmission method, device, computer equipment and computer readable storage medium |
CN117651075B (en) * | 2024-01-25 | 2024-04-19 | 腾讯科技(深圳)有限公司 | Task message transmission method, device, computer equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109688222B (en) | Shared computing resource scheduling method, shared computing system, server and storage medium | |
CN114153581A (en) | Data processing method, data processing device, computer equipment and storage medium | |
US20180027061A1 (en) | Method and apparatus for elastically scaling virtual machine cluster | |
CN112256417B (en) | Data request processing method and device and computer readable storage medium | |
CN107451853B (en) | Method, device and system for real-time red packet distribution and storage medium | |
CN110830565B (en) | Resource downloading method, device, system, electronic equipment and storage medium | |
CN107948004B (en) | Video CDN (content delivery network) calling optimization method and device | |
CN110830564A (en) | CDN scheduling method, device, system and computer readable storage medium | |
CN111897550B (en) | Mirror image preloading method, device and storage medium | |
WO2023116219A1 (en) | Cdn node distribution method and apparatus, electronic device, medium and program product | |
CN108282668B (en) | Video acquisition method and system | |
CN113886069A (en) | Resource allocation method and device, electronic equipment and storage medium | |
CN111193792A (en) | Message transmission method and device, electronic equipment and storage medium | |
WO2023091215A1 (en) | Mapping an application signature to designated cloud resources | |
CN113630457A (en) | Task scheduling method and device, computer equipment and storage medium | |
CN110392119B (en) | Data transmission method and base station | |
CN113055199A (en) | Gateway access method and device and gateway equipment | |
CN114003337A (en) | Access request distribution method and device | |
CN107045452B (en) | Virtual machine scheduling method and device | |
CN113612841B (en) | Task scheduling method, device, computer equipment and storage medium | |
WO2023088362A1 (en) | Network traffic processing method and apparatus, and medium and electronic device | |
CN108616576B (en) | Method and device for scheduling application server | |
CN114885024B (en) | Routing method, device, equipment and medium of application instance | |
CN117692401A (en) | Message sending method, device, server and storage medium | |
CN113612701B (en) | Data processing method, device, computer equipment and storage medium |
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 |