Configuration information sending method and device, electronic device and storage medium
The message middleware is used to deliver incremental configuration information in the CDN system, which solves the problem of poor fault tolerance in the CDN system where the delivery of configuration information depends on network conditions, and improves the timeliness of configuration information and the reliability of edge nodes.
Patent Information
- Application Number
- CN202110518068.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-12
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-05-12
AI Technical Summary
The existing CDN system relies on network conditions during the delivery of configuration information, resulting in insufficient fault tolerance and easy loss of configuration information. Especially when the node to central network is not good, the timeliness and reliability of configuration information are affected.
The message middleware is used to push the incremental configuration information to the edge node, and the target message is generated by obtaining the configuration information to be issued, and is sent to the target edge node through the target message middleware. The fault tolerance function of the message middleware is used to reduce the impact on network conditions. Depend on it, and deliver the full configuration information regularly or when it changes.
It improves the fault tolerance and speed of configuration information delivery, reduces network bandwidth occupation, and ensures timely updating of configuration information and timeliness of edge nodes.
Smart Images

Figure CN113254097B
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a method and device for sending configuration information, an electronic device, and a storage medium. Background Art
[0002] At present, the CDN (Content Delivery Network) system is a large distributed system involving a large number of nodes and devices, with the number of devices reaching tens of thousands or even more. In order to manage CDN applications on tens of thousands of devices, a center-edge architecture program is required to manage them.
[0003] For high availability, several devices are allocated on a node to deploy Agent programs. There will be hundreds or thousands of Agent instances, and the operation of Agent also requires some configuration parameters, such as speed limit, number of concurrent connections, node status, etc. These configuration parameters may need to be changed at any time. Manually logging into the node to modify the configuration parameters has many disadvantages, such as security risks, some operators do not have the authority to log in to the node, and poor timeliness.
[0004] In order to ensure that the configuration information can be sent to the Agent in a timely manner (i.e., the real-time nature of the configuration information sending), the configuration information sending method adopted in the related technology is: the central deployment configuration center service, the edge agent establishes a Socket connection with the central one, and any changes in the configuration center are pushed to the edge agent in real time, and the edge agent configuration takes effect.
[0005] The above configuration information delivery method is obviously insufficient in fault tolerance. If network jitter occurs, the configuration information will be lost. However, there are many nodes in various places in the whole network, and the network situation is complicated. It is possible that the situation of the node to the central network is not good at any time. Therefore, the configuration information delivery method in the related technology has the problem of poor fault tolerance due to dependence on network conditions. Summary of the invention
[0006] The present application provides a method and device for sending configuration information, an electronic device and a storage medium, so as to at least solve the problem of poor fault tolerance caused by dependence on network conditions in the method of sending configuration information in the related art.
[0007] According to one aspect of an embodiment of the present application, a method for sending configuration information is provided, including: obtaining first configuration information to be sent, wherein the first configuration information is incremental configuration information corresponding to a target edge node, and the target edge node is an edge node in a distributed system; generating a first target message, wherein the first target message carries the first configuration information; and sending the first target message to the target edge node through a target message middleware to send the first configuration information to the target edge node.
[0008] Optionally, obtaining the first configuration information to be issued includes: receiving a target task sent by a target object, wherein the target task is a task to be executed by the target edge node; and generating the first configuration information according to task attributes of the target task and node attributes of the target edge node.
[0009] Optionally, generating the first configuration information according to the task attributes of the target task and the node attributes of the target edge node includes: generating first sub-configuration information according to the task attributes of the target task, wherein the first sub-configuration information is configuration information associated with the target task; generating second sub-configuration information according to the task attributes of the target task and the node attributes of the target edge node, wherein the second sub-configuration information is configuration information associated with the target edge node, and the first configuration information includes the first sub-configuration information and the second sub-configuration information.
[0010] Optionally, generating the first target message includes: encapsulating the first configuration information into a task message corresponding to the target task to obtain a target task message, wherein the first target message is the target task message.
[0011] Optionally, after sending the first target message to the target edge node through the target message middleware, the method also includes: if no confirmation message returned by the target edge node in response to the first target message is received within the target time after sending the first target message to the target edge node, resending the first target message to the target edge node through the target message middleware.
[0012] Optionally, before obtaining the first configuration information to be issued, the method also includes: receiving a target indication message sent by the target edge node, wherein the target indication message is used to indicate that the target edge node is to obtain full configuration information; responding to the target indication message, obtaining second configuration information to be issued, wherein the second configuration information is the full configuration information corresponding to the target edge node; generating a second target message, wherein the second target message carries the second configuration information; and sending the second target message to the target edge node through the target message middleware to issue the second configuration information to the target edge node.
[0013] Optionally, after sending the first target message to the target edge node through the target message middleware, the method also includes: periodically obtaining third configuration information to be sent down, wherein the third configuration information is the full configuration information corresponding to the target edge node; generating a third target message, wherein the third target message carries the third configuration information; sending the third target message to the target edge node through the target message middleware to send the third configuration information down to the target edge node.
[0014] According to another aspect of an embodiment of the present application, a method for sending configuration information is also provided, including: receiving a first target message sent by a target central node through a target message middleware, wherein the target central node is a central node in a distributed system, and the first target message carries first configuration information, which is incremental configuration information sent to a target edge node; using the first configuration information to update the persisted configuration information on the target edge node to obtain target configuration information; and persisting the target configuration information on the target edge node.
[0015] Optionally, receiving the first target message sent by the target central node through the target message middleware includes: receiving a target task message sent by the target central node through the target message middleware, wherein the target task message is a task message corresponding to the target task to be executed by the target edge node, the target task message encapsulates the first configuration information, and the first target message is the target task message.
[0016] Optionally, before receiving the first target message sent by the target central node through the target message middleware, the method also includes: when the listening program corresponding to the distributed system is started on the target edge node and there is no persisted configuration information on the target edge node, sending a target indication message to the target central node, wherein the target indication message is used to indicate that the target edge node needs to obtain full configuration information; receiving a second target message sent by the target central node in response to the target indication message through the target message middleware, wherein the second target message carries second configuration information, and the second configuration information is the full configuration information sent to the target edge node; and persisting the second configuration information carried in the second target message to the target edge node.
[0017] Optionally, after persisting the target configuration information on the target edge node, the method further includes: receiving a third target message periodically sent by the target central node through the target message middleware, wherein the third target message carries third configuration information, and the third configuration information is the full configuration information sent to the target edge node; persisting the third configuration information carried in the third target message on the target edge node.
[0018] According to another aspect of the embodiment of the present application, a device for sending configuration information is also provided, including: a first acquisition unit, used to acquire first configuration information to be sent, wherein the first configuration information is incremental configuration information corresponding to a target edge node, and the target edge node is an edge node in a distributed system; a first generation unit, used to generate a first target message, wherein the first target message carries the first configuration information; a first sending unit, used to send the first target message to the target edge node through a target message middleware, so as to send the first configuration information to the target edge node.
[0019] Optionally, the first acquisition unit includes: a first receiving module, used to receive a target task sent by a target object, wherein the target task is a task to be executed by the target edge node; and a generation module, used to generate the first configuration information according to the task attributes of the target task and the node attributes of the target edge node.
[0020] Optionally, the generation module includes: a first generation sub-module, used to generate first sub-configuration information according to the task attributes of the target task, wherein the first sub-configuration information is configuration information associated with the target task; a second generation sub-module, used to generate second sub-configuration information according to the task attributes of the target task and the node attributes of the target edge node, wherein the second sub-configuration information is configuration information associated with the target edge node, and the first configuration information includes the first sub-configuration information and the second sub-configuration information.
[0021] Optionally, the first generating unit includes: an encapsulation module, used to encapsulate the first configuration information into a task message corresponding to the target task to obtain a target task message, wherein the first target message is the target task message.
[0022] Optionally, the device also includes: a second sending unit, which is used to resend the first target message to the target edge node through the target message middleware after the first target message is sent to the target edge node through the target message middleware, if no confirmation message returned by the target edge node in response to the first target message is received within a target time after the first target message is sent to the target edge node.
[0023] Optionally, the device also includes: a receiving unit, used to receive a target indication message sent by the target edge node before obtaining the first configuration information to be sent, wherein the target indication message is used to indicate that the target edge node is to obtain the full configuration information; a second acquisition unit, used to respond to the target indication message and obtain the second configuration information to be sent, wherein the second configuration information is the full configuration information corresponding to the target edge node; a second generation unit, used to generate a second target message, wherein the second target message carries the second configuration information; and a third sending unit, used to send the second target message to the target edge node through the target message middleware to send the second configuration information to the target edge node.
[0024] Optionally, the device also includes: a third acquisition unit, used to periodically acquire third configuration information to be sent down after the first target message is sent to the target edge node through the target message middleware, wherein the third configuration information is the full configuration information corresponding to the target edge node; a third generation unit, used to generate a third target message, wherein the third target message carries the third configuration information; and a fourth sending unit, used to send the third target message to the target edge node through the target message middleware, so as to send the third configuration information down to the target edge node.
[0025] According to another aspect of an embodiment of the present application, a device for sending configuration information is also provided, including: a first receiving unit, used to receive a first target message sent by a target central node through a target message middleware, wherein the target central node is a central node in a distributed system, and the first target message carries first configuration information, which is incremental configuration information sent to a target edge node; an updating unit, used to use the first configuration information to update the persisted configuration information on the target edge node to obtain target configuration information; and a first persistence unit, used to persist the target configuration information on the target edge node.
[0026] Optionally, the first receiving unit includes: a second receiving module, used to receive a target task message sent by the target central node through the target message middleware, wherein the target task message is a task message corresponding to the target task to be executed by the target edge node, and the target task message encapsulates the first configuration information, and the first target message is the target task message.
[0027] Optionally, the device also includes: a fifth sending unit, used to send a target indication message to the target central node before receiving the first target message sent by the target central node through the target message middleware, when the listening program corresponding to the distributed system is started on the target edge node and there is no persisted configuration information on the target edge node, wherein the target indication message is used to indicate that the target edge node needs to obtain full configuration information; a second receiving unit, used to receive a second target message sent by the target central node through the target message middleware in response to the target indication message, wherein the second target message carries second configuration information, and the second configuration information is the full configuration information sent to the target edge node; a second persistence unit, used to persist the second configuration information carried in the second target message to the target edge node.
[0028] Optionally, the device also includes: a third receiving unit, used to receive a third target message periodically sent by the target central node through the target message middleware after persisting the target configuration information on the target edge node, wherein the third target message carries third configuration information, and the third configuration information is the full configuration information sent to the target edge node; a third persistence unit, used to persist the third configuration information carried in the third target message on the target edge node.
[0029] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps in any of the above embodiments by running the computer program stored in the memory.
[0030] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the method steps in any of the above embodiments when executed.
[0031] In an embodiment of the present application, incremental configuration information is pushed to an edge node through a message middleware, by obtaining first configuration information to be sent, wherein the first configuration information is incremental configuration information corresponding to a target edge node, and the target edge node is an edge node in a distributed system; a first target message is generated, wherein the first target message carries the first configuration information; the first target message is sent to the target edge node through the target message middleware to send the first configuration information to the target edge node. Since the message middleware is used to push the configuration information, and the message middleware itself has a fault-tolerant function, the purpose of reducing the dependence of the push on network conditions can be achieved. Moreover, since incremental configuration information is sent instead of full configuration information, the purpose of sending configuration information with a smaller message body can be achieved, thereby achieving the technical effects of improving the fault tolerance of configuration information sending, improving the configuration sending speed, and reducing network bandwidth occupancy, thereby solving the problem of poor fault tolerance of the configuration information sending method in the related technology due to dependence on network conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0033] In order to more clearly illustrate the embodiments of the present application 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.
[0034] Figure 1 is a schematic diagram of a hardware environment of an optional method for sending configuration information according to an embodiment of the present application;
[0035] Figure 2 It is a flowchart of an optional method for issuing configuration information according to an embodiment of the present application;
[0036] Figure 3 is a flowchart of another optional method for issuing configuration information according to an embodiment of the present application;
[0037] Figure 4 is a schematic diagram of an optional method for issuing configuration information according to an embodiment of the present application;
[0038] Figure 5 is a flowchart of another optional method for issuing configuration information according to an embodiment of the present application;
[0039] Figure 6 is a structural block diagram of an optional device for sending configuration information according to an embodiment of the present application;
[0040] Figure 7 is a structural block diagram of another optional device for sending configuration information according to an embodiment of the present application;
[0041] Figure 8 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the solution of the present application, 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 only 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 creative work should fall within the scope of protection of the present application.
[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0044] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following interpretation:
[0045] 1. Node: A node generally refers to a virtual collection of devices, or it can be a single device, not limited to physical machines, virtual machines, containers, etc.
[0046] 2. Agent: Agent refers to a program deployed on the management machine of the edge node and used to manage applications on all devices in the node.
[0047] 3. Refresh. For CDN, if the source site content changes, the old content is still retained on the CDN edge device, and the user still accesses the old content. This requires a refresh program to clear the old content cached on the CDN edge device.
[0048] According to one aspect of an embodiment of the present application, a method for sending configuration information is provided. Optionally, in this embodiment, the method for sending configuration information can be applied to Figure 1 In the hardware environment composed of the terminal 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal 102 via a network, and can be used to provide services (such as game services, application services, etc.) for the terminal or a client installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for the server 104.
[0049] The network may include but is not limited to at least one of the following: a wired network, a wireless network. The wired network may include but is not limited to at least one of the following: a wide area network, a metropolitan area network, a local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal 102 may not be limited to a PC, a mobile phone, a tablet computer, etc.
[0050] The method for sending configuration information in the embodiment of the present application may be executed by the server 104, or by the terminal 102, or by both the server 104 and the terminal 102. The method for sending configuration information in the embodiment of the present application may be executed by the terminal 102 or by a client installed thereon.
[0051] Taking the method for sending configuration information in this embodiment executed by the server 104 as an example, Figure 2 is a flow chart of an optional method for sending configuration information according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0052] Step S202: obtaining first configuration information to be issued, wherein the first configuration information is incremental configuration information corresponding to a target edge node, and the target edge node is an edge node in a distributed system.
[0053] The method for sending configuration information in this embodiment can be applied to the scenario of sending node configuration information in a distributed system. The above-mentioned distributed system can have a center (or central)-edge node architecture, that is, the distributed system (for example, CDN) can include a central node and an edge node. The central node can be a server cluster (or central cluster) or a single instance application, which can be but not limited to being deployed on a single machine, a cluster of multiple machines, a virtual machine, a cloud host, or a container. An edge node can be one machine or multiple machines, and the management application and edge cluster application on the edge node can be one application or multiple applications. In addition, the device in the edge node can be but not limited to a medium for deploying applications such as a physical machine, a cloud host, and a container. Optionally, the method for sending configuration information in this embodiment can be performed by a central node (i.e., central) in a distributed system.
[0054] In order to solve the problem of insufficient fault tolerance in the configuration information delivery method in the related technology, the configuration information can be delivered in a periodic polling manner, that is, the central deployment configuration center service, the edge agent periodically polls and sends HTTP (HyperText Transfer Protocol) requests to the central to obtain the latest configuration. Here, in addition to HTTP, other protocols based on TCP (Transmission Control Protocol) can also be used to send requests.
[0055] However, for the above-mentioned periodic polling method, the central and edge usually use the external network for communication. Periodic polling will increase the traffic and waste bandwidth resources. In addition, the real-time nature of the configuration delivery depends on the polling time interval.
[0056] Optionally, in this embodiment, a message mechanism can be used to increase fault tolerance. The configuration information is sent by centrally managing edge node devices and pushing incremental configuration information to edge nodes through the message middleware, that is, when the configuration information is changed, the message middleware sends the incremental information.
[0057] For example, the target central node may obtain first configuration information to be sent to the target edge node, where the first configuration information is incremental configuration information of the target edge node, that is, configuration information changed relative to configuration information already sent to the target edge node.
[0058] Step S204, generating a first target message, wherein the first target message carries first configuration information;
[0059] The target central node may encapsulate the first configuration information into a message, thereby generating a first target message, and the generated first target message carries the first configuration information.
[0060] The configuration information may be sent together with other information, for example, it may be carried in a task message and sent, or it may be sent separately, for example, through a separate message, which is not limited in this embodiment.
[0061] Step S206: Send the first target message to the target edge node through the target message middleware to send the first configuration information to the target edge node.
[0062] The target central node's message middleware is the target message middleware, that is, the target message middleware is the message middleware on the target central node. The target central node can push the first target message to the target edge node through the target message middleware, thereby sending the first configuration information to the target edge node.
[0063] The target message middleware may include one or more message queues corresponding to the target edge node, for example, a target message queue. Sending the first target message to the target node through the target message middleware may include: routing the first target message to a target message queue corresponding to the target node, wherein the target message middleware includes the target message queue; and pushing the first target message in the target message queue to the target node through the target message middleware.
[0064] Through the above steps S202 to S206, the first configuration information to be sent is obtained, wherein the first configuration information is incremental configuration information corresponding to the target edge node, and the target edge node is an edge node in the distributed system; a first target message is generated, wherein the first target message carries the first configuration information; the first target message is sent to the target edge node through the target message middleware to send the first configuration information to the target edge node, which solves the problem of poor fault tolerance of the configuration information sending method in the related art due to dependence on network conditions, improves the fault tolerance of the configuration information sending, improves the configuration sending speed, and reduces network bandwidth occupancy.
[0065] As an optional embodiment, obtaining the first configuration information to be sent includes:
[0066] S11, receiving a target task sent by a target object, wherein the target task is a task to be executed by a target edge node;
[0067] S12: Generate first configuration information according to the task attributes of the target task and the node attributes of the target edge node.
[0068] When centrally managing edge node devices (i.e., edge devices under edge nodes), a large number of tasks will be sent to execute, such as refresh tasks. The central node can use message middleware to cache tasks in the message queue. The edge agent can consume tasks according to its own situation and then execute the tasks. When sending task messages, the configuration parameters (i.e., configuration information) required for task execution can be sent to the edge agent along with the task message, thereby affecting the execution of the task.
[0069] For the above configuration information delivery method, since the configuration information is delivered together with the task, the real-time delivery of the configuration can be guaranteed. However, since each task message carries a large amount of identical configuration information (for example, a list of devices), the message body becomes larger, the delivery speed becomes slower, and the bandwidth increases.
[0070] Optionally, in this embodiment, repeated configuration information may be sent only once (or a small number of times) along with the task, and sent incrementally when the configuration information is changed, thereby reducing the size of the message body.
[0071] The target center node can receive the target task submitted by the target object (corresponding to the target user), and the target task can be a target refresh task. The target task can be executed by a program on the target center node for providing a task receiving service. After receiving the target task submitted by the target object, the target center node can determine which nodes the target task is sent to for execution, that is, determine the target edge node that executes the target task. Here, the number of target edge nodes can be one or more, and the way of sending configuration information and tasks to each edge node is similar.
[0072] After receiving the target task sent by the target object, the target central node can obtain the first configuration information. For example, the target central node can generate the first configuration information based on the characteristics of the target task (i.e., task attributes, such as the domain name to which the task belongs) and the node to be issued (i.e., the node attributes of the target edge node). The process of generating the first configuration information can be: the target central node can generate the target full configuration information corresponding to the target edge node based on the task attributes of the target task and the node attributes of the target edge node; and determine the changes of the target full configuration information relative to the configuration information that has been issued to the target edge node as the first configuration information.
[0073] For example, after receiving the refresh task submitted by the user, the refresh center determines which nodes the task will be sent to for execution, and generates corresponding configuration information based on the characteristics of the task and the nodes to be sent.
[0074] Through this embodiment, when a task to be executed by an edge node is received, corresponding configuration information is generated according to the characteristics of the task and the node to be issued, thereby ensuring the timeliness of configuration issuance.
[0075] As an optional embodiment, generating the first configuration information according to the task attribute of the target task and the node attribute of the target edge node includes:
[0076] S21, generating first sub-configuration information according to a task attribute of a target task, wherein the first sub-configuration information is configuration information associated with the target task;
[0077] S22, generating second sub-configuration information according to the task attributes of the target task and the node attributes of the target edge node, wherein the second sub-configuration information is configuration information associated with the target edge node, and the first configuration information includes the first sub-configuration information and the second sub-configuration information.
[0078] There can be multiple types of configuration information, which may include configuration information associated with edge nodes (i.e., configuration information related to nodes), such as node status information, a list of devices under the node, device IP (Internet Protocol) address, device status information, etc.; it may include configuration information associated with tasks (i.e., configuration information not related to nodes), such as task timeout and number of task execution retries.
[0079] Since the final target of the task is the node, all configuration information can be attributed to a certain node, and node-related configuration information can easily be attributed to a certain node or nodes. If it is a global task timeout, it can be attributed to all nodes.
[0080] For the target task, the target central node may generate first sub-configuration information according to the task attributes of the target task. The first sub-configuration information may be configuration information associated with the target task, such as the task timeout of the target task and the number of task execution retries of the target task.
[0081] The target central node can generate second sub-configuration information based on the task attributes of the target task and the node attributes of the target edge node. The second sub-configuration information can be configuration information associated with the target edge node, such as the node status information of the target edge node, the device list of edge devices under the target edge node, the device IP address of the edge device under the target edge node, the device status information of the edge device under the target edge node, etc.
[0082] The first configuration information may include at least one of the first sub-configuration information and the second sub-configuration information. Here, it should be noted that since the first configuration information is the incremental configuration information corresponding to the target edge node, it contains at least one of the configuration information associated with the target task and the configuration information associated with the target edge node. If some tasks do not cause changes in the configuration information on the edge node, it is not necessary to send the configuration information to the edge node.
[0083] Through this embodiment, the configuration information associated with the target task and the configuration information associated with the target edge node are generated according to the task attributes of the task and the node attributes of the edge node, so that the accuracy of the configuration information generation can be improved.
[0084] As an optional embodiment, generating the first target message includes:
[0085] S31, encapsulating the first configuration information into a task message corresponding to the target task to obtain the target task message, wherein the first target message is the target task message.
[0086] The incrementally delivered configuration can be sent together with the task, or it can be sent separately using a message queue. Optionally, in order to reduce system complexity, the configuration can be delivered together with the task. For example, the central office can choose the appropriate time to deliver the configuration information along with the task message to the node based on the changes in the configuration information.
[0087] After generating the first configuration information, the target central node may encapsulate the first configuration information into a task message corresponding to the target task, thereby obtaining the target task message. The first target message is the target task message.
[0088] Through this embodiment, the configuration information is sent to the edge node together with the task message, which can reduce the complexity of the system and improve the timeliness of the configuration sending.
[0089] As an optional embodiment, after sending the first target message to the target edge node through the target message middleware, the method further includes:
[0090] S41, when no confirmation message returned by the target edge node in response to the first target message is received within a target time after the first target message is sent to the target edge node, the first target message is resent to the target edge node through the target message middleware.
[0091] Optionally, in this embodiment, if network jitter occurs, the message middleware itself can be used to have a fault-tolerant function (i.e., a message confirmation mechanism) to ensure that configuration information is not lost: after successfully receiving the message, the edge node can send a response ACK (Acknowledge) to confirm that the message has been received.
[0092] After sending the first target message to the target edge node, the target central node may wait to receive a confirmation message returned by the target edge node after receiving the first target message. If the confirmation message returned by the target edge node is not received within a certain time (i.e., the target time after sending the first target message), the target central node may resend the first target message to the target edge node through the target message middleware to ensure that the first configuration information can be successfully received by the target edge node.
[0093] Through this embodiment, when no confirmation message returned by the edge node is received, the message carrying the configuration information is re-sent, which can improve the success rate of the configuration information sending.
[0094] As an optional embodiment, before obtaining the first configuration information to be sent, the method further includes:
[0095] S51, receiving a target indication message sent by a target edge node, wherein the target indication message is used to indicate that the target edge node is to obtain full configuration information;
[0096] S52, responding to the target indication message, obtaining second configuration information to be issued, wherein the second configuration information is full configuration information corresponding to the target edge node;
[0097] S53, generating a second target message, wherein the second target message carries second configuration information;
[0098] S54: Send the second target message to the target edge node through the target message middleware to send the second configuration information to the target edge node.
[0099] If the target edge node needs to obtain the full configuration information from the target central node for some reason (for example, when the listener on the edge node is started, there is no previously persisted configuration information), the target edge node can actively pull the full configuration information of the node from the target central node. The target edge node can send a target indication message to the target central node, which is used to indicate that the target edge node is to obtain the full configuration information.
[0100] After receiving the target indication message, the target central node can obtain the full configuration information of the target edge node, that is, the second configuration information, encapsulate the second configuration information into a message, obtain the second target message, and send the obtained second target message to the target edge node through the target message middleware, thereby sending the second configuration information to the target edge node. The generation process of the second target message and the method of sending the second target message through the target message middleware are similar to the above, and will not be repeated here.
[0101] Through this embodiment, the edge node actively pulls the full configuration information from the central node when necessary, which can ensure that the edge node enters the ready state in time and improve the timeliness of the edge node's task execution.
[0102] As an optional embodiment, after sending the first target message to the target edge node through the target message middleware, the method further includes:
[0103] S61, regularly obtaining third configuration information to be issued, wherein the third configuration information is full configuration information corresponding to the target edge node;
[0104] S62, generating a third target message, wherein the third target message carries third configuration information;
[0105] S63: Send the third target message to the target edge node through the target message middleware to send the third configuration information to the target edge node.
[0106] In addition to sending incremental configuration information when the configuration information changes, the central node can also send full configuration information to the edge node regularly to ensure the accuracy of the configuration information on the edge node. At the same time, sending full configuration information regularly can prevent the edge node from being unable to perform incremental updates of configuration information due to the loss of configuration information, thereby affecting the timeliness of task execution on the edge node. In this case, if for some reason the target edge node needs to obtain full configuration information from the target central node, the edge node can also wait for the full configuration information sent by the central node.
[0107] After the first target message is sent to the target edge node through the target message middleware (or before the first target message is sent to the target edge node), the target central node can periodically obtain the full configuration information of the target edge node, that is, the third configuration information, encapsulate the third configuration information into a message, obtain the third target message, and send the obtained third target message to the target edge node through the target message middleware, thereby sending the third configuration information to the target edge node. The generation process of the third target message and the method of sending the third target message through the target message middleware are similar to the above, and will not be repeated here.
[0108] Through this embodiment, a complete set of node-related configuration information is sent to the edge node by the central node at a regular interval, so that the accuracy of the configuration information on the edge node can be guaranteed, and the timeliness of the task execution on the edge node can also be guaranteed.
[0109] According to another aspect of the embodiment of the present application, a method for sending configuration information is provided. Optionally, in this embodiment, the method for sending configuration information can be applied to Figure 1The hardware environment shown is composed of the terminal 102 and the server 104. What has been explained will not be repeated here.
[0110] Taking the method for sending configuration information in this embodiment executed by the server 104 as an example, Figure 3 is a flow chart of another optional method for sending configuration information according to an embodiment of the present application, such as Figure 3 As shown, the process of the method may include the following steps:
[0111] S302, receiving a first target message sent by a target central node through a target message middleware, wherein the target central node is a central node in a distributed system, and the first target message carries first configuration information, which is incremental configuration information sent to a target edge node.
[0112] The method for sending configuration information in this embodiment can be applied to the aforementioned scenario of sending node configuration information in a distributed system. In this embodiment, the method for sending configuration information can be executed by an edge node in a distributed system.
[0113] The target edge node may receive a first target message sent by the target central node through the target message middleware. The first target message may be generated by the target central node in the same or similar manner as described above and will not be repeated here.
[0114] S304: Use the first configuration information to update the persistent configuration information on the target edge node to obtain target configuration information.
[0115] Before receiving the first configuration information, the target edge node may have persistent configuration information. The first configuration information is configuration information that is changed relative to the persistent configuration information on the target edge node, that is, configuration information change.
[0116] After receiving the first configuration information, the target edge node can generate target configuration information to be persisted based on the first configuration information and the persisted configuration information on the target edge node. For example, the target edge node can use the first configuration information to update the persisted configuration information to obtain the target configuration information.
[0117] S306, persist the target configuration information to the target edge node.
[0118] The target configuration information is the full configuration information corresponding to the target edge node (a full configuration information), and the target edge node can persist the target configuration information to the target edge node.
[0119] After persisting the target configuration information on the target edge node, subsequent related tasks can all use the previously persisted configuration information on the target edge node, without the need to encapsulate all corresponding configuration parameters in each message task (for example, unchanged configuration parameters such as device IP addresses do not need to be encapsulated), thereby reducing the message body size of the task being sent, increasing the sending speed, and reducing network bandwidth.
[0120] Through the above steps S302 to S306, a first target message sent by a target central node through a target message middleware is received, wherein the target central node is a central node in a distributed system, and the first target message carries first configuration information, which is incremental configuration information sent to a target edge node; the first configuration information is used to update the persisted configuration information on the target edge node to obtain the target configuration information; the target configuration information is persisted on the target edge node, which solves the problem of poor fault tolerance of a configuration information sending method in related technologies due to dependence on network conditions, improves the fault tolerance of configuration information sending, increases the configuration sending speed, and reduces network bandwidth occupancy.
[0121] As an optional embodiment, receiving a first target message sent by a target central node through a target message middleware includes:
[0122] S71, receiving a target task message sent by a target central node through a target message middleware, wherein the target task message is a task message corresponding to a target task to be executed by a target edge node, the target task message encapsulates first configuration information, and the first target message is the target task message.
[0123] Optionally, in this embodiment, the target central node may encapsulate the first configuration information into a task message corresponding to the target task in the same or similar manner as described above, obtain the target task message, and send the target task message to the target edge node through the target message middleware. The target edge node may receive the target task message sent by the target central node.
[0124] Through this embodiment, the configuration information is sent to the edge node together with the task message, which can reduce the complexity of the system and improve the timeliness of the configuration sending.
[0125] As an optional embodiment, before receiving the first target message sent by the target central node through the target message middleware, the method further includes:
[0126] S81, when a listening program corresponding to the distributed system is started on the target edge node and there is no persisted configuration information on the target edge node, sending a target indication message to the target central node, wherein the target indication message is used to indicate that the target edge node is to obtain full configuration information;
[0127] S82, receiving a second target message sent by the target central node through the target message middleware in response to the target indication message, wherein the second target message carries second configuration information, and the second configuration information is full configuration information sent to the target edge node;
[0128] S83: persist the second configuration information carried in the second target message to the target edge node.
[0129] After the listener (listener Agent, for example, a listener message service Agent) corresponding to the distributed system on the target edge node is started (for example, restarted), if the previously persisted configuration information is not obtained (perhaps the persistent information is lost or has not been persisted before the new device is installed), it can wait for the full configuration information of the target central node to be sent, enter the ready state, and start receiving tasks.
[0130] Optionally, the target edge node may also send the above-mentioned target indication message to the target central node, receive the above-mentioned second target message sent by the target central node in response to the target indication message through the target message middleware, and persist the second configuration information carried in the second target message to the target edge node.
[0131] For example, when the node listener starts, if there is no previously persisted configuration information, a startup message (an example of a target indication message) can be sent to the central. After the central receives the message, it can send the full configuration information to this node. After the node listener agent receives the full configuration information, it starts to be ready to receive and process tasks.
[0132] Through this embodiment, the edge node actively pulls the full configuration information from the central node when necessary, which can ensure that the edge node enters the ready state in time and improve the timeliness of the edge node's task execution.
[0133] As an optional embodiment, after persisting the target configuration information to the target edge node, the method further includes:
[0134] S91, receiving a third target message regularly sent by the target central node through the target message middleware, wherein the third target message carries third configuration information, and the third configuration information is full configuration information sent to the target edge node;
[0135] S92: Persist the third configuration information carried in the third target message on the target edge node.
[0136] The target central node may send the third target message to the target edge node in the same or similar manner as described above. After receiving the third target message, the target edge node may persist the third configuration information carried in the third target message to the target edge node.
[0137] Through this embodiment, a complete set of node-related configuration information is sent to the edge node by the central node at a regular interval, so that the accuracy of the configuration information on the edge node can be guaranteed, and the timeliness of the task execution on the edge node can also be guaranteed.
[0138] The optional example explains the method for sending the configuration information in the embodiment of the present application. In this example, the distributed system is CDN, the target task is a refresh task (ie, a refresh system task), the central node is a refresh center, and the listening program is a listening message service Agent.
[0139] In order to ensure that the configuration parameters modified in the center can take effect immediately on the edge agent (within the allowed delay), the configuration information delivery method provided in this example is a configuration information delivery solution for a distributed task management system across the public network. Figure 4 and Figure 5 As shown, the process of the method for sending configuration information in this optional example may include the following steps:
[0140] Step S502: receiving a target refresh task submitted by a user and generating a target task message.
[0141] After the refresh center (for example, the receiving task service of the refresh center) receives the target refresh task submitted by the user, it verifies the target refresh task. After the verification is passed, the necessary information (including configuration information) can be assembled to obtain the target task message corresponding to the target refresh task. For example, the refresh center can determine which nodes the task will be sent to for execution, generate corresponding configuration information based on the characteristics of the task and the nodes to be sent, and encapsulate it into the target task message. The configuration information is not sent in full every time, it can also be sent in increments.
[0142] Step S504: Push the generated target task message to the corresponding target node through the message middleware.
[0143] According to the target node where the task is to be executed, the refresh center can route the task message to the corresponding node queue (an example of a target message queue) in the message middleware, and the message middleware pushes the generated task message to the corresponding target node.
[0144] Step S506: the monitoring message service Agent on the management machine of the target node receives the target task message, and sends the task message to each device in the node, and each device executes the corresponding refresh task.
[0145] After receiving the target task message, the monitoring message service on the target node can parse the corresponding configuration information, and send the task to the device under the node to execute the task according to the task information and configuration information.
[0146] Here, after receiving the configuration information change or full configuration information, the node can generate a full information and persist it. Thereafter (even when the application is restarted), this persistent configuration information will be used to perform tasks.
[0147] It should be noted that although the refresh system is used as an example for explanation, the configuration information delivery scheme in this example is also applicable to other task delivery systems similar to the central-edge node architecture other than the refresh system.
[0148] Through this example, the message mechanism is used to send configuration information, which can increase the fault tolerance of configuration sending; combining the sending of configuration information when changing with the scheduled sending of configuration information can greatly reduce the size of the message body, increase the sending speed, and reduce the external network bandwidth; sending the configuration information together with the task can reduce the complexity of the system.
[0149] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0151] According to another aspect of an embodiment of the present application, a device for sending configuration information for implementing the above-mentioned method for sending configuration information is also provided. Figure 6 is a structural block diagram of an optional device for sending configuration information according to an embodiment of the present application, such as Figure 6 As shown, the device may include:
[0152] A first acquisition unit 602 is configured to acquire first configuration information to be issued, wherein the first configuration information is incremental configuration information corresponding to a target edge node, and the target edge node is an edge node in a distributed system;
[0153] A first generating unit 604, connected to the first acquiring unit 602, is configured to generate a first target message, wherein the first target message carries the first configuration information;
[0154] The first sending unit 606 is connected to the first generating unit 604, and is used to send the first target message to the target edge node through the target message middleware, so as to send the first configuration information to the target edge node.
[0155] It should be noted that the first acquisition unit 602 in this embodiment can be used to execute the above step S202, the first generation unit 604 in this embodiment can be used to execute the above step S204, and the first sending unit 606 in this embodiment can be used to execute the above step S206.
[0156] Through the above module, the first configuration information to be sent is obtained, wherein the first configuration information is incremental configuration information corresponding to the target edge node, and the target edge node is an edge node in the distributed system; a first target message is generated, wherein the first target message carries the first configuration information; the first target message is sent to the target edge node through the target message middleware to send the first configuration information to the target edge node, which solves the problem of poor fault tolerance of the configuration information sending method in the related technology due to dependence on network conditions, improves the fault tolerance of the configuration information sending, improves the configuration sending speed, and reduces network bandwidth occupancy.
[0157] As an optional embodiment, the first acquiring unit 602 includes:
[0158] A first receiving module is used to receive a target task sent by a target object, wherein the target task is a task to be executed by a target edge node;
[0159] The generating module is used to generate first configuration information according to the task attribute of the target task and the node attribute of the target edge node.
[0160] As an optional embodiment, the generating module includes:
[0161] A first generating submodule, used to generate first sub-configuration information according to a task attribute of a target task, wherein the first sub-configuration information is configuration information associated with the target task;
[0162] The second generation submodule is used to generate second sub-configuration information according to the task attributes of the target task and the node attributes of the target edge node, wherein the second sub-configuration information is configuration information associated with the target edge node, and the first configuration information includes the first sub-configuration information and the second sub-configuration information.
[0163] As an optional embodiment, the first generating unit 604 includes:
[0164] The encapsulation module is used to encapsulate the first configuration information into a task message corresponding to the target task to obtain the target task message, wherein the first target message is the target task message.
[0165] As an optional embodiment, the above device also includes:
[0166] The second sending unit is used to resend the first target message to the target edge node through the target message middleware after the first target message is sent to the target edge node through the target message middleware, if no confirmation message returned by the target edge node in response to the first target message is received within a target time after the first target message is sent to the target edge node.
[0167] As an optional embodiment, the above device also includes:
[0168] A receiving unit, configured to receive a target indication message sent by a target edge node before acquiring the first configuration information to be issued, wherein the target indication message is used to indicate that the target edge node is to acquire the full configuration information;
[0169] A second acquisition unit, configured to respond to the target indication message and acquire second configuration information to be issued, wherein the second configuration information is full configuration information corresponding to the target edge node;
[0170] A second generating unit, configured to generate a second target message, wherein the second target message carries second configuration information;
[0171] The third sending unit is used to send the second target message to the target edge node through the target message middleware, so as to send the second configuration information to the target edge node.
[0172] As an optional embodiment, the above device also includes:
[0173] A third acquisition unit is used to periodically acquire third configuration information to be issued after the first target message is sent to the target edge node through the target message middleware, wherein the third configuration information is full configuration information corresponding to the target edge node;
[0174] A third generating unit, configured to generate a third target message, wherein the third target message carries third configuration information;
[0175] The fourth sending unit is used to send the third target message to the target edge node through the target message middleware, so as to send the third configuration information to the target edge node.
[0176] According to another aspect of an embodiment of the present application, a device for sending configuration information for implementing the above-mentioned method for sending configuration information is also provided. Figure 7 is a structural block diagram of another optional device for sending configuration information according to an embodiment of the present application, such as Figure 7 As shown, the device may include:
[0177] The first receiving unit 702 is used to receive a first target message sent by a target central node through a target message middleware, wherein the target central node is a central node in a distributed system, and the first target message carries first configuration information, which is incremental configuration information sent to a target edge node;
[0178] An updating unit 704, connected to the first receiving unit 702, configured to update the persistent configuration information on the target edge node using the first configuration information to obtain target configuration information;
[0179] The first persistence unit 706 is connected to the update unit 704 and is used to persist the target configuration information to the target edge node.
[0180] It should be noted that the first receiving unit 702 in this embodiment can be used to execute the above step S302, the updating unit 704 in this embodiment can be used to execute the above step S304, and the first persistence unit 706 in this embodiment can be used to execute the above step S306.
[0181] Through the above module, a first target message sent by a target central node through a target message middleware is received, wherein the target central node is a central node in a distributed system, and the first target message carries first configuration information, which is incremental configuration information sent to a target edge node; the first configuration information is used to update the persisted configuration information on the target edge node to obtain the target configuration information; the target configuration information is persisted on the target edge node, which solves the problem of poor fault tolerance of a configuration information sending method in related technologies due to dependence on network conditions, improves the fault tolerance of configuration information sending, increases the configuration sending speed, and reduces network bandwidth occupancy.
[0182] As an optional embodiment, the first receiving unit 702 includes:
[0183] The second receiving module is used to receive a target task message sent by a target central node through a target message middleware, wherein the target task message is a task message corresponding to a target task to be executed by a target edge node, and the target task message encapsulates first configuration information, and the first target message is the target task message.
[0184] As an optional embodiment, the above device also includes:
[0185] A fifth sending unit is used to send a target indication message to the target central node before receiving the first target message sent by the target central node through the target message middleware, when the listening program corresponding to the distributed system is started on the target edge node and there is no persisted configuration information on the target edge node, wherein the target indication message is used to indicate that the target edge node is to obtain full configuration information;
[0186] A second receiving unit is used to receive a second target message sent by the target central node through the target message middleware in response to the target indication message, wherein the second target message carries second configuration information, and the second configuration information is the full configuration information sent to the target edge node;
[0187] The second persistence unit is used to persist the second configuration information carried in the second target message to the target edge node.
[0188] As an optional embodiment, the above device also includes:
[0189] A third receiving unit is used to receive a third target message periodically sent by the target central node through the target message middleware after persisting the target configuration information to the target edge node, wherein the third target message carries the third configuration information, and the third configuration information is the full configuration information sent to the target edge node;
[0190] The third persistence unit is used to persist the third configuration information carried in the third target message to the target edge node.
[0191] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0192] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned method for sending configuration information is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0193] Figure 8 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 8 As shown, it includes a processor 802, a communication interface 804, a memory 806 and a communication bus 808, wherein the processor 802, the communication interface 804 and the memory 806 communicate with each other through the communication bus 808, wherein,
[0194] Memory 806, used for storing computer programs;
[0195] The processor 802 is used to implement the following steps when executing the computer program stored in the memory 806:
[0196] Acquire first configuration information to be issued, wherein the first configuration information is incremental configuration information corresponding to a target edge node, and the target edge node is an edge node in a distributed system;
[0197] Generate a first target message, wherein the first target message carries first configuration information;
[0198] The first target message is sent to the target edge node through the target message middleware, so as to send the first configuration information to the target edge node.
[0199] Optionally, in this embodiment, the processor 802 is configured to implement the following steps when executing the computer program stored in the memory 806:
[0200] Receive a first target message sent by a target central node through a target message middleware, wherein the target central node is a central node in a distributed system, and the first target message carries first configuration information, which is incremental configuration information sent to a target edge node;
[0201] Use the first configuration information to update the persisted configuration information on the target edge node to obtain the target configuration information;
[0202] Persist the target configuration information on the target edge node.
[0203] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0204] The communication interface is used for communication between the above electronic device and other devices.
[0205] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0206] As an example, the memory 806 may include but is not limited to the first acquisition unit 602, the first generation unit 604 and the first sending unit 606 in the above configuration information sending device. In addition, it may also include but is not limited to other module units in the above configuration information sending device, which will not be repeated in this example.
[0207] As another example, the memory 806 may include but is not limited to the first receiving unit 702, the updating unit 704 and the first persistence unit 706 in the above configuration information sending device. In addition, it may also include but is not limited to other module units in the above configuration information sending device, which will not be repeated in this example.
[0208] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0209] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0210] It can be understood by those skilled in the art that Figure 8 The structure shown is for illustration only. The device for implementing the above configuration information sending method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 8 The structure of the electronic device is not limited. Figure 8 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 8 Different configurations shown.
[0211] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0212] According to another aspect of the embodiments of the present application, a storage medium is further provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of any of the above configuration information delivery methods in the embodiments of the present application.
[0213] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0214] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0215] Acquire first configuration information to be issued, wherein the first configuration information is incremental configuration information corresponding to a target edge node, and the target edge node is an edge node in a distributed system;
[0216] Generate a first target message, wherein the first target message carries first configuration information;
[0217] The first target message is sent to the target edge node through the target message middleware, so as to send the first configuration information to the target edge node.
[0218] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0219] Receive a first target message sent by a target central node through a target message middleware, wherein the target central node is a central node in a distributed system, and the first target message carries first configuration information, which is incremental configuration information sent to a target edge node;
[0220] Use the first configuration information to update the persisted configuration information on the target edge node to obtain the target configuration information;
[0221] Persist the target configuration information on the target edge node.
[0222] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0223] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0224] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0225] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0226] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0227] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0228] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.
[0229] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0230] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for delivering configuration information, It is characterized in that include: Acquiring first configuration information to be issued, including: receiving a target task sent by a target object, the target task being a task to be executed by a target edge node, and generating the first configuration information according to a task attribute of the target task and a node attribute of the target edge node, wherein the first configuration information is incremental configuration information corresponding to the target edge node, and the target edge node is an edge node in a distributed system; Generate a first target message, wherein the first target message carries the first configuration information; The first target message is sent to the target edge node through the target message middleware, so as to send the first configuration information to the target edge node, wherein the target message middleware is the message middleware on the target central node.
2. The method according to claim 1, It is characterized in that Generating the first configuration information according to the task attribute of the target task and the node attribute of the target edge node includes: Generate first sub-configuration information according to the task attribute of the target task, wherein the first sub-configuration information is configuration information associated with the target task; Generate second sub-configuration information according to the task attributes of the target task and the node attributes of the target edge node, wherein the second sub-configuration information is configuration information associated with the target edge node, and the first configuration information includes the first sub-configuration information and the second sub-configuration information.
3. The method according to claim 1, It is characterized in that Generating the first target message includes: The first configuration information is encapsulated into a task message corresponding to the target task to obtain a target task message, wherein the first target message is the target task message.
4. The method according to claim 1, It is characterized in that After sending the first target message to the target edge node through the target message middleware, the method further includes: If no confirmation message returned by the target edge node in response to the first target message is received within a target time after the first target message is sent to the target edge node, the first target message is resent to the target edge node through the target message middleware.
5. The method according to claim 1, It is characterized in that Before acquiring the first configuration information to be issued, the method further includes: Receiving a target indication message sent by the target edge node, wherein the target indication message is used to indicate that the target edge node is to obtain full configuration information; In response to the target indication message, obtain second configuration information to be issued, wherein the second configuration information is full configuration information corresponding to the target edge node; Generate a second target message, wherein the second target message carries the second configuration information; The second target message is sent to the target edge node through the target message middleware, so as to send the second configuration information to the target edge node.
6. The method according to any one of claims 1 to 5, It is characterized in that After sending the first target message to the target edge node through the target message middleware, the method further includes: Regularly obtain third configuration information to be issued, wherein the third configuration information is full configuration information corresponding to the target edge node; Generate a third target message, wherein the third target message carries the third configuration information; The third target message is sent to the target edge node through the target message middleware, so as to send the third configuration information to the target edge node.
7. A method for delivering configuration information, It is characterized in that include: Receiving a first target message sent by a target central node through a target message middleware, comprising: receiving a target task message sent by the target central node through the target message middleware, the target task message being a task message corresponding to a target task to be executed by a target edge node, the target task message being encapsulated with first configuration information, the first target message being the target task message, wherein the target central node is a central node in a distributed system, the first target message carries first configuration information, the first configuration information is incremental configuration information sent to a target edge node, and the target message middleware is a message middleware on the target central node; Using the first configuration information to update the persistent configuration information on the target edge node, to obtain target configuration information; The target configuration information is persisted to the target edge node.
8. The method according to claim 7, It is characterized in that Before receiving the first target message sent by the target central node through the target message middleware, the method further includes: When a listening program corresponding to the distributed system is started on the target edge node and there is no persisted configuration information on the target edge node, a target indication message is sent to the target central node, wherein the target indication message is used to indicate that the target edge node is to obtain full configuration information; Receiving a second target message sent by the target central node through the target message middleware in response to the target indication message, wherein the second target message carries second configuration information, and the second configuration information is full configuration information sent to the target edge node; The second configuration information carried in the second target message is persisted on the target edge node.
9. The method according to any one of claims 7 to 8, It is characterized in that After persisting the target configuration information to the target edge node, the method further includes: Receiving a third target message periodically sent by the target central node through the target message middleware, wherein the third target message carries third configuration information, and the third configuration information is full configuration information sent to the target edge node; The third configuration information carried in the third target message is persisted on the target edge node.
10. A device for sending configuration information, It is characterized in that include: A first acquisition unit is used to acquire first configuration information to be issued, including: receiving a target task sent by a target object, the target task being a task to be executed by a target edge node, and generating the first configuration information according to a task attribute of the target task and a node attribute of the target edge node, wherein the first configuration information is incremental configuration information corresponding to the target edge node, and the target edge node is an edge node in a distributed system; A first generating unit, configured to generate a first target message, wherein the first target message carries the first configuration information; The first sending unit is used to send the first target message to the target edge node through the target message middleware, so as to send the first configuration information to the target edge node, wherein the target message middleware is the message middleware on the target central node.
11. A device for sending configuration information, It is characterized in that include: A first receiving unit is used to receive a first target message sent by a target central node through a target message middleware, including: receiving a target task message sent by the target central node through the target message middleware, the target task message is a task message corresponding to a target task to be executed by a target edge node, the target task message is encapsulated with first configuration information, the first target message is the target task message, wherein the target central node is a central node in a distributed system, the first target message carries first configuration information, the first configuration information is incremental configuration information sent to a target edge node, and the target message middleware is a message middleware on the target central node; An updating unit, configured to update the persistent configuration information on the target edge node using the first configuration information to obtain target configuration information; The first persistence unit is used to persist the target configuration information to the target edge node.
12. An electronic device comprising a processor, a communication interface, a memory and a communication bus, in, The processor, the communication interface and the memory communicate with each other via the communication bus, wherein: The memory is used to store computer programs; The processor is configured to execute the method steps of any one of claims 1 to 6 or the method steps of any one of claims 7 to 9 by running the computer program stored in the memory.
13. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the method steps described in any one of claims 1 to 6 or the method steps described in any one of claims 7 to 9 when running.
Citation Information
Patent Citations
Extensible high-performance distributed query processing method and device
CN111046065A
Data processing method and related equipment
CN111901421A
Audio translation method and system
CN112118309A
Business data processing method and device, storage medium and electronic device
CN112732793A
Scaleable message system
US20020120717A1
