Data acquisition method, edge computing host, and computer-readable storage medium

By establishing virtual edge devices in the data acquisition auxiliary module of the edge computing host, the problem of CPU overhead during high-frequency data acquisition is solved, and more efficient and real-time multi-channel data acquisition is achieved.

CN114860437BActive Publication Date: 2025-06-10KONGTROLINK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210465738.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-06-10
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

In the industrial Internet of Things scenario, when the edge computing host collects data from multiple terminal devices, the CPU needs to send data query requests in real time, resulting in high CPU overhead, affecting the efficiency and real-timeness of data acquisition.

Method used

By establishing virtual edge devices in the data acquisition auxiliary module, these virtual devices are used to obtain data of the terminal device according to the data query request in the data query frame sequence, and feedback it to the CPU to reduce the CPU's real-time data query request.

Benefits of technology

It effectively reduces the overhead of edge computing host CPU and improves the efficiency and real-time performance of multi-channel data acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114860437B_ABST
    Figure CN114860437B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a data acquisition method, an edge computing host, and a computer-readable storage medium, which relate to the technical field of industrial Internet of Things and can be applied to an edge computing host. The edge computing host includes a CPU and a data acquisition auxiliary module that are communicatively connected. The method includes: The data acquisition auxiliary module receives a first data packet sent by the CPU. The first data packet includes device configuration information corresponding to a target terminal device and a data query frame sequence. According to the device configuration information, a virtual edge device corresponding to the target terminal device is established, and the virtual edge device is used to sequentially obtain first data collected by the target terminal device according to each data query request in the data query frame sequence and send it to the CPU. In the embodiment of the present application, the CPU does not need to send data query requests to the data acquisition auxiliary module in real time, thereby effectively reducing the overhead of the CPU and improving the efficiency and real-time performance of multi-channel data acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the technical field of industrial Internet of Things, and in particular, to a data acquisition method, an edge computing host, and a computer-readable storage medium. Background Art

[0002] In the industrial Internet of Things scenario, an edge computing host needs to collect data from multiple sensors or intelligent devices (hereinafter referred to as "terminal devices"). When the acquisition channel resources of the edge computing host (hereinafter referred to as "host") are limited, in order to complete the data acquisition of multiple terminal devices, the traditional solution is to set up a data acquisition auxiliary module under the central processing unit (CPU) of the host, and the CPU and the data acquisition auxiliary module communicate through a high-speed bus.

[0003] Among them, when the CPU needs to collect data from a terminal device, the CPU sends a data query request to the data acquisition auxiliary module. The data acquisition auxiliary module transparently transmits the data query request to the corresponding terminal device, and transparently transmits the acquisition data returned by the terminal device according to the data query request to the CPU, thereby expanding the number of acquisition channels of the edge computing host.

[0004] However, in the above solution, the data query of the data acquisition auxiliary module is completely controlled by the CPU. Therefore, when the data query frequency is relatively high, the overhead of the CPU will be relatively large, affecting the efficiency and real-time performance of data acquisition. Summary of the Invention

[0005] Embodiments of the present application provide a data acquisition method, an edge computing host, and a computer-readable storage medium, which can enable the edge computing host to collect data from multiple terminal devices with a relatively low CPU overhead.

[0006] In a first aspect, an embodiment of the present application provides a data acquisition method, which is applied to an edge computing host. The edge computing host includes a CPU and a data acquisition auxiliary module, and the CPU is communicatively connected to the data acquisition auxiliary module. The method includes:

[0007] The data acquisition auxiliary module receives a first data packet sent by the CPU. The first data packet includes device configuration information corresponding to a target terminal device and a data query frame sequence, and the data query frame sequence includes at least one data query request.

[0008] The data acquisition auxiliary module establishes a virtual edge device corresponding to the target terminal device according to the device configuration information, and uses the virtual edge device to sequentially obtain first data collected by the target terminal device according to each data query request in the data query frame sequence.

[0009] The data acquisition assistance module sends the first data to the CPU.

[0010] In a feasible implementation manner, the step of using the virtual edge device to sequentially obtain the first data collected by the target terminal device according to each data query request in the data query frame sequence includes:

[0011] Create a data query task in the virtual edge device and control the virtual edge device to execute the data query task, where the data query task includes:

[0012] Send each data query request in the data query frame sequence to the target terminal device in accordance with a preset sending frequency, and each data query request is used to obtain the first data currently collected by the target terminal device;

[0013] Receive the first data corresponding to the data query request fed back by the target terminal device and send it to the data acquisition assistance module.

[0014] In a feasible implementation manner, the first data packet further includes a first Cyclic Redundancy Check (CRC) check code. Before the data acquisition assistance module receives the first data packet sent by the CPU, it further includes:

[0015] The CPU determines the device configuration information and the data query frame sequence corresponding to the target terminal device, where the device configuration information includes at least one of the following information: port type, port number, data frame index, sending interval, data length, and data content;

[0016] The CPU generates the first CRC check code according to the device configuration information and the data query frame sequence;

[0017] The CPU encapsulates the device configuration information, the data query frame sequence, and the first CRC check code in the first data packet.

[0018] In a feasible implementation manner, the data acquisition assistance module creates a virtual edge device corresponding to the target terminal device according to the device configuration information, including:

[0019] The data acquisition assistance module performs CRC verification on the received first data packet, and after the verification passes, creates a virtual edge device corresponding to the target terminal device according to the device configuration information.

[0020] In a feasible implementation manner, the data acquisition assistance module sends the first data to the CPU, including:

[0021] The data acquisition auxiliary module generates a second data packet and a second CRC check code corresponding to the second data packet based on the first data and the device configuration information of the virtual edge device. The device configuration information of the virtual edge device includes at least one of the following information: port type, port number, data frame index, data frame status, data length, and data content;

[0022] The data acquisition auxiliary module sends the second data packet added with the second CRC check code to the CPU.

[0023] In a second aspect, an edge computing host provided by an embodiment of the present application includes a CPU and a data acquisition auxiliary module, and the CPU is communicatively connected to the data acquisition auxiliary module; the data acquisition auxiliary module is configured to:

[0024] Receive a first data packet sent by the CPU, where the first data packet includes device configuration information corresponding to a target terminal device and a data query frame sequence, and the data query frame sequence includes at least one data query request;

[0025] According to the device configuration information, establish a virtual edge device corresponding to the target terminal device, and use the virtual edge device to sequentially obtain first data collected by the target terminal device according to each data query request in the data query frame sequence;

[0026] Send the first data to the CPU.

[0027] In a feasible implementation manner, the data acquisition auxiliary module is configured to:

[0028] Establish a data query task in the virtual edge device, and control the virtual edge device to execute the data query task. The data query task includes:

[0029] Send each data query request in the data query frame sequence to the target terminal device in sequence according to a preset sending frequency, and each data query request is used to obtain first data currently collected by the target terminal device;

[0030] Receive the first data corresponding to the data query request fed back by the target terminal device, and send it to the data acquisition auxiliary module.

[0031] In a feasible implementation manner, the first data packet further includes a first cyclic redundancy check (CRC) check code, and the CPU includes:

[0032] A protocol parsing module, configured to determine device configuration information and a data query frame sequence corresponding to the target terminal device, where the device configuration information includes at least one of the following information: port type, port number, data frame index, sending interval, data length, and data content;

[0033] A sending encapsulation module, configured to generate the first CRC check code according to the device configuration information and the data query frame sequence, and after encapsulating the device configuration information, the data query frame sequence, and the first CRC check code in the first data packet, send the data packet to the data acquisition auxiliary module.

[0034] In a feasible implementation manner, the data acquisition auxiliary module is configured to:

[0035] Generate a second data packet and a second CRC check code corresponding to the second data packet based on the first data and the device configuration information of the virtual edge device, where the device configuration information of the virtual edge device includes at least one of the following information: port type, port number, data frame index, data frame status, data length, and data content;

[0036] Send the second data packet added with the second CRC check code to the CPU;

[0037] The CPU further includes:

[0038] A receiving conversion module, configured to perform CRC check on the second data packet added with the second CRC check code, and after the check passes, send the first data in the second data packet to the protocol parsing module for parsing.

[0039] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored, and when a processor executes the computer execution instructions, the data acquisition method provided in the first aspect is implemented.

[0040] For the data acquisition method, edge computing host, and computer-readable storage medium provided in the embodiments of the present application, the data acquisition auxiliary module establishes virtual edge devices corresponding to each terminal device, and uses the virtual edge devices to obtain the first data collected by each terminal device according to each data query request in the data query frame sequence, and feeds it back to the edge computing host CPU, so that the edge computing host CPU does not need to send data query requests to the data acquisition auxiliary module in real time, thereby effectively reducing the overhead of the edge computing host CPU and improving the efficiency and real-time performance of multi-channel data acquisition. Description of the Drawings

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

[0042] Figure 1 It is a schematic flowchart of a data acquisition method provided in an embodiment of the present application;

[0043] Figure 2 It is a schematic structural diagram of an industrial Internet of Things system provided in an embodiment of the present application;

[0044] Figure 3 It is a schematic structural diagram of another industrial Internet of Things system provided in an embodiment of the present application;

[0045] Figure 4 It is a schematic structural diagram of an edge computing host provided in an embodiment of the present application;

[0046] Figure 5 It is a schematic hardware structure diagram of an electronic device provided in an embodiment of the present application. Detailed implementation manners

[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application. In addition, although the disclosure in the present application is introduced according to exemplary one or several examples, it should be understood that each aspect of these disclosures can also be independently constituted as a complete implementation manner.

[0048] It should be noted that the brief description of the terms in the present application is only for the convenience of understanding the following described implementation manners, rather than intending to limit the implementation manners of the present application. Unless otherwise stated, these terms should be understood in their ordinary and common meanings.

[0049] The terms "first", "second", etc. in the specification, claims, and the above drawings of the present application are used to distinguish similar or like objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that such terms can be interchanged under appropriate circumstances, for example, they can be implemented in an order other than those given in the illustration or description of the embodiments of the present application.

[0050] In addition, the terms "comprising" and "having" and any variations thereof are intended to cover inclusion without exclusivity. For example, a product or device comprising a series of components need not be limited to those components clearly listed, but may include other components not clearly listed or inherent to such products or devices.

[0051] As used in this application, the term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or a combination of hardware and / or software code that is capable of performing functions related to that element.

[0052] The Industrial Internet of Things (IIoT) can integrate various types of acquisition and control sensors or controllers with sensing and monitoring capabilities, as well as technologies such as mobile communication and intelligent analysis, into all aspects of the industrial production process, thereby significantly improving manufacturing efficiency, enhancing product quality, reducing product costs and resource consumption, and ultimately achieving the elevation of traditional industries to a new stage of intelligence. In terms of application forms, the applications of the IIoT have characteristics such as real-time, automation, embedded (software), security, and information interconnection.

[0053] In most cases, enterprises will build the IIoT based on existing industrial systems. One of the problems faced in the popularization of the IIoT is how to make the sensors used in the IIoT compatible with the sensors already applied in the original equipment. Sensor compatibility mainly refers to the compatibility of data formats and communication protocols, and the key to compatibility is the unification of standards. Currently, protocols such as Profibus and Modbus commonly used in industrial fieldbus networks have already well solved the compatibility problem, and most industrial equipment manufacturers have developed various types of sensors, controllers, etc. based on these protocols.

[0054] Edge computing is the extension of cloud computing to the edge. Compared with the massive computing power of the "cloud" brought by classical cloud computing, edge computing realizes the sinking of resources and services to the edge location, thereby being able to reduce interaction latency, relieve network burden, enrich service types, optimize service processing, and improve service quality and user experience.

[0055] In the industrial Internet of Things scenario, an edge computing host needs to collect data from multiple sensors or intelligent devices (hereinafter referred to as "terminal devices"). For example, the above sensors include but are not limited to temperature sensors, humidity sensors, pressure sensors, vibration sensors, etc., and the above intelligent devices include but are not limited to Programmable Logic Controllers (PLCs), Computer Numerical Control (CNC) systems, Uninterruptible Power Supplies (UPSs), air conditioners, etc.

[0056] When the acquisition channel resources of the edge computing host are limited, it is impossible to complete the high-speed data acquisition of multiple terminal devices. A general solution is to set up a data acquisition auxiliary module under the CPU of the host, and the CPU and the data acquisition auxiliary module communicate through a high-speed bus. The data acquisition auxiliary module transparently forwards the data frames of the CPU and transparently returns the received data to the CPU. In this way, the data acquisition auxiliary module forwards the CPU data, expands the number of acquisition channels of the edge computing host, and realizes the transformation of data acquisition from serial to parallel.

[0057] However, in the above solution, a buffer queue method is generally used for data query, which evolves a single data query into a multi-channel data query. The CPU sends the data frame to be queried to the data acquisition auxiliary module through the high-speed bus, and after the data acquisition auxiliary module finishes the query, it sends it back to the CPU. Among them, the above buffer queue includes port information of the data acquisition auxiliary module, etc. The CPU fetches data in order in the buffer queue and sends the data to the data acquisition auxiliary module. The data acquisition auxiliary module sends it through different ports according to port information, etc., realizing the evolution from a single data query to a multi-channel data query.

[0058] However, in the above solution, the data query of the data acquisition auxiliary module is completely controlled by the CPU. Therefore, when the data query frequency is relatively high, the CPU overhead will be relatively large.

[0059] To solve the above technical problems, an embodiment of the present application provides a method for dynamically constructing a virtual edge device. The data acquisition auxiliary module establishes a virtual edge device corresponding to each terminal device, and uses the virtual edge device to obtain the first data collected by each terminal device according to each data query request in the data query frame sequence, and feeds it back to the edge computing host CPU, so that the edge computing host CPU does not need to send data query requests to the data acquisition auxiliary module in real time, thereby effectively reducing the overhead of the edge computing host CPU and improving the efficiency and real-time performance of multi-channel data acquisition. The following uses detailed embodiments for detailed description.

[0060] Refer to Figure 1 , Figure 1 which is a schematic flowchart of a data acquisition method provided in an embodiment of this application. This method can be applied to an edge computing host, which includes a CPU and a data acquisition auxiliary module. Among them, the CPU is communicatively connected to the data acquisition auxiliary module.

[0061] In a feasible implementation manner, the above data acquisition method includes:

[0062] S101. The data acquisition auxiliary module receives a first data packet sent by the CPU. The first data packet includes device configuration information corresponding to a target terminal device and a data query frame sequence.

[0063] Among them, the above data query frame sequence includes at least one data query request.

[0064] In a feasible implementation manner, a protocol parsing module in the above CPU parses out the device protocol frame of each terminal device. The device protocol frame includes the device configuration information of the terminal device. In addition, the above CPU also needs to determine the data query frame sequence of each terminal device.

[0065] After the above CPU determines the device configuration information and data query frame sequence corresponding to each terminal device, after packing and encapsulating the device configuration information and data query frame sequence corresponding to each terminal device respectively, they are sent to the data acquisition auxiliary module in a non-real-time manner.

[0066] S102. The data acquisition auxiliary module establishes a virtual edge device corresponding to the target terminal device according to the device configuration information, and uses the virtual edge device to sequentially obtain the first data collected by the target terminal device according to each data query request in the data query frame sequence.

[0067] In a feasible implementation manner, after receiving the above first data packet, the data acquisition auxiliary module records the device configuration information and query data frame sequence corresponding to each terminal device, and dynamically creates virtual edge devices corresponding to each terminal device according to the device configuration information and query data frame sequence corresponding to each terminal device.

[0068] Among them, after creating the virtual edge devices corresponding to each terminal device, the data query tasks of the virtual edge devices corresponding to each terminal device are immediately started.

[0069] In some embodiments, after starting a data query task, the virtual edge device sequentially queries the data currently collected by the terminal device according to each data query request in the data query frame sequence, and after receiving the response data returned by the terminal device, appends the virtual edge device information to the response data and sends it to the data backhaul sequence of the data acquisition assistance module in real time.

[0070] In some embodiments, the data acquisition assistance module records the data query frame sequence and performs data queries periodically on behalf of the CPU at a configured frequency.

[0071] S103. The data acquisition assistance module sends the first data to the CPU.

[0072] In a feasible implementation manner, when the data acquisition assistance module detects a data backhaul sequence to be sent, it immediately sends the data backhaul sequence to the edge computing host CPU. The receiving and conversion module of the edge computing host CPU parses the backhauled data packet and sends the data part of the protocol to the protocol parsing module to complete the query and parsing of the device protocol frame of this item.

[0073] Among them, the data acquisition assistance module can send a second data packet to the CPU, and the second data packet includes the device configuration information of the virtual edge device in the first data, which is convenient for the CPU to identify which virtual edge device sent the first data. For example, if the device configuration information of sensor A is included in the returned data, the CPU parses the first data according to the protocol of sensor A to obtain the data of sensor A.

[0074] For a better understanding of the embodiments of the present application, refer to Figure 2 , Figure 2 which is a schematic structural diagram of an industrial Internet of Things system provided in the embodiments of the present application.

[0075] In some embodiments, the above industrial Internet of Things system includes an edge computing host and multiple terminal devices. Among them, the edge computing host includes a CPU and a data acquisition assistance module, and the CPU is communicatively connected to the data acquisition assistance module.

[0076] In some embodiments, the above CPU can hang the data acquisition assistance module through a high-speed digital interface, and the virtual edge devices established by the data acquisition assistance module are respectively interconnected with the corresponding terminal devices.

[0077] In the data acquisition method provided by the embodiments of the present application, the data acquisition auxiliary module creates virtual edge devices corresponding to each terminal device, and uses the virtual edge devices to obtain the first data collected by each terminal device according to each data query request in the data query frame sequence, and feeds it back to the edge computing host CPU, so that the edge computing host CPU does not need to send data query requests to the data acquisition auxiliary module in real time, thereby effectively reducing the overhead of the edge computing host CPU and improving the efficiency and real-time performance of multi-channel data acquisition.

[0078] Based on the content described in the above embodiments, in some embodiments, a protocol parsing module, a sending encapsulation module, and a receiving conversion module can be created in the above CPU, and a virtual device data structure and a data query task can be created in the data acquisition auxiliary module.

[0079] Refer to Figure 3 , Figure 3 which is a schematic structural diagram of another industrial Internet of Things system provided in the embodiments of the present application.

[0080] In some embodiments, the above protocol parsing module loads the device configuration information of the terminal device, reads out the data query frame sequence, and sends the device configuration information corresponding to each terminal device and the data query frame sequence to the above sending encapsulation module. The sending encapsulation module encapsulates the device configuration information corresponding to each terminal device and the data query frame sequence respectively, and sends them to the data acquisition auxiliary module in a non-real-time manner. The data acquisition auxiliary module receives the device configuration information corresponding to each terminal device and the data query frame sequence, records the device configuration information and the query data frame sequence, and dynamically creates a virtual edge device according to the device configuration information and the query data frame sequence, etc.

[0081] Optionally, the sending encapsulation module can encapsulate the device configuration information corresponding to each terminal device and the data query frame sequence into data packets according to the port type, port number, frame index, sending interval, data length, data content, etc. of the device protocol frame, and dynamically generate a CRC check code according to the above information and place it at the end of the above data packet, and then send it to the data acquisition auxiliary module. After receiving the data packet, the data acquisition auxiliary module performs CRC check, and after the check passes, it dynamically creates a virtual edge device according to the device configuration information.

[0082] In some embodiments, after the virtual edge device is successfully created, the data query operation of the virtual edge device is immediately started, and the data collected by the terminal device is queried in real time according to the data query frame sequence in turn. After receiving the response frame sent by the terminal device, after attaching the virtual edge device information, it is sent to the data backhaul sequence in real time. When the data acquisition auxiliary module detects that there is a data backhaul sequence to be sent, it immediately sends the data backhaul sequence to the above CPU. The receiving and conversion module of the above CPU parses the backhaul data packet and sends the data part of the protocol to the protocol parsing module to complete the device protocol of this item.

[0083] Optionally, after each data query request is sent, if the terminal device responds normally, it is determined that the received response frame is a normal frame and the frame status is normal; if the terminal device responds timeout, it is determined that the response frame is a timeout frame, the frame status is timeout, and the data length is zero. After attaching information such as port type, port number, frame index, frame status, data length, and data content to the response frame of each device protocol frame, and dynamically calculating the CRC checksum, it is sent to the edge computing host CPU.

[0084] After receiving the data packet, the receiving and conversion module in the CPU first performs a CRC check. After the check is completed, it reads the additional information of the protocol frame and passes the corresponding response frame data part to the protocol parsing module. The protocol module parses the device signal points from the protocol frame to obtain the device data.

[0085] Among them, the device signal point refers to the information of the terminal device, such as voltage value, current value, temperature value, etc.

[0086] The process of obtaining the device signal point is as follows: The CPU sends the data query request of the terminal device to the data acquisition auxiliary module according to the terminal device model. The data acquisition auxiliary module periodically sends the data query request to the terminal device. After each device response frame is attached with the virtual edge device information, it is fed back to the CPU. The CPU parses the device information from the response message according to the virtual edge device information, thereby obtaining the device information.

[0087] Based on the content described in the above embodiments, an edge computing host is further provided in the embodiments of the present application. Refer to Figure 4 , Figure 4 which is a schematic structural diagram of an edge computing host provided in the embodiments of the present application. The edge computing host includes: CPU10 and a data acquisition auxiliary module 20, and CPU10 is communicatively connected to the data acquisition auxiliary module 20; the data acquisition auxiliary module 20 is used for:

[0088] Receiving the first data packet sent by CPU10, the first data packet includes the device configuration information corresponding to the target terminal device and the data query frame sequence, and the data query frame sequence includes at least one data query request.

[0089] According to the device configuration information, a virtual edge device corresponding to the target terminal device is established, and the virtual edge device is used to sequentially obtain the first data collected by the target terminal device according to each data query request in the data query frame sequence.

[0090] Send the first data to the CPU.

[0091] In some embodiments, the data acquisition assistance module 20 is configured to:

[0092] Establish a data query task in the virtual edge device and control the virtual edge device to execute the data query task, where the data query task includes:

[0093] Send each data query request in the data query frame sequence to the target terminal device in accordance with a preset sending frequency, and each data query request is used to obtain the first data currently collected by the target terminal device;

[0094] Receive the first data corresponding to the data query request fed back by the target terminal device and send it to the data acquisition assistance module.

[0095] In some embodiments, the above first data packet further includes a first CRC check code, and the CPU 10 includes:

[0096] A protocol analysis module 101, configured to determine the device configuration information and data query frame sequence corresponding to the target terminal device, where the device configuration information includes at least one of the following information: port type, port number, data frame index, sending interval, data length, and data content.

[0097] A sending encapsulation module 102, configured to generate the first CRC check code according to the device configuration information and the data query frame sequence, and after encapsulating the device configuration information, the data query frame sequence, and the first CRC check code in the first data packet, send it to the data acquisition assistance module.

[0098] In some embodiments, the data acquisition assistance module 20 is configured to:

[0099] Generate a second data packet and a second CRC check code corresponding to the second data packet based on the first data and the device configuration information of the virtual edge device, where the device configuration information of the virtual edge device includes at least one of the following information: port type, port number, data frame index, data frame status, data length, and data content.

[0100] Send the second data packet added with the second CRC check code to the CPU.

[0101] In some embodiments, the CPU 10 further includes:

[0102] A receiving and conversion module 103, configured to perform CRC check on the second data packet added with the second CRC check code, and send the first data in the second data packet to the protocol parsing module for parsing after the check passes.

[0103] In the edge computing host provided by the embodiments of the present application, the data acquisition auxiliary module establishes virtual edge devices corresponding to each terminal device, and uses the virtual edge devices to obtain the first data collected by each terminal device according to each data query request in the data query frame sequence, and feeds it back to the CPU of the edge computing host, so that the CPU of the edge computing host does not need to send data query requests to the data acquisition auxiliary module in real time, thereby effectively reducing the overhead of the CPU of the edge computing host and improving the efficiency and real-time performance of multi-channel data acquisition.

[0104] Furthermore, based on the content described in the above embodiments, an electronic device is further provided in the embodiments of the present application. The electronic device includes at least one processor and a memory; wherein, the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory to implement each step in the data acquisition method described in the above embodiments, which will not be elaborated herein in this embodiment.

[0105] For a better understanding of the embodiments of the present application, refer to Figure 5 , Figure 5 , which is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application. The electronic device may be the above-mentioned edge computing host.

[0106] As Figure 5 shown, the electronic device 50 in this embodiment includes: a processor 501 and a memory 502; wherein:

[0107] The memory 502 is used to store computer execution instructions;

[0108] The processor 501 is configured to execute the computer execution instructions stored in the memory to implement each step in the data acquisition method described in the above embodiments, which will not be elaborated herein in this embodiment.

[0109] Optionally, the memory 502 may be either independent or integrated with the processor 501.

[0110] When the memory 502 is independently provided, the device further includes a bus 503 for connecting the memory 502 and the processor 501.

[0111] Further, based on the content described in the above embodiments, the embodiments of the present application also provide a computer-readable storage medium, in which computer-executable instructions are stored. When the processor executes the computer-executable instructions, each step in the data acquisition method described in the above embodiments is implemented, and details are not described herein again.

[0112] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, indirect couplings or communication connections of devices or modules, and can be in electrical, mechanical or other forms.

[0113] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0114] In addition, in each embodiment of the present application, the functional modules can be integrated in a processing unit, or each module exists physically alone, or two or more modules can be integrated in a unit. The above-mentioned unit integrated with modules can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.

[0115] The above-mentioned integrated modules implemented in the form of software functional modules can be stored in a computer-readable storage medium. The above-mentioned software functional modules are stored in a storage medium, including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute some steps of the methods described in each embodiment of the present application.

[0116] It should be understood that the above-mentioned processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the application can be directly implemented by a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.

[0117] The memory may include high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk, or an optical disc, etc.

[0118] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0119] The above-mentioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0120] An exemplary storage medium is coupled to the processor, enabling the processor to read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an Application Specific Integrated Circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a master control device.

[0121] Those of ordinary skill in the art will understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments; and the foregoing storage medium includes various media that can store program codes such as ROM, RAM, magnetic disks, or optical discs.

[0122] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A data acquisition method, characterized in that, it is applied to an edge computing host, the edge computing host includes a central processing unit CPU and a data acquisition auxiliary module, and the CPU is communicatively connected to the data acquisition auxiliary module; the method includes: the data acquisition auxiliary module receives a first data packet sent by the CPU, and the first data packet includes device configuration information corresponding to a target terminal device and a data query frame sequence, and at least one data query request is included in the data query frame sequence; the data acquisition auxiliary module establishes a virtual edge device corresponding to the target terminal device according to the device configuration information, and uses the virtual edge device to sequentially obtain first data collected by the target terminal device according to each data query request in the data query frame sequence; the data acquisition auxiliary module sends the first data to the CPU.

2. The method according to claim 1, characterized in that, the step of using the virtual edge device to sequentially obtain the first data collected by the target terminal device according to each data query request in the data query frame sequence includes: establishing a data query task in the virtual edge device and controlling the virtual edge device to execute the data query task, and the data query task includes: sequentially sending each data query request in the data query frame sequence to the target terminal device at a preset sending frequency, and each data query request is used to obtain first data currently collected by the target terminal device; receiving the first data corresponding to the data query request fed back by the target terminal device and sending it to the data acquisition auxiliary module.

3. The method according to claim 1, characterized in that, the first data packet further includes a first cyclic redundancy check CRC check code, and before the data acquisition auxiliary module receives the first data packet sent by the CPU, it further includes: the CPU determines the device configuration information and the data query frame sequence corresponding to the target terminal device, and the device configuration information includes at least one of the following information: port type, port number, data frame index, sending interval, data length and data content; the CPU generates the first CRC check code according to the device configuration information and the data query frame sequence; the CPU encapsulates the device configuration information, the data query frame sequence and the first CRC check code in the first data packet.

4. The method according to claim 3, characterized in that, the step that the data acquisition auxiliary module establishes a virtual edge device corresponding to the target terminal device according to the device configuration information includes: the data acquisition auxiliary module performs CRC check on the received first data packet, and after the check passes, establishes a virtual edge device corresponding to the target terminal device according to the device configuration information.

5. The method according to claim 4, characterized in that, the step that the data acquisition auxiliary module sends the first data to the CPU includes: The data acquisition assistance module generates a second data packet and a second CRC check code corresponding to the second data packet based on the first data and the device configuration information of the virtual edge device. The device configuration information of the virtual edge device includes at least one of the following information: port type, port number, data frame index, data frame status, data length, and data content; The data acquisition assistance module sends the second data packet with the second CRC check code added to the CPU.

6. An edge computing host, characterized in that, the edge computing host includes a central processing unit CPU and a data acquisition assistance module, and the CPU is communicatively connected to the data acquisition assistance module; the data acquisition assistance module is configured to: receive a first data packet sent by the CPU, where the first data packet includes device configuration information corresponding to a target terminal device and a data query frame sequence, and the data query frame sequence includes at least one data query request; establish a virtual edge device corresponding to the target terminal device according to the device configuration information, and use the virtual edge device to sequentially obtain the first data collected by the target terminal device according to each data query request in the data query frame sequence; send the first data to the CPU.

7. The edge computing host according to claim 6, characterized in that, the data acquisition assistance module is configured to: establish a data query task in the virtual edge device, and control the virtual edge device to execute the data query task, where the data query task includes: sequentially sending each data query request in the data query frame sequence to the target terminal device at a preset sending frequency, and each data query request is used to obtain the first data currently collected by the target terminal device; receive the first data corresponding to the data query request fed back by the target terminal device, and send it to the data acquisition assistance module.

8. The edge computing host according to claim 6, characterized in that, the first data packet further includes a first cyclic redundancy check CRC check code, and the CPU includes: a protocol parsing module, configured to determine the device configuration information and the data query frame sequence corresponding to the target terminal device, where the device configuration information includes at least one of the following information: port type, port number, data frame index, sending interval, data length, and data content; a sending encapsulation module, configured to generate the first CRC check code according to the device configuration information and the data query frame sequence, and after encapsulating the device configuration information, the data query frame sequence, and the first CRC check code in the first data packet, send it to the data acquisition assistance module.

9. The edge computing host according to claim 8, characterized in that, the data acquisition assistance module is configured to: Generate a second data packet and a second CRC check code corresponding to the second data packet based on the first data and the device configuration information of the virtual edge device, where the device configuration information of the virtual edge device includes at least one of the following information: port type, port number, data frame index, data frame status, data length, and data content; Send the second data packet with the second CRC check code added to the CPU; The CPU further includes: A receiving conversion module, configured to perform CRC check on the second data packet with the second CRC check code added, and send the first data in the second data packet to the protocol parsing module for parsing after the check passes.

10. A computer-readable storage medium, Characterized in that, The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the data acquisition method described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Data transmission method and device and terminal equipment

    CN111683127A

  • Data processing method, virtual machine, device and system

    CN112619128A