Telegraf-based Pcdn account management platform and Pcdn account management method
Through the PCdn account management platform based on telegraf, unified management and allocation of PCdn device accounts is achieved, the problem of large number of accounts and difficult to manage is solved, operation and maintenance efficiency is improved and operation costs are reduced.
Patent Information
- Application Number
- CN202411695333.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-11-25
AI Technical Summary
The number of accounts on PCdn devices is large and difficult to manage, resulting in high maintenance costs, slow timeliness, low efficiency, and inability to obtain the bandwidth information and device availability borne by each account in real time.
The PCdn account management platform based on telegraf is adopted, including an account entry module, device account management module, account allocation module and account recovery module. The device information is collected through telegraf and integrated with the Mysql database to achieve unified management and allocation of accounts.
It improves operation and maintenance efficiency, reduces operating costs, realizes real-time management and bandwidth optimization of PCdn accounts, and solves the problems of many accounts and difficult management.
Smart Images

Figure CN119728165A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of PCDN small bandwidth dial-up, and in particular to a PCDN account management platform based on telegraf and a PCDN account management method based on telegraf. Background Art
[0002] The bandwidth that a single account used on a Pcdn (P2P content distribution network) device can bear is generally small, with a small one being only 50M and a large one being 500M, which is far from enough to meet the bandwidth requirements. Therefore, multiple accounts are generally purchased for a single Pcdn device. The number of accounts varies for different business volumes, and can reach hundreds of accounts. Therefore, account management is particularly important! The initial accounts were manually modified on the machine by the operation and maintenance personnel, and the relationship between the account and the device was maintained in Excel, which resulted in high maintenance costs, slow timeliness, and low efficiency. It is also impossible to obtain real-time bandwidth information for each account, and the availability of the Pcdn device cannot be obtained. Summary of the invention
[0003] The embodiment of the present invention provides a Pcdn account management platform based on telegraf and a Pcdn account management method based on telegraf to solve the problems of multiple Pcdn accounts, difficult management and high maintenance costs.
[0004] The embodiment of the present invention discloses a Pcdn account management platform based on telegraf, including:
[0005] The account entry module is used to store the account information entered by the operation and maintenance personnel in the MySQL database;
[0006] The device account management module is used to collect the account information currently used by each Pcdn device through the telegraf in the Pcdn device for management;
[0007] The account allocation module is used to configure the account information allocated to the Pcdn device through telegraf based on the current real-time bandwidth of each Pcdn device within a specified frequency period;
[0008] The account recovery module is used to recover redundant account information in each Pcdn device through telegraf based on the current real-time bandwidth of each Pcdn device within a specified frequency period.
[0009] Optionally, it also includes:
[0010] Promethues module is used to receive the real-time bandwidth data of each account information collected by telegraf in the Pcdn device for visual display;
[0011] Mysql database is used to store account information and Pcdn devices bound to account information, real-time bandwidth data transmitted by the Promethues module, heartbeat information of Pcdn devices, and monitoring information of all account information in the platform;
[0012] The account bandwidth adjustment module is used to adjust the rated upstream bandwidth, rated downstream bandwidth, account password and VLAN value of the account information;
[0013] The account line switching module is used to switch the management line type of the lost account information in the current Pcdn device to the data line type according to the monitoring information of the account information in each Pcdn device, and select the type of an account with a data line type to switch to the management line type;
[0014] Account status adjustment is used to set the status of account information recovered by the account recovery module to idle, set the status of account information allocated by the account allocation module to occupied, and adjust the status of account information in the Pcdn device according to the monitoring information of the account information in each Pcdn device.
[0015] Optionally, the device account management module is specifically used to:
[0016] For each Pcdn device, according to the real-time bandwidth data of the Pcdn device received by the Promethues module and the bandwidth of the allocated account of the Pcdn device, an average allocation algorithm is used to determine the account information to be recycled in the Pcdn device; or to determine the idle account information to be allocated to the Pcdn device;
[0017] The account recovery module is specifically used for:
[0018] According to the account information to be recovered in the Pcdn device determined by the device account management module, recover the account information in the Pcdn device through telegraf in the Pcdn device;
[0019] The account allocation module is specifically used for:
[0020] According to the account information allocated to the Pcdn device determined by the device account management module, the newly allocated account information of the Pcdn device is configured through telegraf in the Pcdn device.
[0021] Optionally, the device account management module is specifically used to:
[0022] Traverse all Pcdn devices, and calculate the redundant bandwidth based on the real-time bandwidth data of the Pcdn device received by the Promethues module in each Pcdn device and the bandwidth of the allocated account of the Pcdn device;
[0023] The redundant bandwidth = bandwidth of the allocated account - real-time bandwidth data;
[0024] Filter Pcdn devices whose redundant bandwidth is greater than 0 and less than or equal to the specified bandwidth threshold;
[0025] For a Pcdn device whose redundant bandwidth is greater than a specified bandwidth threshold, selecting at least one account information matching the redundant bandwidth from the Pcdn device as the account information to be recycled in the Pcdn device;
[0026] For Pcdn devices with redundant bandwidth less than 0, the absolute values of the redundant bandwidth are arranged in order, starting from the one with the largest absolute value of the redundant bandwidth. If there are idle accounts, at least one account information that matches the absolute value of the redundant bandwidth is selected from the idle accounts as the newly allocated account information in the current Pcdn device.
[0027] Optionally, it also includes:
[0028] The account analysis module is used to analyze each account information according to the real-time bandwidth data of the Pcdn device received by the Promethues module and the bandwidth of the allocated account of the Pcdn device, and verify whether the scheduled account information is stable;
[0029] The log module is used to record all operation information of the Pcdn account management platform.
[0030] The embodiment of the present invention further discloses a PCDN account management system, which is characterized by comprising:
[0031] The telegraf-based account management platform and multiple Pcdn devices integrated with telegraf described above;
[0032] Each Pcdn device interacts with the Pcdn account management platform through telegraf.
[0033] The embodiment of the present invention also discloses a Pcdn account management method based on telegraf, comprising:
[0034] The account management platform obtains the real-time bandwidth data of the Pcdn device and all account information of the Pcdn device through the telegraf integrated in the Pcdn device;
[0035] The account management platform determines whether there is redundant bandwidth in the current PCDN device based on the rated bandwidth and real-time bandwidth data of all account information;
[0036] If there is redundant bandwidth, it is determined whether to allocate idle account information to the Pcdn device or to recycle at least one account information in the Pcdn device according to the redundant bandwidth information.
[0037] Optionally, if there is redundant bandwidth, determining whether to allocate idle account information to the Pcdn device or to recycle at least one account information in the Pcdn device according to information of the redundant bandwidth includes:
[0038] Calculate redundant bandwidth, where redundant bandwidth = bandwidth of allocated account minus real-time bandwidth data;
[0039] If the redundant bandwidth is greater than 0 and less than or equal to the specified bandwidth threshold, it does not need to be recycled and account information is not allocated;
[0040] When the redundant bandwidth is greater than the specified bandwidth threshold, at least one account information matching the redundant bandwidth is selected from the Pcdn device as the account information to be recovered in the Pcdn device;
[0041] When the redundant bandwidth is less than 0, determine whether there is an idle account. If so, select at least one account information that matches the absolute value of the redundant bandwidth from the idle accounts as the newly allocated account information in the Pcdn device.
[0042] Optionally, it also includes:
[0043] The account management platform receives the real-time bandwidth data of each account collected by telegraf in the Pcdn device for visual display.
[0044] Optionally, the method further comprises:
[0045] The account management platform receives the account information input by the operation and maintenance personnel and stores it in a Mysql database, or adjusts the rated bandwidth / password / line type / vlan value of at least one account information.
[0046] The embodiment of the present invention further discloses an electronic device, comprising 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;
[0047] The memory is used to store computer programs;
[0048] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.
[0049] The embodiment of the present invention further discloses one or more computer-readable media on which instructions are stored. When executed by one or more processors, the processors are enabled to execute the method described in the embodiment of the present invention.
[0050] The embodiments of the present invention include the following advantages:
[0051] The Pcdn account management platform of the embodiment of the present invention uniformly manages and allocates Pcdn accounts, solving the problem of the large number of Pcdn accounts in the prior art. The device account relationship that can only be changed and maintained in Excel on the Pcdn device in the prior art is moved to the platform for unified change and maintenance, which greatly improves the operation and maintenance efficiency and facilitates problem analysis and troubleshooting.
[0052] The Pcdn account management platform of the embodiment of the present invention assists online operators in account management, Pcdn account analysis, and Pcdn machine analysis, thereby improving operational efficiency and reducing operating costs. The problem of multiple accounts, difficult management, and high maintenance costs in the prior art is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a structural block diagram of a Pcdn account management platform based on telegraf provided in an embodiment of the present invention;
[0054] Figure 2 is a schematic diagram of daily account operations shown in an embodiment of the present invention;
[0055] Figure 3 It is a flowchart of a Pcdn account management method based on telegraf provided in an embodiment of the present invention;
[0056] Figure 4 is a schematic diagram of newly purchased account information provided in an embodiment of the present invention;
[0057] Figure 5 is a schematic diagram of account import provided in an embodiment of the present invention;
[0058] Figure 6 is a schematic diagram of account status adjustment provided in an embodiment of the present invention;
[0059] Figure 7 is a schematic diagram of account bandwidth adjustment provided in an embodiment of the present invention;
[0060] Figure 8 and Fig. 9 They are schematic diagrams of visual analysis of all accounts of a Pcdn device provided in an embodiment of the present invention;
[0061] Fig.10is a schematic diagram of a query Pcdn device provided in an embodiment of the present invention;
[0062] Fig.11 It is a schematic diagram of querying logs on a Pcdn device provided in an embodiment of the present invention;
[0063] Fig.12 is a block diagram of an electronic device provided in an embodiment of the present invention;
[0064] Fig.13 is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0065] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0066] This embodiment provides a Pcdn account management system, which includes: an account management platform based on telegraf, and multiple Pcdn devices integrated with telegraf; each Pcdn device interacts with the Pcdn account management platform through telegraf to assist online operators in account management, Pcdn account analysis, and Pcdn machine analysis, thereby improving operational efficiency and reducing operating costs.
[0067] Pcdn (Peer Content Delibery Network) is a peer-to-peer content distribution network that accelerates the transmission of network content by utilizing resources on terminal devices. Pcdn devices usually refer to servers or devices deployed at the edge of the network, which are used to store and transmit network content and communicate with terminal devices. The Pcdn device of this embodiment belongs to the edge device, which is responsible for caching data and dialing up the Internet. Each Pcdn device has a dial-up program installed, which will read the account, password, and VLAN in the specified file for dial-up Internet access.
[0068] In this embodiment, the telegraf program is installed on each Pcdn device, where the telegraf program is a data collection agent, which is mainly used to collect, process and summarize indicator data from various data personnel and systems. The telegraf program can be easily integrated with different data personnel and data storage systems to monitor and analyze system and application performance. In this embodiment, telegraf is responsible for the communication between the Pcdn device and the Pcdn account management platform (referred to as the account management platform or platform). The account information (account, password, vlan, etc.) configured by the account management platform will be sent to the file of the specified path on the Pcdn device through telegraf. Telegraf will collect the network card, actual uplink bandwidth, and actual downlink bandwidth of each account that successfully dials up on the current device at a fixed time (such as every 30 seconds), and push it to the Pcdn account management platform.
[0069] See also Figure 1 , shows a structural block diagram of a Pcdn account management platform based on telegraf provided in an embodiment of the present invention, which may specifically include the following modules:
[0070] The account entry module is used to store the account information entered by the operation and maintenance personnel in the Mysql database; for example, it receives the new account entered by the operation and maintenance personnel and adds it to realize account storage.
[0071] The device account management module is used to collect the account information currently used by each Pcdn device through telegraf in each Pcdn device for management; for example, the device account management module is responsible for the daily operation of the account, issuing the latest account configuration to the Pcdn device, and real-time bandwidth analysis of each account. In this embodiment, the daily operation of the account may include: account entry, account bandwidth adjustment, account status adjustment, account allocation, account recovery, line switching and other functions, such as Figure 2 shown.
[0072] The account allocation module is used to configure the account information allocated to the Pcdn device through telegraf based on the current real-time bandwidth of each Pcdn device within a specified frequency period;
[0073] The account recovery module is used to recover redundant account information in each Pcdn device through telegraf based on the current real-time bandwidth of each Pcdn device within a specified frequency period. That is, if there are too many accounts on the Pcdn device and the bandwidth is redundant, the account recovery module can be used to recover the accounts on the Pcdn device.
[0074] The Pcdn account management platform of this embodiment manages and allocates Pcdn accounts in a unified manner, solving the problem of the difficulty in managing the number of Pcdn accounts in the prior art. For example, the account management platform can automatically recycle and allocate accounts periodically. When the accounts on the Pcdn device are insufficient or the bandwidth of the accounts on the device is redundant, the "average allocation algorithm" can be used to allocate accounts. Among them, the average allocation algorithm is a calculation method that evenly allocates resources or tasks to a group of objects or individuals to ensure that each object or individual obtains the same or similar share to achieve fair and reasonable allocation. Common average allocation algorithms include equal allocation, proportional allocation, and reverse greedy allocation. When the account is recycled, the bandwidth of the account that is preferentially recycled is close to the redundant bandwidth, and after the account is recycled, the redundant bandwidth of the device is greater than 0; when the account is allocated, the device with relatively large redundant bandwidth is allocated first, that is, the reverse greedy allocation is adopted, and the device with the most resources is preferentially selected to obtain the account for allocation, so as to minimize the pressure of operation and management and improve the utilization rate of the account.
[0075] The above-mentioned reverse greedy allocation means that the algorithm gives priority to the devices or accounts with the most resources for allocation. Each time it makes a selection, it will try its best to utilize the part with the most resources, that is, the part with more redundant bandwidth, so as to maximize the account utilization rate, thereby improving the platform stability and management efficiency.
[0076] The account management system of this embodiment moves the device account relationship, which in the prior art could only be changed on the PCDN device and maintained in Excel, to the account management platform for unified change and maintenance, greatly improving operation and maintenance efficiency and facilitating problem analysis and troubleshooting.
[0077] The Pcdn account management platform of this embodiment may also include: a Promethues module, a Mysql database, an account bandwidth adjustment module, and an account line switching module;
[0078] The Promethues module is used to receive the real-time bandwidth data of each account information collected by telegraf in the Pcdn device for visual display or provide it to external query or visual analysis. The Promethues module captures the real-time bandwidth data of each account information collected by telegraf in the Pcdn device in real time through the HTTP protocol (that is, the monitored target is pre-incorporated into the Promethues module, and time series data collection, storage, alarm and display can be performed).
[0079] Furthermore, when the Promethus module captures the real-time bandwidth data of any account information collected by telegraf in any Pcdn device, it uniquely identifies the metric by giving it a name and a series of tags (key values), and different tags represent different time series. Metric types include Counter, Gauge, Histogram, and Summary. The data can be queried by the metric name and the corresponding tag.
[0080] Furthermore, the Promethues module has a built-in graphical interface for data visualization and visual analysis. It can display the real-time bandwidth data of each account information collected by telegraf in the captured Pcdn device through the pre-set dials, icons and other visualization tools in the graphical interface.
[0081] The Mysql database is used to store account information and the Pcdn devices bound to the account information, real-time bandwidth data transmitted by the Promethues module, heartbeat information of the Pcdn devices, and monitoring information of all account information in the platform. Furthermore, the Mysql database uses the SQL language to manage and query data, and can handle large-scale data and high concurrent access. The Mysql database of this embodiment is only used as an example, and can be replaced by PostagreSQL database, Oracle Database database, MongoDB database, Redis database or SQLite database, etc., and can be selected according to performance, security, scalability, cost and other factors.
[0082] The account bandwidth adjustment module is used to adjust the rated upstream bandwidth, rated downstream bandwidth, account password and VLAN of the account information; specifically, it includes:
[0083] Allows management of account information; allows setting the rated uplink and downlink bandwidth of an account according to demand, supports dynamic adjustment and preset value setting; allows modification of account passwords to ensure account security, supports password strength setting and password policy management to ensure the security of account information; allows setting the VLAN value identifier of an account to ensure that the account can correctly access the network, and supports flexible switching of different VLANs. Furthermore, permission control can be set to ensure that only authorized personnel can adjust account information to prevent unauthorized personnel from accessing or modifying account information; sets alarm rules to send alarm notifications in a timely manner when account information adjustment is abnormal or exceeds the set range; provides a confirmation mechanism to ensure verification and confirmation before adjusting account information to reduce the risk of misoperation.
[0084] The account line switching module is used to switch the management line type of the lost account information in the current Pcdn device to the data line type according to the monitoring information of the account information in each Pcdn device, and select the type of an account with a data line type to switch to the management line type;
[0085] Account status adjustment is used to set the status of account information recovered by the account recovery module to idle, set the status of account information allocated by the account allocation module to occupied, and adjust the status of account information in the Pcdn device according to the monitoring information of the account information in each Pcdn device.
[0086] The edge Pcdn device of this embodiment integrates the telegraf function. After the edge Pcdn device is handed over and maintained, after dialing up to the Internet, a small amount of pre-configured account information of this Pcdn device and the corresponding public network IP are collected through telegraf to the Pcdn account management platform for management; the Pcdn account management platform collects and stores the account information, network card information and device heartbeat pushed by telegraf; the account management platform can perform account entry, account recovery, account deletion and account allocation according to actual business to change the account on the pcdn device; the changed device account is sent to the Pcdn device through telegraf; the account management platform records all change records.
[0087] In the prior art, it takes 5 minutes to implement a simple account bandwidth adjustment on a PCDN device. It is necessary to log in to the machine, verify the relationship between the account and the IP, and adjust the account. After using the account management platform of this embodiment, the account adjustment can be completed within 1 minute, which effectively improves the timeliness.
[0088] In a possible implementation, the account entry module of this embodiment is specifically used to:
[0089] According to the account information entered by the operation and maintenance personnel and stored in the MySQL database;
[0090] Mysql database, specifically used for:
[0091] Use SQL language to store account information and Pcdn devices bound to account information, real-time bandwidth data transmitted by Promethues modules, heartbeat information of Pcdn devices, and monitoring information of all account information in the platform;
[0092] The account bandwidth adjustment module is specifically used for:
[0093] Adjust the rated upstream bandwidth, rated downstream bandwidth, account password and VLAN value of the account information;
[0094] The account line switching module is specifically used for:
[0095] According to the monitoring information of the account information in each Pcdn device, the management line type of the lost account information in the current Pcdn device is switched to the data line type, and the type of an account with a data line type is switched to the management line type;
[0096] Account status adjustment is used to set the status of account information recovered by the account recovery module to idle, set the status of account information allocated by the account allocation module to occupied, and adjust the status of account information in the Pcdn device according to the monitoring information of the account information in each Pcdn device.
[0097] The device account management module is specifically used for:
[0098] For each Pcdn device, according to the real-time bandwidth data of the Pcdn device received by the Promethues module and the bandwidth of the allocated account of the Pcdn device, an average allocation algorithm is used to determine the account information to be recycled in the Pcdn device; or to determine the idle account information to be allocated to the Pcdn device;
[0099] The account recovery module is specifically used for:
[0100] According to the account information to be recovered in the Pcdn device determined by the device account management module, recover the account information in the Pcdn device through telegraf in the Pcdn device;
[0101] The account allocation module is specifically used for:
[0102] According to the account information allocated to the Pcdn device determined by the device account management module, the newly allocated account information of the Pcdn device is configured through telegraf in the Pcdn device.
[0103] In a second possible implementation, the device account management module of this embodiment may be specifically used for:
[0104] Traverse all Pcdn devices, and calculate the redundant bandwidth based on the real-time bandwidth data of the Pcdn device received by the Promethues module in each Pcdn device and the bandwidth of the allocated account of the Pcdn device;
[0105] The redundant bandwidth = bandwidth of the allocated account - real-time bandwidth data;
[0106] Filter Pcdn devices whose redundant bandwidth is greater than 0 and less than or equal to the specified bandwidth threshold;
[0107] For a Pcdn device whose redundant bandwidth is greater than a specified bandwidth threshold, selecting at least one account information matching the redundant bandwidth from the Pcdn device as the account information to be recycled in the Pcdn device;
[0108] For Pcdn devices with redundant bandwidth less than 0, the absolute values of the redundant bandwidth are arranged in order, starting from the one with the largest absolute value of the redundant bandwidth. If there are idle accounts, at least one account information that matches the absolute value of the redundant bandwidth is selected from the idle accounts as the newly allocated account information in the current Pcdn device.
[0109] The account management platform of this embodiment adopts the above-mentioned "average distribution algorithm" to reduce the pressure of operation and management, especially when the number of accounts reaches tens of thousands and the number of PCDN devices reaches thousands. The advantages of the algorithm can be better reflected, and the utilization rate of the account is improved to the greatest extent. Manual inspection and recovery and distribution are no longer required, which improves the stability of the online machine.
[0110] In the specific implementation process, the account management platform of this embodiment also includes: an account analysis module and a log module;
[0111] The account analysis module is used to analyze each account information according to the real-time bandwidth data of the Pcdn device received by the Promethues module and the bandwidth of the allocated account of the Pcdn device, and verify whether the scheduled account information is stable; specifically, the account analysis module generates stability data corresponding to the scheduled account information, that is, the number of fluctuations of the data, and the specific value corresponding to the fluctuation of the data and the corresponding time of the fluctuation, according to the real-time bandwidth data of the Pcdn device received by the Promethues module and the bandwidth of the allocated account of the Pcdn device, as well as the pre-set fluctuation threshold. At the same time, based on the real-time bandwidth data of the Pcdn device and the bandwidth of the allocated account of the Pcdn device, a schematic diagram of the visual analysis of the scheduled account information is drawn to verify whether the scheduled account information is stable and assist the scheduling in allocation optimization. For example, when the bandwidth on the Pcdn device is abnormal, the real-time bandwidth borne by each account can be viewed through the account analysis module, so as to find out which accounts have problems.
[0112] The log module is used to record all operation information of the Pcdn account management platform, that is, to record information on various operations and events that occur in the Pcdn account management platform, as well as the corresponding time of various operations and events that occur (the time here includes coordinated universal time, local time and server time), for the purpose of auditing, troubleshooting, performance tuning, etc. Furthermore, the log module can record user operation logs, permission change logs, platform time logs, account access logs, error logs and performance logs respectively; among them, the user operation log can record various operations on the Pcdn account management platform, such as the operator, operation time and specific operation content; the permission change log can record the user permission changes in order to track and audit the historical records of permission changes; the platform event log can record the occurrence of key platform events, such as startup, shutdown, restart, etc., which is used to monitor the operating status of the platform and handle abnormal situations in a timely manner; the account access log can record the user's access to the account management platform, including the access source and access path, etc., which is used to track the activity path; the error log can record errors, warnings and abnormal information during the platform operation process, so as to diagnose and solve problems in a timely manner and ensure the stability and reliability of the platform; the performance log can record the performance of the platform operation, such as response time, throughput, resource utilization, etc., which is used to analyze the platform performance bottleneck and optimize the platform operation efficiency.
[0113] The account management platform of this embodiment can visualize the real-time bandwidth data, and it comes with a complete operation log, which is convenient for tracing account changes and troubleshooting.
[0114] Reference Figure 3 , shows a flowchart of the steps of the Pcdn account management method based on telegraf provided in an embodiment of the present invention, which may specifically include the following steps:
[0115] 301. The account management platform obtains the real-time bandwidth data of the Pcdn device and all account information of the Pcdn device through telegraf integrated in the Pcdn device;
[0116] 302. The account management platform determines whether there is redundant bandwidth in the current PCDN device based on the rated bandwidth and real-time bandwidth data of all account information;
[0117] 303. If there is redundant bandwidth, determine whether to allocate idle account information to the Pcdn device or to recycle at least one account information in the Pcdn device according to the redundant bandwidth information.
[0118] In addition, to better understand the above Figure 3 The method shown in the embodiment of the present invention provides a Pcdn account management method based on telegraf, which specifically includes the following steps:
[0119] Step 11: First calculate the redundant bandwidth of the Pcdn device = bandwidth of the allocated account - actual bandwidth of the device.
[0120] Step 12: Filter out devices with redundant bandwidth > 0 and redundant bandwidth <= 40M (specified bandwidth threshold).
[0121] In this embodiment, these Pcdn devices do not need to be adjusted, so they are filtered.
[0122] Step 13: For devices with redundant bandwidth > 40M, account recovery is performed. The accounts that are preferentially selected for recovery are: the bandwidth of the account is close to the redundant bandwidth and the redundant bandwidth of the device is > 0 after the account is recovered.
[0123] Step 14: The account is reclaimed and the status is set to idle.
[0124] Step 15: Update redundant bandwidth = previous redundant bandwidth - bandwidth of the recovered account, and determine whether the redundant bandwidth at this time is still greater than 40M. If it is still greater than 40M, continue with step 13, otherwise execute step 16.
[0125] Step 16: For devices with redundant bandwidth < 0, redundant bandwidth = - redundant bandwidth, and the devices are sorted from large to small according to redundant bandwidth, and the accounts are allocated starting from the device with the largest redundant bandwidth.
[0126] In view of the actual number of idle accounts, a sorting method may be selected to prevent idle accounts from being insufficient for allocation to all devices. In this embodiment, devices with a relatively large redundant bandwidth gap may be allocated preferentially.
[0127] If the number of idle accounts in this embodiment is sufficient, there is no need to sort them, and an account is allocated to each device with redundant bandwidth.
[0128] Step 17: If there is no idle account, then end.
[0129] Step 18: If there are idle accounts, the idle accounts with bandwidth closest to the redundant bandwidth are preferentially selected, and after the idle accounts are allocated to the device, the redundant bandwidth of the device is less than or equal to 40.
[0130] Step 19: Assign the above idle account to the device.
[0131] Step 20: Update redundant bandwidth = previous redundant bandwidth - bandwidth of the allocated account. If redundant bandwidth>0, continue with step 17, otherwise, end the allocation of the device and continue with the allocation of the next device.
[0132] The accounts are evenly distributed, and the device information is as shown in Table 1:
[0133]
[0134] Combined with Table 1, an example is given to illustrate the allocation process:
[0135] (1) Calculate the redundant bandwidth of the device. The redundant bandwidth of 192.168.200.123 is 80M, and the redundant bandwidth of 192.168.200.124 is -70M.
[0136] (2) Filter out devices with redundant bandwidth > 0 and redundant bandwidth <= 40M (no device meets the conditions);
[0137] (3) The redundant bandwidth of 192.168.200.123 is 250-120=130M>40M, and account recovery is required. According to the priority selection condition, account 211216 is recovered (the bandwidth of this account is closest to 80M, and 250-60-120>0). After recovery, the redundant bandwidth of 192.168.200.123 is 190M, 190-120=70>=40, so recovery continues. According to the priority selection condition, account 211215 is recovered (211213 and 211214 also meet the requirements, so one is randomly selected). After recovery, the redundant bandwidth of 192.168.200.123 is 140M, 140-120=20<40, so the end condition is met, and the recovery of 192.168.200.123 is completed;
[0138] (4) The redundant bandwidth of 192.168.200.124 is 50-120=-70M<0, and account allocation is required. The redundant bandwidth=-redundant bandwidth=70. According to the priority selection condition, account 211216 is allocated (the bandwidth 60 of this account is closest to 70, and 50+60=110-120<=40). After the allocation, the redundant bandwidth of 192.168.200.124 is 110, 110-120<0. The allocation continues. According to the priority selection condition, 211215 is allocated. After the allocation, the redundant bandwidth of 192.168.200.124 is 110+50=160M, 160-120=40<=40, and the allocation ends.
[0139] The account management platform of this embodiment adopts an average distribution algorithm to recover or allocate accounts, which reduces the pressure of operation and management. Especially when the number of accounts reaches tens of thousands and the number of devices reaches thousands, the advantages of the algorithm can be better reflected, and the utilization rate of accounts is improved to the greatest extent. Manual inspection and recovery and allocation are no longer required, which improves the stability of online machines.
[0140] In addition, if Figure 4 As shown, Figure 4The diagram shows the newly purchased account information. If the account number on the device 192.168.200.123 is insufficient, some accounts need to be added. The newly purchased account number is imported into the account management platform through the account entry module, such as Figure 5 After the import is successful, the account status is changed to "upward" through the account bandwidth adjustment module, and then sent to the Pcdn device to complete the expansion of the device account, as shown in the figure below. Figure 6 shown.
[0141] like Figure 7 As shown in the figure, the rated upstream and downstream bandwidth of the account 211212s3 needs to be modified to a larger value, otherwise it will affect the usage. Select this account with the help of the account bandwidth adjustment module in the account management platform, and then click Bandwidth Adjustment. After clicking Report Error, the account will be automatically sent to the Pcdn device to complete a bandwidth adjustment of the account.
[0142] like Figure 8 and Fig. 9 As shown, in order to verify whether the scheduling can stably and evenly allocate bandwidth to each account, the account needs to be analyzed. With the help of the account analysis module, select all accounts on the device 192.168.202.2 and click Account Analysis. You can see that the uplink bandwidth of the accounts on this device is relatively stable overall, and the downlink bandwidth may have abnormal spikes at certain times. Therefore, send this analysis data to the dispatcher to assist the dispatcher in optimizing the allocation.
[0143] like Fig.10 As shown in the figure, the number of accounts on the online device 192.168.209.250 is incorrect, so you need to check what changes have been made to the accounts on this machine. You can query the change operation log of this machine and use the keyword 192.168.209.250 to query and get the result. Click "Details" to see the specific operation content, such as Fig.11 As shown, you can see the account change history of this device and the corresponding operator.
[0144] Through telegraf, Pcdn accounts are uniformly managed and allocated to solve the problem of difficult management of a large number of Pcdn accounts. Account changes that could only be performed on the device and device account relationships maintained in Excel were moved to the platform for unified changes and maintenance, and real-time bandwidth data visualization was performed. This greatly improved the efficiency of operation and maintenance and facilitated problem analysis and troubleshooting.
[0145] The account management platform comes with a complete operation log, which makes it easy to trace account changes and troubleshoot problems.
[0146] In addition, an embodiment of the present invention further provides an electronic device, such as Fig.12As shown, it includes a processor 1301, a communication interface 1302, a memory 1303 and a communication bus 1304, wherein the processor 1301, the communication interface 1302, and the memory 1303 communicate with each other through the communication bus 1304.
[0147] Memory 1303, used for storing computer programs;
[0148] The processor 1301 is used to implement the following steps when executing the program stored in the memory 1303:
[0149] The account management platform obtains the real-time bandwidth data of the Pcdn device and all account information of the Pcdn device through the telegraf integrated in the Pcdn device;
[0150] The account management platform determines whether there is redundant bandwidth in the current PCDN device based on the rated bandwidth and real-time bandwidth data of all account information;
[0151] If there is redundant bandwidth, it is determined whether to allocate idle account information to the Pcdn device or to recycle at least one account information in the Pcdn device according to the redundant bandwidth information.
[0152] Specifically, after the account management platform obtains the real-time bandwidth data of the Pcdn device and all account information of the Pcdn device through the telegraf integrated in the Pcdn device, it calculates the redundant bandwidth of the Pcdn device through the bandwidth of the allocated account and the actual bandwidth of the device, that is, the redundant bandwidth of the Pcdn device = the bandwidth of the allocated account - the actual bandwidth of the device.
[0153] Subsequently, the account management platform filters out devices with redundant bandwidth>0 and redundant bandwidth<=40M (specified bandwidth threshold).
[0154] Subsequently, for devices with redundant bandwidth > 40M, account recovery is performed, and accounts that are preferentially selected for recovery are those whose bandwidth is close to the redundant bandwidth and whose redundant bandwidth is > 0 after the account is recovered.
[0155] After the account is recovered, the status is set to idle and the redundant bandwidth is updated. The updated redundant bandwidth = the previous redundant bandwidth - the bandwidth of the recovered account. It is determined whether the redundant bandwidth is still greater than 40M. If it is still greater than 40M, the account recovery is continued.
[0156] Otherwise, for devices with redundant bandwidth < 0, redundant bandwidth = - redundant bandwidth, and the devices are sorted from large to small according to redundant bandwidth, and the accounts are allocated starting from the device with the largest redundant bandwidth;
[0157] In view of the actual number of idle accounts, a sorting method may be selected to prevent idle accounts from being insufficient for allocation to all devices. In this embodiment, devices with a relatively large redundant bandwidth gap may be allocated preferentially.
[0158] If the number of idle accounts in this embodiment is sufficient, there is no need to sort them, and an account is allocated to each device with redundant bandwidth.
[0159] If there is no idle account, then end;
[0160] If there are idle accounts, the idle accounts with the closest bandwidth to the redundant bandwidth are preferentially selected, and after the idle accounts are allocated to the device, the redundant bandwidth of the device is less than or equal to 40.
[0161] Allocate the idle account to the device and update the redundant bandwidth, where the updated redundant bandwidth = the previous redundant bandwidth - the bandwidth of the allocated account;
[0162] If the redundant bandwidth>0, continue to determine whether there is an idle account, otherwise, end the allocation of the device and continue to allocate the next device.
[0163] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0164] The communication interface is used for communication between the above terminal and other devices.
[0165] The memory may include a random access memory (RAM) or a 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.
[0166] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0167] like Fig.13 As shown, in another embodiment provided by the present invention, a computer-readable storage medium 1401 is also provided, in which instructions are stored. When the computer-readable storage medium 1401 is run on a computer, the computer executes the Pcdn account management method based on telegraf described in the above embodiment.
[0168] In another embodiment provided by the present invention, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the Pcdn account management method based on telegraf described in the above embodiment.
[0169] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0170] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0171] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0172] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A Pcdn account management platform based on telegraf, characterized in that: include: The account entry module is used to store the account information entered by the operation and maintenance personnel in the MySQL database; The device account management module is used to collect the account information currently used by each Pcdn device through the telegraf in the Pcdn device for management; The account allocation module is used to configure the account information allocated to the Pcdn device through telegraf based on the current real-time bandwidth of each Pcdn device within a specified frequency period; The account recovery module is used to recover redundant account information in each Pcdn device through telegraf based on the current real-time bandwidth of each Pcdn device within a specified frequency period.
2. The Pcdn account management platform according to claim 1, characterized in that: Also includes: Promethues module is used to receive the real-time bandwidth data of each account information collected by telegraf in the Pcdn device for visual display; Mysql database is used to store account information and Pcdn devices bound to account information, real-time bandwidth data transmitted by the Promethues module, heartbeat information of Pcdn devices, and monitoring information of all account information in the platform; The account bandwidth adjustment module is used to adjust the rated upstream bandwidth, rated downstream bandwidth, account password and VLAN value of the account information; The account line switching module is used to switch the management line type of the lost account information in the current Pcdn device to the data line type according to the monitoring information of the account information in each Pcdn device, and select the type of an account with a data line type to switch to the management line type; Account status adjustment is used to set the status of account information recovered by the account recovery module to idle, set the status of account information allocated by the account allocation module to occupied, and adjust the status of account information in the Pcdn device according to the monitoring information of the account information in each Pcdn device.
3. The Pcdn account management platform according to claim 2, characterized in that: The device account management module is specifically used for: For each Pcdn device, according to the real-time bandwidth data of the Pcdn device received by the Promethues module and the bandwidth of the allocated account of the Pcdn device, an average allocation algorithm is used to determine the account information to be recycled in the Pcdn device; or to determine the idle account information to be allocated to the Pcdn device; The account recovery module is specifically used for: According to the account information to be recovered in the Pcdn device determined by the device account management module, recover the account information in the Pcdn device through telegraf in the Pcdn device; The account allocation module is specifically used for: According to the account information allocated to the Pcdn device determined by the device account management module, the newly allocated account information of the Pcdn device is configured through telegraf in the Pcdn device.
4. The Pcdn account management platform according to claim 3, characterized in that: The device account management module is specifically used for: Traverse all Pcdn devices, and calculate the redundant bandwidth based on the real-time bandwidth data of the Pcdn device received by the Promethues module in each Pcdn device and the bandwidth of the allocated account of the Pcdn device; The redundant bandwidth = bandwidth of the allocated account - real-time bandwidth data; Filter Pcdn devices whose redundant bandwidth is greater than 0 and less than or equal to the specified bandwidth threshold; For a Pcdn device whose redundant bandwidth is greater than a specified bandwidth threshold, selecting at least one account information matching the redundant bandwidth from the Pcdn device as the account information to be recycled in the Pcdn device; For Pcdn devices with redundant bandwidth less than 0, the absolute values of the redundant bandwidth are arranged in order, starting from the one with the largest absolute value of the redundant bandwidth. If there are idle accounts, at least one account information that matches the absolute value of the redundant bandwidth is selected from the idle accounts as the newly allocated account information in the current Pcdn device.
5. The Pcdn account management platform according to claim 3, characterized in that: Also includes: The account analysis module is used to analyze each account information according to the real-time bandwidth data of the Pcdn device received by the Promethues module and the bandwidth of the allocated account of the Pcdn device, and verify whether the scheduled account information is stable; The log module is used to record all operation information of the Pcdn account management platform.
6. A Pcdn account management system, characterized in that: include: The telegraf-based account management platform as described in any one of claims 1 to 5 above, and a plurality of Pcdn devices integrated with telegraf; Each Pcdn device interacts with the Pcdn account management platform through telegraf.
7. A Pcdn account management method based on telegraf, characterized in that: include: The account management platform obtains the real-time bandwidth data of the Pcdn device and all account information of the Pcdn device through the telegraf integrated in the Pcdn device; The account management platform determines whether there is redundant bandwidth in the current PCDN device based on the rated bandwidth and real-time bandwidth data of all account information; If there is redundant bandwidth, it is determined whether to allocate idle account information to the Pcdn device or to recycle at least one account information in the Pcdn device according to the redundant bandwidth information.
8. The method according to claim 7, characterized in that If there is redundant bandwidth, determining whether to allocate idle account information to the Pcdn device or to recycle at least one account information in the Pcdn device according to information of the redundant bandwidth, including: Calculate redundant bandwidth, where redundant bandwidth = bandwidth of allocated account minus real-time bandwidth data; If the redundant bandwidth is greater than 0 and less than or equal to the specified bandwidth threshold, it does not need to be recycled and account information is not allocated; When the redundant bandwidth is greater than the specified bandwidth threshold, at least one account information matching the redundant bandwidth is selected from the Pcdn device as the account information to be recovered in the Pcdn device; When the redundant bandwidth is less than 0, determine whether there is an idle account. If so, select at least one account information that matches the absolute value of the redundant bandwidth from the idle accounts as the newly allocated account information in the Pcdn device.
9. The method according to claim 7, characterized in that: Also includes: The account management platform receives the real-time bandwidth data of each account collected by telegraf in the Pcdn device for visual display.
10. The method according to claim 7, characterized in that The method further comprises: The account management platform receives the account information input by the operation and maintenance personnel and stores it in a Mysql database, or adjusts the rated bandwidth / password / line type / vlan of at least one account information.
Citation Information
Patent Citations
Method, device and system for node management and access in peer-to-peer network
CN101631034A
Dynamic depriving type service transmission method of space information network
CN101741733A
Cloud container storage control method and system, electronic equipment and storage medium
CN113055469A
Workstation performance monitoring and warning system and method thereof
CN114490248A
Resource node adjustment method and system, electronic equipment and readable storage medium
CN116600015A