Control method and device of single-chip switch, equipment and storage medium

By obtaining packet priority and type in a single chip switch, assigning processing queues, and combining PoE information for power analysis, efficient resource allocation and task execution are achieved, and the problems of low efficiency and power management difficulties of single chip switch are solved. Improve network transmission efficiency and equipment stability.

CN119094471AActive Publication Date: 2024-12-06SHENZHEN YUHANG COMM TECH CO LTD

Patent Information

Application Number
CN202411385325.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-06
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

Existing single-chip switches are less efficient when processing network data packets, resulting in network congestion and delay, and it is difficult to effectively manage and allocate PoE power, resulting in low resource utilization and instability in the system.

Method used

By obtaining the priority and type of network data packets, it is allocated to the corresponding processing queue, and combining the device's PoE information to perform power demand analysis, generating power supply strategies, using parallel processing methods to allocate resources and perform tasks, and dynamically adjust to adapt to network traffic and electricity demand.

Benefits of technology

It improves network transmission efficiency and equipment operation stability, optimizes task execution process, reduces delays and waste of power resources, ensures timely power supply of key equipment, and enhances the adaptability and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094471A_ABST
    Figure CN119094471A_ABST
Patent Text Reader

Abstract

The invention relates to a control method and device of a single-chip switch, equipment and a storage medium, and the method comprises the steps: obtaining the priority and type of a network data packet, distributing the network data packet to a corresponding processing queue according to the priority and / or type of the network data packet, and obtaining a sequential processing strategy of the network data packet; equipment PoE information of the multiple pieces of connection equipment is obtained, power demand analysis is carried out on the multiple pieces of connection equipment according to the equipment PoE information to obtain a power demand analysis result, and a corresponding PoE power supply strategy is generated according to the power demand analysis result and the sequential processing strategy of the network data packet; through a parallel processing method preset by the system, resource allocation is carried out according to a sequence processing strategy of the network data packet and a PoE power supply strategy, a corresponding task execution instruction is generated, and a switch is controlled to carry out task allocation according to the task execution instruction. The method has the effect of improving the task processing efficiency of the single-chip switch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer network communications, and in particular to a control method, device, equipment and storage medium for a single-chip switch. Background Art

[0002] At present, with the rapid development of network technology and the acceleration of informatization, the importance of switches in network communications has become increasingly prominent. Traditional switches usually use fixed paths and static priority queues to process network data packets. This method is difficult to adapt to the dynamic changes of network traffic and easily leads to network congestion and delays. Especially when processing complex network data, there are often problems such as slow processing speed and low resource utilization. In addition, with the increase in electricity demand, how to effectively manage and distribute PoE, or Power over Ethernet, has become a problem that needs to be solved urgently.

[0003] The above-mentioned prior art solutions have the following defects: the existing single-chip switches are relatively inefficient in data processing, so there is room for improvement. Summary of the invention

[0004] In order to improve the task processing efficiency of a single-chip switch, the present application provides a control method, device, equipment and storage medium for a single-chip switch.

[0005] The above-mentioned invention objective of the present application is achieved through the following technical solutions: A control method for a single-chip switch, the control method for the single-chip switch comprising: Obtaining the priority and type of the network data packet, and assigning the network data packet to a corresponding processing queue according to the priority and / or type of the network data packet, to obtain a sequential processing strategy for the network data packet; Acquire device PoE information of multiple connected devices, and perform power demand analysis on the multiple connected devices according to the device PoE information to obtain a power demand analysis result, and generate a corresponding PoE power supply strategy according to the power demand analysis result and the sequential processing strategy of the network data packet; Through the system preset parallel processing method, and according to the sequential processing strategy of the network data packet and the PoE power supply strategy, resource allocation is performed, and corresponding task execution instructions are generated, and the switch is controlled to perform task allocation according to the task execution instructions.

[0006] By adopting the above technical solution, by obtaining the priority and type of the network data packet, and allocating the network data packet to the corresponding processing queue according to the priority and / or type of the network data packet, it is possible to ensure that data packets of different priorities are processed in a predetermined order, thereby improving the efficiency of network transmission; by obtaining the device PoE information of multiple connected devices, and performing power demand analysis on the multiple connected devices according to the device PoE information to obtain the power demand analysis result, it is possible to accurately evaluate and allocate the power demand of each device, ensure the rational use of power resources, and thus improve the overall operation stability of the equipment; through the system preset parallel processing method, and according to the sequential processing strategy of the network data packet and the PoE power supply strategy, resources are allocated, and corresponding task execution instructions are generated, which can effectively coordinate various resources, so that the switch can be dynamically adjusted according to actual needs, thereby optimizing the task execution process and improving the work efficiency of the switch.

[0007] In a preferred example, the present application may be further configured as follows: obtaining the priority and / or type of the network data packet, and assigning the network data packet to a corresponding processing queue according to the priority and type of the network data packet, specifically including: When the priority of the network data packet is high, the network data packet corresponding to the high priority is promoted to the head position of the priority processing queue; In case the type of the network data packet is a real-time data packet, the real-time data packet is allocated to a fast queue.

[0008] By adopting the above technical solution, when the priority of the network data packet is high, the network data packet corresponding to the high priority is promoted to the head of the priority processing queue, so that key data can be processed with priority, delays can be reduced, and the timely execution of key tasks can be ensured; when the type of the network data packet is a real-time data packet, the real-time data packet is allocated to the fast queue, real-time data can be processed more quickly, ensuring that data packets with high timeliness requirements can be transmitted in time, thereby improving the response speed of network transmission.

[0009] In a preferred example, the present application may be further configured as follows: after allocating the network data packet to a corresponding processing queue according to the priority and type of the network data packet, the method further includes: The network data packets in different processing queues are processed in turn by adopting the time slice rotation rule, so as to ensure that the network data packets of different priorities and types can be processed within the predetermined time.

[0010] By adopting the above technical solution and the time slice rotation rule, network data packets in different processing queues are processed in rotation, which can ensure that all types of data packets can get fair processing opportunities and prevent low priority or non-real-time data packets from being accumulated for a long time, thereby improving the balance and fairness of the overall network processing.

[0011] In a preferred example, the present application may be further configured as follows: the time slice rotation rule is adopted to perform rotation processing on the network data packets in different processing queues, specifically including: Allocate a different time slice length to each processing queue, wherein the priority processing queue and the fast queue are allocated a preset short rotation time slice, and the common processing queue is allocated a preset normal rotation time slice; The task processing efficiency of the different processing queues is obtained. When the task processing efficiency corresponding to the common processing queue is lower than the preset warning efficiency threshold, the time slice lengths of the different processing queues are dynamically adjusted to adapt to changes in network traffic and processing requirements of different types of network data packets.

[0012] By adopting the above technical solution, by allocating different time slice lengths to each processing queue, wherein the priority processing queue and the fast queue are allocated preset short rotation time slices, it is possible to ensure that high priority and real-time data packets are processed quickly and delays are reduced; by allocating preset normal rotation time slices to the ordinary processing queue, it is possible to maintain stable processing of non-critical tasks; by obtaining the task processing efficiency of different processing queues, when the task processing efficiency corresponding to the ordinary processing queue is lower than the preset warning efficiency threshold, the time slice lengths of different processing queues are dynamically adjusted, which can flexibly adapt to fluctuations in network traffic and ensure that all types of data packets can be effectively processed, thereby improving the working efficiency and adaptability of the switch.

[0013] In a preferred example, the present application can be further configured as follows: the device PoE information of the connected device is obtained, and the power demand analysis of the connected device is performed, and a corresponding PoE power supply strategy is generated according to the power demand analysis result and the sequential processing strategy of the network data packet, specifically including: Calculate and set the power output of each port of the switch according to the power demand analysis results of the plurality of connected devices and the available power of the bus; The current total system power is obtained. When the current total system power exceeds the power supply capacity, the power distribution data is dynamically adjusted according to the sequential processing strategy of the network data packet, and the PoE power supply strategy of each port of the switch is generated according to the power distribution data.

[0014] By adopting the above technical solution, by calculating and setting the power output of each port of the switch according to the power demand analysis results of multiple connected devices and the available power supply of the bus, it is possible to ensure that the power demand of each device is met and optimize the power distribution efficiency; by obtaining the current total system power, when the current total system power exceeds the power supply capacity, the power distribution data is dynamically adjusted according to the sequential processing strategy of the network data packets, and the PoE power supply strategy of each port of the switch is generated according to the power distribution data, which can give priority to the power supply of key equipment when power resources are tight, avoid system overload or failure, and thus improve the stability and security of the system.

[0015] In a preferred example, the present application may be further configured as follows: the control method of the single-chip switch further includes: Monitor the operation status of the switch and network communication anomalies in real time, and trigger an error diagnosis program and generate corresponding diagnosis results when abnormalities in data packet reception and / or power distribution are detected; According to the diagnosis result, a system-defined recovery program is executed, and the diagnosis result and its corresponding recovery program are stored in a fault database.

[0016] By adopting the above technical solution, by real-time monitoring of the operating status of the switch and network communication anomalies, potential problems can be discovered and located in a timely manner to prevent further expansion of the fault; by triggering the error diagnosis program and generating corresponding diagnostic results when abnormalities in data packet transmission and reception and / or power distribution are detected, the abnormal situation can be responded to and handled quickly to reduce the impact on the system; by executing the system-defined recovery program according to the diagnostic results, and storing the diagnostic results and their corresponding recovery programs in the fault database, the recovery speed and stability of the system can be improved, and reference data can be provided for future troubleshooting.

[0017] The second object of the invention is achieved by the following technical solutions: A control device for a single-chip switch, the control device for the single-chip switch comprising: A data packet allocation module, used to obtain the priority and type of the network data packet, and allocate the network data packet to the corresponding processing queue according to the priority and / or type of the network data packet to obtain a sequential processing strategy for the network data packet; A power demand analysis module, used to obtain device PoE information of multiple connected devices, and perform power demand analysis on the multiple connected devices according to the device PoE information to obtain power demand analysis results, and generate corresponding PoE power supply strategies according to the power demand analysis results and the sequential processing strategy of network data packets; The task allocation module is used to allocate resources through the system's preset parallel processing method, according to the sequential processing strategy of network data packets and the PoE power supply strategy, and generate corresponding task execution instructions, and control the switch to perform task allocation according to the task execution instructions.

[0018] By adopting the above technical solution, by obtaining the priority and type of the network data packet, and allocating the network data packet to the corresponding processing queue according to the priority and / or type of the network data packet, it is possible to ensure that data packets of different priorities are processed in a predetermined order, thereby improving the efficiency of network transmission; by obtaining the device PoE information of multiple connected devices, and performing power demand analysis on the multiple connected devices according to the device PoE information to obtain the power demand analysis result, it is possible to accurately evaluate and allocate the power demand of each device, ensure the rational use of power resources, and thus improve the overall operation stability of the equipment; through the system preset parallel processing method, and according to the sequential processing strategy of the network data packet and the PoE power supply strategy, resources are allocated, and corresponding task execution instructions are generated, which can effectively coordinate various resources, so that the switch can be dynamically adjusted according to actual needs, thereby optimizing the task execution process and improving the work efficiency of the switch.

[0019] The third objective of the present application is achieved through the following technical solutions: A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the control method of the single-chip switch when executing the computer program.

[0020] The fourth objective of the present application is achieved through the following technical solutions: A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the control method of the single-chip switch are implemented.

[0021] In summary, the present application includes at least one of the following beneficial technical effects: 1. By obtaining the priority and type of network data packets and assigning network data packets to corresponding processing queues according to the priority and / or type of network data packets, it is possible to ensure that data packets of different priorities are processed in a predetermined order, thereby improving the efficiency of network transmission; by obtaining the device PoE information of multiple connected devices and performing power demand analysis on multiple connected devices according to the device PoE information to obtain the power demand analysis results, it is possible to accurately evaluate and allocate the power demand of each device, ensure the rational use of power resources, and thus improve the overall operation stability of the equipment; through the system's preset parallel processing method, and according to the sequential processing strategy of network data packets and the PoE power supply strategy, resources are allocated, and corresponding task execution instructions are generated, which can effectively coordinate various resources, so that the switch can be dynamically adjusted according to actual needs, thereby optimizing the task execution process and improving the work efficiency of the switch; 2. By allocating different time slice lengths to each processing queue, the priority processing queue and the fast queue are allocated with preset short rotation time slices, which can ensure that high-priority and real-time data packets are processed quickly and reduce delays; by allocating preset normal rotation time slices to the common processing queue, non-critical tasks can be processed stably; by obtaining the task processing efficiency of different processing queues, when the task processing efficiency corresponding to the common processing queue is lower than the preset warning efficiency threshold, the time slice lengths of different processing queues are dynamically adjusted, which can flexibly adapt to the fluctuation of network traffic and ensure that all types of data packets can be effectively processed, thereby improving the working efficiency and adaptability of the switch; 3. By calculating and setting the power output of each port of the switch based on the power demand analysis results of multiple connected devices and the available power supply of the bus, it is possible to ensure that the power demand of each device is met and optimize the power distribution efficiency; by obtaining the current total system power, when the current total system power exceeds the power supply capacity, the power distribution data is dynamically adjusted according to the sequential processing strategy of the network data packets, and the PoE power supply strategy for each port of the switch is generated based on the power distribution data, which can give priority to the power supply of key equipment when power resources are tight, avoid system overload or failure, and thus improve the stability and security of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a flow chart of a control method of a single-chip switch in an embodiment of the present application; Figure 2 is a flowchart for implementing step S10 in a control method of a single-chip switch in an embodiment of the present application; Figure 3 is another implementation flow chart of step S10 in the control method of a single-chip switch in one embodiment of the present application; Figure 4is a flowchart for implementing step S13 in the control method of a single-chip switch in one embodiment of the present application; Figure 5 is a flowchart for implementing step S20 in the control method of a single-chip switch in one embodiment of the present application; Figure 6 is another implementation flow chart of the control method of the single-chip switch in one embodiment of the present application; Figure 7 This is a principle block diagram of a control device of a single-chip switch in an embodiment of the present application; Figure 8 It is a schematic diagram of a device in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The present application is further described in detail below in conjunction with the accompanying drawings.

[0024] In one embodiment, if Figure 1 As shown, the present application discloses a control method for a single-chip switch, which specifically includes the following steps: S10: Obtain the priority and type of the network data packet, and assign the network data packet to a corresponding processing queue according to the priority and / or type of the network data packet to obtain a sequential processing strategy for the network data packet.

[0025] Specifically, when the switch device receives a large number of data packets, the network monitoring system analyzes the header information of each data packet to identify its priority and type, and preliminarily allocates these data packets to different processing queues based on different priority tags and data packet types. At the same time, by introducing an adaptive algorithm, the priority sorting of network data packets is dynamically adjusted based on real-time network traffic and device resources. According to the historical priority processing time of the data packet and the network load, the execution order of high-priority tasks is predicted and adjusted in advance, thereby effectively reducing delays and improving processing efficiency in a busy network environment, to ensure that different data packets can be processed in a corresponding manner.

[0026] S20: Obtain device PoE information of multiple connected devices, and perform power demand analysis on the multiple connected devices according to the device PoE information to obtain power demand analysis results, and generate corresponding PoE power supply strategies according to the power demand analysis results and the sequential processing strategy of network data packets.

[0027] Specifically, data is collected on the PoE information of all connected devices, including the power requirements of the devices, connection time, and historical power usage, and these data are analyzed to evaluate the power requirements of each connected device and generate a preliminary power allocation strategy. Subsequently, the PoE power supply of each port is dynamically adjusted in combination with the network data packet sequence processing strategy to ensure that key devices obtain sufficient power resources when high-priority tasks are executed. By real-time monitoring of the power requirements of each device and changes in network traffic, the power load is automatically redistributed to optimize the overall utilization of power resources. For example, sufficient power resources are allocated preferentially to devices that process high-priority data packets to ensure that key devices can operate normally under high loads. The power allocation strategy is then dynamically adjusted according to the real-time network traffic and power demand conditions to ensure efficient and stable operation of the entire network system.

[0028] S30: Allocate resources through the system preset parallel processing method and according to the sequential processing strategy of the network data packet and the PoE power supply strategy, generate corresponding task execution instructions, and control the switch to perform task allocation according to the task execution instructions.

[0029] Specifically, an intelligent resource scheduling mechanism is adopted to monitor the switch load and task execution progress in real time. Combined with multi-threading technology, the execution order of various tasks is dynamically adjusted according to the task priority and real-time needs. Through the preset parallel processing method, according to the network data packet sequence processing strategy and PoE power supply strategy, the processing resource allocation of the switch is coordinated. Each task execution instruction will be broken down into multiple micro-operations. The switch system will allocate the processing capacity of the switch in real time according to the current network traffic and power load conditions to ensure that different types of tasks can be efficiently executed in parallel.

[0030] In one embodiment, if Figure 2 As shown, in step S10, the priority and / or type of the network data packet is obtained, and the network data packet is allocated to a corresponding processing queue according to the priority and type of the network data packet, specifically including: S11: When the priority of the network data packet is high, the network data packet corresponding to the high priority is promoted to the head position of the priority processing queue.

[0031] Specifically, by analyzing the priority field in the packet header, high-priority packets are extracted from the regular queue and placed at the front of the priority processing queue, ensuring that high-priority packets can be processed as quickly as possible, thereby meeting their demand for low latency.

[0032] S12: When the type of the network data packet is a real-time data packet, the real-time data packet is allocated to a fast queue.

[0033] Specifically, real-time data packets are usually sensitive to delays. The system will identify these data packets and assign them directly to the fast queue, giving priority to ensuring the processing speed of real-time data packets to improve real-time performance and responsiveness.

[0034] In one embodiment, if Figure 3 As shown, in step S10, that is, after allocating the network data packet to the corresponding processing queue according to the priority and type of the network data packet, it also includes: S13: adopting the time slice rotation rule to process the network data packets in different processing queues in turn, so as to ensure that the network data packets of different priorities and types can be processed within the predetermined time.

[0035] Specifically, a time slice rotation rule is used to determine the time slice size allocated to each processing queue, the number of data packets that each queue can process within a time slice or the processing time, and the rotation order of the processing queues, that is, to determine the processing priority or rotation order of different queues. For example, the processing order is from fast queue to ordinary queue. Subsequently, each queue processes the data packets in the queue according to the set time slice size or processing capacity until the time slice is exhausted or all the data packets in the queue are processed. If the time slice is not exhausted and there are still unprocessed data packets in the queue, the current queue will be temporarily suspended and switched to the next queue for processing until all queues have completed rotation and the next cycle is performed again, thereby reducing the situation where low priority data packets are not processed due to high priority data packets and real-time data packets occupying processing time for a long time.

[0036] In one embodiment, if Figure 4 As shown, in step S13, the time slice rotation rule is adopted to rotate the network data packets in different processing queues, which specifically includes: S131: Allocate a different time slice length to each processing queue, wherein the priority processing queue and the fast queue are allocated a preset short rotation time slice, and the common processing queue is allocated a preset normal rotation time slice.

[0037] Specifically, the system will allocate shorter time slices to the priority processing queue and the fast queue based on the priority of the data packet and the processing requirements of the queue to ensure that the data packets in these queues can be processed faster. The ordinary processing queue will be allocated a slightly longer time slice to adapt to its processing speed requirements while ensuring the processing speed of the fast queue and the priority queue.

[0038] S132: Obtain task processing efficiency of different processing queues. When the task processing efficiency corresponding to the common processing queue is lower than a preset warning efficiency threshold, dynamically adjust the time slice lengths of different processing queues to adapt to changes in network traffic and processing requirements of different types of network data packets.

[0039] Specifically, the task processing efficiency of different processing queues is monitored and compared with the preset warning efficiency threshold. If the processing efficiency of the ordinary processing queue is lower than the threshold, the time slice length is dynamically adjusted. According to different efficiency processing stages, the time slice length corresponding to the ordinary queue is reduced to increase its total processing time to adapt to the actual network traffic and data packet processing requirements, thereby optimizing the overall processing performance.

[0040] In one embodiment, if Figure 4 As shown, in step S20, the device PoE information of the connected device is obtained, and the power demand of the connected device is analyzed. According to the power demand analysis result and the sequential processing strategy of the network data packet, a corresponding PoE power supply strategy is generated, which specifically includes: S21: Calculate and set the power output of each port of the switch according to the power demand analysis results of the multiple connected devices and the available power of the bus.

[0041] Specifically, the switch will obtain device reports from each connected device periodically or when the device is connected. These reports contain information such as the power requirements of the device. The switch calculates the power output of each port based on these demand reports and the power capacity available on the current bus. This calculation process needs to consider the maximum power requirement of the device and the power supply capacity of the bus. The switch uses this information to dynamically set the power output of each port to ensure that each device can obtain appropriate power supply according to its actual needs, thereby optimizing the allocation and use of power resources.

[0042] S22: Obtain the current total system power. When the current total system power exceeds the power supply capacity, dynamically adjust the power distribution data according to the sequential processing strategy of the network data packets, and generate the PoE power supply strategy for each port of the switch according to the power distribution data.

[0043] Specifically, the switch monitors the total power of the current system in real time. When it detects that the total power exceeds the system power supply capacity, the switch will start the dynamic adjustment mechanism. Specifically, the priority and type of network data packets are first classified to generate a sequential processing strategy for network data packets. This sequential processing strategy is implemented through a rule-based algorithm or machine learning model, which can dynamically evaluate the task priority and data type in the current network environment. For example, the system automatically generates priority sorting for different queues based on the header information of different data packets, such as source, destination, priority tag, quality of service (QoS) requirements, etc. Under high load conditions, the system will give priority to data packets with real-time requirements, such as video streams or voice data, and postpone or limit tasks with low delay sensitivity, such as low-priority file transfers.

[0044] Furthermore, in combination with the current power supply situation, a corresponding PoE (Power over Ethernet) power supply strategy is generated. This power supply strategy not only takes into account the static power demand of the device, but also dynamically adjusts according to the order processing strategy of the current network data packets. For example, when a high-priority task occupies a large amount of network resources, the system will give priority to allocating sufficient power resources to it to ensure that the task can be completed smoothly. Correspondingly, for low-priority devices or tasks, the system may temporarily reduce their power supply, or suspend power supply when necessary, until the critical task is completed. The entire power distribution process is continuously adjusted through real-time monitoring and feedback mechanisms to cope with dynamic changes in network traffic and device power demand, ensuring that the system can operate efficiently and stably under various working conditions.

[0045] In one embodiment, if Figure 6 As shown, the control method of the single-chip switch also includes: S40: monitor the operation status of the switch and network communication anomalies in real time, and when abnormalities in data packet reception and / or power distribution are detected, trigger an error diagnosis program and generate corresponding diagnosis results.

[0046] Specifically, the system's operating status and network communication status are monitored in real time. The monitored operating status includes CPU usage, memory usage, port status, traffic status, etc. The monitored network communication status includes the sending and receiving of data packets, error rate, packet loss rate, etc., and the system's operating status and network communication status are detected. When an abnormal situation is found, such as excessive CPU load, port failure, network communication interruption, etc., the error diagnosis program is triggered, such as hardware failure, network failure, software abnormality, etc., and the corresponding diagnostic results are obtained, including information such as the abnormality type, occurrence time, and impact range.

[0047] S50: Execute a system-defined recovery program according to the diagnosis result, and store the diagnosis result and its corresponding recovery program in a fault database.

[0048] Specifically, the system-customized recovery program is executed according to the diagnostic results. The recovery program includes automatically restarting the affected modules, switching backup devices, adjusting network configurations and other operations to restore the normal operation of the system as soon as possible. When the error diagnosis program generates diagnostic results and executes the recovery program, the relevant information is stored in the fault database.

[0049] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0050] In one embodiment, a control device for a single-chip switch is provided, and the control device for the single-chip switch corresponds one-to-one to the control method for the single-chip switch in the above embodiment. Figure 7 As shown, the control device of the single-chip switch includes a data packet distribution module, a power demand analysis module, and a task distribution module. The detailed description of each functional module is as follows: A data packet allocation module, used to obtain the priority and type of the network data packet, and allocate the network data packet to the corresponding processing queue according to the priority and / or type of the network data packet to obtain a sequential processing strategy for the network data packet; A power demand analysis module, used to obtain device PoE information of multiple connected devices, and perform power demand analysis on the multiple connected devices according to the device PoE information to obtain power demand analysis results, and generate corresponding PoE power supply strategies according to the power demand analysis results and the sequential processing strategy of network data packets; The task allocation module is used to allocate resources through the system's preset parallel processing method, according to the sequential processing strategy of network data packets and the PoE power supply strategy, and generate corresponding task execution instructions, and control the switch to perform task allocation according to the task execution instructions.

[0051] Optionally, the data packet distribution module specifically includes: The priority processing module is used to promote the network data packet corresponding to the high priority to the head position of the priority processing queue when the priority of the network data packet is high priority; The type processing module is used to allocate the real-time data packet to the fast queue when the type of the network data packet is a real-time data packet.

[0052] Optionally, after the data packet distribution module, it also includes: The round-robin processing module is used to adopt the time slice round-robin rule to process the network data packets in different processing queues in turn to ensure that network data packets of different priorities and types can be processed within the predetermined time.

[0053] Optionally, the round-robin processing module specifically includes: A time slice allocation module is used to allocate different time slice lengths to each processing queue, wherein the priority processing queue and the fast queue are allocated a preset short-time rotation time slice, and the ordinary processing queue is allocated a preset normal rotation time slice; The dynamic adjustment module is used to obtain the task processing efficiency of different processing queues. When the task processing efficiency corresponding to the ordinary processing queue is lower than the preset warning efficiency threshold, the time slice length of different processing queues is dynamically adjusted to adapt to the changes in network traffic and the processing requirements of different types of network data packets.

[0054] Optionally, the power demand analysis module specifically includes: A power calculation module, used to calculate and set the power output of each port of the switch based on the power demand analysis results of multiple connected devices and the available power of the bus; The dynamic power adjustment module is used to obtain the current total system power. When the current total system power exceeds the power supply capacity, the power distribution data is dynamically adjusted according to the sequential processing strategy of the network data packets, and the PoE power supply strategy for each port of the switch is generated according to the power distribution data.

[0055] Optionally, the control method of the single-chip switch further includes: The status monitoring module is used to monitor the operating status of the switch and network communication anomalies in real time. When abnormalities in data packet transmission and reception and / or power distribution are detected, the error diagnosis program is triggered and the corresponding diagnosis results are generated; The recovery program module is used to execute the system-defined recovery program according to the diagnosis results, and store the diagnosis results and their corresponding recovery programs in the fault database.

[0056] For the specific definition of the control device of the single-chip switch, please refer to the definition of the control method of the single-chip switch above, which will not be repeated here. Each module in the control device of the above-mentioned single-chip switch can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0057] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store abnormal problem diagnosis results and their corresponding recovery reports. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a control method for a single-chip switch is implemented.

[0058] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: Obtaining the priority and type of the network data packet, and assigning the network data packet to a corresponding processing queue according to the priority and / or type of the network data packet, to obtain a sequential processing strategy for the network data packet; Obtain device PoE information of multiple connected devices, and perform power demand analysis on the multiple connected devices according to the device PoE information to obtain power demand analysis results, and generate corresponding PoE power supply strategies according to the power demand analysis results and the sequential processing strategy of network data packets; Through the system's preset parallel processing method, resources are allocated according to the sequential processing strategy of network data packets and the PoE power supply strategy, and corresponding task execution instructions are generated. The switch is controlled to perform task allocation according to the task execution instructions.

[0059] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: Obtaining the priority and type of the network data packet, and assigning the network data packet to a corresponding processing queue according to the priority and / or type of the network data packet, to obtain a sequential processing strategy for the network data packet; Obtain device PoE information of multiple connected devices, and perform power demand analysis on the multiple connected devices according to the device PoE information to obtain power demand analysis results, and generate corresponding PoE power supply strategies according to the power demand analysis results and the sequential processing strategy of network data packets; Through the system's preset parallel processing method, resources are allocated according to the sequential processing strategy of network data packets and the PoE power supply strategy, and corresponding task execution instructions are generated. The switch is controlled to perform task allocation according to the task execution instructions.

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

[0061] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0062] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A control method for a single-chip switch, characterized in that: The control method of the single-chip switch comprises: Obtaining the priority and type of the network data packet, and assigning the network data packet to a corresponding processing queue according to the priority and / or type of the network data packet, to obtain a sequential processing strategy for the network data packet; Acquire device PoE information of multiple connected devices, and perform power demand analysis on the multiple connected devices according to the device PoE information to obtain a power demand analysis result, and generate a corresponding PoE power supply strategy according to the power demand analysis result and the sequential processing strategy of the network data packet; Through the system preset parallel processing method, and according to the sequential processing strategy of the network data packet and the PoE power supply strategy, resource allocation is performed, and corresponding task execution instructions are generated, and the switch is controlled to perform task allocation according to the task execution instructions.

2. The control method of the single-chip switch according to claim 1, characterized in that: The obtaining the priority and / or type of the network data packet and allocating the network data packet to a corresponding processing queue according to the priority and type of the network data packet specifically includes: When the priority of the network data packet is high, the network data packet corresponding to the high priority is promoted to the head position of the priority processing queue; In case the type of the network data packet is a real-time data packet, the real-time data packet is allocated to a fast queue.

3. The control method of the single-chip switch according to claim 2, characterized in that: After allocating the network data packets to corresponding processing queues according to the priority and type of the network data packets, the method further includes: The network data packets in different processing queues are processed in turn by adopting the time slice rotation rule, so as to ensure that the network data packets of different priorities and types can be processed within the predetermined time.

4. The control method of the single-chip switch according to claim 3, characterized in that: The adopting of the time slice rotation rule to perform rotation processing on the network data packets in different processing queues specifically includes: Allocate a different time slice length to each processing queue, wherein the priority processing queue and the fast queue are allocated a preset short rotation time slice, and the common processing queue is allocated a preset normal rotation time slice; The task processing efficiency of the different processing queues is obtained. When the task processing efficiency corresponding to the common processing queue is lower than the preset warning efficiency threshold, the time slice lengths of the different processing queues are dynamically adjusted to adapt to changes in network traffic and processing requirements of different types of network data packets.

5. The control method of the single-chip switch according to claim 1, characterized in that: The obtaining of device PoE information of the connected device, performing power demand analysis on the connected device, and generating a corresponding PoE power supply strategy according to the power demand analysis result and the sequential processing strategy of the network data packet specifically includes: Calculate and set the power output of each port of the switch according to the power demand analysis results of the plurality of connected devices and the available power of the bus; The current total system power is obtained. When the current total system power exceeds the power supply capacity, the power distribution data is dynamically adjusted according to the sequential processing strategy of the network data packet, and the PoE power supply strategy of each port of the switch is generated according to the power distribution data.

6. The control method of the single-chip switch according to claim 1, characterized in that: The control method of the single-chip switch also includes: Monitor the operation status of the switch and network communication anomalies in real time, and trigger an error diagnosis program and generate corresponding diagnosis results when abnormalities in data packet reception and / or power distribution are detected; According to the diagnosis result, a system-defined recovery program is executed, and the diagnosis result and its corresponding recovery program are stored in a fault database.

7. A control device for a single-chip switch, characterized in that: The control device of the single-chip switch comprises: A data packet allocation module, used to obtain the priority and type of the network data packet, and allocate the network data packet to a corresponding processing queue according to the priority and / or type of the network data packet, so as to obtain a sequential processing strategy for the network data packet; A power demand analysis module, used to obtain device PoE information of multiple connected devices, and perform power demand analysis on the multiple connected devices according to the device PoE information to obtain a power demand analysis result, and generate a corresponding PoE power supply strategy according to the power demand analysis result and the sequential processing strategy of the network data packet; The task allocation module is used to allocate resources through a system preset parallel processing method, according to the sequential processing strategy of the network data packet and the PoE power supply strategy, and generate corresponding task execution instructions, and control the switch to perform task allocation according to the task execution instructions.

8. The control device of the single-chip switch according to claim 7, characterized in that: Optionally, the data packet distribution module specifically includes: A priority processing module, used for, when the priority of the network data packet is high, promoting the network data packet corresponding to the high priority to the head position of the priority processing queue; The type processing module is used to allocate the real-time data packet to a fast queue when the type of the network data packet is a real-time data packet.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the control method of the single-chip switch according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the control method of the single-chip switch according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Network equipment and power supply method

    CN107979474A

  • Electric power intelligent Internet of Things base station based on end edge cloud architecture

    CN111669843A

  • Control method and system for providing power for powered equipment and POE (Power Over Ethernet) equipment

    CN118540171A

  • Rapid load reduction for power-over-LAN system

    US20060259792A1

  • Power-over-ethernet (POE) breakout module

    US20210392006A1

Cited By

  • Data synchronization method and device of server

    CN120091024A

  • Fault detection processing method and device for switch chip

    CN120512391A

  • Fault detection processing method and apparatus for a switch chip

    CN120512391B