A telegraf-based Pcdn account management platform and Pcdn account management method
Patent Information
- Application Number
- CN202411695333.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2044-11-25
AI Technical Summary
[0003]本发明实施例是提供一种基于telegraf的Pcdn账号管理平台、一种基于telegraf的Pcdn账号管理方法,以解决Pcdn账号多、难管理、维护成本高的问题
[0051] The PCDN account management platform of this invention provides unified management and allocation of PCDN accounts, solving the problem of managing a large number of PCDN accounts in existing technologies. It moves the existing method of account changes and Excel maintenance, which previously only allowed on-device PCDN maintenance, to a unified platform for changes and maintenance, greatly improving operational efficiency and facilitating problem analysis and troubleshooting.
Smart Images

Figure CN119728165B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of PCDN low-bandwidth dial-up technology, and in particular to a PCDN account management platform based on Telegraf and a PCDN account management method based on Telegraf. Background Technology
[0002] The bandwidth that a single account on a PCDN (P2P Content Delivery Network) device can handle is generally quite small, ranging from as low as 50Mbps to as high as 500Mbps, far from sufficient to meet the required bandwidth demands. Therefore, multiple accounts are typically purchased for a single PCDN device. The number of accounts varies depending on the volume of business, sometimes reaching hundreds. Thus, account management is extremely important! Initially, accounts were manually modified by maintenance personnel on the machines, and the relationship between accounts and devices was maintained in Excel. This resulted in high maintenance costs, slow processing times, and low efficiency. It also made it impossible to obtain real-time bandwidth information for each account, and the availability of the PCDN device remained unavailable. Summary of the Invention
[0003] This invention provides a Telegraf-based PCDN account management platform and a Telegraf-based PCDN account management method to solve the problems of numerous, difficult-to-manage, and high-maintenance PCDN accounts.
[0004] This invention discloses a PCDN account management platform based on Telegraf, comprising:
[0005] The account entry module is used to input account information from operations and maintenance personnel and store it in a MySQL database;
[0006] The device account management module is used to collect and manage the account information currently used by each PCDN device through the Telegraf function in each PCDN device.
[0007] The account allocation module is used to configure and allocate account information to each PCDN device via Telegraf based on the current real-time bandwidth of each PCDN device within a specified frequency period.
[0008] The account recycling module is used to reclaim redundant account information in each PCDN device based on the current real-time bandwidth of each PCDN device within a specified frequency period using Telegraf.
[0009] Optionally, it also includes:
[0010] The Promethues module is used to receive real-time bandwidth data of each account information collected by Telegraf within the PCDN device and visualize it.
[0011] 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 accounts within the platform.
[0012] The account bandwidth adjustment module is used to adjust the rated uplink bandwidth, rated downlink bandwidth, account password, and VLAN value of 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 based on the monitoring information of the account information in each PCDN device, and to select an account of data line type to switch to the management line type.
[0014] Account status adjustment is used to set the status of accounts reclaimed by the account recycling module to idle, the status of accounts allocated by the account allocation module to occupied, and to adjust the status of account information within each PCDN device based on monitoring information of account information within each PCDN device.
[0015] Optionally, the device account management module is specifically used for:
[0016] For each PCDN device, based on the real-time bandwidth data of the PCDN device received by the Promethues module and the bandwidth of the allocated accounts of the PCDN device, an average allocation algorithm is used to determine the account information to be reclaimed within the PCDN device; or to determine the idle account information to be allocated to the PCDN device.
[0017] The account recycling module is specifically used for:
[0018] Based on the account information to be reclaimed within the PCDN device determined by the device account management module, the account information within the PCDN device is reclaimed via Telegraf within the PCDN device.
[0019] The account allocation module is specifically used for:
[0020] Based on the account information assigned to the PCDN device by the device account management module, the newly assigned account information is configured through the telegraf function within the PCDN device.
[0021] Optionally, the device account management module is specifically used for:
[0022] Iterate through all PCDN devices and calculate redundant bandwidth based on the real-time bandwidth data of the PCDN device received by the Promethues module within each PCDN device and the bandwidth of the allocated accounts of the PCDN device.
[0023] The redundant bandwidth = bandwidth of allocated accounts - real-time bandwidth data;
[0024] Filter out PCDN devices with redundant bandwidth greater than 0 and less than or equal to a specified bandwidth threshold;
[0025] For a PCDN device with redundant bandwidth greater than a specified bandwidth threshold, at least one account information matching the redundant bandwidth is selected from the PCDN device and used as the account information to be reclaimed from the PCDN device.
[0026] For PCDN devices with redundant bandwidth less than 0, the absolute values of the redundant bandwidth are sorted by size, starting with the largest absolute value. 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 and used as the newly assigned account information in the current PCDN device.
[0027] Optionally, it also includes:
[0028] The account analysis module is used to analyze the information of each account based on the real-time bandwidth data of the PCDN device and the bandwidth of the allocated accounts of the PCDN device received by the Promethues module, and to 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] This invention also discloses a PCDN account management system, characterized in that it includes:
[0031] The aforementioned Telegraf-based account management platform, and multiple PCDN devices integrated with Telegraf;
[0032] Each PCDN device interacts with the PCDN account management platform via Telegraf.
[0033] This invention also discloses a PCDN account management method based on Telegraf, including:
[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 within the PCDN device.
[0035] The account management platform determines whether the current PCDN device has redundant bandwidth based on the rated bandwidth and real-time bandwidth data of all account information.
[0036] If redundant bandwidth exists, the system determines, based on the redundant bandwidth information, whether to allocate idle account information to the PCDN device or to reclaim at least one account information within the PCDN device.
[0037] Optionally, if redundant bandwidth exists, the system determines, based on the redundant bandwidth information, whether to allocate idle account information to the PCDN device or to reclaim at least one account information within the PCDN device, including:
[0038] Calculate the redundant bandwidth, where the redundant bandwidth = bandwidth of allocated accounts - 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 or account information needs to be allocated.
[0040] When the redundant bandwidth is greater than the specified bandwidth threshold, at least one account information that matches the redundant bandwidth is selected from the PCDN device and used as the account information to be reclaimed 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 and use it as the newly allocated account information in the PCDN device.
[0042] Optionally, it also includes:
[0043] The account management platform receives and visualizes the real-time bandwidth data of each account collected by Telegraf within the PCDN device.
[0044] Optionally, the method further includes:
[0045] The account management platform receives account information input by operations and maintenance personnel and stores it in a MySQL database, or adjusts the rated bandwidth / password / line type / VLAN values of at least one account.
[0046] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0047] The memory is used to store computer programs;
[0048] When the processor executes a program stored in the memory, it implements the method described in the embodiments of the present invention.
[0049] This invention also discloses one or more computer-readable media storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this invention.
[0050] The embodiments of the present invention have the following advantages:
[0051] The PCDN account management platform of this invention provides unified management and allocation of PCDN accounts, solving the problem of managing a large number of PCDN accounts in existing technologies. It moves the existing method of account changes and Excel maintenance, which previously only allowed on-device PCDN maintenance, to a unified platform for changes and maintenance, greatly improving operational efficiency and facilitating problem analysis and troubleshooting.
[0052] The PCDN account management platform of this invention assists online operators in account management, PCDN account analysis, and PCDN machine analysis, improving operational efficiency and reducing operating costs. It solves the problems of numerous accounts, difficulty in management, and high maintenance costs in existing technologies. Attached Figure Description
[0053] Figure 1 This 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 This is a schematic diagram illustrating the daily operation of an account, as shown in an embodiment of the present invention;
[0055] Figure 3 This is a flowchart illustrating the steps of a PCDN account management method based on Telegraf provided in this embodiment of the invention;
[0056] Figure 4 This is a schematic diagram of the newly purchased account information provided in an embodiment of the present invention;
[0057] Figure 5 This is a schematic diagram of account import provided in an embodiment of the present invention;
[0058] Figure 6 This is a schematic diagram of account status adjustment provided in an embodiment of the present invention;
[0059] Figure 7 This is a schematic diagram of account bandwidth adjustment provided in an embodiment of the present invention;
[0060] Figure 8 and Figure 9 These are schematic diagrams illustrating the visualization analysis of all accounts on the PCDN device provided in this embodiment of the invention;
[0061] Figure 10This is a schematic diagram of querying PCDN devices provided in an embodiment of the present invention;
[0062] Figure 11 This is a schematic diagram of querying logs on a PCDN device provided in an embodiment of the present invention;
[0063] Figure 12 This is a block diagram of an electronic device provided in an embodiment of the present invention;
[0064] Figure 13 This is a schematic diagram of a computer-readable medium provided in an embodiment of the present invention. Detailed Implementation
[0065] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be 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: a Telegraf-based account management platform 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] A PCDN (Peer Content Deliberation Network) is a type of peer-to-peer content delivery network that accelerates the transmission of network content by utilizing resources on terminal devices. PCDN devices typically refer to servers or devices deployed at the network edge, used to store and transmit network content and communicate with terminal devices. In this embodiment, the PCDN device is an edge device responsible for caching data and dialing up for internet access. Each PCDN device has a dial-up program installed, which reads the username, password, and VLAN from a specified file to establish an internet connection.
[0068] In this embodiment, each PCDN device has the Telegraf program installed. Telegraf is a data collection agent primarily used to collect, process, and summarize metric data from various data collection systems and tools. It can easily integrate with different data collection and storage systems to monitor and analyze system and application performance. In this embodiment, Telegraf handles communication between the PCDN device and the PCDN account management platform (hereinafter referred to as the account management platform or platform). The account information (username, password, VLAN, etc.) configured by the account management platform is sent to a file at a specified path on the PCDN device via Telegraf. Telegraf periodically (e.g., every 30 seconds) collects the network card, actual uplink bandwidth, and actual downlink bandwidth of each successfully dialed account on the current device and pushes this data to the PCDN account management platform.
[0069] See Figure 1 This diagram illustrates a structural block diagram of a Telegraf-based PCDN account management platform provided in an embodiment of the present invention, which may specifically include the following modules:
[0070] The account entry module is used to store account information entered by operations and maintenance personnel in a MySQL database; for example, it receives new accounts entered by operations and maintenance personnel and adds them to achieve account storage.
[0071] The device account management module is used to collect and manage the account information currently used by each PCDN device through Telegraf. For example, this module is responsible for the daily operation of accounts, distributing the latest account configurations to the PCDN devices, and real-time bandwidth analysis for each account. In this embodiment, the daily operation of accounts may include functions such as account entry, account bandwidth adjustment, account status adjustment, account allocation, account recycling, and line switching. Figure 2 As shown.
[0072] The account allocation module is used to configure and allocate account information to each PCDN device via Telegraf based on the current real-time bandwidth of each PCDN device within a specified frequency period.
[0073] The account recycling module is used to reclaim redundant account information within each PCDN device based on the current real-time bandwidth of each device within a specified frequency period, using Telegraf. In other words, if there are too many accounts on a PCDN device, resulting in bandwidth redundancy, the account recycling module can be used to reclaim these accounts.
[0074] This embodiment of the PCDN account management platform provides unified management and allocation of PCDN accounts, solving the problem of managing a large number of PCDN accounts in existing technologies. For example, the account management platform can periodically and automatically reclaim and allocate accounts. When there are not enough accounts on a PCDN device, or when the bandwidth of accounts on the device is redundant, an "average allocation algorithm" can be used for account allocation. The average allocation algorithm is a calculation method that evenly distributes resources or tasks to a group of objects or individuals to ensure that each object or individual receives the same or similar share, thus achieving a fair and reasonable allocation. Common average allocation algorithms include equal allocation, proportional allocation, and reverse-order greedy allocation. In this application, when reclaiming accounts, priority is given to reclaiming accounts whose bandwidth is close to redundant bandwidth, and whose redundant bandwidth is greater than 0 after reclaiming the account. When allocating accounts, priority is given to allocating to devices with larger redundant bandwidth, i.e., a reverse-order greedy allocation is used, prioritizing the allocation to devices with the most resources to maximize account utilization and reduce operational management pressure.
[0075] The aforementioned reverse greedy allocation algorithm prioritizes the allocation of devices and accounts with the most resources. Each time a selection is made, it will make the most use of the most resources, i.e. the part with more redundant bandwidth, in order to maximize the account utilization rate and thus improve platform stability and management efficiency.
[0076] The account management system in this embodiment moves the device account relationships, which in the prior art could only be changed and maintained on PCDN devices using 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 in 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 real-time bandwidth data for each account collected by Telegraf within the PCDN device, and then visualize or provide it to external queries or visualization analysis. The Promethues module captures real-time bandwidth data for each account collected by Telegraf within the PCDN device via the HTTP protocol (i.e., by pre-including the monitored target in the Promethues module, time-series data collection, storage, alarms, and display can be performed).
[0079] Furthermore, when the Promethus module captures real-time bandwidth data for any account information collected by Telegraf within any PCDN device, it uniquely identifies the metric by assigning it a name and a series of tags (key-value pairs). Different tags represent different time series. Metric types include Counter, Gauge, Histogram, and Summary. Data can be queried using the metric name and its corresponding tags.
[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 captured by Telegraf from the PCDN device through pre-set visualization tools such as dials and icons within the graphical interface.
[0081] The MySQL database is used to store account information and the PCDN devices bound to those accounts, real-time bandwidth data transmitted by the Promethues module, heartbeat information from the PCDN devices, and monitoring information for all accounts within the platform. Furthermore, the MySQL database uses SQL for data management and querying, enabling it to handle large-scale data and high-concurrency access. The MySQL database in this example is merely a sample; it can be replaced with other databases such as PostgreSQL, Oracle, MongoDB, Redis, or SQLite. The appropriate database should be selected based on factors such as performance, security, scalability, and cost.
[0082] The account bandwidth adjustment module is used to adjust the rated uplink bandwidth, rated downlink bandwidth, username and password, and VLAN of account information; specifically, it includes:
[0083] It allows for account information management; allows setting the rated uplink and downlink bandwidth of an account according to needs, supporting dynamic adjustment and preset value settings; allows changing account passwords to ensure account security, supporting password strength settings and password policy management to ensure the security of account information; allows setting VLAN values for accounts to ensure that accounts can correctly access the network, and supports flexible switching between different VLANs. Furthermore, it allows for access control to ensure that only authorized personnel can adjust account information, preventing unauthorized personnel from accessing or modifying account information; it allows for setting alarm rules to send alarm notifications promptly when account information adjustments are abnormal or exceed the set range; and it provides a confirmation mechanism to ensure verification and confirmation before adjusting account information, reducing the risk of accidental operation.
[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 based on the monitoring information of the account information in each PCDN device, and to select an account of data line type to switch to the management line type.
[0085] Account status adjustment is used to set the status of account information reclaimed by the account recycling module to idle, set the status of account information allocated by the account allocation module to occupied, and adjust the status of account information within each PCDN device based on monitoring information of account information within each PCDN device.
[0086] In this embodiment, the edge PCDN device integrates Telegraf functionality. After the edge PCDN device is handed over for maintenance and connects to the Internet, it uses Telegraf to collect a small amount of pre-configured account information and corresponding public IP addresses of the PCDN device and sends them to the PCDN account management platform for management. The PCDN account management platform collects and stores the account information, network card information, and device heartbeats pushed by Telegraf. The account management platform can change the accounts on the PCDN device by performing account entry, account recycling, account deletion, and account allocation according to actual business needs. The changed device accounts are then distributed to the PCDN device via Telegraf. The account management platform records all change records.
[0087] In the existing technology, it takes 5 minutes to implement a simple account bandwidth adjustment on a PCDN device. It requires logging into the machine, verifying the relationship between the account and the IP, and making the account adjustment. 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 one possible implementation, the account entry module of this embodiment is specifically used for:
[0089] The account information entered by the operations and maintenance personnel is stored in the MySQL database;
[0090] MySQL database, specifically used for:
[0091] The system uses SQL to store account information and the PCDN devices bound to those accounts, real-time bandwidth data transmitted by the Promethues module, heartbeat information of the PCDN devices, and monitoring information of all accounts within the platform.
[0092] The account bandwidth adjustment module is specifically used for:
[0093] Adjust the rated uplink bandwidth, rated downlink bandwidth, username, password, and VLAN value of the account information;
[0094] The account line switching module is specifically used for:
[0095] Based on the monitoring information of account information in each PCDN device, the management line type of the currently disconnected account information in the PCDN device is switched to the data line type, and the type of an account with a selected data line type is switched to the management line type.
[0096] Account status adjustment is used to set the status of accounts reclaimed by the account recycling module to idle, the status of accounts allocated by the account allocation module to occupied, and to adjust the status of account information within each PCDN device based on monitoring information of account information within each PCDN device.
[0097] The device account management module is specifically used for:
[0098] For each PCDN device, based on the real-time bandwidth data of the PCDN device received by the Promethues module and the bandwidth of the allocated accounts of the PCDN device, an average allocation algorithm is used to determine the account information to be reclaimed within the PCDN device; or to determine the idle account information to be allocated to the PCDN device.
[0099] The account recycling module is specifically used for:
[0100] Based on the account information to be reclaimed within the PCDN device determined by the device account management module, the account information within the PCDN device is reclaimed via Telegraf within the PCDN device.
[0101] The account allocation module is specifically used for:
[0102] Based on the account information assigned to the PCDN device by the device account management module, the newly assigned account information is configured through the telegraf function within the PCDN device.
[0103] In the second possible implementation, the device account management module of this embodiment can be specifically used for:
[0104] Iterate through all PCDN devices and calculate redundant bandwidth based on the real-time bandwidth data of the PCDN device received by the Promethues module within each PCDN device and the bandwidth of the allocated accounts of the PCDN device.
[0105] The redundant bandwidth = bandwidth of allocated accounts - real-time bandwidth data;
[0106] Filter out PCDN devices with redundant bandwidth greater than 0 and less than or equal to a specified bandwidth threshold;
[0107] For a PCDN device with redundant bandwidth greater than a specified bandwidth threshold, at least one account information matching the redundant bandwidth is selected from the PCDN device and used as the account information to be reclaimed from the PCDN device.
[0108] For PCDN devices with redundant bandwidth less than 0, the absolute values of the redundant bandwidth are sorted by size, starting with the largest absolute value. 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 and used as the newly assigned account information in the current PCDN device.
[0109] The account management platform in this embodiment adopts the aforementioned "average allocation algorithm," which reduces the pressure of operation and management. In particular, when the number of accounts reaches tens of thousands and the number of PCDN devices reaches thousands, the advantages of this algorithm are more evident, maximizing the utilization rate of accounts, eliminating the need for manual inspection and recycling, and improving the stability of online machines.
[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 analyzes each account's information based on the real-time bandwidth data of the PCDN device received from the Promethues module and the bandwidth of the allocated accounts on the PCDN device. This analysis verifies the stability of the scheduled account information. Specifically, the account analysis module generates stability data for the scheduled account information based on the real-time bandwidth data and allocated account bandwidth received from the Promethues module, along with a pre-set fluctuation threshold. This data includes the number of fluctuations, the specific values corresponding to each fluctuation, and the time period during those fluctuations. Furthermore, based on the real-time bandwidth data and allocated account bandwidth of the PCDN device, the module creates a visual analysis diagram of the scheduled account information to verify its stability and assist in optimizing allocation. For example, when bandwidth anomalies occur on the PCDN device, the account analysis module can be used to view the real-time bandwidth allocated to each account, making it easier to identify which accounts are experiencing 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 each operation and event (the time here includes Coordinated Universal Time, local time and server time), so as to facilitate auditing, troubleshooting, performance tuning and other purposes. Furthermore, the log module can record user operation logs, permission change logs, platform time logs, account access logs, error logs, and performance logs. User operation logs record various operations performed on the PCDN account management platform, including information such as the operator, operation time, and specific operation content. Permission change logs record user permission changes to track and audit historical permission changes. Platform event logs record key platform events, such as startup, shutdown, and restart, for monitoring platform operation and timely handling of anomalies. Account access logs record user access to the account management platform, including access source and path, for tracking activity paths. Error logs record errors, warnings, and anomalies during platform operation for timely diagnosis and problem resolution, ensuring platform stability and reliability. Performance logs record platform performance, such as response time, throughput, and resource utilization, for analyzing platform performance bottlenecks and optimizing platform efficiency.
[0113] The account management platform in this embodiment can visualize bandwidth data in real time. It comes with a complete operation log, which makes it easy to trace account changes and troubleshoot problems.
[0114] Reference Figure 3 The diagram illustrates a flowchart of the steps involved in a Telegraf-based PCDN account management method provided in an embodiment of the present invention. Specifically, the method may 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 the Telegraf integrated within 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 redundant bandwidth exists, determine whether to allocate idle account information to the PCDN device or reclaim at least one account information in the PCDN device based on the redundant bandwidth information.
[0118] In addition, to better understand the above Figure 3 The method shown in this embodiment of the 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 accounts - 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 out.
[0122] Step 13: For devices with redundant bandwidth > 40M, reclaim the account. Prioritize reclaiming accounts that have bandwidth close to the redundant bandwidth and whose redundant bandwidth will be > 0 after the account is reclaimed.
[0123] Step 14: Reclaim the account and set its status to idle.
[0124] Step 15: Update redundant bandwidth = previous redundant bandwidth - bandwidth of reclaimed account. Determine if the current redundant bandwidth is still greater than 40M. If it is still greater than 40M, continue to step 13; otherwise, proceed to step 16.
[0125] Step 16: For devices with redundant bandwidth < 0, redundancy bandwidth = -redundancy bandwidth. Sort the devices by redundancy bandwidth from largest to smallest, and start allocating accounts from the device with the largest redundancy bandwidth.
[0126] Given the actual number of available accounts, a sorting method can be selected to prevent the possibility that there may not be enough available accounts to allocate to all devices. In this embodiment, devices with relatively large differences in redundant bandwidth can be prioritized for allocation.
[0127] If there are enough idle accounts in this embodiment, there is no need to sort them; accounts are assigned to each device with redundant bandwidth.
[0128] Step 17: If no available account exists, the process ends.
[0129] Step 18: If there are available accounts, the preferred available account is one whose bandwidth is closest to the redundant bandwidth, and whose redundant bandwidth is less than or equal to 40 after the available account is assigned to the device.
[0130] Step 19: Assign the aforementioned available account to the device.
[0131] Step 20: Update redundant bandwidth = previous redundant bandwidth - bandwidth of the assigned account. If the redundant bandwidth > 0, continue to step 17; otherwise, end the allocation of this device and continue to the allocation of the next device.
[0132] Accounts are evenly distributed, and device information is shown in Table 1 below:
[0133]
[0134] Referring to Table 1, illustrate the allocation process with an example:
[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 devices meet the criteria);
[0137] (3) The redundant bandwidth of 192.168.200.123 is 250-120=130M>40M, so account reclamation is required. According to the priority selection condition, account 211216 is reclaimed (the bandwidth of this account is closest to 80M, and 250-60-120>0). After reclamation, the redundant bandwidth of 192.168.200.123 is 190M, and 190-120=70>=40, so reclamation continues. According to the priority selection condition, account 211215 is reclaimed (211213 and 211214 also meet the condition, so one is randomly selected). After reclamation, the redundant bandwidth of 192.168.200.123 is 140M, and 140-120=20<40, so the termination condition is met, and the reclamation of 192.168.200.123 is completed.
[0138] (4) The redundant bandwidth of 192.168.200.124 is 50-120=-70M<0, so account allocation is required. The redundant bandwidth = -redundant bandwidth = 70. According to the priority selection condition, account 211216 is allocated (the bandwidth of this account is 60, which is closest to 70, and 50+60=110-120<=40). After allocation, the redundant bandwidth of 192.168.200.124 is 110, and 110-120<0. Allocation continues. According to the priority selection condition, 211215 is allocated. After allocation, the redundant bandwidth of 192.168.200.124 is 110+50=160M, and 160-120=40<=40. Allocation ends.
[0139] The account management platform in this embodiment uses an average allocation algorithm to reclaim or redistribute accounts, which reduces the pressure of operation and management. In particular, when the number of accounts reaches tens of thousands and the number of devices reaches thousands, the advantages of this algorithm can be better demonstrated, maximizing the utilization rate of accounts, eliminating the need for manual inspection and reclamation, and improving the stability of online machines.
[0140] In addition, such as Figure 4 As shown, Figure 4The diagram illustrates the newly purchased account information. If the accounts on device 192.168.200.123 are insufficient, additional accounts need to be added. The newly purchased accounts are imported into the account management platform through the account entry module, such as... Figure 5 As shown. After successful import, the account status is changed to "Increased" through the account bandwidth adjustment module, and then distributed to the PCDN device, thus completing the expansion of the device account, as shown. Figure 6 As shown.
[0141] like Figure 7 As shown, the rated uplink and downlink bandwidth of account 211212s3 needs to be increased to avoid affecting usage. By using the account bandwidth adjustment module in the account management platform, select this account, click bandwidth adjustment, and then click error report. The account will be automatically sent to the PCDN device to complete the bandwidth adjustment for the account.
[0142] like Figure 8 and Figure 9 As shown, in order to verify whether the scheduling is stably and evenly distributing bandwidth to each account, it is necessary to analyze the accounts. Using the account analysis module, select all accounts on the device 192.168.202.2, click Account Analysis, and you can see that the uplink bandwidth of the accounts on this device is generally relatively stable, but the downlink bandwidth will occasionally spike abnormally. Therefore, send this analysis data to the scheduling personnel to assist in optimizing the allocation.
[0143] like Figure 10 As shown, the number of accounts on the online device 192.168.209.250 is incorrect. Therefore, it's necessary to check what changes have been made to the accounts on this machine. You can check the change operation log for this machine using the keyword "192.168.209.250" to get the results. Clicking "Details" will show the specific operation details, such as... Figure 11 As shown, you can see the account change history of this device and the corresponding operators.
[0144] Telegraf enables unified management and allocation of PCDN accounts, solving the problem of managing a large number of PCDN accounts. Previously, account changes and account relationships could only be maintained on the device itself using Excel; now, these changes and maintenance are handled centrally on the platform, with real-time bandwidth data visualization provided. This significantly improves operational efficiency and facilitates problem analysis and troubleshooting.
[0145] The account management platform comes with complete operation logs, making it easy to track account changes and troubleshoot problems.
[0146] In addition, embodiments of the present invention also provide an electronic device, such as... Figure 12As shown, it includes a processor 1301, a communication interface 1302, a memory 1303, and a communication bus 1304. The processor 1301, the communication interface 1302, and the memory 1303 communicate with each other through the communication bus 1304.
[0147] Memory 1303 is used to store computer programs;
[0148] When processor 1301 executes a program stored in memory 1303, it performs the following steps:
[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 within the PCDN device.
[0150] The account management platform determines whether the current PCDN device has redundant bandwidth based on the rated bandwidth and real-time bandwidth data of all account information.
[0151] If redundant bandwidth exists, the system determines, based on the redundant bandwidth information, whether to allocate idle account information to the PCDN device or to reclaim at least one account information within the PCDN device.
[0152] Specifically, 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 within the PCDN device. Then, it calculates the redundant bandwidth of the PCDN device based on the bandwidth of the allocated accounts and the actual bandwidth of the device. That is, the redundant bandwidth of the PCDN device = the bandwidth of the allocated accounts - 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 recycling will be carried out. Priority will be given to recycling accounts that have bandwidth close to the redundant bandwidth and whose redundant bandwidth will be > 0 after the account is recycled.
[0155] After the account is reclaimed, its status is set to idle, and the redundant bandwidth is updated. The updated redundant bandwidth = the previous redundant bandwidth - the bandwidth of the reclaimed account. It is then determined whether the current redundant bandwidth is still greater than 40M. If it is still greater than 40M, the account reclamation process continues.
[0156] Otherwise, for devices with redundant bandwidth < 0, the redundant bandwidth = -redundant bandwidth, and accounts are allocated starting from the device with the largest redundant bandwidth, sorted by redundant bandwidth from largest to smallest.
[0157] Given the actual number of available accounts, a sorting method can be selected to prevent the possibility that there may not be enough available accounts to allocate to all devices. In this embodiment, devices with relatively large differences in redundant bandwidth can be prioritized for allocation.
[0158] If there are enough idle accounts in this embodiment, there is no need to sort them; accounts are assigned to each device with redundant bandwidth.
[0159] If no available account is found, the process ends.
[0160] If an idle account exists, the idle account should be selected first if its bandwidth is closest to the redundant bandwidth, and the redundant bandwidth of the device is less than or equal to 40 after the idle account is assigned to the device.
[0161] Assign the aforementioned idle accounts to the device and update the redundant bandwidth. Updated redundant bandwidth = previous redundant bandwidth - bandwidth of the assigned account;
[0162] If the redundant bandwidth is greater than 0, continue to check if there are any idle accounts; otherwise, end the allocation of the device and continue to the allocation of the next device.
[0163] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0164] The communication interface is used for communication between the aforementioned terminal and other devices.
[0165] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0166] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0167] like Figure 13 As shown, in another embodiment of the present invention, a computer-readable storage medium 1401 is also provided, which stores instructions that, when executed on a computer, cause the computer to perform the Telegraf-based PCDN account management method described in the above embodiment.
[0168] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the Telegraf-based PCDN account management method described in the above embodiments.
[0169] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially 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, all or part of the processes or functions described in the embodiments of the present invention are generated. 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. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. 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 integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0170] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0171] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0172] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection 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 receive account information entered by maintenance personnel and store the account information in a MySQL database; The device account management module is used to collect and manage the account information currently used by each PCDN device through the Telegraf function in each PCDN device. The account allocation module is used to configure and allocate account information to each PCDN device via Telegraf based on the current real-time bandwidth of each PCDN device within a specified frequency period. The account recycling module is used to recycle redundant account information in each PCDN device based on the current real-time bandwidth of each PCDN device within a specified frequency period using Telegraf. The Promethues module is used to receive real-time bandwidth data of each account information collected by Telegraf within the PCDN device and visualize it. 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 accounts within the platform. The account bandwidth adjustment module is used to adjust the rated uplink bandwidth, rated downlink bandwidth, account password, and VLAN value of 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 based on the monitoring information of the account information in each PCDN device, and to select an account of data line type to switch to the management line type. Account status adjustment is used to set the status of accounts reclaimed by the account recycling module to idle, the status of accounts allocated by the account allocation module to occupied, and to adjust the status of account information within each PCDN device based on monitoring information of account information within each PCDN device.
2. The PCDN account management platform according to claim 1, characterized in that, The device account management module is specifically used for: For each PCDN device, based on the real-time bandwidth data of the PCDN device received by the Promethues module and the bandwidth of the allocated accounts of the PCDN device, an average allocation algorithm is used to determine the account information to be reclaimed within the PCDN device; or to determine the idle account information to be allocated to the PCDN device. The account recycling module is specifically used for: Based on the account information to be reclaimed within the PCDN device determined by the device account management module, the account information within the PCDN device is reclaimed via Telegraf within the PCDN device. The account allocation module is specifically used for: Based on the account information assigned to the PCDN device by the device account management module, the newly assigned account information is configured through the telegraf function within the PCDN device.
3. The PCDN account management platform according to claim 2, characterized in that, The device account management module is specifically used for: Iterate through all PCDN devices and calculate redundant bandwidth based on the real-time bandwidth data of the PCDN device received by the Promethues module within each PCDN device and the bandwidth of the assigned accounts of the PCDN device. The redundant bandwidth = bandwidth of allocated accounts - real-time bandwidth data; Filter out PCDN devices with redundant bandwidth greater than 0 and less than or equal to a specified bandwidth threshold; For a PCDN device with redundant bandwidth greater than a specified bandwidth threshold, at least one account information matching the redundant bandwidth is selected from the PCDN device and used as the account information to be reclaimed from the PCDN device. For PCDN devices with redundant bandwidth less than 0, the absolute values of the redundant bandwidth are sorted by size, starting with the largest absolute value. 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 and used as the newly assigned account information in the current PCDN device.
4. The PCDN account management platform according to claim 2, characterized in that, Also includes: The account analysis module is used to analyze the information of each account based on the real-time bandwidth data of the PCDN device and the bandwidth of the allocated accounts of the PCDN device received by the Promethues module, and to verify whether the scheduled account information is stable. The log module is used to record all operation information of the PCDN account management platform.
5. A PCDN account management system, characterized in that, include: The Telegraf-based account management platform as described in any one of claims 1 to 4, and multiple PCDN devices integrated with Telegraf; Each PCDN device interacts with the PCDN account management platform via Telegraf.
6. 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 within the PCDN device. The account management platform determines whether the current PCDN device has redundant bandwidth based on the rated bandwidth and real-time bandwidth data of all account information. If redundant bandwidth exists, then based on the redundant bandwidth information, it is determined whether to allocate idle account information to the PCDN device or to reclaim at least one account information within the PCDN device. The Promethues module receives real-time bandwidth data from Telegraf within the PCDN device, which is used to collect information about each account and then visualizes it. The system uses a MySQL database to store account information and the PCDN devices bound to those accounts, real-time bandwidth data transmitted by the Promethues module, heartbeat information of the PCDN devices, and monitoring information of all accounts within the platform. The account bandwidth adjustment module adjusts the rated uplink bandwidth, rated downlink bandwidth, username, password, and VLAN value of the account information. Based on the monitoring information of account information in each PCDN device, the account line switching module switches the management line type of the currently disconnected account information in the PCDN device to the data line type, and selects an account with a data line type to switch to the management line type. Set the status of account information reclaimed by the account recycling 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 each PCDN device according to the monitoring information of account information in each PCDN device.
7. The method according to claim 6, characterized in that, If redundant bandwidth exists, based on the redundant bandwidth information, determine whether to allocate idle account information to the PCDN device or reclaim at least one account information within the PCDN device, including: Calculate the redundant bandwidth, where the redundant bandwidth = bandwidth of allocated accounts - 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 or account information needs to be allocated. When the redundant bandwidth is greater than the specified bandwidth threshold, at least one account information that matches the redundant bandwidth is selected from the PCDN device and used as the account information to be reclaimed 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 and use it as the newly allocated account information in the PCDN device.
8. The method according to claim 6, characterized in that, Also includes: The account management platform receives and visualizes the real-time bandwidth data of each account collected by Telegraf within the PCDN device.
9. The method according to claim 6, characterized in that, The method further includes: The account management platform receives account information input by operations and maintenance personnel and stores it in a MySQL database, or adjusts the rated bandwidth, password, line type, or VLAN of at least one account.
Citation Information
Patent Citations
Cloud container storage control method and system, electronic equipment and storage medium
CN113055469A
Data monitoring processing method and device, equipment and storage medium
CN117009175A