Method and equipment for acquiring low-speed bus slave device data
By isolating data access from devices through an independent management controller and an open network operating system, the problem of performance loss and increased CPU utilization caused by frequent low-speed bus access is solved, resulting in more efficient data management and a simplified maintenance process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-17
AI Technical Summary
Existing open network operating systems experience prolonged data response time, increased CPU utilization, and increased system maintenance complexity when low-speed bus access is frequent, impacting switch performance and responsiveness.
By creating a hardware functional module corresponding to each low-speed bus slave device through an independent management controller, and utilizing the data channel of the independent management controller and the open network operating system, slave device data access is isolated, reducing frequent multi-level gating switching, and using a first-in-first-out strategy to schedule the access queue, thereby reducing CPU load.
It reduces performance loss caused by frequent multi-level gating switching, lowers the CPU load of the main system, simplifies the maintenance process, and improves data access efficiency.
Smart Images

Figure CN121691237A_ABST
Abstract
Description
Technical Field
[0001] This application relates to communication technology, specifically a method and apparatus for acquiring data from a low-speed bus slave device. Background Technology
[0002] Currently, switches can be categorized into commercial switches and white-box switches based on their software type. Commercial switches typically use the manufacturer's own closed operating system, which has lower openness and flexibility; white-box switches, on the other hand, support deep customization of the operating system and functional requirements by users, with white-box switches using open network operating systems being more common in the industry.
[0003] In the design of switches using open network operating systems, low-speed bus-based communication devices are extensively used to achieve fine-grained management and comprehensive monitoring of hardware. This necessitates frequent management and monitoring tasks. With the increasing number of low-speed bus slave devices and the demand for concurrent multi-task access, the access frequency to the low-speed bus increases significantly, leading to decreased access efficiency. Existing open network operating systems generally handle low-speed bus data interaction directly through the main processor. As the access frequency increases, the data response time significantly lengthens, failing to meet the low-latency requirements for device management and monitoring involving bus access. Furthermore, frequent communication with a large number of slave devices consumes significant CPU resources, increasing system load and failure risk, and enhancing system maintenance complexity.
[0004] Therefore, existing open network operating systems suffer from high data acquisition latency, increased CPU utilization, and increased maintenance difficulty when bus access is frequent, which affects the overall performance and responsiveness of the switch. Summary of the Invention
[0005] The purpose of this application is to provide a method and apparatus for acquiring data from low-speed bus slave devices, thereby reducing performance loss caused by frequent multi-level gating switching.
[0006] To achieve the above objectives, this application provides a method for acquiring data from low-speed bus slave devices. The method includes: creating a slave device hardware function module corresponding to each low-speed bus slave device through an independent management controller control plane; sequentially accessing each slave device hardware function module through the independent management controller control plane; recording the acquired data of each low-speed bus slave device in a first database of the independent management controller; and reading the data of each low-speed bus slave device from the first database through an open network operating system control plane via a data channel connecting the open network operating system and the independent management controller.
[0007] To achieve the above objectives, this application also provides a device for acquiring data from low-speed bus slave devices. This device includes multiple low-speed bus slave devices, an independent management controller, a processor, and a machine-readable storage medium. The processor implements an open network operating system by executing machine-executable instructions recorded on the machine-readable storage medium. The independent management controller creates a slave device hardware functional module corresponding to each low-speed bus slave device. It sequentially accesses each slave device hardware functional module and records the acquired data from each corresponding low-speed bus slave device in a first database of the independent management controller. The open network operating system reads the data from each low-speed bus slave device from the first database through a data channel connected to the independent management controller.
[0008] The beneficial effects of this application are that it reduces the performance loss caused by frequent multi-level gating switching, reduces the CPU load of the main system, and simplifies maintenance by isolating slave device data access and slave device data management. Attached Figure Description
[0009] Figure 1 A flowchart illustrating an embodiment of a method for acquiring low-speed bus slave device data provided in this application; Figure 2 A flowchart illustrating how an independent management controller reads low-speed bus slave device data, as provided in an embodiment of this application; Figure 3 A schematic diagram illustrating the aggregation of multiple access requests to an access queue, provided for an embodiment of this application; Figure 4 This application provides a flowchart of an embodiment of scheduling access request queues; Figure 5 A schematic diagram illustrating the first-level control plane reading data from a low-speed bus slave device, as provided in an embodiment of this application. Figure 6 A schematic diagram illustrating the second-level control plane reading data from a low-speed bus slave device, as provided in an embodiment of this application. Figure 7 This is a schematic diagram of an embodiment of a device for acquiring low-speed bus slave device data provided in this application. Detailed Implementation
[0010] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.
[0011] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.
[0012] Figure 1 The diagram shown is a flowchart of an embodiment of a method for acquiring low-speed bus slave device data provided in this application; this embodiment includes, Step 101: Independently manage the controller control plane and create a slave device hardware function module corresponding to each low-speed bus slave device. Step 102: The independent management controller control plane sequentially accesses the hardware function modules of each slave device and records the data of each low-speed bus slave device corresponding to it in the local first database. Step 103: Open network operating system control plane, through the data channel connecting the open network operating system and the independent management controller, reads data from each low-speed bus slave device from the first database.
[0013] Figure 1 The beneficial effects of the embodiments are that the network devices reduce the performance loss caused by frequent multi-level gating switching, reduce the CPU load of the main system, and simplify maintenance by isolating slave device data access and slave device data management.
[0014] Figure 2 The diagram shown is a flowchart illustrating how an independent management controller reads low-speed bus slave device data according to an embodiment of this application. Step 201: Independently manage the controller and configure an independent data acquisition timer for each slave device hardware module.
[0015] In this embodiment, the independent management controller (BMC) of the network device establishes one-to-one corresponding hardware functional modules for slave devices on the low-speed bus, such as fans, power supplies, temperature sensors, and voltage sensors. Each slave device hardware module contains device information, data items, and access configurations.
[0016] In this way, the independent management controller of the network device can clearly identify the device type, address, and register layout through the corresponding slave device hardware module, avoiding the misreading of data using a common access method.
[0017] The independent management controller configures separate data acquisition timers for the fan hardware module, power supply hardware module, temperature sensor hardware module, and voltage sensor hardware module, each with a different data acquisition frequency. This avoids the problem of low-frequency hardware modules being accessed frequently while high-frequency hardware modules experience increased latency due to accessing each slave hardware module at the same frequency, thus preventing them from competing for the bus. It also eliminates the need to maintain many task queues with different cycles within the scheduler, thereby reducing scheduling complexity.
[0018] Step 202: Run a corresponding status detection thread for each slave device hardware functional module and cache the detection results of each status monitoring thread for status judgment when accessing the queue scheduling. In this embodiment, the frequency of each independent data acquisition timer for the hardware module function is lower than the running frequency of the state thread corresponding to its meaning.
[0019] Step 203: Collect all access requests generated by each data acquisition timer into the access queue; like Figure 3 As shown, when the data acquisition timer of the fan hardware module reaches its set period, it generates access request 31 and places it into access queue 300 through scheduling operation 301. Then, the data acquisition timer of the temperature sensor hardware module reaches its data acquisition period and generates access request 32, which is placed into access queue 300 through scheduling operation 302. Next, the data acquisition timer of the voltage sensor hardware module generates access request 33 when it reaches its data acquisition period, and places it into access queue 300 through scheduling operation 303. Finally, the data acquisition timer of the voltage sensor hardware module reaches its own data acquisition period and generates access request 34, which is placed into access queue 300 through scheduling operation 303.
[0020] The network device’s independent management controller uses a First In First Out (FIFO) strategy to schedule access requests in access queue 300.
[0021] Figure 4 This application provides a flowchart of an embodiment of scheduling access request queues; the embodiment includes the following steps: Step 401: The independent management controller determines whether the queue head access request is available; if not, proceed to step 402; if yes, proceed to step 403. The network device's independent management controller continuously monitors the status of the low-speed bus slave device hardware module corresponding to the access request at the head of access queue 300, whether the bus is occupied, and whether the access cycle has been reached. Step 402: The independent management controller waits for the head of the queue to become available; The independent management controller determines that if the access request at the head of the queue is currently unavailable, it enters a waiting state until the access request at the head of the queue meets the processing conditions. In this embodiment, access requests 31-34 are scheduled through access queue 300, reducing frequent strobe operations on slave devices.
[0022] Step 403: The independent management controller selects the corresponding module; The independent management controller determines when a queue-leading access request is available and then performs a gating operation on the slave device corresponding to the hardware functional module to which the queue-leading access request belongs. In one example, the independent management controller gating the fan hardware module corresponding to the queue-leading access request 31.
[0023] Figure 5 A schematic diagram illustrating the first-level control plane reading data from a low-speed bus slave device, as provided in an embodiment of this application. Step 501: The independent management controller traverses all data items of the selected slave device hardware function modules; Step 502: The independent management controller determines whether the currently traversed data item depends on the detection result of the state detection thread corresponding to the hardware functional module of the selected slave device; if not, proceed to step 503; if yes, proceed to step 504. Step 503: The independent management controller obtains the data of the currently traversed data item and caches it in the first database of the independent management controller, and releases the selected slave device hardware function module. Step 504: The independent management controller determines whether the current state of the selected slave device hardware function module allows data access; if yes, proceed to step 505; if no, proceed to step 506. Step 505: The independent management controller obtains the data of the currently traversed data item, caches it in the first database of the independent management controller, and releases the selected slave device hardware function module. Step 506: The independent management controller either keeps the cached data of the currently traversed data item in the first database unchanged or sets the data of the currently traversed data item to an invalid value and caches it in the first database. Step 507: The independent management controller releases the selected slave device hardware function module.
[0024] Figure 6 This is a schematic diagram illustrating the second-level control plane reading data from a low-speed bus slave device, as provided in an embodiment of this application.
[0025] Step 601: The open network operating system control plane sets an independent data acquisition cycle for each slave device hardware functional module; Step 602: The open network operating system control plane initiates a data acquisition request from the slave device hardware functional module that has reached the data acquisition cycle through the data channel; Step 603: The open network operating system control plane determines whether communication is successful; if yes, proceed to step 604; otherwise, proceed to step 606. Step 604: The independent controller open network operating system control plane reads the data of the slave device hardware function module corresponding to the data acquisition request from the first database of the independent controller, and sends it to the open network operating system control plane through the data acquisition response; Step 605: The Open Network Operating System Control Plane parses the data carried in the data acquisition response message and records the parsed data in the second database of the Open Network Operating System Control Plane. Step 606: If the open network operating system control plane determines that no data acquisition response message has been received within the specified response time, it will resend the data acquisition request. Step 607: The open network operating system control plane determines whether the number of retries for the data acquisition request exceeds the specified threshold; if yes, proceed to step 608; if no, return to step 602. Step 608: Mark the data items of the slave device hardware function modules that have reached the data acquisition cycle in the second database of the open network operating system control plane as invalid values.
[0026] In this embodiment, after the open network operating system control plane updates the data of the device hardware functional modules to the database, the monitoring tasks run by the network operating system are respectively retrieved from the second database; thus realizing monitoring, alarm and other related functions.
[0027] Figure 7 This is a schematic diagram of an embodiment of a device for acquiring data from low-speed bus slave devices provided in this application. The device 70 includes multiple low-speed bus slave devices, an independent management controller 73, a processor 71, and a machine-readable storage medium 72. The processor 71 implements an open network operating system by running machine-executable instructions recorded in the machine-readable storage medium 72. The independent management controller 73 creates a slave device hardware function module corresponding to each low-speed bus slave device; sequentially accesses each slave device hardware function module; and records the acquired data from each corresponding low-speed bus slave device in a first database of the independent management controller. The open network operating system reads data from each low-speed bus slave device from the first database through a data channel connecting the open network operating system and the independent management controller.
[0028] The independent management controller 73 sequentially accesses the hardware function modules of each slave device; it records the data acquired from each low-speed bus slave device in the first database of the independent management controller, including... The independent management controller 73 configures an independent data acquisition timer for each slave device hardware module; runs a corresponding status detection thread for each slave device hardware functional module and caches the detection results of each status monitoring thread for status judgment during access queue scheduling; aggregates the access requests generated by each data acquisition timer into the access queue; reads each access request sequentially according to the first-in-first-out scheduling strategy; and accesses the data of the low-speed bus slave device corresponding to the slave device hardware functional module to which each access request belongs.
[0029] The independent management controller 73 reads each access request sequentially according to the first-in-first-out scheduling strategy, including: the independent management controller 73 continuously detects the access request at the head of the access queue; when the access request at the head of the queue is currently unavailable, the independent management controller enters a waiting state until the access request at the head of the queue meets the processing conditions; or, when the access request at the head of the queue is currently available, it performs a gating operation on the slave device corresponding to the hardware functional module to which the access request at the head of the queue belongs.
[0030] The independent management controller 73 accesses the data of the low-speed bus slave device corresponding to the slave device hardware function module to which each access request belongs. The independent management controller traverses all data items of the slave device hardware function module to which the access request belongs; detects whether the currently traversed data item depends on the detection result of the state detection thread corresponding to the selected slave device hardware function module; if not, it obtains the data of the currently traversed data item, performs caching, and releases the selected slave device hardware function module; if yes, it determines whether the current state of the selected slave device hardware function module allows data access; if yes, it obtains the data of the currently traversed data item, performs caching, and releases the selected slave device hardware function module; if not, it keeps the cached data of the currently traversed data item unchanged or sets the data of the currently traversed data item to an invalid value, performs caching, and releases the selected slave device hardware function module.
[0031] The open network operating system (ORS) reads data from each low-speed bus slave device from the first database via a data channel connecting the ORS and the independent management controller 73. This includes: setting an independent data acquisition cycle for each slave device hardware functional module via the ORS; initiating a data acquisition request from the slave device hardware functional module that has reached the data acquisition cycle via the data channel; the independent management controller reading the data from the first database corresponding to the data acquisition request from the slave device hardware functional module and sending it to the ORS via a data acquisition response; the ORS parsing the data carried in the data acquisition response message and recording the parsed data in the ORS's second database; or, if the ORS determines that the data acquisition response message has not been responded to within a specified response time, resending the data acquisition request; if the number of retries for the data acquisition request exceeds a specified threshold, marking the data items of the slave device hardware functional modules that have reached the data acquisition cycle in the second database of the ORS control plane as invalid values.
[0032] In this application, a machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device used to store or contain information (such as executable instructions, data, etc.). For example, any machine-readable storage medium herein can be any type of random access memory (RAM), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid-state drive, any type of optical disc (such as an optical disc, DVD, etc.), and similar devices, or combinations thereof. Furthermore, any machine-readable storage medium herein can be a non-transitory machine-readable storage medium.
[0033] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method of obtaining low speed bus slave device data, characterized by, The method comprises, creating, by an independent management controller control plane, a one-to-one correspondence between each low-speed bus slave device and a slave device hardware function module; sequentially accessing, by the independent management controller control plane, each slave device hardware function module; and recording data of each low-speed bus slave device in a first database of the independent management controller. reading, by an open network operating system control plane, data of each low-speed bus slave device from the first database through a data channel connected between the open network operating system and the independent management controller.
2. The method of claim 1, wherein, The sequentially accessing, by the independent management controller control plane, each slave device hardware function module; and recording data of each low-speed bus slave device in a first database of the independent management controller comprises, configuring, by the independent management controller control plane, a separate data acquisition timer for each slave device hardware module; running, by the independent management controller control plane, a one-to-one correspondence state detection thread for each slave device hardware function module, and caching a detection result of each state detection thread for state judgment during access queue scheduling; unifying, by the independent management controller control plane, access requests generated by each data acquisition timer into an access queue; sequentially reading, by the independent management controller control plane, each access request according to a first-in first-out scheduling strategy; accessing, by the independent management controller control plane, data of a one-to-one correspondence low-speed bus slave device of each slave device hardware function module to which the access request belongs.
3. The method of claim 2, wherein, The sequentially reading, by the independent management controller control plane, each access request according to a first-in first-out scheduling strategy comprises, continuously detecting, by the independent management controller control plane, a head access request of the access queue; when the head access request is currently unavailable, the independent management controller control plane enters a waiting state until the head access request reaches a processable condition; when the head access request is currently available, the independent management controller control plane performs gating operation on a one-to-one correspondence slave device of a hardware function module to which the head access request belongs.
4. The method of claim 3, wherein, The accessing, by the independent management controller control plane, data of a one-to-one correspondence low-speed bus slave device of each slave device hardware function module to which the access request belongs comprises, traversing all data items of the gated slave device hardware function module; detecting whether a currently traversed data item depends on a detection result of a one-to-one correspondence state detection thread of the gated slave device hardware function module; if not, acquiring data of the currently traversed data item and caching the data in the first database, and releasing the gated slave device hardware function module. If yes, it is judged whether the current state of the gated slave device hardware function module allows data access; if yes, the data of the current traversed data item is obtained and cached in the first database, and the gated slave device hardware function module is released; if no, the cached data of the current traversed data item in the first database is kept unchanged or the data of the current traversed data item is set to an invalid value, and the first database is cached; and the gated slave device hardware function module is released.
5. The method of claim 1, wherein, Through the open network operating system control plane, reading the data of each low-speed bus slave device from the first database includes, Through the open network operating system control plane, setting an independent data collection period for each slave device hardware function module; Through the data channel, initiating a data collection request of the slave device hardware function module reaching the data collection period; The independent management controller control plane reads the data of the slave device hardware function module corresponding to the data collection request from the first database, and sends a data collection response to the open network operating system control plane; the open network operating system control plane analyzes the data carried by the data collection response message, and records the analyzed data in the second database of the open network operating system control plane; or The open network operating system control plane determines that no data collection response message is responded within a specified response time, and then re-sends the data collection request; when the retry number of the data collection request exceeds a specified threshold, the data item of the slave device hardware function module reaching the data collection period in the second database of the open network operating system control plane is marked as an invalid value.
6. A device for acquiring data from a low-speed bus slave device, characterized in that, The device includes a plurality of low-speed bus slave devices, an independent management controller, a processor, and a machine-readable storage medium; the processor implements an open network operating system by running machine-executable instructions recorded in the machine-readable storage medium; characterized in that, The independent management controller creates a slave device hardware function module corresponding to each low-speed bus slave device; each slave device hardware function module is accessed in turn; and the data of each low-speed bus slave device is recorded in the first database of the independent management controller. The open network operating system reads the data of each low-speed bus slave device from the first database through the data channel connected to the independent management controller.
7. The apparatus of claim 6, wherein, The independent management controller accesses each slave device hardware function module in turn; and the data of each low-speed bus slave device is recorded in the first database of the independent management controller. The independent management controller configures an independent data collection timer for each slave device hardware module; runs a one-to-one state detection thread for each slave device hardware function module, and caches the detection results of each state detection thread for state judgment when accessing the queue scheduling; and uniformly collects the access requests generated by each data collection timer into an access queue. The independent management controller reads each access request in turn according to a first-in first-out scheduling strategy, and accesses the data of a one-to-one low-speed bus slave device of the slave device hardware function module to which the access request belongs.
8. The apparatus of claim 7, wherein, The independent management controller reads each access request in turn according to a first-in first-out scheduling strategy, and accesses the data of a one-to-one low-speed bus slave device of the slave device hardware function module to which the access request belongs. The independent management controller continuously detects the head access request of the access queue; when the head access request is currently unavailable, the independent management controller enters a waiting state until the head access request reaches a processable condition; or when the head access request is currently available, the independent management controller performs a gating operation on a one-to-one slave device of the hardware function module to which the head access request belongs.
9. The apparatus of claim 8, wherein, The independent management controller reads each access request in turn according to a first-in first-out scheduling strategy, and accesses the data of a one-to-one low-speed bus slave device of the slave device hardware function module to which the access request belongs. The independent management controller traverses all data items of the gated slave device hardware function module; The independent management controller detects whether the currently traversed data item depends on the detection result of the one-to-one state detection thread of the gated slave device hardware function module. When the independent management controller detects that the currently traversed data item does not depend on the detection result of the one-to-one state detection thread of the gated slave device hardware function module, the independent management controller acquires the data of the currently traversed data item, performs caching, and releases the gated slave device hardware function module. When the independent management controller detects that the currently traversed data item depends on the detection result of the one-to-one state detection thread of the gated slave device hardware function module, the independent management controller judges whether the current state of the gated slave device hardware function module allows data access; if yes, the independent management controller acquires the data of the currently traversed data item, performs caching, and releases the gated slave device hardware function module; if no, the independent management controller keeps the cached data of the currently traversed data item unchanged or sets the data of the currently traversed data item to an invalid value, performs caching, and releases the gated slave device hardware function module.
10. The apparatus of claim 6, wherein, Through the open network operating system, the independent management controller reads the data of each low-speed bus slave device from the first database through a data channel connected to the independent management controller, which includes: The open network operating system sets an independent data collection period for each slave device hardware function module; The data channel initiates a data collection request for the slave device hardware function module that reaches the data collection period. The data channel initiates a data collection request for the slave device hardware function module that reaches the data collection period. The independent management controller reads data of the slave device hardware function module corresponding to the data collection request from the first database, and sends the data to the open network operating system through a data collection response; the open network operating system analyzes data carried by the data collection response message, and records the analyzed data in a second database of the open network operating system; or The open network operating system determines whether the data collection response message is not responded within a specified response time, and re-sends the data collection request. When the retry number of the data collection request exceeds a specified threshold, the data item of the slave device hardware function module reaching the data collection cycle in the second database of the control plane of the open network operating system is marked as an invalid value.