Data acquisition method and system for distributed equipment and storage medium

Through the timer-triggered data acquisition method, the coordinated work of the main service program and the device agent program is used to realize efficient and automated data acquisition of distributed devices, and solve the problems of high manpower and poor data accuracy in the existing technology.

CN119629230APending Publication Date: 2025-03-14SHANGHAI HENGWEI INTELLIGENT TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411726184.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing data collection methods have high manpower demand, long time consuming and difficult to guarantee data accuracy, and are prone to equipment missed or command execution missed.

Method used

Through the data acquisition method triggered by the timer, the main service program querys device information from the database, groups and creates coroutines, initiates acquisition requests to the device agent, and realizes programmatic collection.

Benefits of technology

It realizes the automation and efficiency of data collection, ensures the integrity and accuracy of data, saves labor costs, and shortens the collection time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629230A_ABST
    Figure CN119629230A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data transmission, and provides a data acquisition method and system for distributed equipment and a storage medium. The data acquisition method comprises the steps that the data acquisition method is triggered through a timer, equipment information of business equipment is inquired from a database through a main service program, and the equipment information is stored in the database; traversing the equipment information through the main service program, grouping the business equipment through the machine frame, creating a coroutine by taking the machine frame as a unit, traversing the equipment information in the machine frame through the main service program in the coroutine, and initiating an acquisition request to a corresponding equipment agent program according to the equipment type of the business equipment; the acquisition request is received through the device agent program, a programmed acquisition process is started, and a programmed acquisition result is obtained, and the programmed acquisition result comprises the index data of the business device. According to the application, the data can be acquired in a programmed and accurate manner, the integrity of data acquisition is ensured, and manual participation in command execution and programmed acquisition is not needed, so that the labor cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data transmission, and in particular to a data acquisition method, system and storage medium for distributed devices. Background Art

[0002] At present, the types of equipment involved in business systems are numerous, totaling more than twenty, and the number of equipment in a single system is huge, reaching hundreds. For different types of equipment, the existing technology is equipped with corresponding agent software to collect indicator data of such equipment.

[0003] However, the existing data collection methods have many shortcomings. Operation and maintenance personnel need to log in remotely and execute commands one by one to obtain status data from each device. This method not only requires high manpower and requires operation and maintenance personnel to have a deep knowledge of business equipment, but is also time-consuming and lengthy. Data collection for the entire system often takes several hours to complete. In addition, due to the manual collection of data from each device, the accuracy of the data is difficult to guarantee, and it is easy to miss devices or miss command execution. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a data collection method, system and storage medium for distributed devices.

[0005] In a first aspect, the present application provides a data collection method for distributed devices, which adopts the following technical solution: A data collection method for distributed equipment, wherein the data collection method comprises: The data collection method is triggered by a timer, and the device information of the service device is queried from a database through a main service program, and the database stores the device information; The device information is traversed by the main service program, the service devices are grouped by machine frames, and a coroutine is created based on the machine frames. In the coroutine, the device information in the machine frames is traversed by the main service program, and a collection request is initiated to a corresponding device agent program according to the device type of the service device; The acquisition request is received through the device agent program, a programmed acquisition process is started, and a programmed acquisition result is obtained, wherein the programmed acquisition result includes the indicator data of the business device.

[0006] Preferably, the data collection method further comprises: Integrate the programmed collection results through the device agent program and return the programmed collection results to the main service program; The programmed collection results are integrated through the main service program.

[0007] Preferably, the programmed acquisition process includes a secure shell protocol programmed acquisition process, in which the device agent program initiates a secure shell protocol remote connection, remotely executes Linux instructions and extracts the programmed acquisition results according to the acquisition request.

[0008] Preferably, the programmed collection process also includes a remote procedure call programmed collection process, in which the device agent program initiates a remote procedure call request and extracts the programmed collection result according to the collection request.

[0009] Preferably, the programmed collection process also includes a simple network management protocol programmed collection process, in which the device agent program initiates a simple network management protocol request and extracts the programmed collection result according to the collection request.

[0010] Preferably, the programmed acquisition process also includes a hypertext transfer protocol programmed acquisition process, in which the device agent program initiates a hypertext transfer protocol request and extracts the programmed acquisition result according to the acquisition request.

[0011] In a second aspect, the present application provides a data acquisition system, which adopts the following technical solution: A data acquisition system, wherein the data acquisition system comprises a main service program module, a device agent program module and a business device connected in sequence, The main service program module is used to traverse the device information of the service device, and group the service devices by the machine frame, and create a coroutine with the machine frame as a unit. In the coroutine, the main service program module is used to traverse the device information in the machine frame, and initiate a collection request to the corresponding device agent program module according to the device type of the service device; The device agent program module is used to receive the collection request, start a programmed collection process, and obtain a programmed collection result, which includes the indicator data of the business device.

[0012] In a third aspect, the present application provides a storage medium, which adopts the following technical solution: A storage medium, wherein the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the data acquisition method as described in any one of the first aspects.

[0013] To sum up, in the data collection method of the present application, each device is equipped with a corresponding collection agent, which can collect data in a programmed and accurate manner, ensuring the integrity and accuracy of data collection, and does not require human participation in executing commands. Programmed collection saves labor costs, and programmed collection allows the entire system collection to be completed within a few minutes, greatly improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 A schematic block diagram of an embodiment of the data collection method of the present application; Figure 2 A flow chart of an embodiment of the data collection method of the present application; Figure 3 A schematic block diagram of an embodiment of a data acquisition system of the present application. DETAILED DESCRIPTION

[0015] The present application is further described below in conjunction with the accompanying drawings, and the structure and principle of the present application are very clear to people in the field. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0016] Figure 1 is a schematic block diagram of an embodiment of the data collection method of the present application, Figure 2 The following is a flow chart of an embodiment of the data collection method of the present application. Figure 1 and Figure 2 It is understood that the data collection method may include: Step S1: The data collection method is triggered by a timer, and the device information of the business device is queried from the database through the main service program, and the database stores the device information. In step S1, the data collection method is triggered by a timer to achieve automation and periodicity of data collection. The main service program queries the device information of the business device from the database to ensure the accuracy and integrity of the data. As the center of data storage, the database provides efficient data retrieval and management capabilities.

[0017] Step S2: Traverse the device information through the main service program, group the business devices through the frame, and create a coroutine based on the frame. In the coroutine, traverse the device information in the frame through the main service program, and initiate a collection request to the corresponding device agent program according to the device type of the business device. In step S2, traverse the device information through the main service program, group the business devices using the frame, and create a coroutine based on the frame. This grouping and coroutine creation method improves the concurrency and efficiency of data collection, allowing multiple devices to collect data at the same time. At the same time, a collection request is initiated to the corresponding device agent program based on the device type of the business device, realizing customized collection and enhancing the flexibility and adaptability of collection.

[0018] Step S3: Receive the collection request through the device agent program, start the programmed collection process, and obtain the programmed collection results, which include the indicator data of the business equipment. It should be noted that the programmed collection process can include the secure shell protocol programmed collection process, the remote procedure call programmed collection process, the simple network management protocol programmed collection process and the hypertext transfer protocol programmed collection process.

[0019] In the Secure Shell Protocol programmatic collection process, the device agent initiates a Secure Shell Protocol remote connection, remotely executes Linux instructions and extracts programmatic collection results according to the collection request. In the Remote Procedure Call programmatic collection process, the device agent initiates a Remote Procedure Call request and extracts programmatic collection results according to the collection request. In the Simple Network Management Protocol programmatic collection process, the device agent initiates a Simple Network Management Protocol request and extracts programmatic collection results according to the collection request. In the Hypertext Transfer Protocol programmatic collection process, the device agent initiates a Hypertext Transfer Protocol request and extracts programmatic collection results according to the collection request.

[0020] Secure Shell Protocol programmatic collection process, Remote Procedure Call programmatic collection process, Simple Network Management Protocol programmatic collection process and Hypertext Transfer Protocol programmatic collection process. These four collection methods cover the current mainstream data collection protocols and technologies, ensuring the extensiveness and compatibility of data collection. Each collection method extracts programmatic collection results based on the collection request, achieving accuracy and efficiency in collection.

[0021] In step S3, the process of starting the programmed collection process and obtaining the programmed collection results after the device agent receives the collection request is described. The programmed collection process covers multiple collection methods such as the secure shell protocol, remote procedure call, simple network management protocol and hypertext transfer protocol, ensuring the extensiveness and compatibility of data collection. Each collection method extracts the programmed collection results according to the collection request, achieving the accuracy and efficiency of the collection.

[0022] Step S4: Integrate the programmed collection results through the device agent program, and return the programmed collection results to the main service program, and integrate the programmed collection results through the main service program. In step S4, the programmed collection results are integrated through the device agent program, and the results are returned to the main service program for reintegration. This ensures the integrity and consistency of the collected data and avoids data omissions or errors. The accuracy and reliability of the data are improved through the initial integration of the device agent program and the reintegration of the main service program. At the same time, this integration method also reduces the workload of subsequent data processing and improves the overall performance of the system.

[0023] This application also proposes a data acquisition system. Figure 3 This is a schematic block diagram of an embodiment of the data acquisition system of the present application. Figure 3 It can be understood that the data acquisition system may include a main service program module, a device agent program module and business equipment connected in sequential communication. The main service program module is used to traverse the device information of the business equipment, group the business equipment by the machine frame, and create a coroutine based on the machine frame. In the coroutine, the main service program module is used to traverse the device information in the machine frame, and initiate a collection request to the corresponding device agent program module according to the device type of the business equipment; the device agent program module is used to receive the collection request, and start the programmed collection process to obtain the programmed collection results, and the programmed collection results include the indicator data of the business equipment.

[0024] The present application also proposes a storage medium, which stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the aforementioned data acquisition method.

[0025] Among them, the readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates the transmission of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer. For example, a readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application-specific integrated circuit (Application Specific Integrated Circuits, abbreviated as: ASIC). In addition, the ASIC can be located in a user device. Of course, the processor and the readable storage medium can also exist in a communication device as discrete components. The readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0026] In summary, the present application provides an efficient, accurate, flexible and reliable data collection method. The method realizes the automation and programming of data collection through steps such as timer triggering, database query, frame grouping, coroutine creation and customized collection. The present application stores the equipment information of the business system in the database. The main service program initiates a request to the equipment collection agent corresponding to the equipment by periodically polling the equipment data in the database. The equipment collection agent program collects the index data according to the pre-determined programmed steps and returns it to the main service program in a specific format. The main service program integrates the data and finally outputs the data in JSON format. The method also provides a variety of collection methods and system structures to meet the needs of different devices and scenarios. The form of storage medium further enhances the dissemination and application of the data collection method. Therefore, the present application has significant technical advantages and application value in the field of data collection of distributed devices.

Claims

1. A data collection method for distributed equipment, characterized in that: The data collection method comprises: The data collection method is triggered by a timer, and the device information of the service device is queried from a database through a main service program, and the database stores the device information; The device information is traversed by the main service program, the service devices are grouped by machine frames, and a coroutine is created based on the machine frames. In the coroutine, the device information in the machine frames is traversed by the main service program, and a collection request is initiated to a corresponding device agent program according to the device type of the service device; The acquisition request is received through the device agent program, a programmed acquisition process is started, and a programmed acquisition result is obtained, wherein the programmed acquisition result includes the indicator data of the business device.

2. The data collection method according to claim 1, characterized in that: The data collection method further comprises: Integrate the programmed collection results through the device agent program and return the programmed collection results to the main service program; The programmed collection results are integrated through the main service program.

3. The data collection method according to claim 2, characterized in that: The programmed acquisition process includes a secure shell protocol programmed acquisition process. In the secure shell protocol programmed acquisition process, the device agent program initiates a secure shell protocol remote connection, remotely executes Linux instructions and extracts the programmed acquisition result according to the acquisition request.

4. The data collection method according to claim 2, characterized in that: The programmed collection process also includes a remote procedure call programmed collection process. In the remote procedure call programmed collection process, the device agent program initiates a remote procedure call request and extracts the programmed collection result according to the collection request.

5. The data collection method according to claim 2, characterized in that: The programmed collection process also includes a simple network management protocol programmed collection process. In the simple network management protocol programmed collection process, the device agent program initiates a simple network management protocol request and extracts the programmed collection result according to the collection request.

6. The data collection method according to claim 2, characterized in that: The programmed collection process also includes a hypertext transfer protocol programmed collection process. In the hypertext transfer protocol programmed collection process, the device agent program initiates a hypertext transfer protocol request and extracts the programmed collection result according to the collection request.

7. A data acquisition system, characterized in that: The data acquisition system includes a main service program module, a device agent program module and a business device connected in sequence. The main service program module is used to traverse the device information of the service device, and group the service devices by the machine frame, and create a coroutine with the machine frame as a unit. In the coroutine, the main service program module is used to traverse the device information in the machine frame, and initiate a collection request to the corresponding device agent program module according to the device type of the service device; The device agent program module is used to receive the collection request, start a programmed collection process, and obtain a programmed collection result, which includes the indicator data of the business device.

8. A storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the data acquisition method as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Equipment working condition acquisition method and system, computer equipment and computer program product

    CN121367706A