Data collection method, device and server based on cloud-edge collaboration
By obtaining the object model of the data mining equipment characteristics and automatically generating the Docker image of the data mining application, the complex and time-consuming problem of data mining protocol docking in the existing technology is solved, and efficient and automated data mining data acquisition is achieved.
Patent Information
- Application Number
- CN202210873447.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-21
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2042-07-21
AI Technical Summary
The existing digital procurement protocol docking method is complex and time-consuming, requiring a lot of manpower and material resources, and has a high probability of errors, resulting in low efficiency in obtaining digital procurement equipment data in edge computing.
By obtaining the object model corresponding to the characteristics of the data mining equipment, the corresponding relationship between the object model and the data mining equipment protocol message is automatically determined, a data mining application Docker image is generated, and sent to the edge device to realize automated data mining data acquisition.
There is no need for software developers to manually analyze protocols and write codes, which significantly reduces the consumption of manpower and material resources and improves the efficiency of data acquisition from data mining equipment.
Smart Images

Figure CN115473947B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing technology, and in particular to a data collection method, device and server based on cloud-edge collaboration. Background Art
[0002] The development of cloud computing technology has greatly reduced the cost of using information technology infrastructure. However, the resource centralization brought by cloud data centers also has some shortcomings. After the centralization of resources, the end users are far away from the data center. The long-distance network transmission not only takes up a lot of network resources, but also the high latency it brings slows down the response speed of user requests, affecting the user experience. Therefore, edge computing has emerged. Edge computing distributes the computing power originally concentrated in the data center to the edge of the network and processes data at the edge of the network. In the process of edge computing, it is necessary to use the data acquisition protocol docking to obtain the data collected by the data acquisition equipment.
[0003] The commonly used data acquisition protocol docking method is: software developers analyze the data acquisition device connection protocol, dock with the data acquisition device by writing code, making software and debugging software, and report the docked data to the cloud platform in a specified format. The above process will have the following defects: the data acquisition protocol is complex and diverse, each protocol needs to be coded and implemented, and the debugging method is to install the software in the form of a binary installation package to the edge device for debugging, which consumes a lot of manpower and material resources, and the error rate is unpredictable. Therefore, in edge computing, based on the current data acquisition protocol docking method, the efficiency of obtaining data collected by data acquisition equipment is low. Summary of the invention
[0004] The present invention provides a data acquisition method, device and server based on cloud-edge collaboration, which are used to improve the efficiency of data collected by data acquisition equipment.
[0005] The present invention provides a data collection method based on cloud-edge collaboration, comprising:
[0006] Obtain the physical model corresponding to the characteristics of the data acquisition equipment;
[0007] Determine the correspondence between the object model and the data acquisition device protocol message;
[0008] Based on the object model and the corresponding relationship, generate a data acquisition application Docker image;
[0009] Obtain a data acquisition application file corresponding to the data acquisition application Docker image, and send the data acquisition application file to an edge device, so that the edge device monitors data acquisition device messages based on the data acquisition application file.
[0010] According to the data acquisition method based on cloud-edge collaboration provided by the present invention, obtaining the data acquisition application file corresponding to the data acquisition application Docker image includes:
[0011] The data acquisition application Docker image is sent to a target image warehouse, so that after the data acquisition application file is generated based on the data acquisition application Docker image in the target image warehouse, the data acquisition application file issued by the target image warehouse is received.
[0012] According to the data acquisition method based on cloud-edge collaboration provided by the present invention, the data acquisition application file is sent to the edge device, so that the edge device monitors the data acquisition device message based on the data acquisition application file, including:
[0013] The data acquisition application file is sent to the edge device, and the edge device is controlled to enable the data acquisition application file, so as to create a communication port after the data acquisition application file is enabled, and listen to the data acquisition device message. The communication port is the communication port between the edge device and the data acquisition device.
[0014] The data collection method based on cloud-edge collaboration provided by the present invention also includes:
[0015] After the edge device parses the data acquisition device message based on the preset arrangement information, the parsed data of the data acquisition device message returned by the edge device is received.
[0016] According to the data collection method based on cloud-edge collaboration provided by the present invention, the parsed data of the data collection device message is the data sent by the edge device based on the MQTT protocol.
[0017] According to the data acquisition method based on cloud-edge collaboration provided by the present invention, the data acquisition device characteristics include: identification characteristics and communication data characteristics of the data acquisition device.
[0018] The present invention also provides a data acquisition device based on cloud-edge collaboration, comprising:
[0019] An acquisition module is used to acquire the physical model corresponding to the characteristics of the data acquisition equipment;
[0020] A determination module, used to determine the correspondence between the object model and the data acquisition device protocol message;
[0021] A generation module, used to generate a data acquisition application Docker image based on the object model and the corresponding relationship;
[0022] The monitoring module is used to obtain the data acquisition application file corresponding to the data acquisition application Docker image, and send the data acquisition application file to the edge device, so that the edge device can monitor the data acquisition device message based on the data acquisition application file.
[0023] The present invention also provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the data collection method based on cloud-edge collaboration as described in any one of the above items is implemented.
[0024] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements any of the cloud-edge collaboration-based data collection methods described above.
[0025] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements any of the cloud-edge collaboration-based data collection methods described above.
[0026] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the cloud-edge collaboration-based data collection methods described above.
[0027] The data acquisition method, device and server based on cloud-edge collaboration provided by the present invention automatically determine the correspondence between the physical model and the protocol message of the data acquisition device after the edge computing server obtains the physical model corresponding to the characteristics of the data acquisition device, and then uses the physical model and the correspondence to generate a data acquisition application Docker image, and then generates a data acquisition application file, and then automatically sends the data acquisition application file to the edge device, so as to enable the data acquisition application file through the edge device, automatically obtain the data collected by the data acquisition device and return it to the edge computing server. During the whole process, there is no need for software developers to analyze the connection protocol of the data acquisition device, and manually write code, make software and debug software to connect with the data acquisition device, thereby improving the efficiency of obtaining the data collected by the data acquisition device. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0029] Figure 1 It is one of the flow charts of the data acquisition protocol pairing method based on cloud-edge collaboration provided by the present invention;
[0030] Figure 2 This is the second flow chart of the data acquisition protocol pairing method based on cloud-edge collaboration provided by the present invention;
[0031] Figure 3 It is a structural schematic diagram of a data acquisition protocol pair device based on cloud-edge collaboration provided by the present invention;
[0032] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] Combine the following Figure 1-Figure 4 The present invention describes the data collection method, device and server based on cloud-edge collaboration.
[0035] like Figure 1 As shown, the present invention provides a data collection method based on cloud-edge collaboration, comprising:
[0036] Step 110: Obtain the physical model corresponding to the characteristics of the data acquisition device.
[0037] It can be understood that the data collection method based on cloud-edge collaboration provided by the present invention can be executed by an edge computing server.
[0038] Data acquisition equipment is also called data collection equipment. Data acquisition refers to the equipment collecting various changing physical quantities, such as temperature, pressure, vibration, etc., which can be converted into analog electrical signals through corresponding sensors. Data acquisition equipment is a device that converts these analog electrical signals into digital signals and stores them for preprocessing.
[0039] The object model is a digital representation of entities in the physical space (such as sensors, vehicle-mounted devices, buildings, factories, etc.) in the cloud. It describes what the entity is, what it can do, and what information it can provide to the outside world from the three dimensions of attributes, services, and events. Defining these three dimensions of the object model completes the definition of product functions.
[0040] Furthermore, a World Wide Web page is provided on the edge computing server, and the user can input the characteristics of the data acquisition device on the World Wide Web page. The edge computing server can generate a corresponding physical model based on the characteristics of the data acquisition device input by the user.
[0041] Step 120: Determine the correspondence between the object model and the data acquisition device protocol message.
[0042] It is understandable that the data acquisition equipment protocol may be the MODBUS protocol, which is a serial communication protocol published by Modicon (now Schneider Electric) in 1979 for communication using programmable logic controllers.
[0043] The data acquisition device is one or more data acquisition devices connected to the edge device, which can collect indicator data such as temperature, humidity, and power consumption through the MODBUS protocol.
[0044] Step 130: Generate a data acquisition application Docker image based on the object model and the corresponding relationship.
[0045] It can be understood that the data acquisition application Docker image is generated according to the device model, device type and communication protocol in the object model and the corresponding relationship after orchestration.
[0046] Step 140: Obtain a data acquisition application file corresponding to the data acquisition application Docker image, and send the data acquisition application file to an edge device, so that the edge device monitors data acquisition device messages based on the data acquisition application file.
[0047] It can be understood that after the edge computing server downloads the application file from the target image repository, it sends the application file to the edge device, and the edge device monitors the data acquisition device message.
[0048] In some embodiments, obtaining the data acquisition application file corresponding to the data acquisition application Docker image includes:
[0049] The data acquisition application Docker image is sent to a target image warehouse, so that after the data acquisition application file is generated based on the data acquisition application Docker image in the target image warehouse, the data acquisition application file issued by the target image warehouse is received.
[0050] It is understandable that the target image warehouse can be the image warehouse of the edge computing server. After the edge computing server sends the data acquisition application Docker image to the target image warehouse, the target image warehouse generates the data acquisition application file based on the data acquisition application Docker image. The target image warehouse centrally processes the data acquisition application Docker images uploaded by different edge computing servers, which can improve data processing efficiency.
[0051] In some embodiments, the sending of the data acquisition application file to the edge device so that the edge device monitors data acquisition device messages based on the data acquisition application file includes:
[0052] The data acquisition application file is sent to the edge device, and the edge device is controlled to enable the data acquisition application file, so as to create a communication port after the data acquisition application file is enabled, and listen to the data acquisition device message. The communication port is the communication port between the edge device and the data acquisition device.
[0053] It can be understood that after the data acquisition application file is enabled and a communication port is created, data communication can be achieved with the data acquisition device. After collecting the data, the data acquisition device sends the collected data to the edge device through the communication port, and the edge device then sends the collected data to the edge computing server.
[0054] In some embodiments, the data collection method based on cloud-edge collaboration further includes:
[0055] After the edge device parses the data acquisition device message based on the preset arrangement information, the parsed data of the data acquisition device message returned by the edge device is received.
[0056] It is understandable that the initial data collected by the data acquisition equipment through the corresponding sensors are analog electrical signals, and the data acquisition equipment converts these analog electrical signals into digital signals, namely, data acquisition equipment messages. The data acquisition equipment messages are parsed based on the preset arrangement information, and the parsed data obtained is the data that meets the required format.
[0057] In some embodiments, the parsed data of the data acquisition device message is data sent by the edge device based on the MQTT (Message Queuing Telemetry Transport) protocol.
[0058] It can be understood that the MQTT protocol is a message queue transmission protocol that uses a subscription and publishing mechanism. Subscribers only receive data to which they have subscribed, and do not receive non-subscribed data. This ensures the exchange of necessary data and avoids the storage and processing of invalid data.
[0059] In some embodiments, the data acquisition device characteristics include: identification characteristics and communication data characteristics of the data acquisition device.
[0060] It can be understood that the identification features of the data acquisition equipment include features such as the data acquisition equipment model and data acquisition equipment type, and the communication data features of the data acquisition equipment include features such as the communication protocol, communication address, function code, data length, register data and cyclic redundancy check code.
[0061] In some other embodiments, the data collection method based on cloud-edge collaboration is as follows: Figure 2As shown, the edge computing server determines the data acquisition protocol, configures the data acquisition device object model, arranges the correspondence between the object model and the data acquisition protocol message, generates the data acquisition application Docker image, generates and sends the data acquisition application file, starts the data acquisition application file on the edge device, monitors the data acquisition device message, parses the data according to the preset orchestration information, and uploads it to the edge computing server based on the MQTT protocol.
[0062] To summarize, the data acquisition method based on cloud-edge collaboration provided by the present invention includes: obtaining a physical model corresponding to the characteristics of a data acquisition device; determining the correspondence between the physical model and the protocol message of the data acquisition device; generating a data acquisition application Docker image based on the physical model and the correspondence; obtaining a data acquisition application file corresponding to the data acquisition application Docker image, and sending the data acquisition application file to an edge device, so that the edge device can monitor the data acquisition device message based on the data acquisition application file.
[0063] In the data acquisition method based on cloud-edge collaboration provided by the present invention, after the edge computing server obtains the physical model corresponding to the characteristics of the data acquisition device, it automatically determines the correspondence between the physical model and the protocol message of the data acquisition device, and then uses the physical model and the correspondence to generate a data acquisition application Docker image, and then generates a data acquisition application file, and then automatically sends the data acquisition application file to the edge device, so as to enable the data acquisition application file through the edge device, automatically obtain the data collected by the data acquisition device and return it to the edge computing server. During the whole process, there is no need for software developers to analyze the connection protocol of the data acquisition device, and manually write code, make software and debug software to connect with the data acquisition device, thereby improving the efficiency of obtaining the data collected by the data acquisition device.
[0064] The data collection device based on cloud-edge collaboration provided by the present invention is described below. The data collection device based on cloud-edge collaboration described below and the data collection method based on cloud-edge collaboration described above can be referenced to each other.
[0065] like Figure 3 As shown, the data acquisition device 300 based on cloud-edge collaboration provided by the present invention includes:
[0066] An acquisition module 310 is used to acquire a physical model corresponding to the characteristics of the data acquisition device;
[0067] A determination module 320 is used to determine the correspondence between the object model and the data acquisition device protocol message;
[0068] A generation module 330, configured to generate a data acquisition application Docker image based on the object model and the corresponding relationship;
[0069] The monitoring module 340 is used to obtain the data acquisition application file corresponding to the data acquisition application Docker image, and send the data acquisition application file to the edge device, so that the edge device can monitor the data acquisition device message based on the data acquisition application file.
[0070] In the data acquisition device 300 based on cloud-edge collaboration provided by the present invention, after the edge computing server obtains the physical model corresponding to the characteristics of the data acquisition device, it automatically determines the correspondence between the physical model and the protocol message of the data acquisition device, and then uses the physical model and the correspondence to generate a data acquisition application Docker image, and then generates a data acquisition application file, and then automatically sends the data acquisition application file to the edge device, so as to enable the data acquisition application file through the edge device, automatically obtain the data collected by the data acquisition device and return it to the edge computing server. During the whole process, there is no need for software developers to analyze the connection protocol of the data acquisition device, and manually write code, make software and debug software to connect with the data acquisition device, thereby improving the efficiency of obtaining the data collected by the data acquisition device.
[0071] The present invention also provides a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the data collection method based on cloud-edge collaboration as described in any one of the above items is implemented.
[0072] The electronic device, computer program product and storage medium provided by the present invention are described below. The electronic device, computer program product and storage medium described below can be referenced to each other with the data collection method based on cloud-edge collaboration described above.
[0073] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the data collection method based on cloud-edge collaboration, and the method includes:
[0074] Obtain the physical model corresponding to the characteristics of the data acquisition equipment;
[0075] Determine the correspondence between the object model and the data acquisition device protocol message;
[0076] Based on the object model and the corresponding relationship, generate a data acquisition application Docker image;
[0077] Obtain a data acquisition application file corresponding to the data acquisition application Docker image, and send the data acquisition application file to an edge device, so that the edge device monitors data acquisition device messages based on the data acquisition application file.
[0078] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0079] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the data collection method based on cloud-edge collaboration provided by the above methods, the method includes:
[0080] Obtain the physical model corresponding to the characteristics of the data acquisition equipment;
[0081] Determine the correspondence between the object model and the data acquisition device protocol message;
[0082] Based on the object model and the corresponding relationship, generate a data acquisition application Docker image;
[0083] Obtain a data acquisition application file corresponding to the data acquisition application Docker image, and send the data acquisition application file to an edge device, so that the edge device monitors data acquisition device messages based on the data acquisition application file.
[0084] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to execute the data collection method based on cloud-edge collaboration provided by the above methods, the method comprising:
[0085] Obtain the physical model corresponding to the characteristics of the data acquisition equipment;
[0086] Determine the correspondence between the object model and the data acquisition device protocol message;
[0087] Based on the object model and the corresponding relationship, generate a data acquisition application Docker image;
[0088] Obtain a data acquisition application file corresponding to the data acquisition application Docker image, and send the data acquisition application file to an edge device, so that the edge device monitors data acquisition device messages based on the data acquisition application file.
[0089] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data collection method based on cloud-edge collaboration, characterized in that: include: Obtain the physical model corresponding to the characteristics of the data acquisition equipment; Determine the correspondence between the object model and the data acquisition device protocol message; Based on the object model and the corresponding relationship, generate a data acquisition application Docker image; Obtain a data acquisition application file corresponding to the data acquisition application Docker image, and send the data acquisition application file to an edge device, so that the edge device monitors data acquisition device messages based on the data acquisition application file; The step of sending the data acquisition application file to the edge device so that the edge device monitors data acquisition device messages based on the data acquisition application file includes: The data acquisition application file is sent to the edge device, and the edge device is controlled to enable the data acquisition application file, so as to create a communication port after the data acquisition application file is enabled, and monitor the data acquisition device message. The communication port is the communication port between the edge device and the data acquisition device.
2. The data collection method based on cloud-edge collaboration according to claim 1 is characterized in that: The obtaining of the data acquisition application file corresponding to the data acquisition application Docker image includes: The data acquisition application Docker image is sent to a target image warehouse, so that after the data acquisition application file is generated based on the data acquisition application Docker image in the target image warehouse, the data acquisition application file issued by the target image warehouse is received.
3. The data collection method based on cloud-edge collaboration according to claim 1 is characterized in that: Also includes: After the edge device parses the data acquisition device message based on the preset arrangement information, the parsed data of the data acquisition device message returned by the edge device is received.
4. The data collection method based on cloud-edge collaboration according to claim 1 is characterized in that: The parsed data of the data acquisition device message is the data sent by the edge device based on the MQTT protocol.
5. The data collection method based on cloud-edge collaboration according to any one of claims 1 to 4, characterized in that: The data acquisition device characteristics include: identification characteristics and communication data characteristics of the data acquisition device.
6. A data collection device based on cloud-edge collaboration, characterized in that: include: An acquisition module is used to acquire the physical model corresponding to the characteristics of the data acquisition equipment; A determination module, used to determine the correspondence between the object model and the data acquisition device protocol message; A generation module, used to generate a data acquisition application Docker image based on the object model and the corresponding relationship; A monitoring module, used to obtain the data acquisition application file corresponding to the data acquisition application Docker image, and send the data acquisition application file to the edge device, so that the edge device monitors the data acquisition device message based on the data acquisition application file; The step of sending the data acquisition application file to the edge device so that the edge device monitors data acquisition device messages based on the data acquisition application file includes: The data acquisition application file is sent to the edge device, and the edge device is controlled to enable the data acquisition application file, so as to create a communication port after the data acquisition application file is enabled, and monitor the data acquisition device message. The communication port is the communication port between the edge device and the data acquisition device.
7. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements the data collection method based on cloud-edge collaboration as described in any one of claims 1 to 5.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the data collection method based on cloud-edge collaboration as described in any one of claims 1 to 5.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the data collection method based on cloud-edge collaboration as described in any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the data collection method based on cloud-edge collaboration as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Network data analysis method and device
CN110719194A
Protocol conversion method and device, computer equipment and storage medium
CN113542267A