Task push method, device, computer equipment and storage medium

Task information is stored uniformly through the message middleware, and content nodes actively pull tasks, which solves the problems of low task distribution efficiency and large resource occupation in the CDN network, and achieves resource saving and efficiency improvement.

CN113626188BActive Publication Date: 2024-09-20BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110882713.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-02
Publication Date
2024-09-20
Estimated Expiration
2041-08-02

AI Technical Summary

Technical Problem

The problem of low task distribution efficiency in CDN network and occupying a lot of server resources.

Method used

The message middleware is used to uniformly store the task information issued by the server, and the content node actively pulls the tasks to be executed from the middleware to avoid the server from issuing tasks one by one.

Benefits of technology

It saves server resources and improves task distribution efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113626188B
    Figure CN113626188B
Patent Text Reader

Abstract

The present application relates to a task push method, device, computer equipment and storage medium. It relates to the field of cloud computing technology. The method comprises: the message middleware saves the task information sent by the server, wherein the task information carries the first task and the first attribute information of the first task, and receives the task reading request of the target content node, and when it is determined that the second attribute information of the target content node matches the first attribute information of the first task, the first task is returned to the target content node as a response to the task reading request. Each content node actively pulls the tasks to be executed assigned by the server to it from the message middleware, and there is no need for the server to send each task to be executed to the corresponding content node one by one, which saves the data resources of the server and also improves the efficiency of task distribution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a task pushing method, device, computer equipment and storage medium. Background Art

[0002] CDN (Content Delivery Network) is an intelligent virtual network built on the existing network. It relies on edge servers deployed in various places and uses the load balancing, content distribution, scheduling and other functional modules of the central platform to enable users to obtain the required content nearby, reduce network congestion, and improve user access response speed and hit rate. The key technologies of CDN mainly include content storage and distribution technology.

[0003] In the CDN network, the main server is connected to the content node. When the content node needs to process a task, the content node will wait for the server to send the tasks to be executed to the corresponding content node one by one, so that the content node can execute the assigned tasks. However, this task distribution method has low task distribution efficiency and will occupy more server resources to implement task distribution. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a task pushing method, apparatus, computer device and storage medium.

[0005] In a first aspect, the present application provides a task pushing method, comprising:

[0006] Saving task information sent by the server, wherein the task information carries the first task and first attribute information of the first task;

[0007] Receive a task read request from a target content node;

[0008] In a case where the second attribute information of the target content node matches the first attribute information of the first task, the first task is returned to the target content node as a response to the task read request.

[0009] In a second aspect, the present application provides a task push method, which is applied to a content node, and the method includes:

[0010] When the trigger condition is met, a task read request is sent to the message middleware, wherein the task read request is used to request the message middleware to send the to-be-executed task matched by the content node;

[0011] Receiving response information from the message middleware;

[0012] In a case where the response information carries a first task, the first task is executed, wherein the first attribute information of the first task matches the second attribute information of the content node.

[0013] In a third aspect, the present application provides a task push method, applied to a server, the method comprising:

[0014] Acquire reporting data of a plurality of content nodes, wherein the reporting data is used to indicate the operation status of the content nodes;

[0015] Generate multiple task information according to the reported data of each content node and the file update record in the database, wherein each task information carries corresponding attribute information;

[0016] The plurality of task information is sent to the message middleware.

[0017] In a fourth aspect, the present application provides a task pushing device, comprising:

[0018] A task receiving module, used for storing task information sent by the server, wherein the task information carries a first task and first attribute information of the first task;

[0019] A request receiving module, used for receiving a task reading request of a target content node;

[0020] The task forwarding module is used to return the first task to the target content node as a response to the task read request when the second attribute information of the target content node matches the first attribute information of the first task.

[0021] In a fifth aspect, the present application provides a task pushing device, comprising:

[0022] A request sending module, used for sending a task reading request to the message middleware when a trigger condition is met, wherein the task reading request is used to request the message middleware to send a to-be-executed task matched by the content node;

[0023] A response receiving module, used for receiving response information from the message middleware;

[0024] The task execution module is used to execute the first task when the response information carries the first task, wherein the first attribute information of the first task matches the second attribute information of the content node.

[0025] In a sixth aspect, the present application provides a task pushing device, including:

[0026] A data acquisition module, used to acquire reported data of a plurality of content nodes, wherein the reported data is used to indicate the running status of the content nodes;

[0027] A task generation module, used to generate a plurality of task information according to the reported data of each content node and the file update record in the database, wherein each of the task information carries corresponding attribute information;

[0028] The task sending module is used to send the plurality of task information to the message middleware.

[0029] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0030] Saving task information sent by the server, wherein the task information carries the first task and first attribute information of the first task;

[0031] Receive a task read request from a target content node;

[0032] In a case where the second attribute information of the target content node matches the first attribute information of the first task, the first task is returned to the target content node as a response to the task read request.

[0033] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0034] Saving task information sent by the server, wherein the task information carries the first task and first attribute information of the first task;

[0035] Receive a task read request from a target content node;

[0036] In a case where the second attribute information of the target content node matches the first attribute information of the first task, the first task is returned to the target content node as a response to the task read request.

[0037] The above-mentioned task push method, device, computer equipment and storage medium, the method includes: saving the task information sent by the server, wherein the task information carries the first task and the first attribute information of the first task; receiving the task reading request of the target content node; when the second attribute information of the target content node matches the first attribute information of the first task, returning the first task as the response of the task reading request to the target content node. The task information sent by the server is uniformly saved by the message middleware, and each content node actively pulls the tasks to be executed assigned by the server to it from the message middleware, without the server sending each task to be executed to the corresponding content node one by one, which saves the data resources of the server and improves the efficiency of task distribution. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] 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.

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0040] Figure 1 An application environment diagram of a task pushing method in an embodiment;

[0041] Figure 2 A schematic diagram of a process of applying a task push method to a message middleware in an embodiment;

[0042] Figure 3 A schematic diagram of a process of applying a task push method to a content node in an embodiment;

[0043] Figure 4 A schematic diagram of a process of applying a task push method to a server in an embodiment;

[0044] Figure 5 is a structural block diagram of a task pushing device in one embodiment;

[0045] Figure 6 is a structural block diagram of a task pushing device in one embodiment;

[0046] Figure 7 is a structural block diagram of a task pushing device in one embodiment;

[0047] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0049] Figure 1 FIG. 1 is an application environment diagram of a task push method in an embodiment. Figure 1 , the task push method is applied to the task push system. The task push system includes a content node 110, a message middleware 120 and a server 130. The content node 110, the message middleware 120 and the server 130 are connected to the network. The content node 110 can be a home node or a CDN node. The home node is a router or a set-top box that uses idle bandwidth to provide download services for ordinary user families. The CDN node is a node in the content delivery network (Content Delivery Network, CDN network). The server 130 can be implemented by an independent server or a server cluster composed of multiple servers.

[0050] In one embodiment, Figure 2 A flowchart of a task push method in an embodiment is shown in FIG. Figure 2 , provides a task push method. This embodiment mainly applies this method to the above Figure 1 Taking the message middleware 120 in the example as an example, the task push method specifically includes the following steps:

[0051] Step S210: Save the task information sent by the server, wherein the task information carries the first task and first attribute information of the first task.

[0052] In this embodiment, the message middleware saves the task information sent by the server, and the task information carries the first task and the first attribute information of the first task. The first task is the task to be executed assigned by the server to the content node. The task to be executed can specifically be a file refresh task, a file preheating task, a load task or a task that can be executed by other content nodes. The attribute information is used to identify the field information related to the execution object of the task to be executed. The attribute information includes but is not limited to the fields such as the IP address of the execution object, the node area, the node service capability and the storage status. The content node is used to provide the requested file to the terminal that requests the file on the content distribution network.

[0053] Step S220: receiving a task read request from a target content node.

[0054] In this embodiment, the task read request is used for the target content node to obtain the task information related to the target content node from the message middleware. The task read request can be generated when the target content node meets the preset trigger condition. The specific trigger condition includes but is not limited to generating the task read request at the target content node by means of timed polling; it can also be automatically generated when the target content node is started; or the task read request is generated at the target content node according to the data request of the client. The specific trigger condition is not specifically limited in this embodiment.

[0055] Step S230: When the second attribute information of the target content node matches the first attribute information of the first task, the first task is returned to the target content node as a response to the task read request.

[0056] In this embodiment, the message middleware obtains and saves the task information sent by the server, and after receiving the task read request of the target content node, it compares the first attribute information of the first task with the second attribute information in the task read request of the target content node to determine whether the two information match. If they match, it means that the target content node is the execution object of the first task, and the first task is returned to the target content node as a response to the task read request. The second attribute information is used to indicate the running status of the target content node.

[0057] Specifically, after determining that the first attribute information of the first task is consistent with the second attribute information in the task read request of the target content node, the message middleware encapsulates the first task into a response message and sends it to the target content node. After receiving the encapsulated response information, the target content node can parse the corresponding task to be executed and execute the corresponding task to be executed. For example, if the task to be executed is a file refresh task, the corresponding target file is downloaded according to the first task to the indicated target address, and the downloaded target file is used to update the old version of the file cached in the target content node, that is, to delete the old version of the file, thereby updating the file resources originally cached in the target content node. The target file can specifically be any form of streaming media resources such as URL resources, video resources, document resources, and picture resources.

[0058] In one embodiment, the method further includes determining whether the second attribute information matches the first attribute information in the following manner: the message middleware obtains the field value of the target field in the first attribute information and the field value of the target field in the second attribute information, and determines that the second attribute information matches the first attribute information when the field value of the target field in the first attribute information and the field value of the target field in the second attribute information are the same, or the field value of the target field in the first attribute information includes the field value of the target field in the second attribute information; if the field value of the target field in the first attribute information and the field value of the target field in the second attribute information are different, it is determined that the second attribute information does not match the first attribute information. The second attribute information includes multiple fields, each field is used to identify an attribute dimension, and the multiple fields include the target field mentioned in this embodiment.

[0059] Specifically, take the target field as the node area as an example: if the target field in the second attribute information is the node area, the specific field value is area A, and the target field in the first attribute information is also the node area, and the specific field value is area A, then it is determined that the second attribute information matches the first attribute information; if the target field in the second attribute information is the node area, the specific field value is area A, and the target field in the first attribute information is also the node area, and the specific field value is area B, but area B is set to include area A, that is, the field value area B of the node area in the first attribute information includes the field value area A of the node area in the second attribute information, then it is determined that the second attribute information matches the first attribute information.

[0060] If the target field in the second attribute information is the node area, and the specific field value is area A, while the target field in the first attribute information is also the node area, and the specific field value is area C, then it is determined that the second attribute information does not match the first attribute information; if the target field in the second attribute information is the node area, and the specific field value is area A, while the target field in the first attribute information is also the node area, and the specific field value is area D, but the field value area D does not include area A in setting, that is, the field value area D of the node area in the first attribute information does not include the field value area A of the node area in the second attribute information, then it is determined that the second attribute information does not match the first attribute information.

[0061] In one embodiment, obtaining the field value of the target field in the first attribute information and the field value of the target field in the second attribute information specifically includes: obtaining the matching condition of the first task, and obtaining the field value of the target field in the first attribute information and the field value of the target field in the second attribute information according to the matching condition.

[0062] Specifically, the matching condition is used to indicate the target field among the multiple fields in the second attribute information, that is, the first attribute information and the second attribute information are compared according to the target field, and the target field includes but is not limited to the requested IP address, node area, node service capability, and storage status, etc. For example: if the target field indicated by the matching condition of the first task is the IP address, then the comparison determines whether the IP address in the first attribute information is consistent with the IP address in the second attribute information; or, if the target field indicated by the matching condition of the first task is the node area, then the node area in the first attribute information is matched with the node area in the second attribute information to determine whether there is an association relationship, and so on. In actual applications, different tasks are preset with different matching conditions, and the matching conditions can determine the target field for matching the first attribute information with the second attribute information.

[0063] In one embodiment, after receiving a task read request from a target node in a content distribution network, the message middleware will also execute the following method: when the second attribute information of the target content node does not match the first attribute information of the first task, the message middleware will search for a second task from other tasks whose corresponding attribute information matches the second attribute information in the task read request of the target content node; when the corresponding second task is found, the second task is returned to the target content node as a response to the task read request; if the corresponding second task is not found, information indicating that the task read failed is returned to the target content node.

[0064] Among them, the message middleware stores multiple different tasks. In this embodiment, different tasks use other tasks as a distinction from the first task. Each different task has corresponding attribute information. For example, the first task corresponds to the first attribute information, and the second task corresponds to the second attribute information. The message middleware can receive multiple different tasks issued by the server at the same time as receiving the first task and save them for subsequent matching; it can also autonomously request multiple different tasks from the server for matching when it is determined that the first attribute information of the first task does not match the second attribute information.

[0065] Specifically, when the message middleware determines that the second attribute information of the target content node does not match the first attribute information of the first task, it will search for a task whose attribute information matches the second attribute information from other tasks as the second task; if it cannot find a task whose attribute information matches the second attribute information from other tasks, the information indicating that the task reading failed is encapsulated into a response message and returned to the target content node to inform the target content node that there is no matching task to be executed on the current server.

[0066] In a specific embodiment, the target content node includes a CDN node, that is, when the message middleware receives a task read request from the CDN node, it returns the first task corresponding to the CDN node as a response to the task read request to the CDN node. CDN nodes are also called edge nodes, Cache nodes, etc. CDN nodes can be used as cache servers to provide data services to clients. Correspondingly, when the message middleware determines that the first attribute information does not match the second attribute information, it encapsulates the second task whose attribute information matches the second attribute information into response information and returns it to the CDN node; when the message middleware cannot find a task that matches the second attribute information, it encapsulates information indicating that the task read failed into response information and returns it to the CDN node, so as to inform the CDN node that there is no corresponding task to be executed in the current message middleware.

[0067] In one embodiment, the target content node includes a home node, that is, when the message middleware receives a task read request from the home node, it returns the first task corresponding to the home node as a response to the task read request to the home node in the content distribution network. Correspondingly, when the message middleware determines that the first attribute information does not match the second attribute information, it encapsulates the second task whose attribute information matches the second attribute information into response information and returns it to the home node; when the message middleware cannot find a task that matches the second attribute information, it encapsulates information indicating that the task read failed into response information and returns it to the home node, so as to inform the home node that there is no corresponding task to be executed in the current message middleware.

[0068] In one embodiment, the task information is preset with corresponding time limit information, which is used to identify the expiration time limit corresponding to the task information. When the storage time of the task information reaches the expiration time limit, the message middleware will delete the saved task information, thereby solving the problem of cache redundancy caused by caching the task information for too long.

[0069] In one embodiment, Figure 3 A flowchart of a task push method in an embodiment is shown in FIG. Figure 3 , provides a task push method. This embodiment mainly applies this method to the above Figure 1 Taking the content node 110 in the content distribution network as an example, the task push method specifically includes the following steps:

[0070] Step S310: When the triggering condition is met, a task read request is sent to the message middleware.

[0071] In this embodiment, the task read request is used for the target content node to obtain the to-be-executed tasks related to itself from the message middleware. The to-be-executed tasks are used to indicate the tasks assigned by the server to the target content node, for example, the server indicates the target file that the target content node needs to download or update.

[0072] Satisfying the trigger conditions includes, but is not limited to, generating a task read request at the target content node by means of timed polling, that is, the target content node periodically sends a task read request to the message middleware according to the trigger period; it may also be that the task read request is automatically generated when the target content node is started; or that the task read request is generated at the target content node according to the data request of the client.

[0073] Step S320, receiving response information from the message middleware.

[0074] In one embodiment, the response information includes the tasks to be executed related to the target content node or the information indicating the failure of task reading returned by the message middleware. The target content node can obtain the response returned by the message middleware, and the response is specifically returned through the following process: the message middleware obtains and saves the task information issued by the server, and after receiving the task reading request of the target content node, it will match the first attribute information of the first task with the second attribute information in the task reading request of the target content node to determine whether the two information match. If they match, the first task is returned to the target content node as a response to the task reading request. The second attribute information is used to indicate the running status of the target content node.

[0075] Step S330: when the response information carries the first task, download the corresponding target file according to the target address of the first task, wherein the first attribute information of the first task matches the second attribute information of the content node.

[0076] In one embodiment, after the message middleware determines that the first attribute information of the first task matches the second attribute information in the task read request of the target content node, the message middleware encapsulates the first task into a response message and sends it to the target content node. After receiving the response message, the target content node can parse the corresponding first task and execute the first task. For example, if the first task is a file refresh task, the corresponding target file is downloaded according to the target address in the first task, and the old version of the file corresponding to the target file in the target content node is deleted, thereby updating the file resources originally cached in the target content node; if the first task is not obtained, it means that there is no pending task in the message middleware that needs to be executed by the target content node.

[0077] In one embodiment, Figure 4 A flowchart of a task push method in an embodiment is shown in FIG. Figure 4 , provides a task push method. This embodiment mainly applies this method to the above Figure 1 Taking the server in as an example, the task push method specifically includes the following steps:

[0078] S410: Acquire reporting data of multiple content nodes.

[0079] In this embodiment, the server is connected to multiple content nodes in communication, and the server can obtain the reported data uploaded by the multiple content nodes in real time. Through the reported data, the server can obtain the operating status and attribute information of the corresponding content nodes, such as resource occupancy, load balancing status and other status data.

[0080] S420: Generate multiple task information according to the reported data of each content node and the file update record in the database.

[0081] In this embodiment, the file update record refers to the specific update record of the file content. The file content can be specifically the content stored in the server and / or the content stored in the source station server. If the file content is stored in the source station server, the server needs to obtain the update record corresponding to the update change of the file content in the source station server; if the file content is the content stored in the server, it is necessary to generate the corresponding update record according to the update change of the file content stored in itself. Finally, the update record obtained from the source station server and the update record stored in the server itself are summarized to obtain the file update record. The file update record specifically includes operation records such as downloading files, deleting files or modifying files, as well as areas with high file access frequency and field information related to the area. For example, if a file is updated at a certain moment, a corresponding file update record will be generated for subsequent call queries.

[0082] S430, sending multiple task information to the message middleware.

[0083] In this embodiment, the server sends multiple task information to the message middleware for storage, so that each content node can autonomously pull the task information related to itself from the message middleware later. In this embodiment, each content node actively pulls the tasks to be executed assigned by the server to it from the message middleware by means of task read request, and the server does not need to send each task to be executed to the corresponding content node at once, which saves the data resources of the server and improves the efficiency of task distribution.

[0084] In one embodiment, the server also obtains the access frequency of the file content in each area, and generates multiple task information according to the file update record, the access frequency of each file content and the running status of the content node. For example, the access frequency of the target file in the specified area is high, and it is found according to the file update record that the target file is updated, then a file refresh task for updating the target file in the content node in the specified area will be generated. The file refresh task can correspond to one or more content nodes. The server encapsulates the file refresh task and the attribute information of the content node that needs to execute the task as the task information and sends it to the message middleware, so that the content node can autonomously pull the task information associated with itself from the message middleware. When the content node in the specified area pulls the file refresh task, it executes the file refresh task, that is, downloads the new target file according to the target address in the file refresh task to update the old version of the target file in the content node.

[0085] Figure 2-Figure 4 FIG. 1 is a flow chart of a task push method in one embodiment. It should be understood that although Figure 2-Figure 4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-Figure 4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0086] In one embodiment, Figure 5 As shown, a task pushing device is provided, comprising:

[0087] The task receiving module 510 is used to save the task information sent by the server, wherein the task information carries the first task and the first attribute information of the first task;

[0088] A request receiving module 520, configured to receive a task reading request from a target content node;

[0089] The task forwarding module 530 is configured to return the first task to the target content node as a response to the task read request when the second attribute information of the target content node matches the first attribute information of the first task.

[0090] In one embodiment, the task forwarding module 530 is further used to:

[0091] Acquire a field value of a target field in the first attribute information and a field value of a target field in the second attribute information, wherein each of a plurality of fields in the second attribute information is used to represent an attribute dimension, and the plurality of fields include the target field;

[0092] In a case where a field value of a target field in the first attribute information is the same as a field value of a target field in the second attribute information, or a field value of a target field in the first attribute information includes a field value of a target field in the second attribute information, determining that the second attribute information matches the first attribute information;

[0093] When the field value of the target field in the first attribute information and the field value of the target field in the second attribute information are different, it is determined that the second attribute information does not match the first attribute information.

[0094] In one embodiment, the task forwarding module 530 is further used to:

[0095] Acquire a matching condition of the first task, wherein the matching condition is used to indicate the target field among the multiple fields;

[0096] The field value of the target field in the first attribute information and the field value of the target field in the second attribute information are acquired according to the matching condition.

[0097] In one embodiment, the task forwarding module 530 is further used to:

[0098] In the case where it is determined that the second attribute information of the target content node does not match the first attribute information of the first task, searching for a second task whose attribute information matches the second attribute information of the target content node from other tasks, wherein the other tasks are different from the first task;

[0099] In the case where the second task is found, returning the second task to the target content node as a response to the task read request;

[0100] In the case where the second task is not found, information indicating that the task reading fails is returned to the target content node.

[0101] In one embodiment, the task forwarding module 530 is further used to:

[0102] Returning the first task as a response to the task read request to a CDN node in the content distribution network, wherein the target content node includes the CDN node;

[0103] The first task is returned to the home node in the content distribution network as a response to the task read request, wherein the target content node includes the home node.

[0104] In one embodiment, the device further includes a deletion module, wherein the deletion module is configured to:

[0105] When the duration of acquiring the task information reaches an expiration time limit, the task information is deleted.

[0106] In one embodiment, referring to Figure 6 This embodiment provides a task pushing device, the device comprising:

[0107] The request sending module 610 is used to send a task reading request to the message middleware when a trigger condition is met, wherein the task reading request is used to request the message middleware to send a to-be-executed task matched by the content node;

[0108] A response receiving module 620, configured to receive response information from the message middleware;

[0109] The task execution module 630 is configured to execute the first task when the response information carries the first task, wherein the first attribute information of the first task matches the second attribute information of the content node.

[0110] In one embodiment, the trigger condition includes a trigger period, and the request sending module 610 is further used to:

[0111] The task reading request is periodically sent to the message middleware according to the triggering cycle.

[0112] In one embodiment, referring to Figure 7 This embodiment provides a task pushing device, the device comprising:

[0113] The data acquisition module 710 is used to acquire the reported data of multiple content nodes, wherein the reported data is used to indicate the operation status of the content nodes;

[0114] The task generation module 720 is used to generate a plurality of task information according to the reported data of each content node and the file update record in the database, wherein each of the task information carries corresponding attribute information;

[0115] The task sending module 730 is used to send the plurality of task information to the message middleware.

[0116] Figure 8 The internal structure diagram of a computer device in one embodiment is shown. The computer device may specifically be Figure 1The content node 110 (or server) in Figure 8 As shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected through a system bus. Among them, 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, enables the processor to implement a task push method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to execute a task push method. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0117] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0118] In one embodiment, the task push device provided by the present application can be implemented in the form of a computer program. The computer program can be Figure 8 The memory of the computer device may store various program modules constituting the task pushing device, for example, Figure 5 The task receiving module 510, request receiving module 520 and task forwarding module 530 are shown. The computer program composed of various program modules enables the processor to execute the steps of the task pushing method of each embodiment of the present application described in this specification.

[0119] Figure 8 The computer device shown can be Figure 5 The task receiving module 510 in the task pushing device shown executes to save the task information sent by the server, wherein the task information carries the first task and the first attribute information of the first task. The computer device can execute to receive the task reading request of the target content node through the request receiving module 520. The computer device can execute to return the first task as a response to the task reading request to the target content node through the task forwarding module 530 when the second attribute information of the target content node matches the first attribute information of the first task.

[0120] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the method described in any one of the above embodiments is implemented when the processor executes the computer program.

[0121] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any one of the above embodiments is implemented.

[0122] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0123] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0124] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A task push method, It is characterized in that Applied to message middleware, the method includes: Saving task information sent by the server, wherein the task information carries the first task and first attribute information of the first task; Receive a task read request from a target content node; In a case where the second attribute information of the target content node matches the first attribute information of the first task, returning the first task to the target content node as a response to the task read request; Among them, when matching the second attribute information with the first attribute information of the first task, the field value of the target field in the first attribute information and the field value of the target field in the second attribute information are obtained, and the matching condition of the first task is obtained. The matching condition is used to indicate the target field among multiple fields, and matching is performed according to the target field.

2. The method according to claim 1, It is characterized in that The method further includes determining whether the second attribute information matches the first attribute information in the following manner: Acquire a field value of a target field in the first attribute information and a field value of a target field in the second attribute information, wherein each of a plurality of fields in the second attribute information is used to represent an attribute dimension, and the plurality of fields include the target field; In a case where a field value of a target field in the first attribute information is the same as a field value of a target field in the second attribute information, or a field value of a target field in the first attribute information includes a field value of a target field in the second attribute information, determining that the second attribute information matches the first attribute information; When the field value of the target field in the first attribute information and the field value of the target field in the second attribute information are different, it is determined that the second attribute information does not match the first attribute information.

3. The method according to claim 2, It is characterized in that Acquiring the field value of the target field in the first attribute information and the field value of the target field in the second attribute information includes: Obtaining a matching condition for the first task; The field value of the target field in the first attribute information and the field value of the target field in the second attribute information are acquired according to the matching condition.

4. The method according to claim 1, It is characterized in that After receiving the task reading request of the target content node, the method further includes: In the case where it is determined that the second attribute information of the target content node does not match the first attribute information of the first task, searching for a second task whose attribute information matches the second attribute information of the target content node from other tasks, wherein the other tasks are different from the first task; In the case where the second task is found, returning the second task to the target content node as a response to the task read request; In the case where the second task is not found, information indicating that the task reading fails is returned to the target content node.

5. The method according to claim 1, It is characterized in that Returning the first task as a response to the task read request to the target content node includes: Returning the first task as a response to the task read request to a CDN node in a content distribution network, wherein the target content node includes the CDN node; The first task is returned to the home node in the content distribution network as a response to the task read request, wherein the target content node includes the home node.

6. The method according to claim 1, It is characterized in that After receiving the task information sent by the server, the method further includes: When the duration of acquiring the task information reaches an expiration time limit, the task information is deleted.

7. A task push method, It is characterized in that Applied to a content node, the method comprises: When the trigger condition is met, a task read request is sent to the message middleware, wherein the task read request is used to request the message middleware to send the to-be-executed task matched by the content node; Receiving response information from the message middleware; In the case that the response information carries the first task, the first task is executed, wherein the first attribute information of the first task is matched with the second attribute information of the content node, and when matching the second attribute information with the first attribute information of the first task, the field value of the target field in the first attribute information and the field value of the target field in the second attribute information are obtained, and the matching condition of the first task is obtained, and the matching condition is used to indicate the target field among multiple fields, and matching is performed according to the target field.

8. The method according to claim 7, It is characterized in that The trigger condition includes a trigger period, wherein, when the trigger condition is met, sending a task read request to the message middleware includes: The task reading request is periodically sent to the message middleware according to the triggering cycle.

9. A task push method, It is characterized in that Applied to a server, the method comprises: Acquire reporting data of a plurality of content nodes, wherein the reporting data is used to indicate the operation status of the content nodes; Generate multiple task information according to the reported data of each content node and the file update record in the database, wherein each task information carries corresponding attribute information, and the task information carries a first task and first attribute information of the first task; Sending the plurality of task information to the message middleware, wherein the message middleware is used to uniformly store the task information issued by the server, so that each content node can actively pull the tasks to be executed assigned by the server to it from the message middleware; The message middleware is also used to receive a task read request from a target content node, and when the second attribute information of the target content node matches the first attribute information of the first task, return the first task to the target content node as a response to the task read request; when matching the second attribute information with the first attribute information of the first task, obtain the field value of the target field in the first attribute information and the field value of the target field in the second attribute information, and obtain the matching condition of the first task, the matching condition is used to indicate the target field among multiple fields, and match according to the target field.

10. A task pushing device, It is characterized in that The device comprises: A task receiving module, used for storing task information sent by the server, wherein the task information carries a first task and first attribute information of the first task; A request receiving module, used for receiving a task reading request of a target content node; A task forwarding module is used to return the first task as a response to the task read request to the target content node when the second attribute information of the target content node matches the first attribute information of the first task, and when matching the second attribute information with the first attribute information of the first task, obtain the field value of the target field in the first attribute information and the field value of the target field in the second attribute information, and obtain the matching condition of the first task, wherein the matching condition is used to indicate the target field among multiple fields, and match according to the target field.

11. A task pushing device, It is characterized in that The device comprises: A request sending module, used for sending a task reading request to the message middleware when a trigger condition is met, wherein the task reading request is used to request the message middleware to send a task to be executed that matches a content node; A response receiving module, used for receiving response information from the message middleware; A task execution module is used to execute the first task when the response information carries the first task, wherein the first attribute information of the first task matches the second attribute information of the content node, and when matching the second attribute information with the first attribute information of the first task, obtain the field value of the target field in the first attribute information and the field value of the target field in the second attribute information, and obtain the matching condition of the first task, wherein the matching condition is used to indicate the target field among multiple fields, and match according to the target field.

12. A task pushing device, It is characterized in that The device comprises: A data acquisition module, used to acquire reported data of a plurality of content nodes, wherein the reported data is used to indicate the running status of the content nodes; A task generation module, used to generate a plurality of task information according to the reported data of each content node and the file update record in the database, wherein each of the task information carries corresponding attribute information, and the task information carries a first task and first attribute information of the first task; A task sending module, used for sending the plurality of task information to the message middleware, wherein the message middleware is used for uniformly storing the task information sent by the server, so that each content node can actively pull the tasks to be executed assigned by the server to it from the message middleware; The message middleware is also used to receive a task read request from a target content node, and when the second attribute information of the target content node matches the first attribute information of the first task, return the first task to the target content node as a response to the task read request; when matching the second attribute information with the first attribute information of the first task, obtain the field value of the target field in the first attribute information and the field value of the target field in the second attribute information, and obtain the matching condition of the first task, the matching condition is used to indicate the target field among multiple fields, and match according to the target field.

13. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.