A data acquisition method, system, device, electronic device and storage medium

By mapping multiple virtual serial ports between the power acquisition terminal and the carrier module and configuring the virtual serial ports and processes corresponding to different types of sensors, the business impact problem caused by the power acquisition terminal's access to multiple sensors is solved, and the stable development of multiple services is achieved.

CN116321041BActive Publication Date: 2025-07-29ZHEJIANG CHINT INSTR & METER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310128727.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-01
Publication Date
2025-07-29
Estimated Expiration
2043-02-01

AI Technical Summary

Technical Problem

When existing power acquisition terminals are connected to multiple sensors, the main power data acquisition services are affected and the acquisition rate is reduced.

Method used

By mapping multiple virtual serial ports between the power acquisition terminal and the carrier module, configuring the virtual serial ports and processes corresponding to different types of sensors, sensor identity confirmation and data acquisition are realized, and communication is performed using the USB interface.

Benefits of technology

Without affecting the acquisition of main power data, it can support the development of multiple services at the same time, improving the stability and scalability of the power acquisition terminal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116321041B_ABST
    Figure CN116321041B_ABST
Patent Text Reader

Abstract

The present invention discloses a data acquisition method, system, device, electronic device and storage medium. The method includes: when a virtual serial port for sensor identity confirmation receives sensor attribute data uploaded by a carrier module, determining the type of the sensor for the data to be uploaded according to the sensor attribute data; based on the remaining virtual serial ports among the mapped multiple virtual serial ports, configuring one virtual serial port and the process corresponding to the virtual serial port for each type of sensor; sending a communication request to the carrier module so that the carrier module performs sensor data acquisition and transmission based on the communication request; when receiving data uploaded by any one of the virtual serial ports, performing data acquisition based on the process corresponding to the virtual serial port. The present invention can support the development of multiple services simultaneously without affecting the acquisition of main service data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data acquisition, and particularly relates to a data acquisition method, system, device, electronic device and storage medium. Background Art

[0002] With the proposal of the concept of building a ubiquitous power Internet of Things, in addition to the traditional business of collecting power data, power collection terminals also need to monitor environmental data such as distribution rooms and transformers, etc., so that more and more sensors need to be connected to the power collection terminals; however, the existing power collection terminal body and the carrier module communicate through a single serial port channel, and at the same time, the power collection terminal body runs with a single process. The access of sensors not only requires expanding the acquisition communication protocol in the power collection terminal, but also involves multiple changes to the main process software of the power collection terminal, resulting in the impact on the main power data collection service of the power collection terminal and the decline of the collection rate. Therefore, it is urgent to propose a new data acquisition method that can support the development of multiple services without affecting the collection of main service data. Summary of the Invention

[0003] Therefore, the technical problem to be solved by the present invention is to overcome the defect that the data acquisition method of the existing power collection terminal affects the main collection service, so as to provide a data acquisition method, system, device, electronic device and storage medium.

[0004] According to a first aspect, an embodiment of the present invention discloses a data acquisition method, which is applied to a power collection terminal integrated with multiple processes. The power collection terminal is communicatively connected to a carrier module through a USB interface and maps out multiple virtual serial ports. The carrier module is integrated with a communication module for communicating with external sensors. At least one of the multiple virtual serial ports is used for performing sensor identity confirmation with the carrier module, and at least one is used for receiving power data uploaded by the carrier module; the method includes: when the virtual serial port for performing sensor identity confirmation receives sensor attribute data uploaded by the carrier module, determining the type of the sensor to upload data according to the sensor attribute; based on the remaining virtual serial ports among the mapped multiple virtual serial ports, configuring one virtual serial port and the process corresponding to the virtual serial port for each type of sensor, where the remaining virtual serial ports are the remaining virtual serial ports except for the virtual serial port used for performing sensor identity confirmation with the carrier module and the virtual serial port for receiving power data uploaded by the carrier module; sending a communication request to the carrier module, so that the carrier module performs sensor data acquisition and transmission based on the communication request; when receiving data uploaded by any virtual serial port, performing data acquisition based on the process corresponding to the virtual serial port.

[0005] Optionally, the carrier module is connected to an external sensor through a wireless communication module.

[0006] Optionally, different virtual serial ports correspond to different processes.

[0007] Optionally, the method further includes: when receiving sensor data uploaded by any virtual serial port, using the corresponding process to collect and record the sensor data; summarizing the sensor data recorded by each process.

[0008] Optionally, a USB2.0 interface is used for communication between the power collection terminal and the carrier module.

[0009] According to a second aspect, an embodiment of the present invention further discloses a data collection system, including: a carrier module for accessing external sensor data; a power collection terminal communicating with the carrier module through a USB interface and configured to execute the data collection method according to the first aspect or any optional implementation manner of the first aspect.

[0010] According to a third aspect, an embodiment of the present invention further discloses a data collection device applied to a power collection terminal integrated with multiple processes. The power collection terminal communicates with a carrier module through a USB interface and maps out multiple virtual serial ports. The carrier module is integrated with a communication module for communicating with an external sensor. At least one of the multiple virtual serial ports is used for performing sensor identity confirmation with the carrier module, and at least one is used for receiving power data uploaded by the carrier module. The device includes: a sensor type confirmation module for determining the type of the sensor to upload data according to the sensor attribute when the virtual serial port for performing sensor identity confirmation receives sensor attribute data uploaded by the carrier module; a virtual serial port configuration module for configuring one virtual serial port and the process corresponding to the virtual serial port for each type of sensor based on the remaining virtual serial ports among the mapped multiple virtual serial ports, where the remaining virtual serial ports are the remaining virtual serial ports except those used for performing sensor identity confirmation with the carrier module and receiving power data uploaded by the carrier module; a data transmission module for sending a communication request to the carrier module to enable the carrier module to collect and transmit sensor data based on the communication request; a data collection module for performing data collection based on the process corresponding to the virtual serial port when receiving data uploaded by any virtual serial port.

[0011] Optionally, the device further includes: a data collection and recording module for collecting and recording sensor data using the corresponding process when receiving sensor data uploaded by any virtual serial port; a data summarization module for summarizing the sensor data recorded by each process.

[0012] According to a fourth aspect, an embodiment of the present invention further discloses an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the steps of the data acquisition method as described in the first aspect or any optional implementation manner of the first aspect.

[0013] According to a fifth aspect, an embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the data acquisition method as described in the first aspect or any optional implementation manner of the first aspect.

[0014] The technical solution of the present invention has the following advantages:

[0015] For the data acquisition method provided by the present invention, when the virtual serial port preconfigured for sensor identity confirmation receives the sensor attribute data uploaded by the carrier module, the type of the sensor is determined, and based on the remaining virtual serial ports in the mapped multiple virtual serial ports, one virtual serial port and the process corresponding to the virtual serial port are configured for each type of sensor, and a communication request is sent to the carrier module, so that the carrier module performs the acquisition and transmission of sensor data. When the data uploaded by any one of the virtual serial ports is received, the data is acquired based on the data corresponding to the virtual serial port; by configuring different virtual serial ports to receive power data and sensor data, the present invention can support the development of multiple services for other types of data while not affecting the main power data acquisition. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0017] Figure 1 It is a flowchart of a specific example of the data acquisition method in an embodiment of the present invention;

[0018] Figure 2 It is a specific example diagram corresponding to the data acquisition method in an embodiment of the present invention;

[0019] Figure 3 It is a specific example diagram of a data acquisition system in an embodiment of the present invention;

[0020] Figure 4It is a schematic block diagram of a specific example of the data acquisition device in the embodiment of the present invention;

[0021] Figure 5 It is a specific example diagram of the electronic device in the embodiment of the present invention. Detailed implementation manners

[0022] Next, the technical solutions of the present invention will be clearly and completely described with reference to the accompanying drawings. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0023] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present invention. In addition, the terms "first", "second", "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.

[0024] In the description of the present invention, it should be noted that unless otherwise clearly defined and limited, the terms "installation", "connection", "connection" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can also be the communication inside two elements. It can be a wireless connection or a wired connection. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

[0025] In addition, the technical features involved in different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0026] An embodiment of the present invention discloses a data acquisition method, which is applied to a power acquisition terminal integrated with multiple processes. The power acquisition terminal is communicatively connected to a carrier module through a USB interface and maps out multiple virtual serial ports. Specifically, the USB-CDC protocol can be used for USB protocol enumeration negotiation to map out multiple virtual serial ports. The carrier module is integrated with a communication module for communicating with external sensors. At least one of the multiple virtual serial ports is used for performing sensor identity confirmation with the carrier module, and at least one is used for receiving power data uploaded by the carrier module. In the embodiment of the present application, one of the mapped multiple virtual serial ports can be selected to communicate with the carrier module for sensor identity confirmation, and one virtual serial port is specifically used for receiving power data uploaded by the carrier module. Those skilled in the art can also select multiple virtual serial ports to receive power data respectively as needed, as long as it is ensured that the virtual serial port for receiving power data is only used for receiving power data. The power acquisition terminal in the embodiment of the present application is a power acquisition terminal obtained by fusing an energy controller terminal and a marketing intelligent terminal, and sufficient storage space and memory can be configured for the power acquisition terminal to support the software design of multiple processes. The power acquisition terminal can map out multiple virtual serial ports by communicatively connecting to the carrier module through a USB interface, with high scalability and capable of supporting the above-mentioned multiple-process services. As Figure 1 shown, the method includes the following steps:

[0027] Step 101, when the virtual serial port for performing sensor identity confirmation receives the sensor attribute data uploaded by the carrier module, determine the type of the sensor for the data to be uploaded according to the sensor attribute data. Exemplarily, in the embodiment of the present application, the carrier module is communicatively connected to the sensor that needs to perform data transmission. The carrier module can send an identity attribute data acquisition instruction to the sensor with which the communication connection is established, and then the carrier module can transmit the identity attribute data fed back by the sensor to the power acquisition terminal through the virtual serial port for performing sensor identity confirmation. The power acquisition terminal can listen to the virtual serial port channel to implement the negotiation operation of sensor identity with the carrier module, and determine the type of the sensor according to the acquired sensor data.

[0028] Step 102, based on the remaining virtual serial ports among the mapped multiple virtual serial ports, configure one virtual serial port and the process corresponding to the virtual serial port for each type of sensor. The remaining virtual serial ports are the remaining virtual serial ports except for the virtual serial port used for performing sensor identity confirmation with the carrier module and the virtual serial port for receiving the power data uploaded by the carrier module.

[0029] Exemplarily, in the embodiment of the present application, the power acquisition terminal can map out multiple virtual serial ports on the power acquisition terminal by communicatively connecting to the carrier module through a USB interface, as Figure 2As shown in the figure, define tty1, tty2... ttyN as the corresponding virtual serial ports of the mapping. Among them, at least one virtual serial port is used to transmit the sensor identity attribute information data, so as to confirm the type of the sensor. As the main collection service of the power collection terminal, at least one virtual serial port is used to receive the power data uploaded by the carrier module based on the standard communication protocol of the power user information collection system. The remaining virtual serial ports are used to transmit the sensor data. Specifically, the configuration process of the virtual serial port for receiving sensor data needs to be determined in combination with the type of the sensor to be uploaded (such as function type, protocol type). The power collection terminal negotiates with the carrier module for the sensor identity to determine the sensor type, and matches each type of sensor with the remaining virtual serial ports to determine the virtual serial port for receiving the sensor data of the corresponding type. At the same time, the channel function code corresponding to each virtual serial port is obtained. The channel function code is used to confirm which sensor the virtual serial port is connected to for data transmission. At the same time, the power collection terminal can configure the process matching each type of sensor according to its function type. A soft connection is formed between different processes and the corresponding virtual serial ports to form a data transmission channel, and the corresponding virtual serial port is accessed to realize data interaction with the sensor.

[0030] In a specific embodiment, as Figure 2 shown in the figure, the virtual serial port 1 is pre-configured to transmit the sensor identity attribute information data. The carrier module transmits the power data to the power collection terminal through the virtual serial port 2. The carrier module is connected to the temperature and humidity sensor, vibration sensor or other types of sensors (xxx sensors); taking the temperature and humidity sensor as an example, the carrier module transmits the identity attribute data of the temperature and humidity sensor to the power collection terminal through the virtual serial port 1. The power collection terminal determines the type of the temperature and humidity sensor (such as function type, protocol type, etc.), and confirms that the function code of the virtual serial port 3 is for temperature and humidity sensor data collection. The power collection terminal configures the temperature and humidity collection process. The temperature and humidity collection process identifies the virtual serial port 3 as the corresponding sensor data transmission channel, and communicates with the sensor and collects the sensor data based on the protocol followed by the temperature and humidity sensor.

[0031] Step 103: Send a communication request to the carrier module, so that the carrier module performs sensor data collection and transmission based on the communication request;

[0032] Exemplarily, in the embodiment of the present application, after the power collection terminal deploys the collection process of the corresponding sensor, the collection process identifies the virtual serial port corresponding to the corresponding sensor and sends a communication request to the carrier module, where the communication request at least includes a data collection request, etc. The carrier module performs sensor data collection and transmits the collected data to the corresponding process of the power collection terminal. In a specific embodiment, as Figure 2As shown, after the temperature and humidity acquisition process identifies virtual serial port 3 as the corresponding sensor data transmission channel, the temperature and humidity acquisition process sends a data acquisition request to the carrier module through virtual serial port 3. After the carrier module acquires the data of the temperature and humidity sensor, it transmits the temperature and humidity data to the temperature and humidity acquisition process through virtual serial port 3, only for example.

[0033] Step 104, when receiving the data uploaded by any virtual serial port, perform data acquisition based on the process corresponding to the virtual serial port.

[0034] Exemplarily, the data uploaded by any virtual serial port received can be power data or sensor data. Since the virtual serial ports and processes for receiving the corresponding type of data have been configured, the carrier module can transmit the data to the corresponding sensor acquisition process in the power acquisition terminal through the corresponding virtual serial port and perform the meter reading operation. This acquisition process can perform data acquisition and storage; after the carrier module transmits the temperature and humidity data to the temperature and humidity acquisition process through the corresponding sensor virtual serial port, the temperature and humidity acquisition process performs the acquisition and storage of the temperature and humidity data.

[0035] For the data acquisition method provided by the present invention, when the virtual serial port preconfigured for sensor identity confirmation receives the sensor attribute data uploaded by the carrier module, determine the type of the sensor, and based on the remaining virtual serial ports in the mapped multiple virtual serial ports, configure one virtual serial port and the process corresponding to the virtual serial port for each type of sensor, and send a communication request to the carrier module to enable the carrier module to perform the acquisition and transmission of sensor data. When receiving the data uploaded by any virtual serial port, perform data acquisition based on the data corresponding to the virtual serial port; the present invention configures different virtual serial ports to receive power data and sensor data, and can support the development of multiple services for other types of data while not affecting the main power data acquisition.

[0036] As an optional implementation manner of the present invention, the carrier module is connected to an external sensor through a wireless communication module. Exemplarily, as Figure 2 shown, in the embodiment of the present application, the carrier module is connected to an external sensor through adding a built-in Bluetooth or Zigbee and other common Internet of Things to acquire sensor data, which can reduce the wiring cost and cumbersome workload brought by wired communication. Taking Bluetooth communication as an example, Bluetooth broadcast can be sent after the power acquisition terminal is powered on to obtain the sensor data in the corresponding service scenario.

[0037] As an optional implementation manner of the present invention, different virtual serial ports correspond to different processes.

[0038] Exemplarily, in the embodiments of the present application, after the power collection terminal maps out multiple virtual serial ports, different processes are configured for different virtual serial ports, and each process is independent and does not affect each other. In a specific embodiment, as Figure 2 shown, the power collection terminal configures a main process for the virtual serial port 1. The main process determines the type of the sensor according to the transmitted sensor identity attribute information through the virtual serial port 1 and matches it with the remaining virtual serial ports; the power collection terminal configures a collection scheduling process for the virtual serial port 2. The collection process determines whether the power data transmission channel corresponding to the power service exists and receives the power data uploaded by the carrier module through the virtual serial port 2. This collection method increases the stability of the power data; the power collection terminal configures a temperature and humidity collection process for the virtual serial port 3. The temperature and humidity collection process sends a data collection request to the carrier module through the virtual serial port 3 and stores and records the data when the temperature and humidity data is received; in the power collection terminal of the present invention, different collection processes are deployed according to the types and protocols of different sensors, which does not affect the operation of the main process and the collection scheduling process, and increases the stability of the main collection services of the power collection terminal.

[0039] As an optional implementation manner of the present invention, the method further includes: when receiving the sensor data uploaded by any virtual serial port, using the corresponding process to collect and record the sensor data; summarizing the sensor data recorded by each process. Exemplarily, the collection processes corresponding to different sensors can store and record the sensor data according to common data formats such as json and XML, and the main process summarizes and reports the data according to the data record.

[0040] As an optional implementation manner of the present invention, a USB2.0 interface is used for communication between the power collection terminal and the carrier module. Exemplarily, in the embodiments of the present application, a USB2.0 interface is used between the carrier module and the power collection terminal, so that communication can be carried out based on a rate of 480Mhz, ensuring the support for the transmission of large amounts of data.

[0041] The embodiments of the present application also disclose a data collection system, as Figure 3 shown, the system includes: a carrier module for accessing external sensor data; a power collection terminal communicating with the carrier module through a USB interface for executing the data collection method described in the above embodiments. For specific descriptions, refer to the above embodiments and will not be repeated here.

[0042] An embodiment of the present invention also discloses a data acquisition device, which is applied to a power acquisition terminal integrated with multiple processes. The power acquisition terminal is communicatively connected to a carrier module through a USB interface and maps out multiple virtual serial ports. The carrier module is integrated with a communication module for communicating with an external sensor. At least one of the multiple virtual serial ports is used for performing sensor identity confirmation with the carrier module, and at least one is used for receiving power data uploaded by the carrier module; as Figure 4 shown, the device includes: a sensor type confirmation module 201, configured to determine the type of the sensor for uploading data according to the sensor attribute when the virtual serial port for performing sensor identity confirmation receives the sensor attribute data uploaded by the carrier module; a virtual serial port configuration module 202, configured to, based on the remaining virtual serial ports among the mapped multiple virtual serial ports, configure one virtual serial port and the process corresponding to the virtual serial port for each type of sensor, where the remaining virtual serial ports are the remaining virtual serial ports except for the virtual serial port for performing sensor identity confirmation with the carrier module and the virtual serial port for receiving the power data uploaded by the carrier module; a data transmission module 203, configured to send a communication request to the carrier module, so that the carrier module performs sensor data acquisition and transmission based on the communication request; a data acquisition module 204, configured to perform data acquisition based on the process corresponding to the virtual serial port when receiving the data uploaded by any one of the virtual serial ports.

[0043] For the data acquisition device provided by the present invention, when the virtual serial port pre-configured for performing sensor identity confirmation receives the sensor attribute data uploaded by the carrier module, the type of the sensor is determined. Based on the remaining virtual serial ports among the mapped multiple virtual serial ports, one virtual serial port and the process corresponding to the virtual serial port are configured for each type of sensor, and a communication request is sent to the carrier module, so that the carrier module performs the acquisition and transmission of sensor data. When receiving the data uploaded by any one of the virtual serial ports, data acquisition is performed based on the data corresponding to the virtual serial port. By configuring different virtual serial ports to receive power data and sensor data, the present invention can support the development of multiple services for other types of data while not affecting the main power data acquisition.

[0044] As an optional embodiment of the present invention, the carrier module is connected to an external sensor through a wireless communication module.

[0045] As an optional embodiment of the present invention, different virtual serial ports correspond to different processes.

[0046] As an alternative embodiment of the present invention, the device further includes: a data acquisition and recording module, configured to acquire and record sensor data using a corresponding process when receiving sensor data uploaded by any virtual serial port; and a data aggregation module, configured to aggregate the sensor data recorded by each process.

[0047] As an alternative embodiment of the present invention, a USB2.0 interface is used for communication between the power acquisition terminal and the carrier module.

[0048] An embodiment of the present invention further provides an electronic device, as Figure 5 shown. The electronic device may include a processor 401 and a memory 402, where the processor 401 and the memory 402 may be connected through a bus or other means. Figure 5 Taking the connection through the bus as an example.

[0049] The processor 401 may be a central processing unit (CPU). The processor 401 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. chips, or a combination of the above types of chips.

[0050] The memory 402, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions / modules corresponding to the data acquisition method in the embodiments of the present invention. The processor 401 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions, and modules stored in the memory 402, that is, implements the data acquisition method in the above method embodiments.

[0051] The memory 402 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created by the processor 401 and the like. In addition, the memory 402 may include high-speed random access memory and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 402 may optionally include a memory remotely disposed relative to the processor 401, and these remote memories can be connected to the processor 401 through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0052] The one or more modules are stored in the memory 402 and, when executed by the processor 401, perform the data acquisition method in the embodiments as Figure 1 shown in the embodiments.

[0053] Specific details of the above electronic device can be correspondingly referred to Figure 1 the relevant descriptions and effects in the corresponding embodiments shown and will not be elaborated here.

[0054] Those skilled in the art can understand that to implement all or part of the processes in the above method embodiments, it can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the method embodiments as described above. Among them, the storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (abbreviation: HDD), or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memories.

[0055] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined.

Claims

1. A data acquisition method, characterized in that, Applied to a power collection terminal integrated with multiple processes, the power collection terminal is communicatively connected to a carrier module through a USB interface and maps out multiple virtual serial ports. The carrier module is integrated with a communication module for communicating with external sensors. At least one of the multiple virtual serial ports is used for performing sensor identity confirmation with the carrier module, and at least one is used for receiving power data uploaded by the carrier module; The method includes: When the virtual serial port for performing sensor identity confirmation receives sensor attribute data uploaded by the carrier module, determining the type of the sensor for which data is to be uploaded according to the sensor attribute data; Based on the remaining virtual serial ports among the mapped multiple virtual serial ports, configuring one virtual serial port and the process corresponding to the virtual serial port for each type of sensor, where the remaining virtual serial ports are the remaining virtual serial ports except for the virtual serial port used for performing sensor identity confirmation with the carrier module and the virtual serial port for receiving power data uploaded by the carrier module; Sending a communication request to the carrier module, so that the carrier module performs sensor data collection and transmission based on the communication request; When data uploaded by any virtual serial port is received, performing data collection based on the process corresponding to the virtual serial port.

2. The data collection method according to claim 1, characterized in that: The carrier module is connected to an external sensor through a wireless communication module.

3. The data acquisition method according to claim 1, characterized in that, Different virtual serial ports correspond to different processes.

4. The data acquisition method according to claim 1, wherein The method further includes: When sensor data uploaded by any virtual serial port is received, using the corresponding process to perform sensor data collection and recording; Summarizing the sensor data recorded by each process.

5. The data acquisition method according to claim 1, characterized in that The power collection terminal and the carrier module communicate with each other using a USB2.0 interface.

6. A data acquisition system, characterized in that, The system includes: A carrier module for accessing external sensor data; A power collection terminal communicatively connected to the carrier module through a USB interface for executing the data collection method according to any one of claims 1-5.

7. A data acquisition device, characterized in that, Applied to a power collection terminal integrated with multiple processes, the power collection terminal is communicatively connected to a carrier module through a USB interface and maps out multiple virtual serial ports. The carrier module is integrated with a communication module for communicating with external sensors. At least one of the multiple virtual serial ports is used for performing sensor identity confirmation with the carrier module, and at least one is used for receiving power data uploaded by the carrier module; The apparatus includes: A sensor type confirmation module for, when the virtual serial port for performing sensor identity confirmation receives sensor attribute data uploaded by the carrier module, determining the type of the sensor for which data is to be uploaded according to the sensor attribute data; A virtual serial port configuration module for, based on the remaining virtual serial ports among the mapped multiple virtual serial ports, configuring one virtual serial port and the process corresponding to the virtual serial port for each type of sensor, where the remaining virtual serial ports are the remaining virtual serial ports except for the virtual serial port used for performing sensor identity confirmation with the carrier module and the virtual serial port for receiving power data uploaded by the carrier module; A data transmission module for sending a communication request to the carrier module, so that the carrier module performs sensor data collection and transmission based on the communication request; The data acquisition module is used to collect data based on the process corresponding to any virtual serial port when receiving data uploaded by any virtual serial port.

8. The data acquisition device according to claim 7, characterized in that: The device also includes: The data acquisition and recording module is used to collect and record sensor data using the corresponding process when receiving sensor data uploaded by any virtual serial port; The data aggregation module is used to aggregate the sensor data recorded by each process.

9. An electronic device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the data acquisition method as described in any one of claims 1-5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data collection method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Realization method for debugging electric power acquisition terminal and obtaining meter reading information

    CN105405280A

  • Method and device for communication between 4G communication module and metering electric meter, computer equipment and storage medium

    CN110675613A