Power supply management method, electronic equipment and computer readable storage medium

By obtaining register information and protocol packets in PoE switches to identify port status, creating a virtual sub-interface to independently configure the power supply policy of each PD device, it solves the problem of power supply under the dual-feature PD topology of PoE switches in the prior art, and realizes flexible power supply management and resource optimization.

CN120455184APending Publication Date: 2025-08-08TP-LINK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510621747.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

Existing PoE switches cannot manage the power supply status of each PD device separately under the dual-feature PD topology, resulting in waste of power resources and difficulty in operation and maintenance.

Method used

The switch obtains register information and protocol messages, recognizes the access status of the port, and creates a virtual sub-interface when it is recognized as a dual-feature state, and independently configures the power supply policy of each PD device.

Benefits of technology

It realizes flexible power supply management for each PD device under the dual-feature PD topology, improves operation and maintenance efficiency and resource utilization, and reduces misjudgment rate and power waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455184A_ABST
    Figure CN120455184A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and provides a power supply management method, electronic equipment and a computer readable storage medium, the method is applied to a switch, the switch is provided with a plurality of ports, and the method comprises the following steps: in response to received first access information, obtaining register information and a protocol message, the first access information is used for representing that the first port is in a power supply state. And determining the access state of the first port according to at least one of the register information or the protocol message. And if the access state is a double-feature state, two virtual sub-interfaces are created, the two virtual sub-interfaces are associated with the first power receiving equipment and the second power receiving equipment respectively, and the virtual sub-interfaces receive the configuration information and perform power supply management on the associated power receiving equipment according to the configuration information. Management of the port / sub-interface can be automatically switched according to the identification result, when the dual-feature state is identified, the virtual sub-interface bound with the PD is created on the physical port, and the power supply strategy of each PD can be independently configured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a power supply management method, an electronic device, and a computer-readable storage medium. Background Art

[0002] PoE (Power over Ethernet) is a technology that transmits power through network cables. The IEEE Standards Committee has released three PoE standards: IEEE 802.3af, IEEE 802.3at, and IEEE 802.3bt. A PoE switch is one that supports Power over Ethernet.

[0003] IEEE 802.3bt provides two PD (Power Device) topologies: single-signature and dual-signature. The single-signature PD topology maintains the same classification, maintenance power, and detection signatures across both wire pairs and is suitable for high-power PDs. The dual-signature PD topology maintains independent and distinct signatures across both wire pairs and is suitable for powering two PDs. This means that a single switch port can connect to two PDs.

[0004] However, after two PDs are connected to a port of an existing PoE switch, it is impossible to independently manage and control the power supply status of each PD. Summary of the Invention

[0005] The embodiments of the present application provide a power supply management method, device, chip, electronic device and computer-readable storage medium, which can automatically switch the management of ports / sub-interfaces according to the identification results, support real-time adaptation of hot plug scenarios, and create a virtual sub-interface bound to the PD on the physical port when it is identified as a dual-feature state, and can independently configure the power supply policy of each PD device.

[0006] In a first aspect, the present application provides a power supply management method, which is applied to a switch, the switch having multiple ports. The method includes: obtaining register information in response to received first access information, and obtaining a protocol message, wherein the first access information is used to indicate that a first port is in a power supply state, and the first port is any one of the multiple ports. Based on at least one item in the register information or the protocol message, the access state of the first port is determined, and the access state includes at least a dual-feature state, and the dual-feature state is used to indicate that the first port is connected to a first powered device and a second powered device. If the access state is a dual-feature state, two virtual sub-interfaces are created, and the two virtual sub-interfaces are associated with the first powered device and the second powered device, respectively. The virtual sub-interfaces receive configuration information and perform power supply management on the associated powered devices based on the configuration information.

[0007] In some embodiments, configuration information includes at least a first power threshold and priority information. Power management for associated powered devices based on the configuration information includes: obtaining a first power corresponding to a first powered device, and obtaining a second power corresponding to a second powered device. If the sum of the first power and the second power is greater than or equal to the first power threshold, disconnecting power to a first target powered device based on the priority information. The first target powered device is the device with the lower priority between the first and second powered devices.

[0008] In some embodiments, the configuration information also includes a second power threshold, the second power threshold is less than the first power threshold, and the power supply management method also includes: if the sum of the first power and the second power is greater than or equal to the second power threshold, and the sum of the first power and the second power is less than the first power threshold, then a warning prompt information is displayed, and the warning prompt information is used to indicate that the power sum of the powered device corresponding to the first port is greater than or equal to the second power threshold.

[0009] In some embodiments, determining the access state of the first port based on at least one of the register information or the protocol message includes determining whether the register information includes dual-signature register data. If the register information includes dual-signature register data, determining the access state as the dual-signature state.

[0010] In some embodiments, the protocol message includes a first protocol message and a second protocol message, and the power supply management method further includes: if the register information does not include the dual-signature register data, determining the access state based on the first protocol message, and if the first protocol message includes the first dual-signature data, determining the access state as the dual-signature state.

[0011] In some embodiments, the access state further includes a single-signature state, where the single-signature state indicates that the first port is connected to a third powered device. The power supply management method further includes: if the first protocol message does not include the first dual-signature data, determining the access state based on the second protocol message; if the second protocol message includes the second dual-signature data, determining the access state to be the dual-signature state; and if the second protocol message does not include the second dual-signature data, determining the access state to be the single-signature state.

[0012] In some embodiments, obtaining register information and obtaining protocol messages include: determining whether register information exists, obtaining the register information and protocol messages if register information exists, and obtaining the protocol messages if register information does not exist.

[0013] In some embodiments, the configuration information includes an interruption instruction, and the power supply management method further includes: in response to the received interruption instruction, disconnecting the power supply of the second target powered device, where the second target powered device is the powered device associated with the virtual sub-interface that received the interruption instruction, among the first powered device and the second powered device.

[0014] In some embodiments, the switch further includes a display module, and the power management method further includes: displaying the first power, the second power, the power supply status of the first powered device, the power supply status of the second powered device, and priority information on the display module.

[0015] In a second aspect, the present application provides a power supply management device, which may be a switch having multiple ports. The device includes:

[0016] The acquisition module is configured to acquire register information and a protocol message in response to received first access information, wherein the first access information is used to indicate that the first port is in a power supply state, and the first port is any one of the multiple ports.

[0017] The processing module is used to determine the access status of the first port according to at least one of the register information or the protocol message, where the access status includes at least a dual-feature state, which is used to indicate that the first port is connected to the first powered device and the second powered device.

[0018] The processing module is further configured to create two virtual sub-interfaces when the access state is the dual-feature state, wherein the two virtual sub-interfaces are associated with the first powered device and the second powered device respectively.

[0019] The processing module is further configured to perform power supply management on the associated powered device according to the configuration information after the virtual sub-interface receives the configuration information.

[0020] In a third aspect, the present application provides a chip, which is used to execute any method in the first aspect above.

[0021] In a fourth aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the method as described in any one of the first aspects above. Alternatively,

[0022] The electronic device includes the chip according to the third aspect.

[0023] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method as described in any one of the above-mentioned first aspects.

[0024] In the technical solution provided by the embodiment of the present application, the switch can obtain register information and obtain protocol messages when detecting that the first port is in a power supply state, and determine the access state of the first port based on at least one of the register information or protocol messages. The access state includes at least a dual-feature state, and the dual-feature state is used to indicate that the first port is connected to the first powered device and the second powered device. If the access state is a dual-feature state, two virtual sub-interfaces are created, and the two virtual sub-interfaces are associated with the first powered device and the second powered device respectively. The virtual sub-interfaces receive configuration information and perform power supply management on the associated powered devices based on the configuration information. The technical solution provided by the embodiment of the present application can automatically switch the management of ports / sub-interfaces based on the identification results, support real-time adaptation of hot-swap scenarios, and create a virtual sub-interface bound to the PD on the physical port when it is identified as a dual-feature state. The power supply policy of each PD device can be independently configured. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1 This is a schematic diagram of a single-feature topological structure provided in an embodiment of the present application;

[0027] Figure 2 This is a schematic diagram of a dual-feature topological structure provided in an embodiment of the present application;

[0028] Figure 3 This is a flow chart of a power supply management method provided in an embodiment of the present application;

[0029] Figure 4 This is a schematic diagram of a flow chart for determining the access status of a first port provided by an embodiment of the present application;

[0030] Figure 5 This is a schematic diagram of the structure of a power supply management device provided in an embodiment of the present application;

[0031] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In the following description, specific details such as specific system structures and technologies are provided for illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present application with unnecessary details.

[0033] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0034] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0035] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0036] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0037] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0038] PoE (Power over Ethernet) is a technology that simultaneously transmits data and power through Ethernet cables (such as Cat5e / Cat6 network cables). PoE simplifies the power supply method for network equipment and is particularly suitable for scenarios that require flexible deployment and are difficult to access traditional power sources. The PoE power supply process usually has a topology of: power supply device-dual-function cable-powered device. The power supply device is used for detection and power supply, and can be a PoE switch, etc. The dual-function cable is used to transmit current (direct current). The dual-function cable coexists with the data signal without interfering with each other. The powered device is used to receive power and operate, and can be a camera, AP (Access Point, wireless access point), etc.

[0039] PoE includes three different standards: PoE standard, PoE+ standard and PoE++ standard.

[0040] The PoE standard supports the IEEE 802.3af protocol and can be applied to scenarios where powered devices such as IP phones (Internet Protocol Telephony) and basic cameras are used. Power is transmitted through only two wire pairs (4 cores), allowing data and power to coexist.

[0041] The PoE+ standard supports the IEEE 802.3at protocol and can be applied to scenarios where powered devices such as high-definition cameras are used. Power is transmitted through only two wire pairs (4 cores), allowing data and power to coexist.

[0042] The PoE++ standard supports the IEEE 802.3bt protocol and can be applied to powered devices such as smart displays, PTZ (Pan / Tilt / Zoom) cameras, and IoT (Internet of Things) devices. It uses a four-pair (8-core) power supply for more efficient power distribution and supports higher currents.

[0043] IEEE 802.3bt provides two PD topologies: single-signature and dual-signature. The single-signature PD topology has the same classification, maintenance power, and detection characteristics across both wire pairs and is suitable for high-power PDs.

[0044] For example, Figure 1 A schematic diagram of a single-feature topological structure provided in an embodiment of the present application. Figure 1 (a) is a single-feature topological structure diagram. Figure 1Figure (b) shows a simplified diagram of a single-signature topology. In this topology, the PoE switch supports IEEE 802.3bt (PoE++) and is backward compatible with IEEE 802.3af and IEEE 802.3at. Powered devices (PDs) can support IEEE 802.3bt, IEEE 802.3af, or IEEE 802.3at.

[0045] The dual-signature PD topology has independent and different characteristics between the two wire pairs. In the dual-signature PD topology, the power wire pair (such as 4 wire pairs) can independently power two PDs. It is suitable for PDs that require two power supply lines or for powering two PDs.

[0046] For example, Figure 2 A schematic diagram of a dual-feature topological structure provided in an embodiment of the present application. Figure 2 (a) is a dual-feature topological structure diagram. Figure 2 Figure (b) shows a simplified diagram of a dual-signature topology. In this dual-signature topology, the PoE switch supports IEEE 802.3bt (PoE++) and is backward compatible with IEEE 802.3af and IEEE 802.3at. Powered devices (PDs) can support either IEEE 802.3af or IEEE 802.3at.

[0047] However, PoE / PoE+ switches manage power using physical ports as the smallest unit, while traditional PoE++ switches still use this same port management method in dual-signature scenarios. In dual-signature scenarios, PoE++ switches manage power only by physical port, unable to distinguish between two PDs connected to the same port. This prevents device-level management and, when overload protection is applied, forces the PoE++ switch to shut down power to the entire port, simultaneously powering off both PDs and, consequently, disconnecting the higher-priority PD, wasting power resources.

[0048] In addition, in traditional technical solutions, PoE++ switches use PSE chip registers to determine whether a port has a dual-signature PD topology structure. They cannot identify non-standard PDs or cross-manufacturer devices (protocol parsing differences). When the register data is abnormal, the misjudgment rate increases (for example, a single-signature PD is identified as a dual-signature PD). It is difficult to determine whether a mixed access scenario with multiple PDs (a scenario where non-standard PD devices and / or cross-manufacturer PD devices coexist on one port) is a dual-signature PD topology structure.

[0049] In dual-signature scenarios, the PoE switch cannot independently deploy two PDs, resulting in low PD management flexibility, waste of power resources, and poor PoE switch operation and maintenance capabilities.

[0050] In view of this, an embodiment of the present application provides a power supply method that can determine the topology of a switch and control the power supply status of a single PD when the switch is in a dual-signature PD topology, thereby improving the efficiency and flexibility of switch operation and maintenance.

[0051] The power supply method provided in the embodiment of the present application can be applied to a PoE++ switch.

[0052] The following combination Figures 3 to 4 The examples in the following describe the technical solutions of the embodiments of the present application.

[0053] like Figure 3 FIG. 1 is a flow chart of a power supply management method provided in an embodiment of the present application. The method includes the following steps:

[0054] Step S301: in response to received first access information, register information and protocol message are acquired, wherein the first access information is used to indicate that a first port is in a power supply state, and the first port is any one of a plurality of ports.

[0055] In an embodiment of the present application, the switch may be provided with a PSE (Power Sourcing Equipment Chip, power supply equipment) chip, and the switch may monitor the connected PD through the built-in PSE chip. Specifically, the switch is provided with multiple ports, and the built-in PSE chip may continuously send a detection current to the first port (any one of the multiple ports) to determine whether the first port is connected to a PD device. Specifically, the PSE chip may send a low-voltage detection signal of 2.8V to 10V to the first port, namely, a valid detection voltage (Valid Detection Voltage). If a characteristic resistance of 23.7kΩ to 26.3kΩ, namely, a valid detection resistance (Valid Detection Resistance), is detected, the PSE chip determines that the first port is connected to a PD device.

[0056] The register information may be register information of a PSE chip, and the switch may directly call the register information of the PSE chip. The protocol message may include a first protocol message and a second protocol message, and the first protocol message may be an LLDP (Link Layer Discovery Protocol) message.

[0057] For example, some fields in the LLDP message may be as shown in Table 1.

[0058] Field Name length Example values illustrate Type 1 byte 0x7F Fixed value, indicating a private TLV Length 2 bytes 0x0005 Total length of subsequent data (bytes) OUI 3 bytes 00-12-0F Organizational unique identifier (registration required) Subtype 1 byte 0x01 Custom subtype (power supply characteristics) Power Mode 1 byte 0x01 / 0x02 0x01 = single signature, 0x02 = dual signature

[0059] Table 1

[0060] The byte length of Type can be 1 byte, which is a fixed value. For example, Type can be 0x7F, which is used to represent a private TLV (Type-Length-Value, a coding standard widely used in electronic communications and data storage) type.

[0061] The byte length of Length can be 2 bytes, which is used to indicate the total byte length of the subsequent data. For example, Length can be 0x0005, which indicates that the total byte length of the subsequent data is 5 bytes.

[0062] The length of the OUI (Organizationally Unique Identifier) can be 3 bytes. For example, the OUI can be 00-12-0F, which is used to represent the organizational unique identifier and needs to be registered with the IEEE.

[0063] The Subtype field can be 1 byte long and is used to represent the subtype of a data type. For example, if the Subtype field is 0x01, this TLV is used to describe power supply characteristics.

[0064] The byte length of Power Mode can be 1 byte, and Power Mode can be 0x01 or 0x02. If Power Mode is 0x01, it indicates that the power supply mode is single-signature; if Power Mode is 0x02, it indicates that the power supply mode is dual-signature.

[0065] The second protocol message may be an OAM (Operations, Administration, and Maintenance) message.

[0066] Some fields in the OAM message may be as shown in Table 2.

[0067] Field Name length Example values illustrate Type 1 byte 0x90 0x80~0xFF are private fields Length 2 bytes 0x0001 Total length of subsequent data (bytes) Value 1 byte 0x01 / 0x02 0x01 = single signature, 0x02 = dual signature

[0068] Table 2

[0069] The Type field can be 1 byte long. Its value range is 0x00 to 0xFF (0 to 255). 0x80 to 0xFF (128 to 255) is a private field and requires custom usage. For example, Type can be 0x90.

[0070] The byte length of Length can be 2 bytes, which is used to indicate the total byte length of the subsequent data. For example, Length can be 0x0001, which indicates that the total byte length of the subsequent data is 1 byte.

[0071] The byte length of Value can be 1 byte, and Value can be 0x01 or 0x02. If Value is 0x01, it indicates that the power supply mode is single-signature; if Value is 0x02, it indicates that the power supply mode is dual-signature.

[0072] Step S302: Determine the access status of the first port according to at least one of the register information or the protocol message. The access status includes at least a dual-feature status, which is used to indicate that the first port is connected to the first powered device and the second powered device.

[0073] In an embodiment of the present application, the switch can simultaneously obtain register information and protocol messages, and simultaneously determine the access status of the first port based on the register information and protocol messages. Specifically, the switch can first determine whether the PSE chip has register information. If the register information exists, the switch can obtain the register information and protocol messages, and simultaneously determine the access status of the first port based on the register information and protocol messages. If the PSE chip does not have register information, the switch can obtain the protocol messages, and determine the access status of the first port based on the protocol messages.

[0074] The protocol message may include a first protocol message and a second protocol message. When the PSE chip contains register information, the switch may prioritize the access status of the first port based on the register information, and assist in determining the access status of the first port based on the first protocol message and the second protocol message. In the embodiment of the present application, the judgment priority of the first protocol message may be higher than that of the second protocol message. It should be understood that the judgment priority of the second protocol message may also be higher than that of the first protocol message, and this application does not limit this. The embodiment of the present application takes the example that the judgment priority of the register information is higher than that of the first protocol message, and the judgment priority of the first protocol message is higher than that of the second protocol message as an example for illustrative explanation. It should be understood that, based on the embodiment of the present application, those skilled in the art may also set different judgment priorities to obtain other embodiments, and this application will not elaborate on them here.

[0075] For example, Figure 4 The figure is a flow chart of determining the access status of a first port according to an embodiment of the present application. When the PSE chip has register information, the switch may determine the access status of the first port according to at least one of the register information, the first protocol message, and the second protocol message:

[0076] Step A1: Determine whether the register information contains dual-signature register data.

[0077] In an embodiment of the present application, the switch can read register information in a PSE chip, where the register information includes at least access status information of multiple ports. The switch can determine the access status of the first port based on the access status information corresponding to the first port. If the access status information corresponding to the first port indicates that the access status of the first port is in a dual-signature state (i.e., includes dual-signature register data), the switch executes step A2. If the access status information corresponding to the first port indicates that the access status of the first port is not in a dual-signature state, the switch further determines the access status of the first port based on the first protocol message, i.e., executes step A3.

[0078] Step A2: Determine that the access state is a dual-feature state.

[0079] If the register information includes dual-signature register data, the switch determines that the access state is a dual-signature state.

[0080] In the embodiment of the present application, if the PSE chip has register information, and the register information includes dual-signature register data, the switch can directly determine that the access state of the first port is the dual-signature state.

[0081] Specifically, the switch may determine whether the access state of the first port is the dual-signature state according to the classification flag or the power allocation table in the PSE chip, which is not limited in this application.

[0082] Step A3: If the register information does not include the dual-signature register data, determine whether the first protocol message includes the first dual-signature data.

[0083] In an embodiment of the present application, the switch can identify and determine the access status of the first port based on the first protocol message and / or the second protocol message exchanged by the first port. If the register information does not include dual-signature register data, the switch can determine the access status of the first port based on the first protocol message.

[0084] Specifically, the switch can determine the access status of the first port by determining whether the first protocol message contains the first dual-signature data. If the first protocol message contains the first dual-signature data, the switch can execute step A2, that is, determining that the access status of the first port is the dual-signature state.

[0085] For example, referring to Table 1, some fields in the first protocol message may be as shown in Table 1, and the first dual-feature data may be a Power Mode field value of 0x02. If the Power Mode in the first protocol message is 0x02, the switch may determine that the access state of the first port is a dual-feature state.

[0086] If the first protocol message does not include the first dual-feature data, the switching machine may execute step A4, ie, determine the access status of the first port according to the second protocol message.

[0087] For example, referring to Table 1, some fields in the first protocol message may be as shown in Table 1. If the Power Mode in the first protocol message is 0x01, the switch may determine the access status of the first port according to the second protocol message.

[0088] In the embodiment of the present application, when the register information does not include dual-signature register data and the first protocol message includes first dual-signature data, the switching machine may determine that the access state of the first port is the dual-signature state.

[0089] Step A4: If the first protocol message does not include the first dual characteristic data, determine whether the second protocol message includes the second dual characteristic data.

[0090] In an embodiment of the present application, if the first protocol message does not include the first dual-signature data, the switch may determine the access status of the first port based on the second protocol message. Specifically, the switch may determine the access status of the first port by determining whether the second protocol message includes the second dual-signature data. If the second protocol message includes the second dual-signature data, the switch may execute step A2, i.e., determine that the access status of the first port is the dual-signature state.

[0091] For example, referring to Table 2, some fields in the second protocol message may be as shown in Table 2, and the second dual-feature data may have a Value field value of 0x02. If the Value in the first protocol message is 0x02, the switch may determine that the access state of the first port is the dual-feature state.

[0092] If the second protocol message does not include the second dual-signature data, the switch machine may execute step A5, ie, determine that the access state of the first port is a single-signature state.

[0093] For example, referring to Table 2, some fields in the second protocol message may be as shown in Table 2. If the Value in the second protocol message is 0x01, the switch may determine that the access state of the first port is the single-feature state.

[0094] If the second protocol message includes the second dual-feature data, the switch determines that the access state is the dual-feature state.

[0095] In an embodiment of the present application, when the register information does not include dual-signature register data, the first protocol message does not include first dual-signature data, and the second protocol message includes second dual-signature data, the switching machine can determine that the access state of the first port is a dual-signature state.

[0096] Step A5: If the second protocol message does not include the second dual-feature data, it is determined that the access state is a single-feature state.

[0097] In an embodiment of the present application, when the register information does not include dual-signature register data, the first protocol message does not include first dual-signature data, and the second protocol message does not include second dual-signature data, the switching machine can determine that the access state of the first port is a single-signature state.

[0098] In the technical solution provided in the embodiment of the present application, the switch can identify the access status of the first port by combining register information and protocol messages, thereby reducing the error rate of the judgment result caused by a single judgment and improving the accuracy of the access status judgment result of the first port.

[0099] In addition, the technical solution of judging the access status of the first port by combining the first protocol message and the second protocol message can be compatible with PD devices produced by various different manufacturers, compatible with PoE, PoE+ and PoE++ standards, and improve the accuracy of cross-factory and cross-model device identification results.

[0100] Step S303: If the access state is the dual-feature state, two virtual sub-interfaces are created, and the two virtual sub-interfaces are associated with the first powered device and the second powered device respectively.

[0101] When the switch detects that the access state of the first port is the dual-signature state, it creates two virtual sub-interfaces to implement power supply management for the PD devices (the first powered device and the second powered device) connected to the first port.

[0102] Step S304: the virtual sub-interface receives the configuration information, and performs power supply management on the associated powered device according to the configuration information.

[0103] In an embodiment of the present application, the configuration information may include a power threshold and priority information. The priority information may include the priority of the first powered device and the priority of the second powered device. The preset power threshold may include the first power threshold and / or the second power threshold. The configuration information may also include an operation log.

[0104] The method for the switch to manage power supply to the associated powered device according to the configuration information may include:

[0105] First, a first power corresponding to a first powered device is obtained, and a second power corresponding to a second powered device is obtained.

[0106] The switch can detect the power of the first powered device and the second powered device in real time, and manage the power supply status of the first powered device and the second powered device.

[0107] If the sum of the first power and the second power is greater than or equal to the first power threshold, the switch disconnects power to the first target powered device according to the priority information, where the first target powered device is the powered device with a lower priority between the first powered device and the second powered device.

[0108] In this embodiment of the present application, the preset power thresholds (including the first power threshold and / or the second power threshold) may be preset values stored in the switch, and are used to manage the power supply status of the first powered device and the second powered device based on the sum of the first power and the second power. A user may also modify one or more of the preset power thresholds (including the first power threshold and / or the second power threshold) through the switch, but this application does not limit this.

[0109] In the technical solution provided by the embodiment of the present application, the switch can obtain register information and obtain protocol messages when detecting that the first port is in the power supply state, and determine the access state of the first port based on at least one of the register information or the protocol message, wherein the access state includes at least a dual-feature state, and the dual-feature state is used to indicate that the first port is connected to the first powered device and the second powered device; if the access state is the dual-feature state, two virtual sub-interfaces are created, and the two virtual sub-interfaces are associated with the first powered device and the second powered device respectively, and the virtual sub-interfaces receive configuration information and perform power supply management on the associated powered devices based on the configuration information. The technical solution provided by the embodiment of the present application can automatically switch the management of the port / sub-interface according to the identification result, support real-time adaptation of hot-swap scenarios, and create a virtual sub-interface bound to the PD on the physical port when it is identified as the dual-feature state, and can independently configure the power supply policy of each PD device.

[0110] In some embodiments, when the preset power threshold includes only the first power threshold and the priority of the first powered device is higher than that of the second powered device (i.e., the first target powered device is the second powered device), the method for the switch to disconnect power to the first target powered device based on the priority information may include:

[0111] Step B1: Acquire a first power corresponding to a first powered device, and acquire a second power corresponding to a second powered device.

[0112] In an embodiment of the present application, the switch can obtain, in real time, a first power corresponding to a first powered device and a second power corresponding to a second powered device, and control a display module to display the first and second power. The display module can be a module corresponding to the switch's display screen, or it can be an external display screen or display device connected to the switch, which is not limited in this application.

[0113] Step B2: Determine whether the sum of the first power and the second power is greater than or equal to a first power threshold.

[0114] Step B3: If the sum of the first power and the second power is greater than or equal to the first power threshold, disconnecting the power supply to the second powered device.

[0115] In this embodiment of the present application, if the sum of the first power and the second power is greater than or equal to the first power threshold, the switch may execute step B3 to disconnect the power supply to the second powered device; if the sum of the first power and the second power is less than the first power threshold, the switch may maintain the power supply status of the first powered device and the second powered device.

[0116] In an embodiment of the present application, the switch can disconnect the power supply of the powered device with lower priority when the sum of the first power and the second power is greater than or equal to the first power threshold, so as to ensure that the powered device with higher priority is in a normal power supply state and improve the stability of the system power supply.

[0117] The switch may further display the power-on status / power-off status of the first powered device and the second powered device on the control display module, and the control display module may display priority information of the first powered device and the second powered device.

[0118] In some embodiments, when the preset power threshold includes a first power threshold and a second power threshold, the second power threshold is less than the first power threshold, and the priority of the first powered device is higher than that of the second powered device (i.e., the first target powered device is the second powered device), the method for the switch to disconnect power to the first target powered device based on the priority information may include:

[0119] Step C1: obtaining a first power corresponding to a first powered device, and obtaining a second power corresponding to a second powered device.

[0120] In the embodiment of the present application, the method for the switch to obtain the first power corresponding to the first powered device and the second power corresponding to the second powered device can refer to the method for the switch to obtain the first power and the second power in step B1 above, which is not described in detail herein.

[0121] Step C2: Determine whether the sum of the first power and the second power is greater than or equal to the second power threshold and less than the first power threshold.

[0122] In this embodiment of the present application, if the sum of the first power and the second power is greater than or equal to the second power threshold and less than the first power threshold, the switch may execute step C3 and display a warning message. It should be understood that the second power threshold may be the maximum power that the first port of the switch can withstand to ensure that it maintains an optimal operating state, and the first power threshold may be the maximum power that the first port of the switch can withstand to ensure that it maintains an operating state. If the sum of the first power and the second power is greater than or equal to the second power threshold and less than the first power threshold, the switch will display a warning message to inform the user that the power sum of the powered device corresponding to the first port is high, so that the user can manage the power supply of the powered device, thereby improving the operating efficiency and stability of the switch.

[0123] For example, the first power threshold may be 900W, and the second power threshold may be 850W. If the sum of the first power and the second power is 870W, the switch may display a warning prompt message.

[0124] Step C3: If the sum of the first power and the second power is greater than or equal to the second power threshold, and the sum of the first power and the second power is less than the first power threshold, a warning prompt message is displayed, where the warning prompt message is used to indicate that the power sum of the powered device corresponding to the first port is greater than or equal to the second power threshold.

[0125] It should be understood that if the sum of the first power and the second power is greater than or equal to the first power threshold, the switch may disconnect the power supply to the second powered device. If the sum of the first power and the second power is less than the second power threshold, the switch may maintain the power supply status of the first powered device and the second powered device.

[0126] In some embodiments, the configuration information includes a disconnect instruction, allowing a user to disconnect power to the first powered device and / or the second powered device via two virtual sub-interfaces. Specifically, in response to receiving the disconnect instruction, the switch disconnects power to the second target powered device, where the second target powered device is the powered device associated with the virtual sub-interface that received the disconnect instruction.

[0127] In some embodiments, the configuration information may also include a startup instruction, allowing the user to turn on power to the first powered device and / or the second powered device via the two virtual sub-interfaces. Specifically, in response to the received startup instruction, the switch turns on power to a third target powered device, which is the powered device associated with the virtual sub-interface that received the startup instruction, among the first and second powered devices.

[0128] It should be understood that, provided there is no logical conflict, the above-mentioned embodiments can be combined with each other to meet actual application requirements. The specific embodiments or implementation plans obtained by these combinations still fall within the scope of protection of this application.

[0129] Corresponding to the power supply management method in the above embodiment, an embodiment of the present application provides a power supply management device. The power supply management device can be a switch, and the switch is provided with multiple ports. The power supply management device can be implemented by software, hardware or a combination of both to become part or all of a computer device, and is used to execute the steps in the power supply management method in the above embodiment.

[0130] Figure 5 A structural diagram of a power supply management device 50 provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0131] Reference Figure 5 The device 50 includes an acquisition module 510 and a processing module 520.

[0132] The acquisition module 510 is configured to acquire register information and a protocol message in response to received first access information, wherein the first access information is used to indicate that the first port is in a power supply state, and the first port is any one of the multiple ports.

[0133] The processing module 520 is configured to determine an access state of the first port according to at least one of the register information or the protocol message, where the access state includes at least a dual-feature state, which indicates that the first port is connected to the first powered device and the second powered device.

[0134] The processing module 520 is further configured to create two virtual sub-interfaces when the access state is the dual-feature state, wherein the two virtual sub-interfaces are associated with the first powered device and the second powered device respectively.

[0135] The processing module 520 is further configured to perform power supply management on the associated powered device according to the configuration information after the virtual sub-interface receives the configuration information.

[0136] In some embodiments, the configuration information includes at least a first power threshold and priority information. The processing module 520 is specifically configured to obtain a first power corresponding to the first powered device and a second power corresponding to the second powered device. When the sum of the first and second powers is greater than or equal to the first power threshold, disconnecting power to the first target powered device based on the priority information. The first target powered device is the device with the lower priority between the first and second powered devices.

[0137] In some embodiments, the configuration information also includes a second power threshold, the second power threshold is less than the first power threshold, and the processing module 520 is also used to: when the sum of the first power and the second power is greater than or equal to the second power threshold, and the sum of the first power and the second power is less than the first power threshold, display a warning prompt information, and the warning prompt information is used to indicate that the power sum of the powered device corresponding to the first port is greater than or equal to the second power threshold.

[0138] In some embodiments, the processing module 520 is specifically configured to: determine whether the register information includes dual-signature register data, and if the register information includes dual-signature register data, determine that the access state is the dual-signature state.

[0139] In some embodiments, the protocol message includes a first protocol message and a second protocol message, and the processing module 520 is further configured to: determine the access state based on the first protocol message when the register information does not include the dual-signature register data, and determine that the access state is the dual-signature state if the first protocol message includes the first dual-signature data.

[0140] In some embodiments, the access status also includes a single-signature state, which indicates that the first port is connected to a third powered device. The processing module 520 is further configured to: when the first protocol message does not include the first dual-signature data, determine the access status based on the second protocol message. If the second protocol message includes the second dual-signature data, determine that the access status is the dual-signature state. If the second protocol message does not include the second dual-signature data, determine that the access status is the single-signature state.

[0141] In some embodiments, the processing module 520 is specifically configured to: determine whether register information exists, obtain the register information and the protocol message if register information exists, and obtain the protocol message if register information does not exist.

[0142] In some embodiments, the configuration information includes an interrupt instruction, and the processing module 520 is further used to: in response to the received interrupt instruction, disconnect the power supply of the second target powered device, where the second target powered device is the powered device associated with the virtual sub-interface that received the interrupt instruction, among the first powered device and the second powered device.

[0143] In some embodiments, the switch further includes a display module, and the processing module 520 is further configured to: display the first power, the second power, the power supply status of the first powered device, the power supply status of the second powered device, and priority information on the display module.

[0144] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0145] 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 this application.

[0146] Based on the same inventive concept, an embodiment of the present application also provides an electronic device.

[0147] Figure 6 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 6 As shown, the electronic device 6 of this embodiment includes: at least one processor 610 ( Figure 6 Only one is shown), a memory 620, and a communication module 640. The memory 620 stores a computer program 630 that may be run on the processor 610. When the processor 610 executes the computer program 630, the steps in the above power supply management method embodiment are implemented, such as Figure 3 Alternatively, when the processor 610 executes the computer program 630, the functions of the modules / units in the above-mentioned device embodiments are realized, for example Figure 5 The functions of modules 510 to 520 are shown, and the communication module 640 can be a separate communication unit for communicating with an external server or terminal device.

[0148] The electronic device 6 may include, but is not limited to: a processor 610 and a memory 620. Those skilled in the art will appreciate that Figure 6 It is only an example of electronic device 6 and does not constitute a limitation of electronic device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, electronic device 6 may also include an input sending device, a network access device, a bus, etc.

[0149] The processor 610 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0150] In some embodiments, the memory 620 may be an internal storage unit of the electronic device 6, such as a hard disk or memory of the electronic device 6. The memory 620 may also be an external storage device of the electronic device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped on the electronic device 6. The memory 620 may also include both an internal storage unit of the electronic device 6 and an external storage device. The memory 620 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program 630. The memory 620 may also be used to temporarily store data that has been sent or is about to be sent.

[0151] In addition, 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. The functional units in the various embodiments of the present application can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0152] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on an electronic device, the electronic device executes the steps in the above-mentioned method embodiments.

[0153] An embodiment of the present application provides a chip, which includes a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, the steps in the above-mentioned method embodiments are implemented.

[0154] An embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the steps in the above-mentioned various method embodiments.

[0155] It should be understood that the processor mentioned in the embodiments of the present application may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0156] It should also be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0157] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. 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. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0158] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0159] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0160] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0161] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0162] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0163] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying the computer program code to a large-screen device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0164] Finally, it should be noted that the above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A power supply management method, characterized in that: Applied to a switch, the switch having multiple ports, the method comprising: In response to the received first access information, register information is acquired, and a protocol message is acquired, wherein the first access information is used to indicate that a first port is in a power supply state, and the first port is any one of the multiple ports; Determine, according to at least one of the register information or the protocol message, an access state of the first port, the access state including at least a dual-feature state, the dual-feature state being used to indicate that the first port is connected to a first powered device and a second powered device; If the access state is the dual-feature state, creating two virtual sub-interfaces, the two virtual sub-interfaces being associated with the first powered device and the second powered device respectively; The virtual sub-interface receives configuration information and performs power supply management on the associated powered device according to the configuration information.

2. The power supply management method according to claim 1, wherein: The configuration information includes at least a first power threshold and priority information, and the performing power supply management on the associated powered device according to the configuration information includes: Obtaining a first power corresponding to the first powered device, and obtaining a second power corresponding to the second powered device; If the sum of the first power and the second power is greater than or equal to the first power threshold, power supply to a first target powered device is disconnected according to the priority information, where the first target powered device is a powered device with a lower priority between the first powered device and the second powered device.

3. The power supply management method according to claim 2, characterized in that: The configuration information further includes a second power threshold, where the second power threshold is smaller than the first power threshold. The power supply management method further includes: If the sum of the first power and the second power is greater than or equal to the second power threshold, and the sum of the first power and the second power is less than the first power threshold, a warning prompt information is displayed, where the warning prompt information is used to indicate that the sum of the powers of the powered devices corresponding to the first port is greater than or equal to the second power threshold.

4. The power supply management method according to claim 1, wherein: The determining, according to at least one of the register information or the protocol message, the access status of the first port includes: determining whether the register information includes dual-signature register data; If the register information includes dual-feature register data, the access state is determined to be the dual-feature state.

5. The power supply management method according to claim 4, characterized in that: The protocol message includes a first protocol message and a second protocol message, and the power supply management method further includes: If the register information does not include the dual-signature register data, determining the access status according to the first protocol message; If the first protocol message includes first dual-feature data, it is determined that the access state is the dual-feature state.

6. The power supply management method according to claim 5, characterized in that: The access state further includes a single-feature state, where the single-feature state is used to indicate that the first port is connected to a third powered device. The power supply management method further includes: If the first protocol message does not include the first dual feature data, determining the access status according to the second protocol message; If the second protocol message includes second dual-feature data, determining that the access state is the dual-feature state; If the second protocol message does not include the second dual-feature data, it is determined that the access state is the single-feature state.

7. The power supply management method according to claim 1, characterized in that: The obtaining of register information and protocol message includes: Determine whether the register information exists; If the register information exists, obtaining the register information and the protocol message; If the register information does not exist, the protocol message is obtained.

8. The power supply management method according to claim 1, wherein: The configuration information includes an interrupt instruction, and the power supply management method further includes: In response to the received interrupt instruction, power supply to a second target powered device is disconnected, where the second target powered device is a powered device associated with the virtual sub-interface that received the interrupt instruction, among the first powered device and the second powered device.

9. The power supply management method according to any one of claims 1 to 8, characterized in that: The switch further includes a display module, and the power supply management method further includes: The first power, the second power, the power supply status of the first powered device, the power supply status of the second powered device, and the priority information are displayed on the display module.

10. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the power supply management method as described in any one of claims 1 to 9.

11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the power supply management method as described in any one of claims 1 to 9 is implemented.