Automatic installation method, device and equipment based on distributed mesh network and medium

By using an automated installation method based on a distributed mesh network, the optimal installation parent node is dynamically discovered and resources are acquired in parallel. This solves the problems of high availability and low efficiency of cross-network installation in existing technologies, and achieves efficient and low-cost operating system installation.

CN121807321APending Publication Date: 2026-04-07FENGLING CHUANGJING (BEIJING) TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing automated operating system installation methods suffer from weak high availability, high cost of cross-network installation, and low efficiency of cross-network installation.

Method used

An automated installation method based on a distributed mesh network is adopted. The device to be installed dynamically discovers and selects the optimal installation parent node in the mesh network. The image information and disk information are obtained in parallel using a multi-node collaborative mechanism. The operating system is automatically installed with the help of a preset automated configuration tool, forming a self-expanding and self-sustaining low-cost installation ecosystem.

Benefits of technology

It achieves high availability and self-healing capabilities, reduces cross-network installation costs, improves installation efficiency, avoids single point of failure risks, and simplifies the complexity of network configuration for cross-regional deployments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807321A_ABST
    Figure CN121807321A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the field of information processing, and discloses an automatic installation method and device based on a distributed mesh network, equipment and a medium, and the method comprises the steps that equipment to be installed sends a service request to a target distributed mesh network; acquiring a first guide script based on first response information of the service request; the to-be-installed equipment determines an installation father node and a second guide script based on second response information of the first guide script; analyzing the second guide script, and loading mirror image information, disk information and starting parameters required for installing the to-be-installed equipment so as to enter an installation environment; and in the installation environment, the operation system is automatically installed for the to-be-installed equipment through the preset automatic configuration tool. The single-point fault risk under a traditional main-standby or load balancing architecture is effectively avoided, and high availability of installation services is achieved. The mirror image information, the disk information and the starting parameters are efficiently obtained from the multiple resource nodes in parallel, the resource downloading time is shortened, the cross-network installation efficiency is improved, and the installation cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of information processing, and in particular to an automated installation method and device based on a distributed mesh network, equipment and medium. BACKGROUND

[0002] The existing automated operating system installation method is generally based on a traditional client-server architecture and relies on a centralized boot server or image repository to provide installation services. This method is suitable for installing operating systems on devices located in the same local area network or logical network. If the installation is across networks, the network needs to be pre-opened through means such as VPN, dedicated line or NAT penetration due to the limited cross-network communication, which not only increases the operation and maintenance complexity, but also introduces additional security and performance bottlenecks. In addition, in order to achieve high availability, master-slave nodes or load balancing architecture are often used to distribute backend service nodes through polling or failover mechanisms. However, this mode has the risk of single-point dependence, and in the cross-region scenario, the synchronization delay and switching overhead between master-slave nodes are significant, making it difficult to guarantee the real-time and consistency of the installation service. Therefore, the existing automated operating system installation method has the problems of weak high-availability capability, high cross-network installation cost and low cross-network installation efficiency. SUMMARY

[0003] The purpose of the present application is to at least provide an automated installation method and device based on a distributed mesh network, equipment and medium, which can at least solve the technical problems of weak high-availability capability, high cross-network installation cost and low cross-network installation efficiency of the existing automated operating system installation method, and at least achieve the technical effects of improving the high-availability capability of automated operating system installation, improving the cross-network installation efficiency and reducing the cross-network installation cost.

[0004] To solve the above technical problems, at least one embodiment of the present application provides an automated installation method based on a distributed mesh network, comprising: a to-be-installed device sends a service request to a target distributed mesh network, the service request being used to obtain a first boot script address; obtaining a first boot script based on first response information of the service request, the first boot script being used to discover a node that can provide installation boot service in the target distributed mesh network; the to-be-installed device executes the first boot script and determines an installation parent node and a second boot script based on second response information of the first boot script; parsing the second boot script, loading image information, disk information and startup parameters required by the to-be-installed device for installation, to enter an installation environment; in the installation environment, automatically installing an operating system for the to-be-installed device by using a preset automated configuration tool, so as to take the to-be-installed device with the installed operating system as a working node of the target distributed mesh network.

[0005] The to-be-installed device of the scheme does not need to rely on a single central server, but dynamically discovers and selects an optimal installation parent node in a mesh network through a service request, effectively avoiding the single point failure risk under the traditional master / standby or load balancing architecture, realizing high availability and self-healing capability of the service; at the same time, with the help of the multi-node cooperation mechanism in the mesh network, the to-be-installed device can efficiently obtain image information, disk information and start parameters from multiple resource nodes in parallel, greatly shortening the resource download time and improving the large-scale concurrent installation efficiency; in addition, the scheme does not need to pre-punch a cross-network channel (such as VPN or dedicated line), and each node can independently join and participate in installation cooperation based on a local network, significantly reducing the network configuration complexity and operation and maintenance cost of cross-region deployment, and improving the cross-network installation efficiency. Finally, the to-be-installed device that installs the operating system automatically registers as a worker node of the mesh network, which can continuously provide services for subsequent devices, forming a self-expanding, self-maintaining and low-cost installation ecology.

[0006] In some examples, the to-be-installed device executing the first boot script includes: the to-be-installed device executing a listening command in the first boot script, and listening to at least one boot node, the boot node being a node in the target distributed mesh network that can provide installation boot services; and the node information of at least one boot node as second response information, the node information including load information of the boot node.

[0007] In some examples, determining the installation parent node and the second boot script based on the second response information of the first boot script includes: obtaining a current node of the to-be-installed device in the target distributed mesh network; determining at least one available boot node with a load less than a preset load based on the load information in the second response information; for each available boot node, determining a shortest path for the available boot node to communicate with the current node based on the target distributed mesh network; obtaining a total communication delay corresponding to the shortest path; taking the available boot node corresponding to the total communication delay with the smallest delay as the installation parent node; and sending the MAC of the to-be-installed device to the installation parent node based on the shortest path corresponding to the total communication delay with the smallest delay, to obtain the second boot script obtained by the installation parent node based on the MAC.

[0008] In some examples, before sending the MAC of the to-be-installed device to the installation parent node, the method further includes: when a new node is added to the target distributed mesh network, updating the target distributed mesh network based on the new node; based on the current relay node where the MAC is located, the installation parent node and the updated target distributed mesh network re-determining a new shortest path; the new shortest path is a path with the smallest communication delay when the current relay node communicates with the installation parent node in the updated target distributed mesh network.

[0009] In some examples, parsing the second boot script and loading the image information, disk information, and startup parameters required for the installation of the device to be installed includes: parsing the second boot script to obtain at least one resource node and startup parameters, wherein the resource node contains the image information and / or disk information required for the installation of the device to be installed; and loading the image information and disk information required for the installation of the device to be installed from at least one of the resource nodes in parallel.

[0010] In some examples, after automatically installing an operating system on the device to be installed using a preset automated configuration tool, the method further includes: the device to be installed sending a verification request to the target distributed mesh network; verification nodes in the target distributed mesh network verifying the installation quality of the device to be installed based on automated testing; if the installation quality passes the verification, the device to be installed broadcasts its installed operating system to the target distributed mesh network to update the status of the device to be installed to a working state in the target distributed mesh network.

[0011] In some examples, the startup parameters include disk partitioning policy, user credential information, target package list, static network configuration, and cluster registration instructions. The automatic installation of the operating system on the device to be installed using a preset automated configuration tool includes: the preset automated configuration tool performing full-disk LVM configuration on the disk of the device to be installed based on the disk partitioning policy, creating a root logical volume, and creating a file system on the root logical volume; creating a management user based on the user credential information, and injecting a preset SSH public key into the SSH authorization key file of the management user; pre-installing a container runtime environment and cluster node agent components based on the target package list; setting the static IP address and hostname of the device to be installed according to the static network configuration; and, upon the first startup of the operating system, calling the cluster node agent components to perform a cluster joining operation based on the cluster registration instructions, automatically registering the device to be installed as a node in the target distributed mesh network.

[0012] At least one embodiment of this application also provides an automated installation device based on a distributed mesh network, comprising: a sending unit, configured to send a service request from a device to be installed to a target distributed mesh network, the service request being used to obtain a first boot script address; an obtaining unit, configured to obtain a first boot script based on a first response information of the service request, the first boot script being used to discover nodes in the target distributed mesh network that can provide installation boot services; an execution unit, configured to execute the first boot script from the device to be installed, and determine an installation parent node and a second boot script based on a second response information of the first boot script; a parsing unit, configured to parse the second boot script, load image information, disk information, and startup parameters required for installation by the device to be installed, so as to enter the installation environment; and an installation unit, configured to automatically install an operating system for the device to be installed in the installation environment using a preset automated configuration tool, so as to make the device to be installed with the installed operating system a working node of the target distributed mesh network.

[0013] At least one embodiment of this application also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described automated installation method based on a distributed mesh network.

[0014] At least one embodiment of this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described automated installation method based on a distributed mesh network. Attached Figure Description

[0015] One or more embodiments are illustrated by way of example with reference to the accompanying drawings, and these illustrative descriptions do not constitute a limitation on the embodiments.

[0016] Figure 1 This is a flowchart of an automated installation method based on a distributed mesh network provided in one embodiment of this application; Figure 2 This is a schematic diagram of a distributed mesh network provided in one embodiment of this application; Figure 3 This is a schematic diagram of the structure of an automated installation device based on a distributed mesh network, provided in another embodiment of this application; Figure 4 This is a schematic diagram of the structure of an electronic device provided in another embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the various embodiments of this application to help readers better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.

[0018] It should be noted that the acquisition or use of data in the embodiments of this application requires the user's consent. The relevant data can only be obtained after the user's authorization, and the acquisition or use of the data complies with the provisions of relevant laws and regulations.

[0019] To facilitate understanding of the embodiments of this application, the relevant content of the automated installation method based on distributed mesh network will be introduced first.

[0020] Existing automated operating system installation methods are generally based on traditional client-server architectures, relying on centralized boot servers or image repositories to provide installation services. This approach is suitable for installing operating systems on devices located within the same local area network or logical network. However, for cross-network installations, due to limited cross-network communication, it is usually necessary to pre-establish network connectivity using methods such as VPNs, dedicated lines, or NAT traversal, which not only increases operational complexity but also introduces additional security and performance bottlenecks. Furthermore, to achieve high availability, primary / backup node or load balancing architectures are often used, allocating backend service nodes through round-robin or failover mechanisms. However, this model has the risk of single-point dependency, and in cross-regional scenarios, the synchronization latency and switching overhead between primary and backup nodes are significant, making it difficult to guarantee the real-time performance and consistency of the installation service. Therefore, existing automated operating system installation methods suffer from weak high availability capabilities, high costs for cross-network installations, and low efficiency in cross-network installations.

[0021] To address the aforementioned technical problems, this invention proposes an automated installation method based on a distributed mesh network. The implementation details of this embodiment of the automated installation method based on a distributed mesh network are described below. The following content is only for ease of understanding and is not necessary for implementing this solution.

[0022] Example 1: The automated installation method based on a distributed mesh network in this embodiment can be applied to electronic devices with communication, computing, and data storage capabilities. Its specific process can be as follows: Figure 1 As shown, it includes: Step 110: The device to be installed sends a service request to the target distributed mesh network. The service request is used to obtain the address of the first boot script.

[0023] The device to be installed refers to the device that needs an operating system to be installed in order to serve as a usable node in the target distributed network. The target distributed mesh network is a network based on distributed peer-to-peer networks and mesh networks. Distributed peer-to-peer networks consist of interconnected computer systems located in different locations, and have no central node. Every point in the network is connected to at least two links; when any one link fails, communication can be relayed to other links, resulting in high reliability. Distributed mesh networks are also easily scalable. Mesh networks transmit data and control commands between network nodes through dynamic routing. This type of network maintains the integrity of connections between each node, and when a node in the network topology fails or becomes unavailable, a new route can be formed using a "hop" mechanism to deliver the message to its destination. A service request is a broadcast request sent by the device to be installed to the target distributed mesh network via a PXE or iPXE-enabled network card after power-on and network boot configuration. This broadcast request is used to obtain an IP address and the address of the first boot script. The first boot script address refers to the network path that the target distributed mesh network feeds back to the device to be installed, used to retrieve the first boot script.

[0024] Step 120: Obtain the first boot script based on the first response information of the service request. The first boot script is used to discover nodes in the target distributed mesh network that can provide installation boot services.

[0025] The first response information is the response information sent by the target distributed mesh network to the device to be installed in response to the service request sent by the target distributed mesh network. The first response information includes the IP address assigned to the device by the target distributed mesh network and the address of the first boot script. After receiving the first response information, the device to be installed retrieves the first boot script from the location pointed to by the first boot script address.

[0026] Step 130: The device to be installed executes the first boot script and determines the installation parent node and the second boot script based on the second response information of the first boot script.

[0027] Specifically, in step 130 above, the device to be installed executes the first boot script, including: the device to be installed executes the listening command in the first boot script and listens for at least one boot node, the boot node being a node in the target distributed mesh network that can provide installation boot services; and the node information of at least one boot node is used as the second response information, the node information including the load information of the boot node.

[0028] The listening command is used to listen to the PEX server broadcasts in the target distributed mesh network, and to listen to the boot nodes that can provide installation boot services for the devices to be installed.

[0029] Specifically, determining the installation parent node and the second boot script based on the second response information of the first boot script includes: obtaining the current node of the device to be installed in the target distributed mesh network; determining at least one available boot node with a load less than a preset load based on the load information in the second response information; for each available boot node, determining the shortest path for communication between the available boot node and the current node based on the target distributed mesh network; obtaining the total communication latency corresponding to the shortest path; selecting the available boot node with the minimum total communication latency as the installation parent node; and sending the MAC address of the device to be installed to the installation parent node based on the shortest path with the minimum total communication latency to obtain the second boot script obtained by the installation parent node based on the MAC address.

[0030] Among them, available boot nodes refer to boot nodes with low load.

[0031] Specifically, determining the shortest path for communication between available guiding nodes and the current node based on the target distributed mesh network includes: using a preset shortest path algorithm to determine the shortest path for communication between available guiding nodes and the current node based on the target distributed mesh network.

[0032] The preset shortest path algorithm can be either Dijkstra's algorithm or Floyd-Worscher's algorithm. For details on Dijkstra's and Floyd-Worscher's algorithms, please refer to existing technologies; further elaboration will not be provided here. Communication delay can be used as the path weighting value between two adjacent nodes.

[0033] Furthermore, using a preset shortest path algorithm, the shortest path for communication between the available guiding node and the current node is determined based on the target distributed mesh network. This includes: determining multiple node paths from the current node to the available guiding node based on the target distributed mesh network; calculating the sum of the weighted values ​​of multiple paths corresponding to each node path using the preset shortest path algorithm to obtain the path delay corresponding to the node path; and selecting the node path with the smallest path delay among the multiple node paths as the shortest path for communication between the available guiding node and the current node.

[0034] Furthermore, each node in the target distributed mesh network stores node information and corresponding communication delays of its neighboring nodes. Determining the shortest path for communication between the current node and an available guiding node based on the target distributed mesh network includes: determining at least one neighboring node of the current node based on the current node in the target distributed mesh network; for each first neighboring node, determining at least one second neighboring node based on the target distributed mesh network, and using the second neighboring node as a new first neighboring node; repeating this process for each first neighboring node until all second neighboring nodes are available guiding nodes; forming at least one node path for communication between the current node and an available guiding node based on the current node, multiple first neighboring nodes, and available guiding nodes; for each node path, summing the communication delays between adjacent nodes to obtain the total communication delay corresponding to the node path; and selecting the node path with the smallest total communication delay among at least one total communication delay as the shortest path for communication between the available guiding node and the current node.

[0035] The node information also includes the IP address of the guiding node, the listening port number, and the unique identifier of the node. Nodes communicate with each other through the node information.

[0036] Furthermore, the available boot node corresponding to the minimum total communication latency is used as the installation parent node, including: among the shortest paths corresponding to the shortest total communication latency between each available boot node and the current node, the available boot node corresponding to the shortest path corresponding to the minimum total communication latency is used as the installation parent node.

[0037] If there are multiple shortest paths corresponding to the minimum total communication delay, and there are multiple available boot nodes, then all available boot nodes will be used as the installation parent node simultaneously.

[0038] When the device to be installed determines its parent node, it can send a registration request to the parent node. The parent node responds to the registration request and writes its node identification information into the service registry, thereby announcing that the device to be installed has joined the target distributed mesh network.

[0039] In addition, such as Figure 2 As shown, in the target distributed mesh network, any node is connected to at least two other nodes in a peer-to-peer manner. Peer-to-peer is a decentralized network architecture where network nodes connected in a peer-to-peer manner are both clients and servers, and the nodes can communicate directly with each other without relying on a central server.

[0040] In some cases, before sending the MAC address of the device to be installed to the parent node, if there is a faulty node on the shortest path for forwarding the MAC address, a new shortest path is determined based on the current forwarding node where the MAC address is located, the target distributed mesh network, and the parent node. The new shortest path is the path with the least communication latency when the current node communicates with the parent node.

[0041] In this context, if a node itself fails, becomes disconnected, becomes invalid, or is deleted, it is considered to be a faulty node and is treated as such. A node becoming disconnected means that the node is unable to communicate with its neighboring nodes.

[0042] Furthermore, before sending the MAC address of the device to be installed to the installation parent node, the method also includes: when a new node is added to the target distributed mesh network, updating the target distributed mesh network based on the new node; re-determining a new shortest path based on the current relay node where the MAC address is located, the installation parent node, and the updated target distributed mesh network; the new shortest path is the path with the minimum communication latency when the current relay node communicates with the installation parent node in the updated target distributed mesh network.

[0043] Therefore, it can be seen that any node is connected to at least two other nodes in a point-to-point manner, ensuring that each node has at least two connection paths and avoiding the problem of single point of failure. When a node fails and its connection to its directly adjacent nodes is interrupted, it is guaranteed that it can be connected to at least one other directly adjacent node, ensuring communication continuity. Moreover, even if some nodes in the distributed mesh network fail, or nodes are added or deleted, the distributed mesh network can still maintain network connectivity, greatly enhancing network robustness.

[0044] Specifically, the parent installation node obtains the MAC address and retrieves the second boot script corresponding to the MAC address from the database. The second boot script includes boot parameters, image information required for installation of the device to be installed, and relevant resource node information such as disk information.

[0045] Step 140: Parse the second boot script, load the image information, disk information and boot parameters required for the installation of the device to be installed, and enter the installation environment.

[0046] Among them, boot parameters refer to a set of configuration instructions passed from the boot node to the installation kernel during the operating system installation process, which are used to control unattended installation behavior.

[0047] Specifically, in step 140 above, parsing the second boot script and loading the image information, disk information, and boot parameters required for the installation of the device to be installed includes: parsing the second boot script to obtain at least one resource node and boot parameters, wherein the resource node contains the image information and / or disk information required for the installation of the device to be installed; and loading the image information and disk information required for the installation of the device to be installed from at least one resource node in parallel.

[0048] In this network, a resource node can be either a seed node or a peer node. If there is only one resource node, it is either a seed node or a peer node containing all the image and disk information required by the device to be installed. If there are multiple resource nodes, each resource node can contain both seed and peer nodes, and there is no limit to the number of seed and peer nodes. A seed node contains all the image and / or all the disk information required by the resource node. A peer node is a regular worker node that joins the distributed mesh network, containing all or part of the image information and / or all or part of the disk information.

[0049] Specifically, the image information and disk information required for installation of the device to be installed are loaded in parallel from at least one resource node. This includes: determining a resource retrieval strategy based on the resource distribution of image information and disk information contained in each resource node; the resource retrieval strategy is used to determine the local image information and / or local disk information to be retrieved from each resource node by the device to be installed; and retrieving the corresponding local image information and / or local disk information from each resource node in parallel based on the resource retrieval strategy. The local image information corresponding to each resource node constitutes the image information, and the local disk information corresponding to each resource node constitutes the disk information.

[0050] Therefore, by pulling image and disk information from multiple resource nodes in parallel, the device to be installed significantly speeds up resource acquisition and improves operating system installation efficiency. At the same time, this multi-source pulling mechanism effectively avoids dependence on a single resource node, eliminates bandwidth bottlenecks and single-point failure risks, thereby improving the success rate of resource downloads and the robustness of system deployment.

[0051] Step 150: In the installation environment, use a preset automated configuration tool to automatically install the operating system on the device to be installed, so that the device to be installed with the operating system installed can be used as a working node of the target distributed mesh network.

[0052] The pre-configured automated configuration tools can be Kickstart or Cloud-Init, which can complete the operating system installation unattended based on the boot parameters. For example, during the boot process, the device to be installed loads boot parameters through the kernel command line or metadata service. Kickstart or Cloud-Init parses the boot parameters and automatically completes the partitioning of the operating system, user configuration, software installation, and network configuration based on the parsing results, thus achieving unattended deployment.

[0053] Specifically, in step 150 above, the startup parameters include disk partitioning policy, user credential information, target package list, static network configuration, and cluster registration instructions. A preset automated configuration tool is used to automatically install the operating system on the device to be installed, including: The preset automated configuration tool performs full LVM configuration on the disk of the device to be installed based on the disk partitioning policy, creates a root logical volume, and creates a file system on the root logical volume; creates a management user based on the user credential information and injects a preset SSH public key into the management user's SSH authorization key file; pre-installs the container runtime environment and cluster node agent components based on the target package list; sets the static IP address and hostname of the device to be installed according to the static network configuration; and, upon the first startup of the operating system, calls the cluster node agent component to perform a cluster joining operation based on the cluster registration instructions, automatically registering the device to be installed as a node in the target distributed mesh network.

[0054] LVM (Logical Volume Manager) is a flexible and dynamic disk storage management technology in Linux systems. It introduces a logical abstraction layer between physical storage devices (such as hard drives and SSDs) and the file system, making disk space allocation, expansion, migration and other operations more efficient and flexible.

[0055] In some examples, after automatically installing an operating system on the device to be installed using a pre-defined automated configuration tool, the method further includes: the device to be installed sending a verification request to the target distributed mesh network; verification nodes in the target distributed mesh network verifying the installation quality of the device to be installed based on automated testing; if the installation quality passes the verification, the device to be installed broadcasts its installed operating system to the target distributed mesh network to update the status of the device to be installed to a working state in the target distributed mesh network.

[0056] Installation quality refers to a comprehensive evaluation of whether the installation result of the operating system on the device to be installed meets preset standards. This comprehensive evaluation is achieved through automated testing, which includes connectivity testing (e.g., verifying whether the device is connected to the gateway, DNS, and configuration services) and service verification (e.g., whether SSH, cloud-init, and node agent services are started normally). If the device is connected to the gateway, DNS, and configuration services, and SSH, cloud-init, and node agent services are all started normally, then the installation quality is considered to have passed the verification. The working status indicates that the device to be installed can serve as an available node in the target distributed mesh network, and can be used to provide resources and services to other devices to be installed subsequently.

[0057] Specifically, when the device to be installed has an operating system installed, it reports its current status as having an operating system installed and waiting for verification to the target distributed mesh network via broadcast, or the device to be installed directly sends a verification request to the verification node in the target distributed mesh network. The verification node in the target distributed mesh network then verifies the installation quality of the device to be installed based on automated testing.

[0058] In some cases, the target distributed mesh network can also be replaced with a point-to-point network or a star network that achieves a similar effect to the distributed mesh network in this scheme.

[0059] In summary, this solution involves the device to be installed sending a service request to the target distributed mesh network. This service request is used to obtain the address of the first boot script. Based on the first response information of the service request, the first boot script is obtained. The first boot script is used to discover nodes in the target distributed mesh network that can provide installation boot services. The device to be installed executes the first boot script and determines the installation parent node and the second boot script based on the second response information of the first boot script. The second boot script is parsed to load the image information, disk information, and boot parameters required for installation by the device to enter the installation environment. In the installation environment, a preset automated configuration tool is used to automatically install the operating system on the device to be installed, so that the device with the operating system installed becomes a working node in the target distributed mesh network. The devices awaiting installation do not rely on a single central server. Instead, they dynamically discover and select the optimal parent node for installation within the mesh network through service requests. This effectively avoids the single point of failure risk inherent in traditional master-slave or load-balanced architectures, achieving high availability and self-healing capabilities. Simultaneously, leveraging the multi-node collaboration mechanism within the mesh network, the devices can efficiently acquire image information, disk information, and boot parameters from multiple resource nodes in parallel, significantly reducing resource download time and improving the efficiency of large-scale concurrent installations. Furthermore, this solution eliminates the need for pre-establishing cross-network channels (such as VPNs or dedicated lines). Each node can autonomously join and participate in installation collaboration based on its local network, significantly reducing the complexity of network configuration and maintenance costs for cross-regional deployments and improving cross-network installation efficiency. Ultimately, the devices awaiting installation with the operating system automatically register as working nodes in the mesh network, continuously providing services to subsequent devices and forming a self-scaling, self-sustaining, low-cost installation ecosystem.

[0060] Example 2: Another embodiment of this application relates to an automated installation device based on a distributed mesh network. The implementation details of this embodiment's automated installation device based on a distributed mesh network are described below. The following details are provided for ease of understanding and are not essential for implementing this solution. A schematic diagram of the automated installation device 30 based on a distributed mesh network in this embodiment can be seen as follows: Figure 3 As shown, it includes a sending unit 301, an acquisition unit 302, an execution unit 303, a parsing unit 304, and an installation unit 305.

[0061] The sending unit 301 is used to send a service request from the device to be installed to the target distributed mesh network, wherein the service request is used to obtain the address of the first boot script.

[0062] The acquisition unit 302 is used to acquire a first boot script based on the first response information of the service request. The first boot script is used to discover nodes in the target distributed mesh network that can provide installation boot services.

[0063] The execution unit 303 is used to execute the first boot script on the device to be installed, and to determine the installation parent node and the second boot script based on the second response information of the first boot script.

[0064] The parsing unit 304 is used to parse the second boot script and load the image information, disk information and boot parameters required for the installation of the device to be installed, so as to enter the installation environment.

[0065] Installation unit 305 is used in the installation environment to automatically install an operating system on the device to be installed using a preset automated configuration tool, so as to make the device to be installed with the operating system installed a working node of the target distributed mesh network.

[0066] In some examples, when the execution unit 303 executes the first boot script on the device to be installed, it is specifically used to: execute the listening command in the first boot script on the device to be installed, and listen to at least one boot node, the boot node being a node in the target distributed mesh network that can provide installation boot services; and use the node information of at least one boot node as second response information, the node information including the load information of the boot node.

[0067] In some examples, when the execution unit 303 determines the installation parent node and the second boot script based on the second response information of the first boot script, it specifically performs the following steps: obtaining the current node of the device to be installed in the target distributed mesh network; determining at least one available boot node with a load less than a preset load based on the load information in the second response information; for each available boot node, determining the shortest path for communication between the available boot node and the current node based on the target distributed mesh network; obtaining the total communication latency corresponding to the shortest path; taking the available boot node with the minimum total communication latency as the installation parent node; and sending the MAC address of the device to be installed to the installation parent node based on the shortest path with the minimum total communication latency to obtain the second boot script obtained by the installation parent node based on the MAC address.

[0068] In some examples, before sending the MAC address of the device to be installed to the installation parent node, the execution unit 303 is further configured to: update the target distributed mesh network based on the new node when a new node is added to the target distributed mesh network; and re-determine a new shortest path based on the current relay node where the MAC address is located, the installation parent node, and the updated target distributed mesh network; the new shortest path is the path with the least communication latency when the current relay node communicates with the installation parent node in the updated target distributed mesh network.

[0069] In some examples, when parsing the second boot script and loading the image information, disk information, and startup parameters required for the installation of the device to be installed, the parsing unit 304 is specifically used to: parse the second boot script, obtain at least one resource node and startup parameters, wherein the resource node contains the image information and / or disk information required for the installation of the device to be installed; and load the image information and disk information required for the installation of the device to be installed from at least one of the resource nodes in parallel.

[0070] In some examples, after automatically installing the operating system on the device to be installed using a preset automated configuration tool, the sending unit 301 is further configured to: send a verification request to the target distributed mesh network; the verification nodes in the target distributed mesh network verify the installation quality of the device to be installed based on automated testing; if the installation quality passes the verification, the device to be installed broadcasts its installed operating system to the target distributed mesh network to update the status of the device to be installed to a working state in the target distributed mesh network.

[0071] In some examples, the startup parameters include disk partitioning policy, user credential information, target package list, static network configuration, and cluster registration instructions. When the installation unit 305 is used to automatically install the operating system on the device to be installed using a preset automated configuration tool, it specifically performs the following: The preset automated configuration tool performs full-disk LVM configuration on the disk of the device to be installed based on the disk partitioning policy, creates a root logical volume, and creates a file system on the root logical volume; creates a management user based on the user credential information and injects a preset SSH public key into the SSH authorization key file of the management user; pre-installs the container runtime environment and cluster node agent components based on the target package list; sets the static IP address and hostname of the device to be installed according to the static network configuration; and when the operating system starts for the first time, it calls the cluster node agent components to perform a cluster joining operation based on the cluster registration instructions, automatically registering the device to be installed as a node in the target distributed mesh network.

[0072] It is worth mentioning that all units involved in this embodiment are logical units. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed in this application; however, this does not mean that other units are absent in this embodiment.

[0073] Example 3: Another embodiment of this application relates to an electronic device, such as...Figure 4 As shown, it includes: at least one processor 901; and a memory 902 communicatively connected to the at least one processor 901; wherein the memory 902 stores instructions executable by the at least one processor 901, the instructions being executed by the at least one processor 901 to enable the at least one processor 901 to execute the automated installation method based on a distributed mesh network in the above embodiments.

[0074] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.

[0075] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory, on the other hand, is used to store data used by the processor during operation.

[0076] Example 4: Another embodiment of this application relates to a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the method embodiments described above.

[0077] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0078] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing this application, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of this application.

Claims

1. An automated installation method based on a distributed mesh network, characterized in that, include: The device to be installed sends a service request to the target distributed mesh network, the service request being used to obtain the address of the first boot script; Based on the first response information of the service request, a first boot script is obtained. The first boot script is used to discover nodes in the target distributed mesh network that can provide installation boot services. The device to be installed executes the first boot script and determines the installation parent node and the second boot script based on the second response information of the first boot script; The second boot script is parsed to load the image information, disk information, and boot parameters required for the installation of the device to be installed, so as to enter the installation environment; In the installation environment, a preset automated configuration tool is used to automatically install an operating system on the device to be installed, so that the device to be installed with the operating system installed can be used as a working node of the target distributed mesh network.

2. The automated installation method based on a distributed mesh network according to claim 1, characterized in that, The device to be installed executes the first boot script, including: The device to be installed executes the listening command in the first boot script and listens for at least one boot node, which is a node in the target distributed mesh network that can provide installation boot services; The node information of at least one of the boot nodes is used as the second response information, the node information including the load information of the boot node.

3. The automated installation method based on a distributed mesh network according to claim 2, characterized in that, The determination of the installation parent node and the second boot script based on the second response information of the first boot script includes: Obtain the current node of the device to be installed in the target distributed mesh network; Based on the load information in the second response information, at least one available boot node with a load less than the preset load is identified; For each available bootstrap node, the shortest path for communication between the available bootstrap node and the current node is determined based on the target distributed mesh network; Obtain the total communication delay corresponding to the shortest path; The available boot node corresponding to the minimum total communication latency is selected as the installation parent node; Based on the shortest path corresponding to the minimum total communication latency, the MAC address of the device to be installed is sent to the parent node to obtain the second boot script obtained by the parent node based on the MAC address.

4. The automated installation method based on a distributed mesh network according to claim 3, characterized in that, Before sending the MAC address of the device to be installed to the installation parent node, the method further includes: When a new node is added to the target distributed mesh network, the target distributed mesh network is updated based on the new node. Based on the current relay node where the MAC is located, the installation parent node and the updated target distributed mesh network re-determine the new shortest path; The new shortest path is the path with the least communication latency when the current relay node communicates with the installation parent node in the updated target distributed mesh network.

5. The automated installation method based on a distributed mesh network according to claim 1, characterized in that, The process of parsing the second boot script and loading the image information, disk information, and boot parameters required for the installation of the device to be installed includes: The second boot script is parsed to obtain at least one resource node and startup parameters. The resource node contains the image information and / or disk information required for the installation of the device to be installed. The image information and disk information required for the installation of the device to be installed are loaded from at least one of the resource nodes in parallel.

6. The automated installation method based on a distributed mesh network according to claim 5, characterized in that, After automatically installing the operating system on the device to be installed using a preset automated configuration tool, the method further includes: The device to be installed sends a verification request to the target distributed mesh network; The verification nodes in the target distributed mesh network verify the installation quality of the equipment to be installed based on automated testing. If the installation quality passes verification, the device to be installed broadcasts its installed operating system to the target distributed mesh network to update the status of the device to be installed to working status in the target distributed mesh network.

7. The automated installation method based on a distributed mesh network according to any one of claims 1 to 6, characterized in that, The startup parameters include disk partitioning policy, user credential information, target software package list, static network configuration, and cluster registration instructions. The automatic installation of the operating system on the device to be installed using a preset automated configuration tool includes: The preset automated configuration tool performs full-disk LVM configuration on the disk of the device to be installed based on the disk partitioning strategy, creates a root logical volume, and creates a file system on the root logical volume; A management user is created based on the user credential information, and a preset SSH public key is injected into the SSH authorization key file of the management user; Pre-install container runtime environment and cluster node agent components based on the target package list; Based on the static network configuration, set the static IP address and hostname of the device to be installed; When the operating system starts for the first time, based on the cluster registration instruction, the cluster node agent component is invoked to perform a cluster joining operation, automatically registering the device to be installed as a node of the target distributed mesh network.

8. An automated installation device based on a distributed mesh network, characterized in that, include: The sending unit is used to send a service request from the device to be installed to the target distributed mesh network, wherein the service request is used to obtain the address of the first boot script. The acquisition unit is configured to acquire a first boot script based on the first response information of the service request. The first boot script is used to discover nodes in the target distributed mesh network that can provide installation boot services. An execution unit is used to execute the first boot script on the device to be installed, and to determine the installation parent node and the second boot script based on the second response information of the first boot script; The parsing unit is used to parse the second boot script and load the image information, disk information and boot parameters required for the installation of the device to be installed, so as to enter the installation environment; An installation unit is used in the installation environment to automatically install an operating system on the device to be installed using a preset automated configuration tool, so as to make the device to be installed with the operating system installed a working node of the target distributed mesh network.

9. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the automated installation method based on a distributed mesh network as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the automated installation method based on a distributed mesh network as described in any one of claims 1 to 7.