Method and device for monitoring state of storage drawer
By deploying distance sensors in the server and using an expander to manage them uniformly, the problem of low memory drawer status monitoring is solved, and more accurate mobile information collection and efficient status monitoring are achieved.
Patent Information
- Application Number
- CN202411191465.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-28
AI Technical Summary
In the prior art, the status monitoring efficiency of memory drawers is low. Mechanical sensors may cause false alarms or fail to trigger alarms due to assembly errors and equipment aging, which affects data security.
The distance sensor is deployed for each memory drawer in the server, and the target communication bus that accesses the controller is expanded through the expander, the target access process is created to uniformly manage multiple distance sensors, and the movement information of the memory drawer is collected to monitor the operating status.
It improves the accuracy of the collection of mobile information of memory drawers, avoids the problem of untriggered alarm signals caused by aging of mechanical sensors, and improves the efficiency of memory drawers status monitoring.
Smart Images

Figure CN118760567B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and more specifically, to a method and device for monitoring the status of a storage drawer. Background Art
[0002] With the development of the Internet, data is becoming more and more important. Both the development of artificial intelligence and Internet shopping cannot do without data. By deploying multiple memories in the server, the data in the server can be stored in the memory. In order to ensure the neatness of the internal memory deployment of the server, the relevant manufacturers configure the memory drawer for deploying the memory in the server, and the memory can be placed in the memory drawer. Since data security is crucial to server users, the relevant technology deploys mechanical sensors on the memory drawer. The mechanical sensors are deployed on the memory drawer. When the memory drawer is opened, it will cause the current on the mechanical sensor to change. The mechanical sensor will trigger an alarm signal, thereby preventing other people from opening the memory drawer to steal the data in the memory. However, due to assembly errors and equipment aging, mechanical sensors often have false alarms. Sometimes, due to aging of components, the drawer is opened but the alarm is not triggered, resulting in low efficiency in monitoring the status of the memory drawer. Summary of the invention
[0003] The embodiments of the present application provide a method and device for monitoring the status of a storage drawer, so as to at least solve the problem of low efficiency in monitoring the status of a storage drawer in the related art.
[0004] According to an embodiment of the present application, a method for monitoring the state of a memory drawer is provided. The server includes a controller, a plurality of memory drawers, a plurality of distance sensors and an extender. The memory drawer is used to deploy a memory connected to the server. The distance sensors and the memory drawers are set in a one-to-one correspondence. The distance sensors are used to collect movement information of the correspondingly set memory drawers. The extender is used to expand the number of devices in a target communication bus connected to the controller. The plurality of distance sensors are connected to the extender. The method is applied to the controller. The method includes:
[0005] Creating a target access process for the expander according to the device information of each memory drawer, wherein the device information is used to indicate the memory configuration in the corresponding memory drawer, and the target access process is used to indicate the access timing of the plurality of distance sensors connected to the expander;
[0006] Calling the target communication bus to access the plurality of distance sensors connected to the extender through the target access process to obtain target movement information collected by each distance sensor;
[0007] An operation state of the corresponding storage drawer is detected according to the target movement information, wherein the operation state is used to indicate a situation in which an operation is performed on the corresponding storage drawer.
[0008] Optionally, the creating a target access process to the extender according to the device information includes:
[0009] Classifying the plurality of memory drawers according to the memory information to obtain a target set, wherein the memory information is used to indicate the business configuration of the memory in the memory drawer, the device information includes the memory information, and the target set includes the memory drawers having an associated relationship with the business being handled;
[0010] Creating a target access thread for each of the target sets, wherein the target access thread is used to indicate an access timing for accessing the distance sensor corresponding to the memory drawer in the target set;
[0011] When the number of the target access thread is one, the target access thread is determined as the target access process.
[0012] Optionally, the classifying the plurality of storage drawers according to the storage information to obtain a target set includes:
[0013] Calculating the correlation between services carried by any two storage drawers among the plurality of storage drawers;
[0014] The memory drawers whose association degree is greater than or equal to a set threshold are constructed as a target set.
[0015] Optionally, creating a target access thread for each target set includes:
[0016] Acquire target address information of a target distance sensor configured corresponding to the storage drawer in the target set;
[0017] Add the plurality of target address information to positions corresponding to the address information in the thread template to obtain the target access thread, wherein the thread template records the access logic for accessing the distance sensor.
[0018] Optionally, the adding the plurality of target address information to positions corresponding to the address information in the thread template to obtain the target access thread comprises one of the following:
[0019] Determine a reference priority corresponding to the target business volume carried by each of the memory drawers in the target set from the business volume and priority having a corresponding relationship; construct an access order of the plurality of target address information in the thread template according to the order indicated by the reference priority to obtain the target access thread;
[0020] The plurality of target address information are constructed into a parallel access relationship and added to a position corresponding to the address information in a thread template to obtain the target access thread.
[0021] Optionally, after creating a target access thread for each target set, the method further includes:
[0022] In the case where there are multiple target access threads, the calling information of each target access thread is determined according to the set information of the target set, wherein the set information is used to indicate the business carrying status on the memory drawer in the target set, and the calling information is used to indicate the access method of calling the target access thread to access the distance sensor;
[0023] The corresponding target access thread is configured according to the calling information to obtain the target access process.
[0024] Optionally, the determining the call information of each target access thread according to the set information of the target set includes at least one of the following:
[0025] Determine a target priority corresponding to a target business type carrying a business on the memory drawer in the target set from business types and priorities having a corresponding relationship, wherein the target priority is used to indicate a sequence in which the current target access thread runs among the multiple target access threads, the set information includes the target business type, and the call information includes the target priority;
[0026] The target operation frequency information corresponding to the target business type carrying the business on the memory drawer in the target set is determined from the business types and operation frequency information with corresponding relationships, wherein the target operation frequency information is used to indicate the number of consecutive operations of the target access thread during operation and the time interval between two adjacent operation processes, the set information includes the target business type, and the call information includes the target operation frequency information.
[0027] Optionally, before calling the target communication bus to access the plurality of distance sensors connected to the extender through the target access process, the method further includes:
[0028] In case of detecting that a target access cycle to the distance sensor is currently reached, detecting an occupation state of the target communication bus;
[0029] When it is determined that the target communication bus is currently in an unoccupied state, a target process lock corresponding to the target access process is configured for the target communication bus, wherein the target process lock is used to indicate that the target communication bus is currently in a state of being called by the target access process.
[0030] Optionally, detecting the corresponding operating state of the storage drawer according to the target movement information includes:
[0031] Matching the target distance value with the target distance range of the storage drawer to obtain a matching result, wherein the target movement information includes the target distance value, and the target distance value is used to indicate the distance between the storage drawer and the correspondingly set distance sensor;
[0032] In a case where the matching result is used to indicate that the distance between the storage drawer and the corresponding distance sensor does not fall within the target distance range, it is determined that the storage drawer is in an operated state.
[0033] Optionally, matching the target distance value with the target distance range of the storage drawer includes:
[0034] In the case that the number of the target distance values collected within the target access period of the distance sensor is multiple, filtering out extreme values among the multiple target distance values to obtain multiple filtered candidate distance values;
[0035] Calculate the average of the plurality of candidate distance values to obtain a reference distance value;
[0036] Matching the reference distance value with the target distance range;
[0037] In the case that the reference distance value does not fall within the target distance range, it is determined that the distance between the storage drawer and the correspondingly arranged distance sensor does not fall within the target distance range.
[0038] Optionally, after detecting the operating state of the corresponding storage drawer according to the target movement information, the method further includes:
[0039] In the case where it is determined that the operation state of the memory drawer is a state where an operation is being performed, acquiring memory configuration information of the memory drawer, wherein the memory configuration information is used to indicate a memory deployment state in the memory drawer;
[0040] matching the memory configuration information with preset configuration information of the memory drawer;
[0041] In the case that the memory configuration information does not match the preset configuration information, a target notification message is sent to a target account that has a binding relationship with the server, wherein the target account is an account used to maintain the running status of the server.
[0042] According to another embodiment of the present application, a state monitoring device for a storage drawer is provided, wherein a server includes a controller, a plurality of storage drawers, a plurality of distance sensors and an extender, wherein the storage drawer is used to deploy storage connected to the server, the distance sensors and the storage drawers are arranged in a one-to-one correspondence, the distance sensors are used to collect movement information of the correspondingly arranged storage drawers, the extender is used to expand the number of devices in a target communication bus connected to the controller, the plurality of distance sensors are connected to the extender, the device is applied to the controller, and the device includes:
[0043] A creation module, used to create a target access process for the expander according to the device information of each of the memory drawers, wherein the device information is used to indicate the memory configuration in the corresponding memory drawer, and the target access process is used to indicate the access timing of the plurality of distance sensors connected to the expander;
[0044] A calling module, configured to call the target communication bus through the target access process to access the plurality of distance sensors connected to the extender, and obtain target movement information collected by each distance sensor;
[0045] The first detection module is used to detect the operation state of the corresponding storage drawer according to the target movement information, wherein the operation state is used to indicate the situation in which the corresponding storage drawer is operated.
[0046] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0047] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0048] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0049] Through the present application, a distance sensor is deployed for each memory drawer in the server, and the movement information of the corresponding memory drawer is collected through the distance sensor, thereby avoiding the problem in the related art that the memory drawer moves and the alarm signal cannot be triggered due to the aging of the mechanical sensor components, and improving the accuracy of the collection of the movement information of the memory drawer; by setting an expander, the number of devices in the target communication bus connected to the controller is expanded through the expander, and then a plurality of distance sensors can be connected to the target communication bus, and then a target access process for the expander can be created according to the device information of the memory drawer, so that on the controller side, the plurality of distance sensors connected to the expander are managed and accessed uniformly as a device connected to the target communication bus, and the target access process can be used to call the target communication bus to access the plurality of distance sensors connected to the expander, and under the premise of ensuring the access efficiency of the plurality of distance sensors, the influence of the access to the distance sensor on other services executed by the controller calling the target communication bus is avoided, and then the operation status of the memory drawer is monitored according to the target movement information of the memory drawer obtained by accessing the distance sensor, which can solve the problem of low efficiency of state monitoring of the memory drawer in the related art, and achieve the effect of improving the state monitoring efficiency of the memory drawer. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a hardware structure block diagram of a server device of a method for monitoring the state of a storage drawer according to an embodiment of the present application;
[0051] Figure 2 is a flow chart of a method for monitoring the state of a storage drawer according to an embodiment of the present application;
[0052] Figure 3 It is a scientific bus extension link schematic diagram according to an embodiment of the present application;
[0053] Figure 4 is an optional memory drawer status monitoring schematic diagram according to an embodiment of the present application;
[0054] Figure 5 It is a structural block diagram of a storage drawer status monitoring device according to an embodiment of the present application. DETAILED DESCRIPTION
[0055] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0056] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0057] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a storage drawer status monitoring method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0058] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the state monitoring method of the memory drawer in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0059] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0060] In this embodiment, a method for monitoring the state of a storage drawer is provided. Figure 2 The present invention is a flow chart of a method for monitoring the state of a memory drawer according to an embodiment of the present application. The server includes a controller, multiple memory drawers, multiple distance sensors and an extender. The memory drawer is used to deploy a memory connected to the server. The distance sensors and the memory drawers are set in a one-to-one correspondence. The distance sensors are used to collect movement information of the correspondingly set memory drawers. The extender is used to expand the number of devices in the target communication bus connected to the controller. Multiple distance sensors are connected to the extender. The method is applied to the controller, such as Figure 2 As shown, the process includes the following steps:
[0061] Step S202, creating a target access process for the extender according to the device information of each of the memory drawers, wherein the device information is used to indicate the memory configuration in the corresponding memory drawer, and the target access process is used to indicate the access timing of the plurality of distance sensors connected to the extender;
[0062] Step S204, accessing the plurality of distance sensors connected to the extender by calling the target communication bus through the target access process, and obtaining the target movement information collected by each distance sensor;
[0063] Step S206: detecting an operation state of the corresponding storage drawer according to the target movement information, wherein the operation state is used to indicate a situation in which an operation is performed on the corresponding storage drawer.
[0064] Through the above steps, a distance sensor is deployed for each memory drawer in the server, and the movement information of the corresponding memory drawer is collected through the distance sensor, thereby avoiding the problem in the related art that the memory drawer moves and the alarm signal cannot be triggered due to the aging of the mechanical sensor components, and improving the accuracy of the collection of the movement information of the memory drawer; by setting an expander, the number of devices in the target communication bus connected to the controller is expanded through the expander, and then a plurality of distance sensors can be connected to the target communication bus, and then a target access process for the expander can be created according to the device information of the memory drawer, so that on the controller side, the plurality of distance sensors connected to the expander are managed and accessed as a device connected to the target communication bus in a unified manner, and the target access process can be used to call the target communication bus to access the plurality of distance sensors connected to the expander, and under the premise of ensuring the access efficiency of the plurality of distance sensors, the influence of the access to the distance sensor on other services executed by the controller calling the target communication bus is avoided, and then the operation status of the memory drawer is monitored according to the target movement information of the memory drawer obtained by accessing the distance sensor, which can solve the problem of low efficiency of state monitoring of the memory drawer in the related art, and achieve the effect of improving the state monitoring efficiency of the memory drawer.
[0065] Optionally, in an embodiment of the present application, the controller is a device deployed in the server for monitoring and managing the operating status of the server. The controller can be connected to other electronic components deployed in the server through a target communication bus, thereby adjusting the operating status of the server by adjusting the operating status of the electronic components. The controller can be, but is not limited to, a baseboard management controller, and can also be RMCs (Remote Management Cards), ESCs (Embedded System Controllers), etc., and this solution does not limit this.
[0066] Optionally, in an embodiment of the present application, the memory drawer is a pull-out container configured for memory management in an access server, which can support the storage of multiple memories. By arranging the memories in the memory drawer, the internal space of the server can be made tidy. This solution does not limit this.
[0067] Optionally, in an embodiment of the present application, the memory is a device for storing data in the server, and the memory may include but is not limited to data storage media such as disks, hard disks, disk arrays, memory sticks, etc., and this solution does not limit this.
[0068] Optionally, in an embodiment of the present application, the distance sensor and the storage drawer collect movement information of the corresponding storage drawer through a non-contact collection method. The distance sensor measures the distance between the distance sensor and the storage drawer by sending a ranging signal to the storage drawer. The distance sensor can be but is not limited to an ultrasonic sensor, and can also be a laser rangefinder, an infrared rangefinder, a magnetoelectric distance sensor, etc. This solution does not limit this.
[0069] Optionally, in an embodiment of the present application, the expander is used to provide an interface on the target communication bus of the access controller, so that the device to be accessed in the target communication bus can be connected on the expander, thereby expanding the number of devices accessing the target communication bus. On the controller side, the devices expanded and accessed in the expander are managed as a whole, and a unified process can be configured for the devices accessed on the expander for access and management. The expander can be but is not limited to PCA9548 (a programmable I2C multiplexer) or PCA9555 (an I / O (input / output) expansion chip), and this solution does not limit this.
[0070] Optionally, in an embodiment of the present application, the target communication bus is used to connect the controller and the expander. The target communication bus can, but is not limited to, allow one process to call the target communication bus at the same time. The target communication bus can, but is not limited to, include I2C (Inter-Integrated Circuit, serial communication protocol), I3C (Improved Inter-Integrated Circuit, new serial communication protocol), etc. This solution does not limit this.
[0071] Optionally, in an embodiment of the present application, the distance sensor can be but is not limited to being deployed on the server motherboard, emitting a distance measurement signal upward to detect the distance between the sensor and the corresponding configured storage drawer, and when the distance changes, triggering an alarm that the storage drawer has been operated.
[0072] In the embodiment provided in the above step S202, the device information may include but is not limited to the hardware configuration information in the memory drawer and the business configuration information of the memory drawer. The hardware configuration information is used to indicate the hardware configuration status of the memory in the memory drawer. The hardware configuration information may include but is not limited to the number of memory deployments, memory models, memory capacities, connection relationships between multiple memories in the memory drawer, etc.; the business configuration information is used to indicate the storage business configuration status of the storage in the memory drawer. The business configuration information may include but is not limited to the business load, the business type of the storage business, the correlation between the businesses on different memories in the same memory drawer, the correlation between the businesses on different memory drawers, etc., and this solution does not limit this.
[0073] Optionally, in the embodiment of the present application, the role of creating a target access process is to manage and access multiple distance sensors connected to the expander, so the reference memory drawer in which the memory is deployed in the current multiple memory drawers can be determined based on the device information, and the multiple reference memory drawers are managed as a whole, so an access thread can be created, and the access thread is used to indicate the access method of the distance sensors corresponding to the multiple reference memories, and the target access process is composed of only one access thread; when creating an access thread for the distance sensors corresponding to the multiple reference memories, the access relationship of the distance sensors corresponding to the multiple reference memories can be configured in the access thread as a parallel access relationship, or the access relationship of the distance sensors corresponding to the multiple memories can be configured as a serial access relationship. In order to improve the management and access efficiency of multiple distance sensors, the classification management requirements of the distance sensors can also be determined based on the device information of the memory drawer, so as to realize the classification of multiple distance sensors and create access threads for each type of distance sensor for unified management, and the access method of the corresponding distance sensor is specified in the corresponding access thread (which can include but is not limited to parallel access or serial access). Then, the method of classifying multiple memory drawers according to the device information of the memory drawer can be specifically as follows: obtaining the business access frequency of each memory drawer, wherein the device information includes the business access frequency; classifying multiple memory drawers according to the business access frequency to obtain a target drawer set, wherein the difference between the business access frequencies on the memory drawers included in the target drawer set is less than or equal to the target difference; configuring a target access thread for the distance sensor corresponding to the memory drawer included in the target drawer set, and obtaining the business access frequency corresponding to each target drawer set to determine the operation parameters of the corresponding target access thread (the operation parameters are used to indicate the number of repeated operations of the target access thread during operation, and the time interval between two adjacent operations); and then configuring the operation parameters for the target access thread to obtain a target access process including multiple target access threads. In the above embodiment, when configuring the target access thread for the distance sensor corresponding to the memory drawer included in the target drawer set, the multiple target distance sensors included in the target access thread can be configured as a parallel access relationship, or the access order of the multiple target distance sensors can be configured according to the importance of the business handled on the memory drawer, that is, the distance sensor corresponding to the memory drawer with high business importance is limited to access.
[0074] In the embodiment provided in the above step S204, the target communication bus is only allowed to be called by the same process at a time. Since the controller will also call the target communication bus to manage other devices in the server, there will be a management process on the controller to manage other devices on the server. The controller manages different storage devices in the server by polling and calling different configured processes. When calling the target communication bus through the target access process, it is necessary to avoid the call time of the target communication bus by other processes in the controller. Therefore, a process queue can be created in the controller, and the process queue is used to store processes to be run. After the controller has created the target access process, the running time of the target access process can be predicted based on the number of distance sensors to be accessed and the access timing information of multiple distance sensors recorded in the access process, wherein the running time is used to indicate the time consumption of running the target access process; after determining the running cycle of the target access process, the execution timing of multiple processes to be executed in the process queue can be reconstructed based on the cycle start time of the running cycle of the target access process and the running timing of other processes in the process queue; according to the target access process The method of reconstructing the execution sequence of multiple processes to be executed in the process queue based on the cycle start time of the target access process and the running sequence of other processes in the process queue can be: detecting whether there are candidate access processes in the process queue whose execution cycles overlap with the target access process, and if the candidate access process exists in the process queue, detecting the weight information of the target access process and the candidate access process, wherein the weight information is used to indicate the importance of the business handled by the execution access process; and arranging the candidate access process after the target access process in the process queue when it is determined that the weight of the target access process is greater than that of the candidate access process. The execution time of multiple processes on the target communication bus of the controller is planned in the above manner, thereby avoiding the interference of the running of the target access process with the existing operating process of the controller. On the other hand, by planning the execution time of the access process, the interference of the running of other processes on the controller with the start time of the running of the target access process is avoided.
[0075] Optionally, in an embodiment of the present application, the target movement information is used to detect the distance between the distance sensor and the memory drawer. When the distance sensor is an ultrasonic sensor, the sensor can collect the target movement information by placing the ultrasonic sensor on the server motherboard, controlling the ultrasonic emission sensor to carry an ultrasonic signal of a pseudo-random sequence, collecting echo signals, performing correlation judgment and calculating the transit time, thereby calculating the distance to the obstacle. In order to ensure the accuracy of the target movement information, the collected data can be processed, multiple sets of data can be read, abnormal extreme data can be removed, and the remaining intermediate numbers can be used to calculate the average value as the data finally read by the distance sensor.
[0076] In the embodiment provided in the above step S206, the operating state of the corresponding storage drawer can be detected based on the target movement information by setting a threshold for the distance sensor. When the target movement information is greater than the threshold, the drawer is considered to be opened. The threshold of the distance sensor can be set differently according to different chassis.
[0077] Optionally, in an embodiment of the present application, the operation status is used to indicate the situation in which the operation is performed on the corresponding memory drawer. The operation status may be the change information before and after the operation is performed on the memory drawer, which may include but is not limited to the memory drawer position, memory power usage, memory model changes, increase or decrease in memory quantity, etc. This solution does not limit this.
[0078] Optionally, in an embodiment of the present application, the expander may be, but is not limited to, PCA9548 (a programmable I2C multiplexer) or PCA9555 (an I / O (input / output) expansion chip), and this solution does not limit this. Figure 3 is a scientific bus extension link schematic diagram according to an embodiment of the present application, such as Figure 3As shown, the whole system includes BMC (baseboard management controller, i.e. the controller mentioned above), PCA9548, PCA9555 (i.e. expander), ultrasonic sensor (i.e. distance sensor), sensor in-position signal, and hard disk drawer cover opening alarm log. Among them, BMC is the core of the whole system. After the I2C bus of BMC is extended by PCA9548, a PCA9555 is connected to a channel of PCA9548. A GPIO in PCA9555 is used as the in-position signal of the ultrasonic sensor. When the server is equipped with an ultrasonic sensor, the in-position signal is low level, and when the server is not equipped with an ultrasonic sensor, the in-position signal is high level. The ultrasonic sensor is connected to BMC through a channe on PCA9548, and data is exchanged through the I2C protocol. Because BMC needs to monitor multiple sensors and devices through I2C communication, for example, BMC needs to monitor GPU devices, monitor multiple sensors such as temperature, voltage, power consumption, etc. In order to monitor multiple devices and transmit data correctly, BMC uses multiple I2C buses, and connects one to three levels of I2C switches to the I2C bus to achieve the purpose of monitoring multiple devices. The ultrasonic sensor in this application is one of the many devices monitored by BMC, so its hardware link signal is the monitoring of hard disk drawer 0: first confirm whether the ultrasonic sensor is in place by accessing P0_0 of PCA9555 on I2C6. If it is in place, access the ultrasonic sensor 0 hanging on channel 0 of PCA9548 on I2C7. The monitoring of hard disk drawers 1 and 2 is similar to 0.
[0079] There are multiple processes in BMC that will access different devices on the same I2C at the same time. Adding new devices is likely to cause conflicts in I2C information access, and erroneous data may be accessed when accessing specific devices. In order to prevent the information of many devices on I2C from being monitored normally without interfering with each other, this application optimizes I2C device monitoring. First, an ultrasonic sensor monitoring thread is created in the component monitoring polling process to ensure that the ultrasonic sensor data can be polled and monitored all the time. The BMC starts and enters the ultrasonic monitoring thread for the first time. The ultrasonic sensor data is initialized first, including obtaining the ultrasonic sensor in place and setting the accuracy of the ultrasonic sensor. Taking the monitoring of hard disk drawer 0 as an example, first access 9555 on I2C6. Because the device slaves of I2C6 are different, the slave of 9555 is 0x40, then the data can be read through the interface function dev_ast2600_i2c_read_9555, and the returned data can be checked. 1 represents the ultrasonic sensor in place, and 0 represents it is not in place. When the sensor is in place, the subsequent logic will be executed. If the sensor is not in place, the monitoring will be jumped out. When the ultrasonic sensor is in place, the ultrasonic sensor on I2C10 is accessed. First, PCA9548 needs to be switched to channel0. The interface function pca9548_enable_channel can be used to switch channels. There are multiple processes in the BMC that will access different devices on the same I2C at the same time. Adding new devices is likely to cause conflicts in I2C information access, and erroneous data may be accessed probabilistically when accessing specific devices. In order to prevent the information of many devices on I2C from being monitored normally without interfering with each other, this application optimizes I2C device monitoring. Before switching channels, in order to avoid data access failure caused by other processes accessing this PCA9548 at the same time and switching I2C to other channels, this application adds a device lock to all 9548 data accesses. This lock ensures that other devices cannot access this PCA9548 at the same time, and the lock sets a timeout limit, and the timeout is passed as a function parameter. The ultrasonic sensor lock timeout is defined as 10ms in this application. After the access is completed, the unlocking action is performed, and other devices can be accessed normally after unlocking.
[0080] As an optional embodiment, the creating a target access process to the extender according to the device information includes:
[0081] Classifying the plurality of memory drawers according to the memory information to obtain a target set, wherein the memory information is used to indicate the business configuration of the memory in the memory drawer, the device information includes the memory information, and the target set includes the memory drawers having an associated relationship with the business being handled;
[0082] Creating a target access thread for each of the target sets, wherein the target access thread is used to indicate an access timing for accessing the distance sensor corresponding to the memory drawer in the target set;
[0083] When the number of the target access thread is one, the target access thread is determined as the target access process.
[0084] Optionally, in an embodiment of the present application, the classification of multiple memory drawers according to memory information can be based on the degree of correlation between memory information in different memory drawers, and the memory drawers with high correlation are grouped together; or it can be based on the importance of memory business configuration, and memory drawers with similar business importance are grouped together. This solution does not limit this.
[0085] Optionally, in an embodiment of the present application, memory information is used to indicate the business configuration status of the memory in the memory drawer. The memory information may include but is not limited to the current business logic, business type, business progress, business load, etc. of the memory, and this solution does not limit this.
[0086] Optionally, in an embodiment of the present application, the target access thread is used to indicate the access timing for accessing the distance sensors corresponding to the memory drawers in the target set, and the access timing of multiple distance sensors in the same target access thread can be parallel or serial; when multiple distance sensors are accessed in a serial manner, the access timing can be constructed by sorting the importance of the memory service configurations in the memory drawer, giving priority to accessing the distance sensors in the memory drawer with high memory service importance; it can also be constructed by sorting the memory service processing frequencies in the memory drawer, giving priority to accessing the distance sensors in the memory drawer with high memory service processing frequencies, and this scheme does not limit this.
[0087] Optionally, in an embodiment of the present application, when there is only one target access thread, that is, the number of target sets is one, the target access process only includes this one target access thread. At this time, the target access thread created for the unique target set can be determined as the final target access process.
[0088] Through the above content, by classifying and managing multiple memory drawers according to memory information, access threads can be constructed according to the classification results, so as to classify the access processes of distance sensors corresponding to multiple memory drawers according to the business configuration of the memory drawers, thereby improving the access efficiency of the distance sensors.
[0089] As an optional embodiment, the classifying the plurality of storage drawers according to the storage information to obtain a target set includes:
[0090] Calculating the correlation between services carried by any two storage drawers among the plurality of storage drawers;
[0091] The memory drawers whose association degree is greater than or equal to a set threshold are constructed as a target set.
[0092] Optionally, in an embodiment of the present application, when the classification method is to classify according to the degree of association of the services carried in the memory drawers, the degree of association of the services carried on any two memory drawers in the memory drawers can be calculated. The calculation method can be to count the number of times any two memory drawers are accessed simultaneously within a period of time. If there are two memory drawers that are accessed simultaneously with a high frequency, it is considered that the degree of association between the two memory drawers is high; it can also be to use an association rule model to calculate the degree of association between any two memory drawers. For example, the Apriori (a classic algorithm for association rule mining) association rule algorithm can be used to calculate the degree of improvement of any two memory drawers. At this time, the numerical value of the improvement is determined as the degree of association. This scheme does not limit this.
[0093] Optionally, in an embodiment of the present application, when the method for calculating the association degree is to count the number of times any two memory drawers are accessed simultaneously within a period of time, the set threshold may be the minimum number of times the two memory drawers are accessed simultaneously; when the method for calculating the association degree is to construct an association rule model, the set threshold may be to extract frequently occurring item sets and association rules from a large amount of memory drawer configuration business data through the Apriori association rule algorithm, and to construct an association rule model to calculate the lift. If the lift is greater than 1, it indicates that there is a positive correlation between the two current memory drawers; if the lift is equal to 1, it indicates that the two current memory drawers are independent of each other; if the lift is less than 1, it indicates that there is a negative correlation between the two current memory drawers. At this time, the value of the lift can be determined as the association degree, the set threshold is set to 1, and the memory drawers with a correlation degree greater than 1 are taken as a target set. This scheme does not limit this.
[0094] Through the above content, multiple memory drawers can be classified by calculating the business correlation between memory drawers, and the memory drawers with high correlation can be regarded as a set, so as to realize personalized classification management of memory drawers. This can make more effective use of limited server resources and avoid the ineffective waste of server resources caused by unified management of all memory drawers.
[0095] As an optional embodiment, creating a target access thread for each target set includes:
[0096] Acquire target address information of a target distance sensor configured corresponding to the storage drawer in the target set;
[0097] Add the plurality of target address information to positions corresponding to the address information in the thread template to obtain the target access thread, wherein the thread template records the access logic for accessing the distance sensor.
[0098] Optionally, in an embodiment of the present application, the target address information is used to identify the access location of the distance sensor in the server. The target address information may include, but is not limited to, the device number of the distance sensor and the bus number of the distance sensor on the target bus, which is not limited in this solution.
[0099] Optionally, in an embodiment of the present application, a thread template is used to create a target access thread. The thread template may include, but is not limited to, target address information of the target distance sensor, the number of memory drawers in the target set, access timing of the memory drawers in the target set, access logic for accessing the distance sensor, etc. This solution does not limit this.
[0100] Optionally, in the embodiment of the present application, the access logic for accessing the distance sensor may be random access, simultaneous access, or polling access. In the case where the access logic is polling access, the access may be performed according to the importance of the business carried by the memory drawer, with priority given to the distance sensors in the memory drawers with high business importance, or the access may be performed according to the amount of business carried by the memory drawer, with priority given to the distance sensors in the memory drawers with large business volume, and this solution does not limit this.
[0101] Through the above method, since each distance sensor has its unique corresponding address information, by adding multiple target address information to the position corresponding to the address information in the thread template, the target access thread is obtained, and the target access thread can be automatically created according to the target address information, thereby improving the creation efficiency of the target access thread.
[0102] As an optional embodiment, the adding the plurality of target address information to the position corresponding to the address information in the thread template to obtain the target access thread includes one of the following:
[0103] Determine a reference priority corresponding to the target business volume carried by each of the memory drawers in the target set from the business volume and priority having a corresponding relationship; construct an access order of the plurality of target address information in the thread template according to the order indicated by the reference priority to obtain the target access thread;
[0104] The plurality of target address information are constructed into a parallel access relationship and added to a position corresponding to the address information in a thread template to obtain the target access thread.
[0105] Optionally, in an embodiment of the present application, the access logic to the distance sensor in the target access thread can be serial access or parallel access. When the access logic is serial access, it can be achieved by constructing a mapping table between the business volume carried by the memory drawer and the priority, and each business volume corresponds to a priority level with a sequence. The mapping table is used to determine the reference priority corresponding to the target business volume carried on each memory drawer in the target set, thereby constructing an access order of multiple target address information in the thread template according to the sequence indicated by the reference priority, thereby obtaining the target access thread.
[0106] Optionally, in an embodiment of the present application, when the access logic is parallel access, multiple target address information can be added to the same sequence position in the thread template, and the target access thread of the parallel access logic can be obtained.
[0107] As an optional embodiment, after creating a target access thread for each target set, the method further includes:
[0108] In the case where there are multiple target access threads, the calling information of each target access thread is determined according to the set information of the target set, wherein the set information is used to indicate the business carrying status on the memory drawer in the target set, and the calling information is used to indicate the access method of calling the target access thread to access the distance sensor;
[0109] The corresponding target access thread is configured according to the calling information to obtain the target access process.
[0110] Optionally, in an embodiment of the present application, when the number of target access threads is multiple, that is, multiple target sets are created at this time, and the set information is used to indicate the business carrying status on the memory drawer in the target set. The set information may include but is not limited to the business carrying capacity, business priority, business type, etc. on the memory drawer. This solution does not limit this.
[0111] Optionally, in an embodiment of the present application, the call information may include, but is not limited to, the number of accesses to the distance sensor and the timing relationship between multiple access operations to the distance sensor, etc., which is not limited in this solution.
[0112] Optionally, in an embodiment of the present application, the method of obtaining the call information according to the collection information may be to calculate the target service parameters of the memory drawer according to the service carrying capacity, service priority and service type of the memory drawer, wherein the collection information includes the service carrying capacity, service priority and service type; determine the target access times and target access timing corresponding to the target service parameters from the service parameters, access times and access timing information with corresponding relationships, wherein the target access timing is used to indicate the execution timing between multiple access operations, and the call information includes the access times and the access timing. Furthermore, the method of calculating the target service parameters of the memory drawer according to the service carrying capacity, service priority and service type of the memory drawer may be to obtain the weight parameters corresponding to the service carrying capacity, service priority and service type, and use the weight parameters to perform weighted sum calculation on the service carrying capacity, service priority and service type, thereby obtaining the target service parameters.
[0113] Optionally, in an embodiment of the present application, the corresponding target access thread is configured according to the calling information to obtain a target access process. The configuration method can be to configure the target access threads in parallel or to configure them serially according to the priority order of the target access threads. This scheme does not limit this.
[0114] Through the above content, by determining the call information of each access thread according to the combination parameters of the target set, it is possible to manage multiple access threads separately, improve the access efficiency of the distance sensor, and further improve the monitoring efficiency of the operating status of the memory drawer.
[0115] As an optional embodiment, determining the call information of each target access thread according to the set information of the target set includes at least one of the following:
[0116] Determine a target priority corresponding to a target business type carrying a business on the memory drawer in the target set from business types and priorities having a corresponding relationship, wherein the target priority is used to indicate a sequence in which the current target access thread runs among the multiple target access threads, the set information includes the target business type, and the call information includes the target priority;
[0117] The target operation frequency information corresponding to the target business type carrying the business on the memory drawer in the target set is determined from the business types and operation frequency information with corresponding relationships, wherein the target operation frequency information is used to indicate the number of consecutive operations of the target access thread during operation and the time interval between two adjacent operation processes, the set information includes the target business type, and the call information includes the target operation frequency information.
[0118] Optionally, in an embodiment of the present application, the call information may include but is not limited to the calling order and calling frequency of the target access thread. The calling order of the target access thread may be determined by constructing a mapping table between the business type and priority carried by the memory drawer, each business type corresponding to a priority order. The mapping table is used to determine the target priority corresponding to the target business type carried on the memory drawer in the current target access thread, thereby obtaining the target access process according to the order in which the current target access thread runs in multiple target access threads indicated by the target priority.
[0119] Optionally, in an embodiment of the present application, determining the calling frequency of the target access thread can be achieved by constructing a mapping table between the business type carried by the memory drawer and the running frequency information, each business type corresponding to an running frequency information, and determining the target running frequency information corresponding to the target business type carried on the memory drawer in the current target access thread through the mapping table, thereby obtaining the target access process according to the number of consecutive runs of the target access thread during runtime indicated by the target running frequency information and the time interval between two adjacent running processes.
[0120] Through the above content, different calling orders and calling frequencies can be set for different target access threads, so as to achieve targeted access to various types of target distance sensors. In actual situations, server resources are limited, and the business information in some memories is more important, so the distance sensors of such memory drawers can be inspected frequently, thereby achieving effective utilization of server resources.
[0121] As an optional embodiment, before calling the target communication bus to access the plurality of distance sensors connected to the extender through the target access process, the method further includes:
[0122] In case of detecting that a target access cycle to the distance sensor is currently reached, detecting an occupation state of the target communication bus;
[0123] When it is determined that the target communication bus is currently in an unoccupied state, a target process lock corresponding to the target access process is configured for the target communication bus, wherein the target process lock is used to indicate that the target communication bus is currently in a state of being called by the target access process.
[0124] Optionally, in an embodiment of the present application, a bus lock (i.e., a target process lock) may be configured on the target communication bus. When a process calls the target communication bus to access a device, a bus lock may be set for the target communication bus. When other processes need to call the target communication bus, it may be determined whether the target communication bus can be called based on the lock state of the bus lock of the target communication bus. When the target access process completes the call to the target communication bus, the bus lock on the target communication bus may be released.
[0125] Through the above content, by configuring a process lock for the target communication bus, the state of the process lock on the bus is detected before the access process runs, thereby avoiding access conflicts between different processes on the target communication bus.
[0126] As an optional embodiment, detecting the operation state of the corresponding storage drawer according to the target movement information includes:
[0127] Matching the target distance value with the target distance range of the storage drawer to obtain a matching result, wherein the target movement information includes the target distance value, and the target distance value is used to indicate the distance between the storage drawer and the correspondingly set distance sensor;
[0128] In a case where the matching result is used to indicate that the distance between the storage drawer and the corresponding distance sensor does not fall within the target distance range, it is determined that the storage drawer is in an operated state.
[0129] Optionally, in an embodiment of the present application, in order to ensure the accuracy of the result, the signal collected by the distance sensor can be filtered out by filtering to filter out clutter, thereby ensuring the accuracy of the target distance value obtained. An algorithm for converting non-integer data into integer periodic data can be used. After obtaining the ultrasonic A / D data of the two distance sensors, the non-integer periodic sampling data is first interpolated to convert the non-integer periodic sampling data into integer periodic sampling data. The integer periodic data is then subjected to a fast Fourier transform (FFT) in the frequency domain to filter out noise and waveform distortion, and then the inverse fast Fourier transform (IFFT) is used to return the frequency domain to the time domain for phase difference detection.
[0130] As an optional embodiment, matching the target distance value with the target distance range of the storage drawer includes:
[0131] In the case that the number of the target distance values collected within the target access period of the distance sensor is multiple, filtering out extreme values among the multiple target distance values to obtain multiple filtered candidate distance values;
[0132] Calculate the average of the plurality of candidate distance values to obtain a reference distance value;
[0133] Matching the reference distance value with the target distance range;
[0134] In the case that the reference distance value does not fall within the target distance range, it is determined that the distance between the storage drawer and the correspondingly arranged distance sensor does not fall within the target distance range.
[0135] Optionally, in an embodiment of the present application, after the distance sensor collects the target distance value, it can be passed to the data processing process through the redis database, but is not limited to it. The data processing process processes the data through a sliding window. The so-called sliding window is to read ten groups of data (target distance values) from the database, then remove three groups of maximum values and three groups of minimum values, and use the remaining four middle numbers to calculate the average value as the data finally read by the sensor (reference distance value). There will be a threshold judgment based on the final value of the sensor. When the measured distance is greater than the threshold of 5cm, it is considered that the drawer is opened. Of course, the threshold of the sensor can be set differently through IPMI commands and BMC web according to different chassis. When the BMC detects that the threshold is exceeded, it will generate a corresponding hard disk drawer operation alarm. And it will compare the changes in server components before and after the hard disk drawer is operated to confirm which components are lost or replaced.
[0136] Through the above content, by removing extreme values from multiple target distance values and performing mean calculation on the candidate distance values after filtering out the extreme values, the influence of accidental errors of the sensor on the collection result of the movement information of the storage drawer is avoided.
[0137] As an optional embodiment, after detecting the operating state of the corresponding storage drawer according to the target movement information, the method further includes:
[0138] In the case where it is determined that the operation state of the memory drawer is a state where an operation is being performed, acquiring memory configuration information of the memory drawer, wherein the memory configuration information is used to indicate a memory deployment state in the memory drawer;
[0139] matching the memory configuration information with preset configuration information of the memory drawer;
[0140] In the case that the memory configuration information does not match the preset configuration information, a target notification message is sent to a target account that has a binding relationship with the server, wherein the target account is an account used to maintain the running status of the server.
[0141] Optionally, in an embodiment of the present application, after the memory drawer is opened and closed, the controller will compare the memory configuration information of the front and rear memory drawers to confirm whether it has been replaced. Taking the NVME hard disk as an example: the controller collects the following information of the NVME hard disk through the I2C protocol: Each hard disk has its own information, and this information contains these items: VendorID, ready_mode, drive_functional, reset_required, pcie0_link_active, smart_warning, percentage_drive_life_used, temp, power, SN, fwver, interface_type, CapacityBytes. The following information is written to the bmcStorageInfo.txt file and stored in the / extlog / syslog folder of the controller. When the drawer is pulled out and closed, the information of all NVME hard disks is obtained again and compared with the last hard disk information in the bmcStorageInfo.txt file. Each hard disk has its own silk screen, which refers to the serial number of the hard disk. This serial number corresponds to the actual position of the hard disk on the server. The comparison method is to compare one disk at a time according to the hard disk serial number (actual position). When comparing a disk, it will be compared item by item. When inconsistencies are found, they will be recorded and written into the log. The log will be displayed on the BMC web. Through the BMC log, you can see the change information before and after the hard disk drawer of the server is operated and the alarm is triggered, such as: hard disk operation status, power usage, CPU operation status, device model changes, device addition and reduction, etc. Print the information to be compared in a json file, such as the number of hard disks. If the user needs, you can view the json file, which contains the number of hard disks before the hard disk drawer is operated and the alarm is triggered, the number of hard disks after the alarm is triggered, and whether the number of hard disks has changed.
[0142] In an embodiment of the present application, in order to realize the controller's function of monitoring the operating status of the storage drawer, a DDF module is developed. By dragging the DDF module, the code can be automatically generated, which is easy to quickly adapt to various server models. The DDF module can set the parameters of the ultrasonic sensor, such as the ranging threshold and whether to enable it (some users do not need the sensor, so it is disabled). When the threshold is exceeded, an alarm is triggered and the alarm is recorded in the server BMC log.
[0143] Figure 4 is a schematic diagram of an optional memory drawer status monitoring according to an embodiment of the present application, such as Figure 4As shown, taking the memory as a hard disk as an example, the hard disk drawer (memory drawer) has been operated alarm software architecture is mainly divided into the bottom ultrasonic data reading process, redis database transmission, data processing process, hard disk drawer has been operated alarm fault diagnosis process and the like. The bottom layer uses an ultrasonic sensor to measure the distance between the sensor and the hard disk drawer. Since the I2C bus can only interact with one device at the same time, and many I2Cs are extended on the I2C bus through PCA9546, and sensors or other component devices of different slaves are also hung under the same I2C. In order to ensure that the BMC can display the readings of multiple sensors normally, the reading of sensor values and the processing and display of values are distinguished into different processes. The I2C bus will collect data when interacting with the ultrasonic sensor, but when the I2C bus collects data from other components, the ultrasonic sensor data cannot be collected. At this time, if the ultrasonic data is directly displayed, there will be a probability that it will not be displayed. However, using the solution of this application, the data collection process and the data processing process are separated. The data acquisition process and the data processing process run simultaneously. The data acquisition process is responsible for information interaction with each sensor and component. The data acquisition process will be divided into multiple threads. Through the PCA9546I2C lock and other mechanisms, it is ensured that I2C only interacts with one device to ensure the accuracy of the data. The three ultrasonic sensors of this application are all in the same thread of the data acquisition process. A unique ID is assigned to each sensor code. The unique ID can be used to collect data and call the flag for the entire life cycle of the sensor. The three ultrasonic sensors under the same thread poll their IDs in turn, enter the monitoring of the corresponding sensor, and collect data. At this time, the collected data is raw data. For some unstable components or sensors, abnormal values or 0 may be read probabilistically. In this case, directly displaying the sensor data will cause false alarms. At this time, the sensor data must be processed.
[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0145] In this embodiment, a state monitoring device for a storage drawer is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0146] Figure 5 is a structural block diagram of a state monitoring device for a storage drawer according to an embodiment of the present application, such as Figure 5 As shown, the server includes a controller, multiple memory drawers, multiple distance sensors and an extender, wherein the memory drawer is used to deploy the memory connected to the server, the distance sensor and the memory drawer are set in a one-to-one correspondence, the distance sensor is used to collect the movement information of the corresponding memory drawer, the extender is used to expand the number of devices in the target communication bus connected to the controller, and multiple distance sensors are connected to the extender. The device is applied to the controller, and the device includes: a creation module, which is used to create a target access process to the extender according to the device information of each memory drawer, wherein the device information is used to indicate the memory configuration in the corresponding memory drawer, and the target access process is used to indicate the access timing of the multiple distance sensors connected to the extender; a calling module, which is used to call the target communication bus through the target access process to access the multiple distance sensors connected to the extender, and obtain the target movement information collected by each distance sensor; a first detection module, which is used to detect the operation state of the corresponding memory drawer according to the target movement information, wherein the operation state is used to indicate the situation in which the corresponding memory drawer is operated.
[0147] Through the above content, a distance sensor is deployed for each memory drawer in the server, and the movement information of the corresponding memory drawer is collected through the distance sensor, thereby avoiding the problem in the related art that the memory drawer moves and the alarm signal cannot be triggered due to the aging of the mechanical sensor components, and improving the accuracy of the collection of the movement information of the memory drawer; by setting an expander, the number of devices in the target communication bus connected to the controller is expanded through the expander, and then a plurality of distance sensors can be connected to the target communication bus, and then a target access process for the expander can be created according to the device information of the memory drawer, so that on the controller side, the plurality of distance sensors connected to the expander are managed and accessed as a device connected to the target communication bus in a unified manner, and the target access process can be used to call the target communication bus to access the plurality of distance sensors connected to the expander, and under the premise of ensuring the access efficiency of the plurality of distance sensors, the influence of the access to the distance sensor on other services executed by the controller calling the target communication bus is avoided, and then the operation status of the memory drawer is monitored according to the target movement information of the memory drawer obtained by accessing the distance sensor, which can solve the problem of low efficiency of state monitoring of the memory drawer in the related art, and achieve the effect of improving the state monitoring efficiency of the memory drawer.
[0148] Optionally, the creation module includes:
[0149] a classification unit, configured to classify the plurality of memory drawers according to memory information to obtain a target set, wherein the memory information is used to indicate a business configuration of the memory in the memory drawer, the device information includes the memory information, and the target set includes the memory drawers having an associated relationship with the business being handled;
[0150] A creating unit, configured to create a target access thread for each of the target sets, wherein the target access thread is used to indicate an access timing for accessing the distance sensor corresponding to the memory drawer in the target set;
[0151] The first determining unit is configured to determine the target access thread as the target access process when the number of the target access thread is one.
[0152] Optionally, the classification unit is further used for:
[0153] Calculating the correlation between services carried by any two storage drawers among the plurality of storage drawers;
[0154] The memory drawers whose association degree is greater than or equal to a set threshold are constructed as a target set.
[0155] Optionally, the creation unit is further used to:
[0156] Acquire target address information of a target distance sensor configured corresponding to the storage drawer in the target set;
[0157] Add the plurality of target address information to positions corresponding to the address information in the thread template to obtain the target access thread, wherein the thread template records the access logic for accessing the distance sensor.
[0158] Optionally, the creation unit is further used to:
[0159] Determine a reference priority corresponding to the target business volume carried by each of the memory drawers in the target set from the business volume and priority having a corresponding relationship; construct an access order of the plurality of target address information in the thread template according to the order indicated by the reference priority to obtain the target access thread;
[0160] The plurality of target address information are constructed into a parallel access relationship and added to a position corresponding to the address information in a thread template to obtain the target access thread.
[0161] Optionally, the device further comprises:
[0162] A determination module, configured to, after creating a target access thread for each of the target sets, determine the call information of each of the target access threads according to the set information of the target set when the number of the target access threads is multiple, wherein the set information is used to indicate the business carrying status on the memory drawer in the target set, and the call information is used to indicate the access method of calling the target access thread to access the distance sensor;
[0163] The first configuration module is used to configure the corresponding target access thread according to the calling information to obtain the target access process.
[0164] Optionally, the determining module includes:
[0165] A second determining unit is used to determine a target priority corresponding to a target business type carrying a business on the memory drawer in the target set from business types and priorities having a corresponding relationship, wherein the target priority is used to indicate the order in which the current target access thread runs among the multiple target access threads, the set information includes the target business type, and the call information includes the target priority;
[0166] The third determination unit is used to determine the target operation frequency information corresponding to the target business type carrying the business on the memory drawer in the target set from the business types and operation frequency information with corresponding relationships, wherein the target operation frequency information is used to indicate the number of consecutive operations of the target access thread during operation and the time interval between two adjacent operation processes, the set information includes the target business type, and the call information includes the target operation frequency information.
[0167] Optionally, the device further comprises:
[0168] A second detection module is used to detect the occupancy state of the target communication bus before calling the target communication bus to access the multiple distance sensors connected to the extender through the target access process, when it is detected that the target access cycle to the distance sensor is currently reached;
[0169] The second configuration module is used to configure a target process lock corresponding to the target access process for the target communication bus when it is determined that the target communication bus is currently in an unoccupied state, wherein the target process lock is used to indicate that the target communication bus is currently in a state of being called by the target access process.
[0170] Optionally, the first detection module includes:
[0171] a matching unit, configured to match a target distance value with a target distance range of the storage drawer to obtain a matching result, wherein the target movement information includes the target distance value, and the target distance value is used to indicate a distance between the storage drawer and the correspondingly arranged distance sensor;
[0172] The fourth determining unit is configured to determine that the storage drawer is in an operated state when the matching result is used to indicate that the distance between the storage drawer and the corresponding distance sensor does not fall within the target distance range.
[0173] Optionally, the matching unit is further used for:
[0174] In the case that the number of the target distance values collected within the target access period of the distance sensor is multiple, filtering out extreme values among the multiple target distance values to obtain multiple filtered candidate distance values;
[0175] Calculate the average of the plurality of candidate distance values to obtain a reference distance value;
[0176] Matching the reference distance value with the target distance range;
[0177] In the case that the reference distance value does not fall within the target distance range, it is determined that the distance between the storage drawer and the correspondingly arranged distance sensor does not fall within the target distance range.
[0178] Optionally, the device further comprises:
[0179] an acquisition module, configured to acquire memory configuration information of the memory drawer after detecting the operation state of the corresponding memory drawer according to the target movement information, if it is determined that the operation state of the memory drawer is a state where an operation is performed, wherein the memory configuration information is used to indicate the memory deployment state in the memory drawer;
[0180] A matching module, used to match the memory configuration information with the preset configuration information of the memory drawer;
[0181] A sending module is used to send a target notification message to a target account that has a binding relationship with the server when the memory configuration information does not match the preset configuration information, wherein the target account is an account used to maintain the running status of the server.
[0182] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0183] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0184] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0185] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0186] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0187] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0188] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0189] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.
[0190] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0191] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0192] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for monitoring the state of a storage drawer, characterized in that: The server includes a controller, a plurality of memory drawers, a plurality of distance sensors and an extender, wherein the memory drawer is used to deploy a memory connected to the server, the distance sensors and the memory drawers are set in a one-to-one correspondence, the distance sensors are used to collect movement information of the correspondingly set memory drawers, the extender is used to expand the number of devices in a target communication bus connected to the controller, and a plurality of the distance sensors are connected to the extender, the method is applied to the controller, and the method includes: Creating a target access process for the expander according to the device information of each memory drawer, wherein the device information is used to indicate the memory configuration in the corresponding memory drawer, and the target access process is used to indicate the access timing of the plurality of distance sensors connected to the expander; Calling the target communication bus to access the plurality of distance sensors connected to the extender through the target access process to obtain target movement information collected by each distance sensor; An operation state of the corresponding storage drawer is detected according to the target movement information, wherein the operation state is used to indicate a situation in which an operation is performed on the corresponding storage drawer.
2. The method according to claim 1, characterized in that The step of creating a target access process to the extender according to the device information includes: Classifying the plurality of memory drawers according to the memory information to obtain a target set, wherein the memory information is used to indicate the business configuration of the memory in the memory drawer, the device information includes the memory information, and the target set includes the memory drawers having an associated relationship with the business being handled; Creating a target access thread for each of the target sets, wherein the target access thread is used to indicate an access timing for accessing the distance sensor corresponding to the memory drawer in the target set; When the number of the target access thread is one, the target access thread is determined as the target access process.
3. The method according to claim 2, characterized in that The step of classifying the plurality of storage drawers according to the storage information to obtain a target set includes: Calculating the correlation between services carried by any two storage drawers among the plurality of storage drawers; The memory drawers whose association degree is greater than or equal to a set threshold are constructed as a target set.
4. The method according to claim 2, characterized in that: The step of creating a target access thread for each target set includes: Acquire target address information of a target distance sensor configured corresponding to the storage drawer in the target set; Add the plurality of target address information to positions corresponding to the address information in the thread template to obtain the target access thread, wherein the thread template records the access logic for accessing the distance sensor.
5. The method according to claim 4, characterized in that The step of adding the plurality of target address information to a position corresponding to the address information in the thread template to obtain the target access thread includes one of the following: Determine, from the business volumes and priorities having a corresponding relationship, a reference priority corresponding to the target business volume carried by each of the memory drawers in the target set; Constructing an access order of the plurality of target address information in the thread template according to the order indicated by the reference priority to obtain the target access thread; The plurality of target address information are constructed into a parallel access relationship and added to a position corresponding to the address information in a thread template to obtain the target access thread.
6. The method according to claim 2, characterized in that After creating a target access thread for each target set, the method further includes: In the case where there are multiple target access threads, the calling information of each target access thread is determined according to the set information of the target set, wherein the set information is used to indicate the business carrying status on the memory drawer in the target set, and the calling information is used to indicate the access method of calling the target access thread to access the distance sensor; The corresponding target access thread is configured according to the calling information to obtain the target access process.
7. The method according to claim 6, characterized in that The determining the calling information of each target access thread according to the set information of the target set includes at least one of the following: Determine a target priority corresponding to a target business type carrying a business on the memory drawer in the target set from business types and priorities having a corresponding relationship, wherein the target priority is used to indicate a sequence in which the current target access thread runs among the multiple target access threads, the set information includes the target business type, and the call information includes the target priority; The target operation frequency information corresponding to the target business type carrying the business on the memory drawer in the target set is determined from the business types and operation frequency information with corresponding relationships, wherein the target operation frequency information is used to indicate the number of consecutive operations of the target access thread during operation and the time interval between two adjacent operation processes, the set information includes the target business type, and the call information includes the target operation frequency information.
8. The method according to claim 1, characterized in that Before calling the target communication bus to access the plurality of distance sensors connected to the expander through the target access process, the method further includes: In case of detecting that a target access cycle to the distance sensor is currently reached, detecting an occupation state of the target communication bus; When it is determined that the target communication bus is currently in an unoccupied state, a target process lock corresponding to the target access process is configured for the target communication bus, wherein the target process lock is used to indicate that the target communication bus is currently in a state of being called by the target access process.
9. The method according to claim 1, characterized in that: The detecting the corresponding operation state of the storage drawer according to the target movement information comprises: Matching the target distance value with the target distance range of the storage drawer to obtain a matching result, wherein the target movement information includes the target distance value, and the target distance value is used to indicate the distance between the storage drawer and the correspondingly set distance sensor; In a case where the matching result is used to indicate that the distance between the storage drawer and the corresponding distance sensor does not fall within the target distance range, it is determined that the storage drawer is in an operated state.
10. The method according to claim 8, characterized in that Matching the target distance value with the target distance range of the memory drawer includes: In the case that the number of the target distance values collected within the target access period of the distance sensor is multiple, filtering out extreme values among the multiple target distance values to obtain multiple filtered candidate distance values; Calculate the average of the plurality of candidate distance values to obtain a reference distance value; Matching the reference distance value with the target distance range; In the case that the reference distance value does not fall within the target distance range, it is determined that the distance between the storage drawer and the correspondingly arranged distance sensor does not fall within the target distance range.
11. The method according to claim 1, characterized in that: After detecting the operation state of the corresponding storage drawer according to the target movement information, the method further includes: In the case where it is determined that the operation state of the memory drawer is a state where an operation is being performed, acquiring memory configuration information of the memory drawer, wherein the memory configuration information is used to indicate a memory deployment state in the memory drawer; matching the memory configuration information with preset configuration information of the memory drawer; In the case that the memory configuration information does not match the preset configuration information, a target notification message is sent to a target account that has a binding relationship with the server, wherein the target account is an account used to maintain the running status of the server.
12. A state monitoring device for a storage drawer, characterized in that: The server includes a controller, a plurality of memory drawers, a plurality of distance sensors and an extender, wherein the memory drawer is used to deploy a memory connected to the server, the distance sensors and the memory drawers are set in a one-to-one correspondence, the distance sensors are used to collect movement information of the correspondingly set memory drawers, the extender is used to expand the number of devices in a target communication bus connected to the controller, a plurality of the distance sensors are connected to the extender, the device is applied to the controller, and the device includes: A creation module, used to create a target access process for the expander according to the device information of each of the memory drawers, wherein the device information is used to indicate the memory configuration in the corresponding memory drawer, and the target access process is used to indicate the access timing of the plurality of distance sensors connected to the expander; A calling module, configured to call the target communication bus through the target access process to access the plurality of distance sensors connected to the extender, and obtain target movement information collected by each distance sensor; The first detection module is used to detect the operation state of the corresponding storage drawer according to the target movement information, wherein the operation state is used to indicate the situation in which the corresponding storage drawer is operated.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 11 when executed by a processor.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 11 are implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 11 are implemented.
