Server hood opening degree detection method and device, storage medium and electronic equipment
Patent Information
- Application Number
- CN202311412298.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-10-27
AI Technical Summary
[0005]本申请实施例提供了一种服务器的机盖开度检测方法及装置、存储介质及电子设备,以至少解决相关技术中的服务器开盖检测方法存在服务器内相关检测结构复杂,服务器内部空间利用率低的问题
Smart Images

Figure CN117473581B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for detecting the opening degree of a server's chassis, a storage medium, and an electronic device. Background Technology
[0002] With the development of information technology, servers are being used more and more widely. In industries such as government and finance, the demand for servers is increasing. As server manufacturers continue to increase their demands and develop new applications, some important data needs to be protected. Servers are usually equipped with server cover opening detection functions to prevent damage to the server and loss of data caused by opening the cover for unknown reasons.
[0003] In related technologies, the hardware design for cover opening detection includes mechanical switches, connectors, and cables. When the server cover is opened and closed, the mechanical movement of the mechanical switch is converted into high and low level signals, which are then detected by the BMC (Browser Control Center).
[0004] It is evident that the server cover opening detection method in the relevant technologies suffers from problems such as complex detection structures within the server and low utilization of internal server space. Summary of the Invention
[0005] This application provides a method and apparatus for detecting the opening degree of a server's cover, a storage medium, and an electronic device, to at least solve the problems of complex detection structures and low utilization of internal space in related technologies for detecting server cover opening.
[0006] According to one aspect of the embodiments of this application, a method for detecting the opening degree of a server's chassis is provided, comprising: acquiring target sound data, wherein the target sound data is obtained by collecting sound inside the chassis when a target detection sound is emitted into the chassis of the server; converting the target sound data into target image data; and detecting the opening degree of the server's chassis based on the target image data to obtain a chassis opening degree result.
[0007] According to another aspect of the embodiments of this application, a server cover opening detection device is provided, comprising: a first acquisition unit for acquiring target sound data, wherein the target sound data is obtained by collecting sound inside the server chassis when a target detection sound is emitted into the server chassis; a conversion unit for converting the target sound data into target image data; and a detection unit for detecting the server cover opening based on the target image data to obtain a cover opening result.
[0008] As an optional solution, the server further includes: a sound-emitting module, a sound acquisition module, and a processing module, wherein the sound acquisition module is communicatively connected to the processing module; the device further includes: a transmitting unit and a acquisition unit, wherein the transmitting unit is used to transmit the target detection sound to the cover position according to the target frequency through the sound-emitting module; the acquisition unit is used to acquire the sound inside the chassis through the sound acquisition module to obtain target sound data, and send the target sound data to the processing module; the first acquisition unit is also used to receive the target sound data sent by the sound acquisition module through the processing module.
[0009] As an optional solution, the conversion unit includes: a first input module, used to input the target sound data into a target audio encoder to obtain the target image data output by the target audio encoder, wherein the target audio encoder is obtained by training a video encoder to be trained using video data containing audio data and corresponding image data.
[0010] As an optional embodiment, the apparatus further includes: a preprocessing unit, configured to perform preprocessing operations on the target image data after converting the target sound data into target image data, to obtain preprocessed target image data, wherein the preprocessing operations include one of the following: denoising operation, normalization operation; and an enhancement processing unit, configured to enhance the preprocessed target image data using at least one of the following: using a fractional-order differential algorithm to enhance the preprocessed target image data, to obtain enhanced target image data; using a generative adversarial network to enhance the preprocessed target image data, to obtain enhanced target image data, wherein the generative adversarial network is used to adjust the image parameters of the image data, and the image parameters include at least one of the following: color, brightness, contrast.
[0011] As an optional solution, the detection unit includes: a second input module, used to input the target image data into a first classification model to obtain a target opening interval label output by the first classification model, wherein the first classification model is used to predict a hood opening interval matching the input image data from a set of hood opening intervals based on the image features of the input image data, and the target opening interval label is used to identify the target opening interval in the set of hood opening intervals; and a third input module, used to input the target opening interval label and the target image data into a second classification model to obtain the hood opening result output by the second classification model, wherein the second classification model is used to predict a hood opening matching the input image data based on the image features of the input image data and the hood opening interval identified by the input opening interval label.
[0012] As an optional solution, the first classification model is a classification model based on the K-means clustering algorithm, where K is a positive integer greater than or equal to 2. Each hood opening interval corresponding to the first classification model has corresponding image features. The first classification model is used to predict the hood opening interval matching the input image data from the set of hood opening intervals based on the feature similarity between the image features of the input image data and the image features of each hood opening interval. The device further includes: a second acquisition unit, used to acquire a training image dataset before detecting the hood opening of the server based on the target image data, wherein the training... The annotation information of the training image data in the image dataset is the hood opening that matches the training image data; the sampling unit is used to randomly sample the training image data in the training image dataset when the number of training image data in the training image dataset is greater than a preset threshold, to obtain a subset of training image data; the first clustering unit is used to cluster the subset of training image data by using each specified value in a set of specified values as the number of clusters, to obtain a set of clusters corresponding to each specified value; the encoding unit is used to perform chromosome encoding on each specified value and the cluster center points of the set of clusters corresponding to each specified value, to obtain The first selection unit is configured to select training image data from each cluster corresponding to each specified value based on the fitness between the training image data in each cluster of a set of clusters corresponding to each specified value and the corresponding cluster; the first execution unit is configured to perform crossover and mutation operations on the chromosome corresponding to each specified value based on the selected training image data in each cluster corresponding to each specified value, to obtain an updated chromosome corresponding to each specified value, wherein the updated chromosome corresponding to each specified value is used to represent the chromosome in the updated set of clusters corresponding to each specified value. The training image data subset is configured with a second clustering unit, which re-clusters the training image data subset according to the updated chromosomes corresponding to each specified value, using each specified value as the number of clusters, to obtain an updated set of clusters corresponding to each specified value; a second selection unit, which selects a target value from the set of specified values based on the fitness of the training image data in each cluster corresponding to each specified value and the corresponding cluster; and a second execution unit, which performs multiple rounds of clustering operations on the training image dataset using the target value as the K value of K-means clustering and the cluster center points of the set of clusters corresponding to the target value as the initial cluster center points.The determining unit is configured, after performing the multi-round clustering operation, to determine the hood opening interval corresponding to each target cluster based on the hood opening angle labeled in the training image data of each target cluster obtained from the last clustering, and to determine the image features of the cluster center point of each target cluster as the image features of the hood opening interval corresponding to each target cluster, thereby obtaining the first classification model.
[0013] As an optional solution, the third input module includes: a first input submodule, used to input the target opening interval label and the target image data into the first sub-network model of the second classification model to obtain the target high-dimensional features output by the first sub-network model, wherein the first sub-network model is a network model containing a deep residual network for extracting high-dimensional features from the input image data; a second input submodule, used to input the target high-dimensional features into the second sub-network model of the second classification model to obtain the target low-dimensional features output by the second sub-network model, wherein the second sub-network model is a network model containing an encoder and a decoder for dimensionality reduction processing of the input high-dimensional features; and a third input submodule, used to input the target low-dimensional features into the target classifier of the second classification model to obtain the hood opening result output by the target classifier, wherein the target classifier is a classifier for classifying hood openings.
[0014] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the steps in any of the above method embodiments when it is run.
[0015] According to another aspect 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 perform the steps of any of the above method embodiments via the computer program.
[0016] In this embodiment, target sound data is acquired by collecting sound from inside the server chassis when a target detection sound is emitted into the chassis. Since the internal structure of the server chassis differs depending on whether the server lid is open or closed, the target sound data will also differ. Sound data is streaming data, and recognizing streaming data requires a large amount of data acquisition, necessitating a large number of samples to improve accuracy. Converting the target sound data into target image data effectively improves diagnostic accuracy. Different target sound data yields different target image data. Based on the target image data, the server lid opening is detected to obtain the lid opening result. Because this embodiment utilizes sound to detect the server lid opening, it eliminates the need for mechanical switches and corresponding cable connectors, replacing them with electronic and algorithmic work. This effectively increases the reliability of the server lid opening detection method, reduces costs, and solves the problems of complex internal detection structures and low internal space utilization in related technologies for server lid opening detection. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the hardware environment for an optional server cover opening detection method according to an embodiment of this application;
[0018] Figure 2 This is a flowchart illustrating an optional server cover opening detection method according to an embodiment of this application;
[0019] Figure 3 This is a structural diagram of a server according to an optional server cover opening detection method according to an embodiment of this application;
[0020] Figure 4 This is a schematic diagram illustrating the steps of an optional server cover opening detection method according to an embodiment of this application;
[0021] Figure 5 This is a schematic diagram of an optional opening range according to an embodiment of this application;
[0022] Figure 6 This is a schematic diagram of the technical architecture of an optional server cover opening detection method according to an embodiment of this application;
[0023] Figure 7 This is a structural block diagram of an optional server cover opening detection device according to an embodiment of this application;
[0024] Figure 8 This is a structural block diagram of a computer system for an optional electronic device according to an embodiment of this application. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] The methods and embodiments provided in this application can be executed on a server, mobile terminal, computer terminal, or similar computing device. Taking running on a server as an example, Figure 1 This is a schematic diagram of the hardware environment for a server cover opening detection method according to an embodiment of this application. Figure 1 As shown, a server may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The server may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server described above. For example, the server may also include components that are more complex than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0028] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the server's hood opening detection method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the aforementioned method. The memory 104 may include high-speed random access memory and 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 memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0029] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0030] According to one aspect of the embodiments of this application, a method for detecting the opening degree of a server lid is provided. With the development of information technology, the application of servers is becoming increasingly widespread. In industries such as government and finance, the demand for servers is increasing. As server manufacturers continue to increase their demands and develop new applications, some important data needs to be protected. Servers are typically equipped with a lid opening detection function to prevent damage to the server and loss of data caused by unexplained lid opening. In related technologies, the hardware design for lid opening detection includes mechanical switches, connectors, and cables. When the server lid is opened and closed, the mechanical movement of the mechanical switch is converted into high and low level signals, which are detected by the BMC (Browser Control Center). This lid opening detection method involves mechanical switches, cables, and connectors, resulting in complex detection structures within the server and low utilization of the server's internal space. In this embodiment, target sound data is acquired by collecting sound from inside the server chassis when a target detection sound is emitted into the chassis. Since the internal structure of the server chassis differs depending on whether the server lid is open or closed, the target sound data will also differ. Sound data is streaming data, and recognizing streaming data requires a large amount of data acquisition, necessitating a large number of samples to improve accuracy. Converting the target sound data into target image data effectively improves diagnostic accuracy. Different target sound data yields different target image data. Based on the target image data, the server lid opening is detected to obtain the lid opening result. Because this embodiment utilizes sound to detect the server lid opening, it eliminates the need for mechanical switches and corresponding cable connectors, replacing them with electronic and algorithmic work. This effectively increases the reliability of the server lid opening detection method, reduces costs, and solves the problems of complex internal detection structures and low internal space utilization in related technologies for server lid opening detection.
[0031] The server chassis opening detection method in this embodiment can be applied to scenarios involving detecting the opening of a server chassis. Here, a server refers to a type of computer that is faster, has a higher load capacity, and is more expensive than a regular computer. Servers provide computing or application services to other clients (such as PCs, smartphones, ATMs, and even large equipment like train systems) on a network. Servers have high-speed CPU computing power, long-term reliable operation, powerful I / O external data throughput, and better scalability. The server chassis plays a role in protecting the server to a certain extent. Servers are usually equipped with a server chassis opening detection function to prevent damage to the server and loss of data caused by opening the chassis for unknown reasons. Here, the chassis is part of the server chassis.
[0032] Optionally, the server hood opening detection method in this embodiment can be executed by the server itself. Here, "server" refers to the entire server, including the relevant components and processors within the server that need to execute the server hood opening detection method. Alternatively, the server hood opening detection method in this embodiment can be executed by the BMC. Here, BMC refers to the Baseboard Management Controller and Intelligent Platform Management Interface, which is the server's basic core functional subsystem responsible for core functions such as server hardware status management, operating system management, health status management, and power consumption management. In some examples of this embodiment, the server hood opening detection method is described using the server as an example.
[0033] See Figure 2 , Figure 2 This is a flowchart illustrating an optional server cover opening detection method according to an embodiment of this application, as shown below. Figure 2 As shown, the above method includes the following steps:
[0034] S202: Acquire target sound data, wherein the target sound data is obtained by collecting the sound inside the server chassis when the target detection sound is transmitted into the server chassis.
[0035] Target sound data refers to the sound collected inside the server chassis when a target detection sound is emitted into the server chassis. It should be noted that in this embodiment, when the server chassis opening degree is 0 degrees, it means that the server chassis is completely closed; when the server chassis opening degree is 50 degrees, it means that the server chassis is 50% open; and when the server chassis opening degree is 100 degrees, it means that the server chassis is completely open.
[0036] When the server's chassis opening is in different states, the sound collected inside the chassis after transmitting a target detection sound will also be different. For example, when the server's chassis opening is 0 degrees, the sound collected inside the chassis after transmitting a target detection sound is the first sound; when the server's chassis opening is 50 degrees, the sound collected inside the chassis after transmitting a target detection sound is the second sound; and when the server's chassis opening is 100 degrees, the sound collected inside the chassis after transmitting a target detection sound is the third sound. When the server's chassis opening is in different states, due to the different internal structures of the chassis, the first, second, and third sounds collected after transmitting a target detection sound will also be different, and the sound data corresponding to the first, second, and third sounds will also be different. Therefore, target sound data can be obtained, and the server's chassis opening can be determined by the target sound data.
[0037] In addition, the server is equipped with a sound transmitting device for transmitting target detection sound into the server chassis; the server is also equipped with a sound receiving device for receiving the sound inside the chassis after the sound transmitting device transmits the target detection sound into the chassis; the server is also equipped with a processing device for converting the sound received by the sound receiving device into target sound data.
[0038] Optionally, the target detection sound can be emitted into the chassis or towards the cover. When the server's cover is in different opening states, the internal structure of the chassis is different. Therefore, whether the target detection sound is emitted into the chassis or towards the cover, the sound received by the sound receiving device will change with the change of the server's cover opening.
[0039] S204: Convert the target sound data into target image data.
[0040] Converting target sound data into target image data refers to converting audio files into image files. Methods for converting audio files into image files have been described in relevant documents and will not be repeated here. When the server's hood opening is in different states, the acquired target sound data also differs. Therefore, after converting the target sound data into target image data, the resulting target image data will also differ. Thus, the server's hood opening can be determined by recognizing the target image data. In practical applications, the target sound data can be input into an image conversion algorithm to obtain the target image data corresponding to the target sound data. Preferably, before implementing the server hood opening detection method, the image conversion algorithm needs to be trained and optimized to improve the accuracy of the algorithm's output.
[0041] Understandably, sound data is streaming data, and for streaming data, a large number of samples need to be collected to effectively improve the accuracy of the recognition results; however, converting sound data into image data and performing corresponding recognition based on the image data can effectively improve the diagnostic accuracy.
[0042] S206: Detect the hood opening of the server based on the target image data to obtain the hood opening result.
[0043] Since the target image data obtained varies depending on the server's hood opening state, the target image data can be input into an image detection algorithm to identify the server's hood opening result corresponding to the target image data. Preferably, before implementing the server hood opening detection method, the image detection algorithm needs to be trained and optimized to improve the accuracy of the algorithm's output results.
[0044] The embodiments provided in this application utilize sound to detect the opening degree of the server cover, eliminating the need for mechanical switches and corresponding cable connectors, and replacing them with electronic and algorithmic work. This effectively increases the reliability of the server cover opening degree detection method, reduces costs, simplifies the chassis structure design, increases the internal space of the server, and allows for the placement of more components. This solves the problems of complex internal detection structures and low utilization of internal space in related technologies for server cover opening detection methods.
[0045] As an alternative solution, see [link to relevant documentation]. Figure 3 , Figure 3 This is a structural diagram of a server according to an optional server cover opening detection method based on an embodiment of this application, as shown below. Figure 3 As shown, the server includes a sound-generating module, a sound acquisition module, and a processing module, with the sound acquisition module and the processing module being communicatively connected.
[0046] Before acquiring the target sound data, the above method also includes:
[0047] S11, the sound module emits target detection sound toward the hood position according to the target frequency;
[0048] S12: The sound acquisition module acquires the sound inside the chassis, obtains the target sound data, and sends the target sound data to the processing module;
[0049] Acquire target sound data, including:
[0050] S13, receives the target sound data sent by the sound acquisition module through the processing module.
[0051] The sound-emitting module can be composed of a piezoelectric speaker, which is used to emit target detection sound towards the cover position according to the target frequency. The emitted target detection sound is reflected by the chassis and collected by the sound acquisition module. The target frequency is the frequency of the target detection sound set in advance, which is used to enable the sound acquisition module to more accurately identify the sound of the target detection sound after reflection inside the chassis and effectively filter out invalid data.
[0052] Understandably, when the sound-emitting module emits the target detection sound toward the hood position, the difference in the target sound data collected by the sound acquisition module will be more obvious when the hood opening is in different states, thereby improving the accuracy of the hood opening detection method of the server in this application.
[0053] See Figure 4 , Figure 4 This is a schematic diagram illustrating the steps of an optional server cover opening detection method according to an embodiment of this application, as shown below. Figure 4As shown, optionally, the sound generation module periodically emits target detection sound toward the hood position at the target frequency; for example, after the sound generation module continuously emits target detection sound toward the hood position at the target frequency for 1 second, the sound generation module stops emitting sound for 1 second.
[0054] Optionally, the volume of the target detection sound is below 40dB to avoid affecting the external environment.
[0055] The sound-generating module can communicate with the processing module. When the sound-generating module and the processing module are connected, in cases where the application server's hood opening detection method is required, the processing module can control the sound-generating module and the sound acquisition module to start working together, thereby achieving the acquisition of target sound data. Alternatively, the sound-generating module can be disconnected from the processing module. When the sound-generating module is disconnected from the processing module, in cases where the application server's hood opening detection method is required, the processing module can control the sound acquisition module to work while the sound-generating module emits the target detection sound, thereby achieving the acquisition of target sound data by the sound acquisition module.
[0056] The sound acquisition module is communicatively connected to the processing module. The sound acquisition module can be composed of an electret sensor, which is used to acquire the sound of the target detection sound after it is emitted and reflected inside the chassis. After acquiring the target sound data, the sound acquisition module sends the target sound data to the processing module.
[0057] Optionally, the processing module is the server's BMC. After receiving the target sound data, the processing module can implement the subsequent steps of the server's hood opening detection method based on the target sound data.
[0058] Here, the server incorporates a built-in sound acquisition module, a sound generation module, and a processing module to detect when the chassis is open. It also provides a server open-chassis detection algorithm to improve server efficiency. Furthermore, it utilizes sample augmentation and sample classification algorithms to enhance the efficiency of server open-chassis recognition. In addition, the sound acquisition module can acquire analog signals, which can be converted to digital data using an analog-to-digital converter (ADC) to obtain the corresponding sound data.
[0059] The embodiments provided in this application utilize sound to detect the opening degree of the server's chassis, eliminating the need for mechanical switches and corresponding cable connectors, effectively simplifying the chassis structure design and increasing the internal space of the server. In this embodiment, while ensuring accurate identification of the chassis opening degree, the solution effectively reduces the impact of the server's chassis opening degree detection method on the external environment by reducing the volume of the target detection sound.
[0060] As an optional approach, the target sound data is converted into target image data, including:
[0061] S21, the target sound data is input into the target audio encoder to obtain the target image data output by the target audio encoder. The target audio encoder is obtained by training the audio encoder to be trained using video data containing audio data and corresponding image data.
[0062] The target audio encoder can convert audio data into image data. In this embodiment, before executing the server's hood opening detection method, the target audio encoder needs to be trained using video data containing audio data and corresponding image data to obtain a target audio encoder that can accurately convert the audio data in this embodiment into image data.
[0063] Optionally, the target audio encoder is Wav2CLIP. Wav2CLIP can convert the target audio data into RGB color raw image frames of arbitrary size, and then filter the data images to remove redundant photos, thereby obtaining the target image data corresponding to the target audio data. Wav2CLIP can be trained and optimized using training videos. Wav2CLIP completes audio encoding by extracting the embedding of CLIP images in the video. It uses the CLIP image encoder to extract features from the audio and the corresponding image, generating an audio representation that "understands" which image it should correspond to, and conversely, it can deduce the image from this representation. By using Wav2CLIP as the target audio encoder, a connection can be established between audio and image, thereby realizing the conversion from sound to image.
[0064] The embodiments provided in this application provide a reliable implementation method that can convert target sound data into target image data. Different hood opening degrees correspond to different target sounds and can also be mapped to target image data, thereby effectively improving the reliability and practicality of the server's hood opening detection method.
[0065] As an optional approach, after converting the target sound data into target image data, the above method further includes:
[0066] S31, Perform preprocessing operations on the target image data to obtain preprocessed target image data, wherein the preprocessing operations include one of the following: denoising operation, normalization operation;
[0067] S32, perform at least one of the following enhancement processes on the preprocessed target image data:
[0068] The preprocessed target image data is enhanced using a fractional derivative algorithm to obtain enhanced target image data.
[0069] Generative adversarial networks (GANs) are used to enhance preprocessed target image data to obtain enhanced target image data. The GAN is used to adjust the image parameters of the image data, which include at least one of the following: color, brightness, and contrast.
[0070] The purpose of performing preprocessing operations on the target image data is to eliminate interference and errors in the target image data.
[0071] It should be noted that, in this embodiment, fractional differential algorithms and generative adversarial networks can be used to enhance the preprocessed target image data, or both methods can be used together.
[0072] Optionally, the generative adversarial network in this embodiment is a deep image enhancement technique based on GAN (Generative Adversarial Networks). GAN consists of two neural networks: a generator and a discriminator. The generator aims to generate realistic images to deceive the discriminator, while the discriminator aims to distinguish between generated and real images. The generator and discriminator networks continuously evolve and improve through adversarial and cooperative processes. By adjusting the color balance, brightness, and contrast of the preprocessed target image data, GAN can further enhance the quality and effect of the image.
[0073] Optionally, when fractional derivative algorithms and generative adversarial networks are used simultaneously to enhance the preprocessed target image data, the two algorithms can be adjusted and optimized according to specific image characteristics and requirements to achieve the best processing effect.
[0074] For example, an image enhancement technique based on the fusion of fractional-order differential algorithms and deep learning algorithms can be proposed. The two algorithms can be adjusted and optimized according to image characteristics and requirements to achieve the best processing results.
[0075] The embodiments provided in this application effectively expand and enrich the target image dataset by performing preprocessing and enhancement processing on the target image data, avoiding the problems of low resolution and high noise in the target image data, thereby effectively improving the reliability and accuracy of the server's hood opening detection method.
[0076] As an optional approach, the hood opening of the server is detected based on the target image data to obtain the hood opening result, including:
[0077] S41, the target image data is input into the first classification model to obtain the target opening interval label output by the first classification model. The first classification model is used to predict the hood opening interval that matches the input image data from a set of hood opening intervals based on the image features of the input image data. The target opening interval label is used to identify the target opening interval in a set of hood opening intervals.
[0078] S42, input the target opening interval label and the target image data into the second classification model to obtain the hood opening result output by the second classification model. The second classification model is used to predict the hood opening that matches the input image data based on the image features of the input image data and the hood opening interval identified by the input opening interval label.
[0079] In this embodiment, to improve the accuracy of hood opening detection, a two-level classification model can be set up, namely, a first classification model and a second classification model. The first classification model is used to predict the hood opening interval that matches the input image data from a set of hood opening intervals (e.g., the opening ranges from 0 to 100, with interval lengths of 10, where 0 represents closed and 100 represents fully open) based on the image features of the input image data. The second classification model is used to predict the hood opening that matches the input image data based on the image features of the input image data and the hood opening intervals identified by the input opening interval labels.
[0080] Here, the first classification model predicts the hood opening (i.e., the hood opening of the server) to belong to a specific hood opening range. Compared to finer-grained opening prediction, this reduces the difficulty of model training while improving prediction accuracy (here, the prediction is of the hood opening range). Combining image data with the hood opening range predicted by the first classification model allows the opening prediction to be more focused on the range predicted by the first classification model, reducing prediction difficulty while improving accuracy. Here, the opening predicted by the second classification model can belong to the hood opening range predicted by the first classification model.
[0081] For the target image data, the target image data can be input into a first classification model to obtain the target opening interval label output by the first classification model. This label is used to identify the target opening interval in a set of hood opening intervals. The target opening interval label and the target image data are then input into a second classification model to obtain the hood opening result output by the second classification model. The hood opening indicated by the hood opening result may or may not belong to the target opening interval (the opening interval label can be used to adjust the bias of the hood opening prediction, i.e., to favor the hood opening interval identified by the opening interval label). Optionally, the image data input into the first classification model can be the target image data, preprocessed target image data, enhanced target image data, or target image data that is first preprocessed and then enhanced.
[0082] Optionally, in this embodiment, the first classification model is a classification model based on KNN (K-Nearest Neighbor) algorithm, where K is a positive integer greater than or equal to 2, i.e., a KNN model, or an improved KNN model, or other types of classification models, such as a classification model based on the K-means clustering algorithm (K-means algorithm); the second classification model can be a deep neural network model, or an improved deep neural network model, or other types of classification models, which are not limited in this embodiment.
[0083] For example, when detecting the opening of a server chassis, the sound inside the chassis can be collected by instruments and equipment such as piezoelectric speakers (i.e., sound acquisition components) arranged inside the chassis; the collected sound data can be converted into images and enhanced preprocessing can be performed; the converted image data can be accurately classified (first classification) based on the K-means algorithm, and the accurately classified image data can be input into a deep neural network model for processing to predict and judge the opening of the server chassis (i.e., the opening of the chassis cover).
[0084] The embodiments provided in this application employ two classification models to predict the hood opening range and the hood opening in sequence, which can improve the accuracy of hood opening prediction and reduce the difficulty of model training.
[0085] As an optional approach, each hood opening interval corresponding to the first classification model has corresponding image features. The first classification model is used to predict the hood opening interval matching the input image data from a set of hood opening intervals based on the feature similarity between the image features of the input image data and the image features of each hood opening interval (image features configured for each hood opening interval). Correspondingly, the target image data is input into the first classification model to obtain the target opening interval label output by the first classification model, including: determining the feature similarity between the image features of the target image data and the image features of each hood opening interval, obtaining the maximum feature similarity, where the maximum feature similarity is the maximum value among the feature similarities between the image features of the target image data and the image features of each hood opening interval; and determining the hood opening interval corresponding to the maximum feature similarity as the target hood opening interval.
[0086] Optionally, the first classification model is a classification model based on the K-means clustering algorithm, where K is a positive integer greater than or equal to 2. To determine the first classification model, the above method further includes:
[0087] S51, Obtain the training image dataset, wherein the annotation information of the training image data in the training image dataset is the hood opening that matches the training image data;
[0088] S52, use the target value as the K value for K-means clustering and use a set of cluster centers corresponding to the target value as the initial cluster centers to perform multiple rounds of clustering operations on the training image dataset;
[0089] S53, based on the hood openings labeled in the training image data of each of the multiple target clusters obtained from the last clustering, determine the hood opening interval corresponding to each target cluster, and determine the image features of the cluster center point of each target cluster as the image features of the hood opening interval corresponding to each target cluster, thus obtaining the first classification model.
[0090] To obtain the first classification model, a training image dataset can be acquired. Here, the annotation information of the training image data in the training image dataset is the hood opening degree matched with the training image data. For example, 110 sound samples of the server switch box can be collected, respectively according to the server opening degrees of 0, 10, 20, 30, 40, 50, 60, 70, 80, 90 and 100 (which can correspond to...). Figure 5 Ten sample data points were collected from each of the ten openness intervals: [0, 10], (10, 20], (20, 30], (30, 40], (40, 50], (50, 60], (60, 70], (70, 80], (80, 90], and (90, 100], resulting in a dataset D = {(x...}) containing 110 sample points.i y i ), 1≤i≤n}, x i Let y be the image features of the sound images in sample set i. i For the corresponding hood opening, here, the collected sound samples can be preprocessed by image conversion and enhancement. The label of each sound image can be one of 0-100.
[0091] Optionally, the training image data can be preprocessed, including but not limited to at least one of the following: size normalization, pixel value normalization, etc., to adapt to the subsequent training of the model; in addition, the image data can be labeled to convert the image labels into a numerical form that the model can process.
[0092] To perform K-means clustering on the training image dataset, we can first determine the K value and the initial cluster centers. Here, we can use the target value as the K value for K-means clustering and the set of cluster centers corresponding to the target value as the initial cluster centers to perform multiple rounds of clustering on the training image dataset. The target value can be a preset value or a value determined through certain processing operations. The set of cluster centers corresponding to the target value can be randomly selected cluster centers or cluster centers determined through certain processing operations.
[0093] After performing multiple rounds of clustering operations (meeting the clustering termination condition, which can be the number of iterations or other conditions), the final clustering can yield multiple target clusters. Based on the hood openings labeled in the training image data contained in each target cluster, a hood opening interval corresponding to each target cluster can be determined. Here, the hood opening interval corresponding to each target cluster can cover the hood openings labeled in all or at least part of the training image data contained in each target cluster, and has no overlap (or minimal overlap) with the hood openings labeled in the training image data contained in other target clusters. Furthermore, the image features of the cluster center points of each target cluster can be used as the image features of the hood opening interval corresponding to each target cluster, thus obtaining the first classification model.
[0094] Considering that the directly set target value may not be the optimal solution, the K value and the corresponding cluster centroids of the K-means clustering algorithm can be optimized based on the Immune Genetic Algorithm (IGA): each specified value in a set of specified values is used as the number of clusters to cluster the training image dataset, resulting in a set of clusters corresponding to each specified value; based on the IGA and the fitness between the training image data in each cluster corresponding to each specified value and the corresponding cluster, the target value is selected from a set of specified values.
[0095] Optionally, the parameters of the immune genetic algorithm and the K-means algorithm (i.e., the model parameters of the first classification model) can be initialized. For example, based on the preprocessed training image dataset, the algorithm parameters of the immune genetic algorithm, including population size, mutation probability, crossover probability, etc., can be initialized. Simultaneously, the K value and cluster centers in the K-means algorithm can be initialized. The K value can be a small initial value, such as 2 or 3, and the cluster centers can be randomly selected image features from the training image data, or other methods for setting the initial cluster centers.
[0096] Optionally, the method for determining the K value (target value) and corresponding cluster centers of the first classification model using the immune genetic algorithm can be as follows: Cluster the training image dataset using each specified value as the number of clusters to obtain a set of clusters corresponding to each specified value; encode each specified value and the cluster centers of the set of clusters corresponding to each specified value using chromosomes to obtain chromosomes corresponding to each specified value; select training image data from each cluster corresponding to each specified value based on the fitness between the training image data in each cluster and the corresponding cluster; perform crossover and mutation operations on the chromosomes corresponding to each specified value based on the selected training image data from each cluster corresponding to each specified value to obtain updated chromosomes corresponding to each specified value, wherein the updated chromosomes correspond to each specified value to represent the updated cluster centers of the set of clusters corresponding to each specified value; and re-cluster the training image dataset using each specified value as the number of clusters according to the updated chromosomes corresponding to each specified value to obtain updated sets of clusters corresponding to each specified value. The above update process can be performed multiple times to obtain the optimal set of clusters corresponding to each specified value. Based on the updated training image data in each cluster corresponding to each specified value and the fitness of the corresponding cluster, a target value is selected from the set of specified values. Here, the selected target value and the cluster center point of the set of clusters corresponding to the target value can be determined based on the chromosome corresponding to the final target value. That is, the optimal chromosome is decoded into the corresponding target value and the cluster center point of the set of clusters corresponding to the target value.
[0097] The cluster centers of a group of clusters corresponding to the target value can be directly used as multiple target clusters, meaning that subsequent multi-round clustering operations will not be performed. Optionally, considering that the original dataset (i.e., the training image dataset) varies in size, randomly and uniformly sampling a large-scale original dataset to generate a sample set can more quickly obtain the optimal K value and initial cluster centers. Optionally, the number of individuals in the original dataset can be determined first. If the number of training images in the training image dataset is greater than a preset threshold (e.g., higher than a set threshold, typically set to 60–130), then randomly and uniformly sampling the original dataset can generate a subset of the original dataset (i.e., the sample set): randomly sampling the training images in the training image dataset to obtain a subset of training image data.
[0098] After obtaining the subset of training image data, the target value and the cluster centroids of the corresponding clusters can be determined in a similar manner to that described above. Then, the target value is used as the K value for K-means clustering, and the cluster centroids of the corresponding clusters are used as the initial cluster centroids to perform the aforementioned multi-round clustering operation on the training image dataset, thereby obtaining the aforementioned multiple target clusters. This has already been explained and will not be repeated here.
[0099] It should be noted that the method of determining the target value and the cluster center point of a group of clusters corresponding to the target value from a set of specified values based on the immune genetic algorithm can refer to relevant technologies, or other similar methods can be used to optimize the K value and the initial cluster center point, which will not be elaborated here.
[0100] For example, in the K-means algorithm, the choice of K value has a significant impact on the algorithm's results. A smaller K value can easily lead to overfitting, while a larger K value, although reducing the estimation error, can increase the approximation error. Therefore, an immune genetic algorithm can be used to dynamically select the K value to improve the K-means algorithm.
[0101] For example, an immune genetic algorithm can be run using initialized parameters to optimize the K value. In each generation, the fitness of individuals in the population is evaluated using a fitness function, and individuals with higher fitness are selected for reproduction. After multiple generations of evolution, the optimal K value is finally obtained. Here, the stopping condition can be: if a preset number of iterations is reached, or the best fitness in the population reaches a preset threshold, then iteration stops. Otherwise, it returns to continue iterating. During the training and testing phases of the model, appropriate evaluation metrics (such as accuracy, recall, F1 score, etc.) can be used to evaluate the performance of the algorithm.
[0102] Optionally, the first classification model used to classify the target image data can be a classification model based on the KNN algorithm or an improved KNN algorithm. For example, an improved KNN algorithm can be used to accurately classify samples in a server lid opening detection scenario. An optimized K value can be used to input the feature vector of the image to be classified (e.g., the target image data) into the KNN algorithm to find the K nearest neighbors. Based on the labels of these neighbors, the classification result of the image to be classified is determined.
[0103] It should be noted that optimizing the K-means algorithm based on the immune genetic algorithm avoids the inconvenience of manually selecting the K value and cluster centers, achieving automatic selection and optimization of parameters in the K-means algorithm, thus enhancing its adaptability and robustness. Furthermore, the immune genetic algorithm also has advantages such as fast convergence and global optimization, enabling the algorithm to obtain optimized parameters in a shorter time and improving classification accuracy.
[0104] The embodiments provided in this application optimize the K-means algorithm based on the immune genetic algorithm, thereby improving the generalization performance and robustness of the K-means algorithm. At the same time, it can improve the efficiency of algorithm optimization and also improve the classification accuracy.
[0105] As an optional approach, the target opening interval label and target image data are input into the second classification model to obtain the hood opening result output by the second classification model, including:
[0106] S61, the target opening interval label and target image data are input into the first sub-network model of the second classification model to obtain the target high-dimensional features output by the first sub-network model. The first sub-network model is a network model containing a deep residual network for extracting high-dimensional features from the input image data.
[0107] S62, the high-dimensional features of the target are input into the second sub-network model of the second classification model to obtain the low-dimensional features of the target output by the second sub-network model. The second sub-network model is a network model containing an encoder and a decoder, used to perform dimensionality reduction processing on the input high-dimensional features.
[0108] S63, input the low-dimensional features of the target into the target classifier of the second classification model to obtain the hood opening result output by the target classifier, where the target classifier is the classifier used to classify the hood opening.
[0109] In this embodiment, the second classification model may include a first sub-network model and a second sub-network model. The first sub-network model is a network model containing a deep residual network for extracting high-dimensional features from the input image data, while the second sub-network model is a network model containing an encoder and a decoder for reducing the dimensionality of the input high-dimensional features. By combining the two network models, feature extraction and dimensionality reduction of streaming data are achieved, improving the efficiency and accuracy of classification and detection. At the same time, it can be applied to various types of streaming data and has broad application prospects.
[0110] Optionally, the first sub-network model can be a network model containing a deep residual network (or a deep residual shrinking network), such as the ResNet model. Here, ResNet is a deep learning network that effectively solves the gradient vanishing problem in deep neural networks by introducing "residual blocks," exhibiting strong representational capabilities. By training the ResNet model, high-level feature representations (high-dimensional features, or high-dimensional image features) of the image can be learned. Here, a 34-layer ResNet network structure can be used to train the network model, in which two 2*2 convolutional networks are cascaded together to form a residual network module. The deep residual network employs a feature learning method that integrates the deep residual network ResNet and autoencoder techniques, and can be used for real-time image detection and classification.
[0111] To address the issue of significant noise in server-side audio and image data, an autoencoder mechanism can be introduced into Deep Residual Networks (ResNet). This means the primary classification model can integrate the ResNet and the autoencoder for feature learning. The autoencoder focuses on key features of the region of interest (the learned features can be used for image classification), thus achieving automatic encoding within the ResNet. This allows for adaptive elimination of redundant information during feature learning, improving noise resistance and achieving better noise removal from image data. Consequently, it enhances the learning of useful features, thereby better removing noise from image data, solving the data quality problem, and improving the accuracy of model detection.
[0112] Optionally, the second sub-network model may include an encoder and a decoder, through which a low-dimensional representation of the input data can be learned. The second sub-network model can be an autoencoder model, where an autoencoder is an unsupervised neural network that learns a low-dimensional representation of the input data through an encoder and decoder. By training the autoencoder model, low-level feature representations of the image can be learned. Correspondingly, the second classification model can be a ResNet-autoencoder model, such as... Figure 6 As shown, when training the ResNet-autoencoder model, a ResNet model can be trained first using a preprocessed dataset; then, the output of the ResNet can be used as the input to the autoencoder to train an autoencoder model. Here, the ResNet-autoencoder model is a switch detection model, which is a detection model based on an improved CNN (Convolutional Neural Network).
[0113] Optionally, due to the dynamic nature of image data, the model can be updated periodically to maintain its accuracy. The ResNet and autoencoder models can be retrained using new image datasets. Simultaneously, during the training and testing phases, appropriate evaluation metrics (such as accuracy, recall, F1 score, etc.) can be used to assess the model's performance. These metrics can be adjusted according to actual needs to better evaluate the model's performance. Figure 6 As shown.
[0114] It should be noted that by combining ResNet and autoencoder from deep learning technology, a ResNet-Autoencoder-based streaming data classification and detection algorithm (e.g., image classification and detection algorithm) is provided. This algorithm, combining ResNet and autoencoder from deep learning technology, achieves automatic and efficient image classification and detection; for complex image classification tasks, it improves accuracy and robustness; reduces reliance on manual intervention, and improves work efficiency.
[0115] Unlike traditional detection and classification tasks, the massive volume, rapid arrival, and concept drift of audio stream data for server switch detection make it difficult for a single stationary model to meet the data classification and detection requirements. This paper proposes a switch detection model by combining an improved CNN neural network with an autoencoder. This model has the same encoder-decoder architecture as the autoencoder, whose basic purpose is to reconstruct its own input by encoding the learned input data in a low-dimensional representation in the hidden layer. Furthermore, by measuring the reconstruction error between the input and the prediction, the autoencoder can be used for rapid state anomaly detection. Simultaneously, leveraging the feature recognition advantages of the improved CNN network—RESNET—it can quickly detect the switch state of a server. This approach addresses the problems existing in streaming data classification and detection methods in related technologies, demonstrating high practical and application value.
[0116] For the target image data, the target opening interval label and the target image data can be input into the first sub-network model of the second classification model to obtain the target high-dimensional features output by the first sub-network model, i.e., the high-dimensional image features output by the first sub-network model. The target high-dimensional features are then input into the second sub-network model of the second classification model to obtain the target low-dimensional features output by the second sub-network model, i.e., the low-dimensional image features obtained by the second sub-network model through dimensionality reduction of the target high-dimensional features. The second classification model also includes a target classifier, which is used for classifying the hood opening. After obtaining the target low-dimensional features, these features can be input into the target classifier of the second classification model to obtain the hood opening result output by the target classifier.
[0117] For example, after training, the ResNet-autoencoder model can be used for image classification and detection. Image data that has been accurately classified (based on the K-means algorithm for hood opening interval classification) (i.e., the image to be classified) can be fed into the trained ResNet-autoencoder model for processing. The trained model parameter file can be used to detect server power on / off and predict the opening degree of the server chassis. The image to be classified is input into the ResNet model to obtain a high-level feature representation; this feature representation is then input into the autoencoder model to obtain a low-dimensional feature vector; finally, this feature vector is input into a pre-trained classifier to obtain the image classification result.
[0118] In practical applications, the image to be detected (i.e., the image to be classified) can be fed into a trained model for processing. The trained model parameter file is used to detect RGB color original images of arbitrary size. A deep residual network can be used to detect and segment feature images. Ultimately, a server switch box detection and prediction function can be implemented, thereby calculating the server's opening degree.
[0119] The embodiments provided in this application employ a first sub-network model containing a deep residual network, a second sub-network model containing an encoder and a decoder, and a classification model with a classifier, which can improve the accuracy of hood opening prediction.
[0120] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0121] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0122] According to another aspect of the embodiments of this application, a server cover opening detection device is also provided. This device is used to implement the server cover opening detection method provided in the above embodiments, and will not be repeated hereafter. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0123] Figure 7 This is a structural block diagram of a server cover opening detection device according to an embodiment of this application, as shown below. Figure 7 As shown, the device includes:
[0124] The first acquisition unit 702 is used to acquire target sound data, wherein the target sound data is obtained by collecting the sound inside the chassis when the target detection sound is transmitted into the chassis of the server;
[0125] The conversion unit 704 is connected to the first acquisition unit 702 and is used to convert the target sound data into target image data.
[0126] The detection unit 706, connected to the conversion unit 704, is used to detect the opening degree of the server's hood based on the target image data and obtain the hood opening degree result.
[0127] It should be noted that the first acquisition unit 702 in this embodiment can be used to perform the above step S202, the conversion unit 704 in this embodiment can be used to perform the above step S204, and the detection unit 706 in this embodiment can be used to perform the above step S206.
[0128] The embodiments provided in this application utilize sound to detect the opening degree of the server cover, eliminating the need for mechanical switches and corresponding cable connectors, and replacing them with electronic and algorithmic work. This effectively increases the reliability of the server cover opening degree detection method, reduces costs, simplifies the chassis structure design, increases the internal space of the server, and allows for the placement of more components. This solves the problems of complex internal detection structures and low utilization of internal space in related technologies for server cover opening detection methods.
[0129] As an optional solution, the server also includes: a sound generation module, a sound acquisition module, and a processing module, with the sound acquisition module and the processing module communicating with each other.
[0130] The aforementioned device also includes: a transmitting unit and a acquiring unit, wherein,
[0131] The transmitting unit is used to transmit target detection sound to the hood position according to the target frequency through the sound-generating module;
[0132] The acquisition unit is used to acquire sound inside the chassis through the sound acquisition module, obtain target sound data, and send the target sound data to the processing module;
[0133] The first acquisition unit is also used to receive target sound data sent by the sound acquisition module through the processing module.
[0134] As an optional solution, the conversion unit includes:
[0135] The first input module is used to input the target sound data into the target audio encoder to obtain the target image data output by the target audio encoder. The target audio encoder is obtained by training the audio encoder to be trained using video data containing audio data and corresponding image data.
[0136] As an optional solution, the above-mentioned device further includes:
[0137] The preprocessing unit is used to perform preprocessing operations on the target image data after converting the target sound data into target image data, so as to obtain preprocessed target image data. The preprocessing operations include one of the following: denoising operation and normalization operation.
[0138] An enhancement processing unit is configured to perform at least one of the following enhancement processes on the preprocessed target image data:
[0139] The preprocessed target image data is enhanced using a fractional derivative algorithm to obtain enhanced target image data.
[0140] Generative adversarial networks (GANs) are used to enhance preprocessed target image data to obtain enhanced target image data. The GAN is used to adjust the image parameters of the image data, which include at least one of the following: color, brightness, and contrast.
[0141] As an optional solution, the detection unit 706 includes:
[0142] The second input module is used to input the target image data into the first classification model and obtain the target opening interval label output by the first classification model. The first classification model is used to predict the hood opening interval that matches the input image data from a set of hood opening intervals based on the image features of the input image data. The target opening interval label is used to identify the target opening interval in a set of hood opening intervals.
[0143] The third input module is used to input the target opening interval label and the target image data into the second classification model to obtain the hood opening result output by the second classification model. The second classification model is used to predict the hood opening that matches the input image data based on the image features of the input image data and the hood opening interval identified by the input opening interval label.
[0144] As an alternative, the first classification model is a classification model based on the K-means clustering algorithm, where K is a positive integer greater than or equal to 2. Each hood opening interval corresponding to the first classification model has corresponding image features. The first classification model is used to predict the hood opening interval that matches the input image data from a set of hood opening intervals based on the feature similarity between the image features of the input image data and the image features of each hood opening interval.
[0145] Correspondingly, before detecting the hood opening of the server based on the target image data, the above method further includes:
[0146] The second acquisition unit is used to acquire a training image dataset before detecting the hood opening of the server based on the target image data, wherein the annotation information of the training image data in the training image dataset is the hood opening that matches the training image data.
[0147] The sampling unit is used to randomly sample the training image data in the training image dataset when the number of training image data contained in the training image dataset is greater than a preset threshold, so as to obtain a subset of training image data.
[0148] The first clustering unit is used to cluster the training image data subset by taking each specified value in a set of specified values as the number of clusters, and obtain a set of clusters corresponding to each specified value;
[0149] The encoding unit is used to encode the chromosome for each specified value and the cluster center point of a set of clusters corresponding to each specified value, so as to obtain the chromosome corresponding to each specified value.
[0150] The first selection unit is used to select training image data in each cluster corresponding to each specified value based on the fitness between the training image data in each cluster of a set of clusters corresponding to each specified value and the corresponding cluster.
[0151] The first execution unit is used to perform crossover and mutation operations on the chromosome corresponding to each specified value based on the training image data in each cluster selected for each specified value, to obtain an updated chromosome corresponding to each specified value, wherein the updated chromosome corresponding to each specified value is used to represent the cluster center point of a set of clusters corresponding to each specified value after the update.
[0152] The second clustering unit is used to re-cluster the training image data subsets according to the updated chromosomes corresponding to each specified value, using each specified value as the number of clusters, to obtain an updated set of clusters corresponding to each specified value.
[0153] The second selection unit is used to select a target value from a set of specified values based on the updated training image data in each cluster corresponding to each specified value and the fitness of the corresponding cluster.
[0154] The second execution unit is used to perform multiple rounds of clustering operations on the training image dataset, using the target value as the K value of K-means clustering and the cluster center points of a set of clusters corresponding to the target value as the initial cluster center points.
[0155] The determination unit is used to determine the hood opening interval corresponding to each target cluster based on the hood opening of the training image data contained in each of the multiple target clusters obtained by the last clustering after performing multiple rounds of clustering operations, and to determine the image features of the cluster center point of each target cluster as the image features of the hood opening interval corresponding to each target cluster, so as to obtain the first classification model.
[0156] As an optional solution, the third input module includes:
[0157] The first input submodule is used to input the target opening interval label and target image data into the first sub-network model of the second classification model to obtain the target high-dimensional features output by the first sub-network model. The first sub-network model is a network model containing a deep residual network for extracting high-dimensional features from the input image data.
[0158] The second input submodule is used to input the high-dimensional features of the target into the second sub-network model of the second classification model to obtain the low-dimensional features of the target output by the second sub-network model. The second sub-network model is a network model containing an encoder and a decoder, used to perform dimensionality reduction processing on the input high-dimensional features.
[0159] The third input submodule is used to input the low-dimensional features of the target into the target classifier of the second classification model to obtain the hood opening result output by the target classifier. The target classifier is a classifier used to classify the hood opening.
[0160] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein the program executes the steps in any of the above method embodiments when it is run.
[0161] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0162] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to perform the steps of any of the above method embodiments through the computer program.
[0163] In one 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.
[0164] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0165] According to another aspect of the embodiments of this application, a computer program product is provided, the computer program product including a computer program / instructions comprising program code for performing the method shown in the flowchart. In such an embodiment, reference is made to... Figure 8 The computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit 801, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0166] refer to Figure 8 , Figure 8 This is a structural block diagram of a computer system for an optional electronic device according to an embodiment of this application.
[0167] Figure 8 A schematic block diagram of a computer system architecture for implementing embodiments of the present application is shown. Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 802 or programs loaded from storage section 808 into random access memory (RAM). The random access memory 803 also stores various programs and data required for system operation. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output interface 805 (I / O interface) is also connected to the bus 804.
[0168] The following components are connected to the input / output interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a local area network card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0169] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit 801, it performs various functions defined in the system of this application.
[0170] It should be noted that, Figure 8The computer system 800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0171] Obviously, those skilled in the art should understand that the modules or steps of the embodiments of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of this application are not limited to any particular combination of hardware and software.
[0172] The above are merely preferred embodiments of this application and are not intended to limit the embodiments of this application. For those skilled in the art, various modifications and variations can be made to the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. A method for detecting the opening degree of a server's chassis, characterized in that, include: Acquire target sound data, wherein the target sound data is obtained by collecting the sound inside the chassis when a target detection sound is transmitted into the chassis of the server; Convert the target sound data into target image data; The opening degree of the server's hood is detected based on the target image data to obtain the hood opening degree result.
2. The method according to claim 1, characterized in that, The server includes a sound-generating module, a sound acquisition module, and a processing module, wherein the sound acquisition module and the processing module are communicatively connected. Before acquiring the target sound data, the method further includes: The sound-emitting module emits the target detection sound toward the hood position at the target frequency; The sound acquisition module acquires sound from inside the chassis to obtain target sound data, and then sends the target sound data to the processing module. The acquisition of target sound data includes: The processing module receives the target sound data sent by the sound acquisition module.
3. The method according to claim 1, characterized in that, The step of converting the target sound data into target image data includes: The target sound data is input into the target audio encoder to obtain the target image data output by the target audio encoder. The target audio encoder is obtained by training the audio encoder to be trained using video data containing audio data and corresponding image data.
4. The method according to claim 1, characterized in that, After converting the target sound data into target image data, the method further includes: Perform a preprocessing operation on the target image data to obtain preprocessed target image data, wherein the preprocessing operation includes one of the following: denoising operation, normalization operation; The preprocessed target image data undergoes at least one of the following enhancement processes: The preprocessed target image data is enhanced using a fractional derivative algorithm to obtain the enhanced target image data. The preprocessed target image data is enhanced using a generative adversarial network (GAN) to obtain enhanced target image data. The GAN is used to adjust the image parameters of the image data, and the image parameters include at least one of the following: color, brightness, and contrast.
5. The method according to any one of claims 1 to 4, characterized in that, The step of detecting the hood opening of the server based on the target image data to obtain the hood opening result includes: The target image data is input into a first classification model to obtain a target opening interval label output by the first classification model. The first classification model is used to predict the hood opening interval that matches the input image data from a set of hood opening intervals based on the image features of the input image data. The target opening interval label is used to identify the target opening interval in the set of hood opening intervals. The target opening interval label and the target image data are input into the second classification model to obtain the hood opening result output by the second classification model. The second classification model is used to predict the hood opening that matches the input image data based on the image features of the input image data and the hood opening interval identified by the input opening interval label.
6. The method according to claim 5, characterized in that, The first classification model is a classification model based on the K-means clustering algorithm, where K is a positive integer greater than or equal to 2. Each hood opening interval corresponding to the first classification model has a corresponding image feature. The first classification model is used to predict the hood opening interval that matches the input image data from the set of hood opening intervals based on the feature similarity between the image features of the input image data and the image features of each hood opening interval. Before detecting the hood opening of the server based on the target image data, the method further includes: Obtain a training image dataset, wherein the annotation information of the training image data in the training image dataset is the hood opening that matches the training image data; If the number of training image data contained in the training image dataset is greater than a preset threshold, the training image data in the training image dataset is randomly sampled to obtain a subset of training image data. Each specified value in a set of specified values is used as the number of clusters to cluster the subset of training image data, resulting in a set of clusters corresponding to each specified value. Chromosome encoding is performed on each specified value and the cluster center point of a set of clusters corresponding to each specified value to obtain the chromosome corresponding to each specified value; Based on the fitness between the training image data in each cluster of a set of clusters corresponding to each specified value and the corresponding cluster, the training image data in each cluster corresponding to each specified value is selected; Based on the training image data in each cluster corresponding to each specified value, crossover and mutation operations are performed on the chromosomes corresponding to each specified value to obtain updated chromosomes corresponding to each specified value. The updated chromosomes corresponding to each specified value are used to represent the cluster center points of a set of clusters corresponding to each specified value after the update. Based on the updated chromosomes corresponding to each specified value, the training image data subsets are re-clustered using each specified value as the number of clusters to obtain an updated set of clusters corresponding to each specified value. Based on the updated training image data in each cluster corresponding to each specified value and the fitness of the corresponding cluster, a target value is selected from the set of specified values; The target value is used as the K value for K-means clustering, and the cluster center points of a group of clusters corresponding to the target value are used as the initial cluster center points to perform multiple rounds of clustering operations on the training image dataset; After performing the multi-round clustering operation, based on the hood opening of the training image data contained in each of the multiple target clusters obtained by the last clustering, the hood opening interval corresponding to each target cluster is determined, and the image features of the cluster center point of each target cluster are determined as the image features of the hood opening interval corresponding to each target cluster, thus obtaining the first classification model.
7. The method according to claim 5, characterized in that, The step of inputting the target opening interval label and the target image data into the second classification model to obtain the hood opening result output by the second classification model includes: The target opening interval label and the target image data are input into the first sub-network model of the second classification model to obtain the target high-dimensional features output by the first sub-network model. The first sub-network model is a network model containing a deep residual network for extracting high-dimensional features from the input image data. The target high-dimensional features are input into the second sub-network model of the second classification model to obtain the target low-dimensional features output by the second sub-network model. The second sub-network model is a network model containing an encoder and a decoder for dimensionality reduction of the input high-dimensional features. The target low-dimensional features are input into the target classifier of the second classification model to obtain the hood opening result output by the target classifier, wherein the target classifier is a classifier used to classify the hood opening.
8. A server cover opening detection device, characterized in that, include: The first acquisition unit is used to acquire target sound data, wherein the target sound data is obtained by collecting the sound inside the chassis when a target detection sound is transmitted into the chassis of the server; A conversion unit is used to convert the target sound data into target image data; The detection unit is used to detect the hood opening of the server based on the target image data, and obtain the hood opening result.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 7.
10. 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, it implements the steps of the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Cloud monitoring camera triggering method and system, electronic equipment and storage medium
CN116668641A
Server case intrusion detection device and method
CN116820859A