Method and device for collecting multi-thread moving ring data of cloud computing center
By adopting a multi-threaded dynamic loop data acquisition method in the cloud computing center, using timing tasks, thread pools and Modbus protocols to efficiently collect and parse data from the power environment equipment, the problem of low data acquisition efficiency in the existing technology is solved, and efficient collection and storage of power environment equipment data is realized, and the stability and security of the computing center are improved.
Patent Information
- Application Number
- CN202311675851.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-07
- Publication Date
- 2025-06-10
AI Technical Summary
It is difficult for the existing technology to efficiently collect and store a large amount of measurement point data, which makes it difficult for operation and maintenance managers to understand the operation and key data of the power environment equipment in a timely manner, affecting the stable and safe operation of the computing center.
The cloud computing center multi-threaded dynamic loop data acquisition method is adopted to asynchronously sample the device by creating timing tasks, data acquisition and analysis is used using thread pools and Modbus protocols, and data is stored in a timing database.
It realizes efficient collection and storage of power environment equipment operation data, allowing operation and maintenance management personnel to timely understand the equipment operation status, and improves the stability and safety of the computing center.
Smart Images

Figure CN120128823A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and more particularly, to a multi-threaded dynamic environment data acquisition method and device for a cloud computing center for calculating operation data of power environment equipment in a data center. Background Art
[0002] With the rapid development of social informatization and the increasing expansion of communication networks, the number of computers in computer rooms has reached the million level. The traditional manual computer room maintenance mode can no longer meet the growing computer maintenance volume and the requirements of computer room management. As an information center, the computer room needs to ensure the stable operation of the environment. It should maintain constant temperature and humidity, switch to the backup power supply in case of power failure, and give timely alarms in case of water leakage or fire. The stable and good environmental state of the computer room is the basic guarantee for the operation of computer room equipment. Scientific and effective computer room management can not only reduce the burden on maintenance personnel, but also improve the reliability of system operation.
[0003] For computer rooms, considering the safety of the operation of computer room equipment and the scientific nature of management, it is necessary to centrally manage the operation conditions of scattered equipment in the computer room through modern IT technology, and conduct centralized monitoring or control on systems such as UPS, precision air conditioners, power distribution cabinets, temperature and humidity points, water leakage detection, hydrogen detection points, fire protection, access control, and video security monitoring in the computer room. Corresponding data acquisition devices are configured in the computer room as on-site management servers to collect and process the monitoring data of the computer room. The power equipment in the computer room mainly includes power distribution cabinets, intelligent electric meters, uninterruptible power supplies (UPS), battery packs, and busbars. The environmental equipment mainly includes precision air conditioners, row-by-row air conditioners, temperature and humidity sensors, water immersion alarms, and smoke alarms. Operation and maintenance personnel usually need to constantly pay attention to the key operation status data of these devices to judge faults and handle them in a timely manner, or aggregate the operation data for statistical analysis.
[0004] In the prior art, for a large amount of measured point data, it is usually impossible to perform efficient acquisition and storage, so that operation and maintenance management personnel cannot timely understand the operation conditions and key data of all power environment equipment, making it difficult to ensure the stable and safe operation of the data center. Summary of the Invention
[0005] In view of this, the present invention discloses a multi-threaded dynamic environment data acquisition method and device for a cloud computing center, which realizes the efficient acquisition of operation data of power environment equipment, enables operation and maintenance management personnel to timely understand the operation conditions and key data of all power environment equipment, and provides a safety guarantee for the stable operation of the data center.
[0006] According to one aspect of the present invention, a multi-threaded dynamic environment data acquisition method for a cloud computing center is proposed. The method includes:
[0007] Step 1: Create a scheduled task according to the requirements, asynchronously sample various devices at regular intervals, and obtain various configuration information of the serial port converter device;
[0008] Step 2: Group according to the IP address and port of the serial port converter to obtain grouping information;
[0009] Step 3: Build a thread pool, initialize it according to the grouping information, and enter the thread execution process;
[0010] Step 4: Collect device monitoring data on the port according to the independent running status of each thread and store it in the database.
[0011] In some embodiments, before the step 1, it further includes: classifying the power system and environmental system devices in the computer center room, further subdividing each category according to the brand and model, forming templates respectively, and storing them in the database for management.
[0012] In some embodiments, in the step 3, the thread execution process specifically includes creating, applying, and recycling threads.
[0013] In some embodiments, in the step 4, connect to each device through the Modbus protocol, obtain the protocol template information for communication, obtain the monitoring data, and perform data parsing according to the Modbus protocol and the corresponding template information.
[0014] In some embodiments, in the step 4, while batch storing the data, implement the data storage strategy and data aggregation strategy according to the requirements.
[0015] In some embodiments, step 4 specifically includes the following steps:
[0016] Step 4.1: Initialize according to the serial port information of the current thread and create an available connection to the port;
[0017] Step 4.2: Obtain the device code, function code, and type template connected to the port, and splice the command;
[0018] Step 4.3: Send the command and perform verification;
[0019] Step 4.4: Receive the returned data and parse it according to the data in the template;
[0020] Step 4.5: Store the data in the time series database for display and aggregation.
[0021] In some embodiments, the data in the template in the step 4.4 specifically includes data type, register address, and data quantity information.
[0022] According to one aspect of the present invention, there is also provided a multi-threaded dynamic environment data acquisition device for a cloud computing center, the device comprising:
[0023] A device management module for classifying the power systems and environmental system devices in the computer center computer room, further subdividing each category according to brand and model, each forming a template and storing it in the library for management;
[0024] A timed task module for creating timed tasks according to requirements and performing timed asynchronous sampling on various devices;
[0025] A thread management module for constructing a thread resource pool and creating, applying, and recycling threads;
[0026] A protocol communication module for connecting to various devices through the Modbus protocol, obtaining protocol template information for communication, acquiring monitoring data, and performing data parsing;
[0027] A data storage module for batch storing the successfully parsed data.
[0028] According to another aspect of the present invention, there is also provided an electronic device, the electronic device comprising:
[0029] A memory storing executable instructions;
[0030] A processor, the processor running the executable instructions in the memory to implement the method described above.
[0031] According to another aspect of the present invention, there is also provided a computer-readable storage medium storing a computer program, which when executed by a processor implements the method described above.
[0032] The technical solution has at least the following advantages:
[0033] The multi-threaded dynamic environment data acquisition method and device of the present invention utilize standard serial port devices and the Modbus protocol to network devices such as busbars and distribution cabinets, write code to read the configuration information and device category template information of the devices, create multi-threaded device communication connections according to the configuration, and parse the received data. It realizes the efficient acquisition and storage of a large amount of measurement point data, can be uniformly displayed according to the points of interest, or perform data aggregation analysis according to requirements. It realizes the efficient acquisition of the operation data of the power environment devices, enabling the operation and maintenance management personnel to timely understand the operation conditions and key data of all power environment devices, providing a security guarantee for the stable operation of the computer center.
[0034] The method and apparatus of the present invention have other characteristics and advantages, which will be apparent in the accompanying drawings incorporated herein and the subsequent detailed description, or will be described in detail in the accompanying drawings incorporated herein and the subsequent detailed description, and these accompanying drawings and detailed description are jointly used to explain the specific principles of the present invention. Description of the Drawings
[0035] By describing the exemplary embodiments of the present invention in more detail in conjunction with the accompanying drawings, the above and other objects, features, and advantages of the present invention will become more apparent, wherein in the exemplary embodiments of the present invention, the same reference numerals generally represent the same components.
[0036] Figure 1 The flowchart of a multi-threaded dynamic loop data acquisition method for a cloud computing center according to an embodiment of the present invention is shown.
[0037] Figure 2 The composition diagram of a multi-threaded dynamic loop data acquisition device for a cloud computing center according to an embodiment of the present invention is shown;
[0038] Figure 3 The schematic diagram of the busbar template information in a power device according to an embodiment of the present invention is shown;
[0039] Figure 4 The schematic diagram of the key data display of the busbar start box in a power device according to an embodiment of the present invention is shown;
[0040] Figure 5 The schematic diagram of the key data display of the busbar plug-in box in a power device according to an embodiment of the present invention is shown. Detailed Description of the Embodiments
[0041] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0042] The present invention provides a multi-threaded dynamic loop data acquisition method for a cloud computing center, and the method includes:
[0043] Step 1, creating a timing task according to requirements, performing timed asynchronous sampling on various devices, and obtaining various configuration information of the serial port converter device;
[0044] Step 2, grouping according to the IP address and port of the serial port converter to obtain grouping information;
[0045] Step 3: Construct a thread pool, initialize it according to the grouping information, and enter the thread execution process;
[0046] Step 4: Collect device monitoring data on the port according to the independent running status of each thread and store it in the database.
[0047] In some embodiments, before the step 1, it further includes: classifying the power system and environmental system devices in the computing center computer room, further subdividing each category according to the brand and model, forming respective templates, and storing them in the database for management.
[0048] In some embodiments, in the step 3, the thread execution process specifically includes creating, applying, and recycling threads.
[0049] In some embodiments, in the step 4, connect to each device through the Modbus protocol, obtain the protocol template information for communication, acquire the monitoring data, and perform data parsing according to the Modbus protocol and the corresponding template information.
[0050] In some embodiments, in the step 4, while batch storing the data, implement the data storage strategy and data aggregation strategy according to the requirements.
[0051] In some embodiments, step 4 specifically includes the following steps:
[0052] Step 4.1: Initialize according to the serial port information of the current thread and create an available connection to the port;
[0053] Step 4.2: Obtain the device code, function code, and type template connected to the port, and splice the command;
[0054] Step 4.3: Send the command and perform verification;
[0055] Step 4.4: Receive the returned data and parse it according to the data in the template;
[0056] Step 4.5: Store the data in the time series database for display and aggregation.
[0057] In some embodiments, the data in the template in step 4.4 specifically includes data type, register address, and data quantity information.
[0058] The present invention also proposes a multi-threaded dynamic environment data acquisition device for a cloud computing center, and the device includes:
[0059] A device management module, used to classify the power system and environmental system devices in the computing center computer room, further subdivide each category according to the brand and model, form respective templates, and store them in the database for management;
[0060] A timing task module, used to create timing tasks according to requirements and perform timing asynchronous sampling on various devices;
[0061] A thread management module, used to build a thread resource pool and create, apply, and recycle threads;
[0062] A protocol communication module, used to connect various devices through the Modbus protocol, obtain protocol template information for communication, acquire monitoring data, and perform data parsing;
[0063] A data storage module, used to batch store the successfully parsed data.
[0064] The present invention also proposes an electronic device, which includes:
[0065] A memory, storing executable instructions;
[0066] A processor, which runs the executable instructions in the memory to implement the method described above.
[0067] The present invention also proposes a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements the method described above.
[0068] Example 1
[0069] Figure 1 The flowchart of the multi-threaded dynamic environment data acquisition method for a cloud computing center according to an embodiment of the present invention is shown. As Figure 1 shown, the method includes Step 1 to Step 4.
[0070] Step 1, create a timing task according to requirements, perform timing asynchronous sampling on various devices, and obtain various configuration information of the serial port converter device. Among them, enter the timing execution process through a timer, and obtain device configuration information by interacting with the device management module;
[0071] Step 2, group according to the IP address and port of the serial port converter to obtain grouping information;
[0072] Step 3, build a thread pool, initialize according to the grouping information, and enter the thread execution process;
[0073] Step 4, according to the independent running status of each thread, collect device monitoring data on the port and perform data storage in the database.
[0074] In some embodiments, before step 1, it further includes: classifying the power systems and environmental system devices in the computer center machine room, further subdividing each category according to the brand and model, forming templates respectively, and storing them in the library for management. Connect various devices in the computer center machine room to the serial port converter through the 485 interface. One port can connect multiple devices of the same template, and manage the IP addresses, port information, etc. of the serial port devices.
[0075] In some embodiments, in step 3, the thread execution process specifically includes creating, applying, and recycling the thread.
[0076] In some embodiments, in step 4, connect to each device through the Modbus protocol, obtain the protocol template information for communication, acquire the monitoring data, and perform data parsing according to the Modbus protocol and the corresponding template information. Among them, the Modbus protocol was invented by Modicon in 1979 and is the world's first truly industrial field bus protocol. MODBUS is an application layer message transfer protocol on the 7th layer of the OSI model. It provides client / server communication between devices connected to different types of buses or networks. The MODBUS protocol allows for simple communication within various network architectures, and each device (PLC, HMI, control panel, driver, motion control, input / output device) can use the MODBUS protocol to initiate remote operations. The Modbus protocol defines a simple protocol data unit (PDU) that is independent of the underlying communication layer. The Modbus protocol mapping on a specific bus or network can introduce some additional fields on the application data unit (ADU). The Modbus protocol establishes the request format initiated by the client. The function code field of the Modbus data unit is encoded with one byte. The valid code word range is decimal 1 - 255 (128 - 255 is reserved for exception responses). When sending a message from the client to the server device, the function code field notifies the server which operation to perform. Sub-function codes are added to some function codes to define multiple operations.
[0077] In some embodiments, in step 4, while performing batch data storage into the database, implement the data saving strategy and data aggregation strategy according to requirements.
[0078] In some embodiments, step 4 specifically includes the following steps:
[0079] Step 4.1, initialize according to the serial port information of the current thread and create an available connection to the port;
[0080] Step 4.2, obtain the device code, function code, and type template connected to the port, and splice the data request command;
[0081] Step 4.3: Send a data request command and perform CRC check. Cyclic Redundancy Check (CRC) is a channel coding technique that generates a short fixed-length check code based on data such as network data packets or computer files. It is mainly used to detect or verify errors that may occur after data transmission or storage. It uses the principle of division and remainder to detect errors. CRC check has a fast calculation speed, strong error detection ability, and is easy to implement with hardware circuits such as encoders. In terms of the accuracy, speed, and cost of error detection, it has advantages over other check methods such as parity check. Therefore, CRC has become the most common check method in the field of computer information communication. Common applications include Ethernet / USB communication, compression / decompression, video coding, image storage, disk read / write, etc.
[0082] Step 4.4: Receive the returned data and parse it according to the data type, register address, quantity, etc. in the template.
[0083] Step 4.5: Store the data in the time series database InfluxDB for display and aggregation. InfluxDB is an open-source time series database developed by InfluxData, focusing on high-performance reading, high-performance writing, efficient storage, and real-time analysis of massive time series data. InfluxDB is easy to deploy and use. In terms of technical implementation, it makes full use of the characteristics of the Go language and can be independently deployed without any external dependencies. It provides a query language similar to SQL, with a friendly interface and easy to use. It has rich aggregation operations and sampling capabilities, provides a flexible data retention policy (Retention Policy) to set the retention time and number of copies of data, deletes expired data in a timely manner while ensuring data reliability, releases storage space, and provides flexible continuous queries (Continues Query) to implement sampling of massive data. It supports a variety of protocols. In addition to native protocols such as HTTP and UDP, it is also compatible with communication protocols of components such as CollectD, Graphite, OpenTSDB, and Prometheus.
[0084] The multi-threaded dynamic environment data acquisition method for the cloud computing center of the present invention initializes according to the serial port information of the current thread, creates an available connection to the port, uses serial port devices to form a network, writes code to implement multi-threaded device communication and data parsing based on the Modbus protocol, and collects and stores the data in the database to provide key operation and maintenance data display or perform data aggregation analysis according to requirements. It realizes the efficient acquisition of the operation data of power environment devices, enabling operation and maintenance management personnel to timely understand the operation status and key data of all power environment devices, providing a security guarantee for the stable operation of the computing center.
[0085] Example 2
[0086] According to an embodiment of the present invention, a multi-threaded dynamic environment data acquisition device for a cloud computing center is provided. The device includes:
[0087] A device management module for classifying the power system and environmental system devices in the computer center computer room. Each category is further subdivided according to the brand and model, and respective templates are formed and stored in the database for management; the devices are connected to a serial port converter through a 485 interface, and multiple devices of the same template can be connected to one port. Manage the IP address, port information, etc. of the serial port devices.
[0088] A timing task module for creating timing tasks according to requirements and performing timed asynchronous sampling on various devices; the timing task module interacts with the device management module to read various configuration information of the serial port converter.
[0089] A thread management module for constructing a thread resource pool and creating, applying, and recycling threads;
[0090] A protocol communication module for connecting to various devices through the Modbus protocol, obtaining protocol template information for communication, acquiring monitoring data, and performing data parsing;
[0091] A data storage module for batch storing the successfully parsed data and implementing data saving strategies and aggregation strategies according to requirements.
[0092] In some embodiments, the thread management module initializes according to the serial port information of the current thread, creates available connections to the port, obtains the device code, function code, and type template connected to the port through the protocol communication module, splices commands, sends commands and performs verification. The data storage module receives the returned data, parses the data according to the data type, register address, quantity, etc. in the template, and stores the data in the time series database for display and aggregation.
[0093] The multi-threaded dynamic environment data acquisition device of the present invention realizes the efficient acquisition of the operation data of the power environment devices, enabling the operation and maintenance management personnel to timely understand the operation conditions and key data of all power environment devices, providing a security guarantee for the stable operation of the computer center.
[0094] Example 3
[0095] According to another aspect of the present invention, an electronic device is also provided. The electronic device includes:
[0096] A memory storing executable instructions:
[0097] A processor that runs the executable instructions in the memory to implement the multi-threaded dynamic loop data acquisition method for a cloud computing center according to the present invention.
[0098] The method includes the following steps:
[0099] Step 1: Create a timed task according to requirements, perform timed asynchronous sampling on various devices, and obtain various configuration information of the serial port converter device.
[0100] Step 2: Group according to the IP address and port of the serial port converter to obtain grouping information.
[0101] Step 3: Build a thread pool, initialize it according to the grouping information, and enter the thread execution process.
[0102] Step 4: According to the independent running status of each thread, collect the device monitoring data on the port and store it in the database.
[0103] In some embodiments, before step 1, it further includes: classifying the power system and environmental system devices in the computer center computer room, further subdividing each category according to brand and model, forming templates respectively, and storing them in the database for management.
[0104] In some embodiments, in step 3, the thread execution process specifically includes creating, applying, and recycling the threads.
[0105] In some embodiments, in step 4, connect to each device through the Modbus protocol, obtain the protocol template information for communication, obtain the monitoring data, and perform data parsing according to the Modbus protocol and the corresponding template information.
[0106] In some embodiments, in step 4, while performing batch data storage in the database, implement the data storage strategy and data aggregation strategy according to requirements.
[0107] In some embodiments, step 4 specifically includes the following steps:
[0108] Step 4.1: Initialize according to the serial port information of the current thread and create an available connection to the port.
[0109] Step 4.2: Obtain the device code, function code, and type template connected to the port, and splice the command.
[0110] Step 4.3: Send the command and perform verification.
[0111] Step 4.4: Receive the returned data and parse it according to the data in the template.
[0112] Step 4.5: Store the data in the time series database for display and aggregation.
[0113] In some embodiments, the data in the template of step 4.4 specifically includes data type, register address, and data quantity information.
[0114] Example 4
[0115] According to another aspect of the present invention, there is also provided a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the multi-threaded dynamic loop data acquisition method for a cloud computing center according to the present invention.
[0116] The method includes the following steps:
[0117] Step 1, create a timing task according to requirements, perform timed asynchronous sampling on various devices, and obtain various configuration information of the serial port converter device;
[0118] Step 2, group according to the IP address and port of the serial port converter to obtain grouping information;
[0119] Step 3, construct a thread pool, initialize according to the grouping information, and enter the thread execution process;
[0120] Step 4, collect device monitoring data on the port according to the independent running status of each thread and store it in the database.
[0121] In some embodiments, before step 1, it further includes: classifying the power system and environmental system devices in the computer center computer room, further subdividing each category according to brand and model, forming respective templates, and storing them in the database for management.
[0122] In some embodiments, in step 3, the thread execution process specifically includes creating, applying, and recycling threads.
[0123] In some embodiments, in step 4, connect to each device through the Modbus protocol, obtain protocol template information for communication, acquire monitoring data, and perform data parsing according to the Modbus protocol and the corresponding template information.
[0124] In some embodiments, in step 4, while batch storing the data, implement data saving policies and data aggregation policies according to requirements.
[0125] In some embodiments, step 4 specifically includes the following steps:
[0126] Step 4.1, initialize according to the serial port information of the current thread, and create an available connection to the port;
[0127] Step 4.2, obtain the device code, function code, and type template connected to the port, and splice the command;
[0128] Step 4.3, send the command and perform verification;
[0129] Step 4.4, receive the returned data and parse it according to the data in the template;
[0130] Step 4.5, store the data in the time series database for display and aggregation.
[0131] In some embodiments, the data in the template of step 4.4 specifically includes data type, register address, and data quantity information.
[0132] Example 5
[0133] To verify the effect of the multi-threaded dynamic environment data acquisition scheme for cloud computing centers according to the present invention, this embodiment selects the data of the busbar information acquisition in a certain power equipment for verification.
[0134] Figure 4 and Figure 5 respectively show the schematic diagrams of the key data display of the busbar start box and the busbar plug-in box in the power equipment according to an embodiment of the present invention. For power distribution monitoring, the monitoring content includes: for the important power distribution switches in the computer room, monitoring whether the switches trip or lose power, etc., and performing real-time monitoring on the power distribution switches on the mains input cabinet, installing a power meter to monitor the voltage, current, frequency, power and other parameters of the mains incoming line. The working mode usually uses a dedicated signal processing module with complete optoelectronic isolation to process the input high-voltage signal and convert it into a low-level signal, and then input it into the intelligent switch quantity acquisition module to convert it into data information and send it to the on-site management server to achieve the monitoring of the switch state. The monitoring of parameters such as voltage, current, and frequency of the power distribution cabinet mainly uses a three-phase power meter, and the RS485 signal of the power meter is used to transmit to the multi-device driver board and connected to the centralized management server to achieve real-time voltage and current monitoring.
[0135] The detection of important switches can display the status of important power distribution switches in the computer room in real time in the system. Once the switch trips or loses power, it can alarm in time, alarm according to the pre-established alarm strategy, display the abnormal switch on the interface, and can achieve the function of automatic alarm screen switching.
[0136] Figure 4 、 Figure 5The busbar monitoring data collected by using this method includes the data of the starting box and each plug-in box. Taking a serial port as an example, the number of samples is 1,632. The data displayed on the page are the main data of concern, including three-phase voltage, three-phase line voltage, three-phase current, three-phase power factor, three-phase active power, combined-phase active power, combined-phase reactive power, combined-phase apparent power, combined-phase output active power, as well as main digital inputs and alarm signals, etc. The dynamic environment data acquisition solution of the present invention can achieve the efficient acquisition and storage of a large amount of measurement point data, which can be uniformly displayed according to the points of interest or data analysis can be performed according to requirements.
[0137] This example fully demonstrates initializing according to the serial port information of the current thread, creating an available connection to the port, networking using the serial port device, writing code to implement multi-threaded device communication and data parsing based on the Modbus protocol, collecting and storing the data in the database, providing the display of key operation and maintenance data, and achieving the efficient acquisition and storage of a large amount of measurement point data.
[0138] The multi-threaded dynamic environment data acquisition solution of the cloud computing center of the present invention can use standard serial port devices and the Modbus protocol to network devices such as busbars and distribution cabinets, write code to read the configuration information of the devices and the device category template information, create multi-threaded device communication connections according to the configuration, and parse the received data. It can achieve the efficient acquisition and storage of a large amount of measurement point data, which can be uniformly displayed according to the points of interest or data analysis can be performed according to requirements. This enables operation and maintenance management personnel to timely understand the operating conditions and key data of all power environment devices, providing a security guarantee for the stable operation of the computing center.
[0139] For other detailed descriptions of this exemplary embodiment, reference may be made to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0140] The embodiments of the present invention have been described above. The above description is exemplary and not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations are obvious to those of ordinary skill in the art in the technical field without departing from the scope and spirit of the described embodiments. The selection of the terms used herein is intended to best explain the principles of the embodiments, the practical application or the technical improvement of the technology in the market, or to enable other ordinary technical personnel in the technical field to understand the embodiments disclosed herein.
Claims
1. A multi-threaded dynamic environment data acquisition method for a cloud computing center, characterized in that, the method includes: Step 1, create a timing task according to requirements, perform timed asynchronous sampling on various devices, and obtain various configuration information of the serial converter device; Step 2, group according to the IP address and port of the serial converter to obtain grouping information; Step 3, construct a thread pool, initialize according to the grouping information, and enter the thread execution process; Step 4, collect the device monitoring data on the port according to the independent running status of each thread and store it in the database.
2. The multi-threaded dynamic environment data acquisition method for a cloud computing center according to claim 1, characterized in that, before the step 1, it further includes: classifying the power system and environmental system devices in the computer center computer room, further subdividing each category according to brand and model, forming respective templates, and storing them in the database for management.
3. The multi-threaded dynamic environment data acquisition method for a cloud computing center according to claim 1, characterized in that, in the step 3, the thread execution process specifically includes creating, applying, and recycling the thread.
4. The multi-threaded dynamic environment data acquisition method for a cloud computing center according to claim 1, characterized in that, in the step 4, connect to each device through the Modbus protocol, obtain the protocol template information for communication, obtain the monitoring data, and perform data parsing according to the Modbus protocol and the corresponding template information.
5. The multi-threaded dynamic environment data acquisition method for a cloud computing center according to claim 1, characterized in that, in the step 4, while performing batch storage of data, implement data storage strategies and data aggregation strategies according to requirements.
6. The multi-threaded dynamic environment data acquisition method for a cloud computing center according to claim 1, characterized in that, step 4 specifically includes the following steps: Step 4.1, initialize according to the serial port information of the current thread, and create an available connection to the port; Step 4.2, obtain the device code, function code, and type template connected to the port, and splice the command; Step 4.3, send the command and perform verification; Step 4.4, receive the returned data and parse it according to the data in the template; Step 4.5, store the data in the time series database for display and aggregation.
7. The multi-threaded dynamic environment data acquisition method for a cloud computing center according to claim 6, characterized in that, the data in the template in the step 4.4 specifically includes data type, register address, and data quantity information.
8. A multi-threaded dynamic environment data acquisition device for a cloud computing center, characterized in that, it includes: A device management module for classifying the power system and environmental system devices in the computer center computer room, further subdividing each category according to brand and model, forming respective templates, and storing them in the database for management; A timing task module for creating a timing task according to requirements and performing timed asynchronous sampling on various devices; A thread management module for constructing a thread resource pool and creating, applying, and recycling threads; A protocol communication module, which is used to connect various devices through the Modbus protocol, obtain protocol template information for communication, acquire monitoring data and perform data parsing; A data storage module, which is used to batch store the successfully parsed data.
9. An electronic device, characterized in that, the electronic device includes: a memory storing executable instructions; a processor, and the processor runs the executable instructions in the memory to implement the method according to any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1-7 is implemented.