Equipment data processing method and device, equipment and computer readable storage medium

By introducing a multi-layer architecture into the device monitoring platform, acquiring and processing the data of the target device, the problem of the traditional platform being limited by a single communication method is solved, and the compatibility of multiple communication protocols and unified conversion of data formats is achieved, which improves the applicability and universality of the platform.

CN120034590APending Publication Date: 2025-05-23SHENZHEN SILICON MOUNTAIN TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510097527.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

Due to the limitations of a single communication method, traditional equipment monitoring platforms are difficult to meet the needs of multiple application scenarios, resulting in a significant reduction in their applicability and versatility.

Method used

By introducing a multi-layer architecture into the device monitoring platform, including the communication layer, protocol layer and application layer, we obtain the operating status of the target device and select the appropriate interface to connect according to its communication protocol, obtain the device data, and convert the data format through the protocol layer, and finally process and display it at the application layer.

Benefits of technology

It realizes compatibility of the device monitoring platform for multiple communication protocols, can convert device data from different protocols into a unified format, meets diverse device communication needs, and improves the applicability and universality of the platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034590A_ABST
    Figure CN120034590A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment data processing method and device, equipment and a computer readable storage medium, the method is applied to an equipment monitoring platform, the equipment monitoring platform comprises a communication layer, a protocol layer and an application layer, and the method comprises the following steps: obtaining the running state of target equipment, and if the running state is a normal running state, sending the target equipment to a server; if yes, acquiring a communication protocol of the target equipment; selecting a target communication protocol interface in the communication layer according to the communication protocol to be connected with target equipment, and acquiring equipment data of the target equipment; converting the data format of the equipment data into a target equipment data format based on a protocol layer to obtain target equipment data; and processing the target equipment data based on the application layer according to the target instruction, and displaying a processing result. The equipment monitoring platform can be compatible with various communication protocols, and meanwhile, the data format of the equipment data of each communication protocol can be converted into the uniform target equipment data format, so that the diversification of equipment communication requirements can be met, and the applicability and universality of the equipment monitoring platform are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a device data processing method, apparatus, device and computer-readable storage medium. Background Art

[0002] Traditional equipment monitoring platforms usually collect and manage equipment data based on specific communication methods.

[0003] However, with the diversification of equipment communication requirements, a single communication method is difficult to meet the needs of various application scenarios, which greatly reduces the applicability and versatility of existing equipment monitoring platforms. Summary of the invention

[0004] The embodiments of the present application provide a device data processing method, apparatus, device, and computer-readable storage medium, which can improve the accuracy of device data processing.

[0005] In a first aspect, an embodiment of the present application provides a device data processing method, the device data processing method is applied to a device monitoring platform, the device monitoring platform includes a communication layer, a protocol layer and an application layer, the method includes:

[0006] Obtaining the operating state of the target device, and if the operating state is a normal operating state, obtaining the communication protocol of the target device;

[0007] Selecting a target communication protocol interface in the communication layer according to the communication protocol to connect to the target device, and acquiring device data of the target device;

[0008] Converting the data format of the device data into a target device data format based on the protocol layer to obtain target device data;

[0009] Based on the application layer, the target device data is processed according to the target instruction, and the processing result is displayed.

[0010] Optionally, the communication layer includes a plurality of communication protocol interfaces, and the step of selecting a target communication protocol interface in the communication layer to connect with the target device according to the communication protocol, and acquiring device data of the target device based on the communication layer includes:

[0011] Compare the communication protocol with the protocol labels corresponding to each communication protocol interface in the communication layer, and use the communication protocol interface with the same protocol label as the communication protocol as the target communication protocol interface;

[0012] The target device is connected based on the target communication protocol interface, and the device data of the target device is acquired based on the target communication protocol interface.

[0013] Optionally, converting the data format of the device data into a target device data format based on the protocol layer to obtain the target device data includes:

[0014] Sending the device data to the protocol layer using a preset standard interface based on the communication layer;

[0015] The data format of the device data is compared with the target device data format based on the protocol layer. If the data format is different from the target device data format, the data format is converted into the target device data format to obtain the target device data.

[0016] Optionally, the data format includes: a data frame format and a data byte order format, and the converting the data format into the target device data format to obtain the target device data includes:

[0017] Based on the protocol layer and according to a preset conversion configuration file, the data byte order format of the device data is converted into a target device data byte order format to obtain target device data.

[0018] Optionally, the responding to the target instruction, based on the application layer processing the target device data according to the target instruction and displaying the processing result, includes:

[0019] Generate a control instruction based on the processing result at the application layer, and send the control instruction to the protocol layer;

[0020] Parsing the control instruction based on the protocol layer to obtain control data;

[0021] Based on the protocol layer and according to a preset conversion configuration file, converting the data format of the control data into the data format of the target device to obtain target control data;

[0022] The target control data is sent to the communication layer based on the protocol layer, and the target control data is sent to the target device through the target communication protocol interface based on the communication layer.

[0023] Optionally, after obtaining the operating status of the target device, the method further includes:

[0024] If the operating state is an abnormal operating state, obtaining device parameters of the target device;

[0025] Creating a virtual device in the application layer according to the device parameters;

[0026] The target device is debugged based on the communication layer, the application layer and the virtual device.

[0027] Optionally, the communication layer includes a virtual data interface, and the debugging of the target device based on the communication layer, the application layer and the virtual device includes:

[0028] Generate debugging data based on the virtual data interface in the communication layer, and send the debugging data to the application layer;

[0029] Based on the application layer, according to the debugging data and the virtual device, the sending and receiving of data by the target device is simulated to debug the target device.

[0030] In a second aspect, an embodiment of the present application provides a device data processing apparatus, the device data processing apparatus comprising:

[0031] an acquisition unit, configured to acquire the operating state of the target device, and if the operating state is a normal operating state, acquire the communication protocol of the target device;

[0032] A connecting unit, configured to select a target communication protocol interface in the communication layer according to the communication protocol to connect to the target device, and obtain device data of the target device;

[0033] A conversion unit, configured to convert the data format of the device data into a target device data format based on the protocol layer to obtain target device data;

[0034] A processing unit is used to process the target device data according to the target instruction based on the application layer and display the processing result.

[0035] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing a computer program; a processor loads the computer program from the memory to execute the steps of any device data processing method provided in the embodiment of the present application.

[0036] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program is suitable for loading by a processor to execute the steps of any device data processing method provided in the embodiment of the present application.

[0037] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any device data processing method provided in the embodiment of the present application.

[0038] Using the solution of the embodiment of the present application, the device monitoring platform includes a communication layer, a protocol layer and an application layer. The operating status of the target device is obtained. If the operating status is a normal operating status, the communication protocol of the target device is obtained; according to the communication protocol, the target communication protocol interface is selected in the communication layer to connect with the target device, and the device data of the target device is obtained; based on the protocol layer, the data format of the device data is converted into the target device data format to obtain the target device data; based on the application layer, the target device data is processed according to the target instruction, and the processing results are displayed. The device monitoring platform can be compatible with multiple communication protocols, and at the same time, the data format of the device data of each communication protocol can be converted into a unified target device data format, which can meet the diversity of device communication needs and improve the applicability and versatility of the device monitoring platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0040] Figure 1 It is a flowchart of a first embodiment of a device data processing method provided in an embodiment of the present application;

[0041] Figure 2 It is a flowchart of a second embodiment of the device data processing method provided in the embodiments of the present application;

[0042] Figure 3 It is a schematic flow chart of a third embodiment of the device data processing method provided in the embodiments of the present application;

[0043] Figure 4 It is a flowchart of a fourth embodiment of the device data processing method provided in the embodiments of the present application;

[0044] Figure 5 It is a flowchart of a fifth embodiment of the device data processing method provided in the embodiments of the present application;

[0045] Figure 6 is a structural schematic diagram of a device data processing apparatus provided in an embodiment of the present application;

[0046] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0048] Embodiments of the present application provide a device data processing method, apparatus, device, and computer-readable storage medium.

[0049] Specifically, this embodiment will be described from the perspective of an electronic device, which can be integrated into a device data processing apparatus, that is, the device data processing method of the embodiment of the present application can be executed by the electronic device.

[0050] The device data processing method provided in the embodiment of the present application is applied to devices such as air conditioners and refrigerators that rely on refrigerants to work.

[0051] The following is a detailed description in conjunction with the accompanying drawings. In this embodiment, the execution subject is an electronic device as an example. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings.

[0052] Please refer to Figure 1 , a first embodiment of the device data processing method is proposed. In the first embodiment, the device data processing method is applied to a device monitoring platform, the device monitoring platform includes a communication layer, a protocol layer and an application layer, and the method includes:

[0053] Step 101, obtaining the operating state of the target device, and if the operating state is a normal operating state, obtaining the communication protocol of the target device;

[0054] Step 102, selecting a target communication protocol interface in the communication layer according to the communication protocol to connect to the target device, and obtaining device data of the target device;

[0055] Step 103, converting the data format of the device data into the target device data format based on the protocol layer to obtain the target device data;

[0056] Step 104: Process the target device data according to the target instruction based on the application layer, and display the processing result.

[0057] In this embodiment, the device monitoring platform includes a communication layer, a protocol layer and an application layer; the communication layer is the foundation of the device monitoring platform and is responsible for interacting with the communication interface of the device; the protocol layer implements the parsing and format conversion of device data of multiple communication protocols; the application layer implements the data processing functions of the device monitoring platform, such as data monitoring, device control, fault diagnosis, etc. The device monitoring platform obtains the operating status of the target device, and if the operating status is a normal operating status, the communication protocol of the target device is obtained; the device monitoring platform selects the target communication protocol interface in the communication layer according to the communication protocol to connect with the target device, and obtains the device data of the target device based on the communication layer; the device monitoring platform converts the data format of the device data into the target device data format based on the protocol layer to obtain the target device data; the device monitoring platform processes the target device data according to the target instruction based on the application layer, and displays the processing results.

[0058] Among them, the communication protocols of the target device include CAN communication protocol, USB communication protocol, WiFi communication protocol, etc.; the communication layer of the equipment monitoring platform supports multiple communication protocols such as CAN communication protocol, USB communication protocol, WiFi communication protocol, etc. When the equipment monitoring platform determines that the target device is in normal operation, it can communicate with the target device based on the communication layer using the communication protocol corresponding to the target device, thereby obtaining the device data of the target device.

[0059] It should be noted that the equipment monitoring platform adopts a modular design, and the data of each communication protocol is exchanged with the protocol layer through a standard interface. The modular design makes the equipment monitoring platform have good scalability, and users can flexibly add new communication modules or functional modules according to actual needs.

[0060] Specifically, each step is described in detail below:

[0061] Step 101, obtaining the operating state of the target device, and if the operating state is a normal operating state, obtaining the communication protocol of the target device;

[0062] In this step, the device monitoring platform obtains the operating status of the target device. If the operating status is a normal operating status, the communication protocol of the target device is obtained; wherein, if the operating status of the target device is a working status, it is determined that the target device is in a normal operating status; if the operating status of the target device is a status such as the device is offline, the hardware is unavailable, or the device is under development, it is determined that the target device is in an abnormal operating status.

[0063] Step 102, selecting a target communication protocol interface in the communication layer according to the communication protocol to connect to the target device, and obtaining device data of the target device;

[0064] In this step, the device monitoring platform selects the target communication protocol interface in the communication layer according to the communication protocol of the target device to connect to the target device and obtain the device data of the target device; specifically, the communication layer encapsulates support for communication protocols such as CAN, USBHID and Wi-Fi. The communication layer can select the corresponding communication interface to connect to the target device according to the communication protocol of the target device. After the connection, the device monitoring platform can obtain the device data of the target device through the communication layer.

[0065] Step 103, converting the data format of the device data into the target device data format based on the protocol layer to obtain the target device data;

[0066] In this step, the device monitoring platform converts the data format of the device data into the target device data format based on the protocol layer to obtain the target device data. Specifically, after obtaining the device data of the target device, the communication layer sends the device data to the protocol layer, and the protocol layer can convert the data format of the device data into the target device data format that can be processed by the device monitoring platform according to the preset conversion rules to obtain the target device data.

[0067] Step 104: Process the target device data according to the target instruction based on the application layer, and display the processing result.

[0068] In this step, the device monitoring platform processes the target device data according to the target instructions based on the application layer and displays the processing results. Specifically, after obtaining the target device data, the protocol layer sends the target device data to the application layer. The application layer can process the target device data according to the processing target set by the user and display the processing results. Exemplarily, the application layer is responsible for the display and control of the target device data, supports real-time scaling, translation and analysis of the target device data, monitors the changes of the target device data in real time, and displays the data processing results to the user in the form of curve graphs, bar charts and data tables through a user-friendly interface.

[0069] Furthermore, with respect to the communication layer, the user can flexibly select a communication interface of a corresponding communication protocol based on the user-friendly interface of the application layer to connect to the target device.

[0070] The device monitoring platform of this embodiment includes a communication layer, a protocol layer, and an application layer. The operating status of the target device is obtained. If the operating status is a normal operating status, the communication protocol of the target device is obtained; according to the communication protocol, the target communication protocol interface is selected in the communication layer to connect with the target device, and the device data of the target device is obtained; based on the protocol layer, the data format of the device data is converted into the target device data format to obtain the target device data; based on the application layer, the target device data is processed according to the target instruction, and the processing results are displayed. The device monitoring platform can be compatible with multiple communication protocols, and at the same time, the data format of the device data of each communication protocol can be converted into a unified target device data format, which can meet the diversity of device communication needs and improve the applicability and versatility of the device monitoring platform.

[0071] Please refer to Figure 2 , Figure 2 This is the second embodiment of the present application. The difference between the second embodiment and the first embodiment is that the communication layer includes multiple communication protocol interfaces, and the target communication protocol interface is selected in the communication layer according to the communication protocol to connect with the target device, and the device data of the target device is obtained based on the communication layer, including:

[0072] Step 201, comparing the communication protocol with the protocol labels corresponding to each communication protocol interface in the communication layer, and taking the communication protocol interface having the same protocol label as the communication protocol as the target communication protocol interface;

[0073] In this step, the communication layer includes a plurality of communication protocol interfaces, and the device monitoring platform compares the communication protocol of the target device with the protocol label corresponding to each communication protocol interface in the communication layer, and takes the communication protocol interface having the same protocol label as the communication protocol as the target communication protocol interface. Exemplarily, the communication layer includes three communication interfaces, namely the first communication interface, the second communication interface and the third communication interface, the protocol label corresponding to the first communication interface is the CAN communication protocol, the protocol label corresponding to the second communication interface is the USB communication protocol, and the protocol label corresponding to the third communication interface is the WiFi communication protocol. If the communication protocol of the target device is the CAN communication protocol, the device monitoring platform selects the first communication interface of the communication layer as the target communication protocol interface, if the communication protocol of the target device is the USB communication protocol, the device monitoring platform selects the second communication interface of the communication layer as the target communication protocol interface, and if the communication protocol of the target device is the WiFi communication protocol, the device monitoring platform selects the third communication interface of the communication layer as the target communication protocol interface.

[0074] Optionally, the device monitoring platform can determine the communication protocol of the target device based on the target device information input by the user in the application layer, and then determine the target communication protocol interface in the communication layer; optionally, the device monitoring platform can determine the target communication protocol interface in the communication layer based on the communication interface selection instruction input by the user in the application layer.

[0075] Step 202: connecting to the target device based on the target communication protocol interface, and acquiring device data of the target device based on the target communication protocol interface.

[0076] In this step, the device monitoring platform is connected to the target device based on the target communication protocol interface, and obtains the device data of the target device based on the target communication protocol interface.

[0077] The device monitoring platform of this embodiment compares the communication protocol with the protocol labels corresponding to each communication protocol interface in the communication layer, and uses the communication protocol interface with the same protocol label as the communication protocol as the target communication protocol interface; connects with the target device based on the target communication protocol interface, and obtains the device data of the target device based on the target communication protocol interface. This makes the device monitoring platform compatible with multiple communication protocols, and can then connect with devices of various communication protocols, thereby improving the applicability and versatility of the device monitoring platform.

[0078] Please refer to Figure 3 , Figure 3 This is the third embodiment of the present application. The difference between the third embodiment and the first to second embodiments is that the data format of the device data is converted into the target device data format based on the protocol layer to obtain the target device data, including:

[0079] Step 301, sending the device data to the protocol layer using a preset standard interface based on the communication layer;

[0080] In this step, the device monitoring platform uses a preset standard interface based on the communication layer to send the device data to the protocol layer. It is understandable that there are multiple standard interfaces set in advance between the communication layer and the protocol layer. Exemplarily, it includes: a first standard interface for transmitting device data of the CAN communication protocol, a second standard interface for transmitting device data of the USB communication protocol, and a third standard interface for transmitting device data of the WiFi communication protocol. When the communication layer receives device data of the CAN communication protocol, the first standard interface is used to send the device data to the protocol layer; when the communication layer receives device data of the USB communication protocol, the second standard interface is used to send the device data to the protocol layer; when the communication layer receives device data of the WiFi communication protocol, the third standard interface is used to send the device data to the protocol layer.

[0081] Step 302: Compare the data format of the device data with the target device data format based on the protocol layer. If the data format is different from the target device data format, convert the data format into the target device data format to obtain the target device data.

[0082] In this step, the device monitoring platform compares the data format of the device data with the target device data format based on the protocol layer. If the data format is different from the target device data format, the data format is converted into the target device data format to obtain the target device data. If the data format is the same as the target device data format, there is no need to convert the data format into the target device data format, and the device data sent by the communication layer is used as the target device data.

[0083] Exemplarily, the target device data format is Big-endian (Motorola format), the data format of the device data of the CAN communication protocol uses Big-endian (Motorola format) by default, the data format of the device data of the USB communication protocol usually uses Little-endian (Intel format), and the data format of the device data of the WiFi communication protocol usually uses Little-endian (Intel format). Therefore, when the protocol layer receives device data of the CAN communication protocol, there is no need to convert the data format of the device data of the CAN communication protocol into the target device data format; when the protocol layer receives device data of the USB communication protocol, or device data of the WiFi communication protocol, the third standard interface is used to send the device data to the protocol layer to convert the data format of the device data of the USB communication protocol or the WiFi communication protocol into the target device data format, that is, the device data of the USB communication protocol or the WiFi communication protocol is converted into the device data of the CAN communication protocol.

[0084] Specifically, the data format includes: a data frame format and a data byte order format, and the converting of the data format into the target device data format to obtain the target device data includes:

[0085] Step 3021: Based on the protocol layer and according to a preset conversion configuration file, convert the data byte order format of the device data into the target device data byte order format to obtain the target device data.

[0086] In this step, the device monitoring platform converts the data byte order format of the device data into the target device data byte order format based on the protocol layer according to a preset conversion configuration file to obtain the target device data.

[0087] Specifically, the device monitoring platform configures the device's CAN frames, analog quantities, status quantities, and alarm quantities through Microsoft Excel / WPS Office to generate a recognizable device frame database. The database supports standard frames and extended frames, as well as multiple data formats (such as Intel format and Motorola format); the device frame database generates a preset conversion configuration file based on the database, thereby realizing the conversion between the data byte order format of Intel format and Motorola format.

[0088] The device monitoring platform of this embodiment uses a preset standard interface based on the communication layer to send the device data to the protocol layer; based on the protocol layer, the data format of the device data is compared with the target device data format. If the data format is different from the target device data format, the data format is converted to the target device data format to obtain the target device data. Device data of different communication protocols can be converted into data that can be uniformly processed by the device monitoring platform, so that the device monitoring platform can be compatible with multiple communication protocols, and can then be connected to devices of various communication protocols, thereby improving the applicability and versatility of the device monitoring platform.

[0089] Please refer to Figure 4 , Figure 4 This is the fourth embodiment of the present application. The difference between the fourth embodiment and the first to third embodiments is that, in response to the target instruction, based on the application layer, processes the target device data according to the target instruction and displays the processing result, it includes:

[0090] Step 401, generating a control instruction based on the application layer according to the processing result, and sending the control instruction to the protocol layer;

[0091] In this step, the device monitoring platform processes the target device data according to the target instruction based on the application layer, and after displaying the processing result, if the control instruction is generated based on the application layer according to the processing result, the control instruction is sent to the protocol layer. Exemplarily, after the device monitoring platform displays the data processing result to the user in the form of a curve chart, a bar chart, and a data table based on a user-friendly interface, the user can issue the corresponding control instruction based on the user-friendly interface to adjust the device.

[0092] Step 402, parsing the control instruction based on the protocol layer to obtain control data;

[0093] In this step, the equipment monitoring platform parses the control instruction based on the protocol layer to obtain control data. For example, the control instruction is an instruction generated based on the CAN communication protocol, and the protocol layer can parse the control instruction to obtain control data based on the preset parsing rules of the CAN communication protocol.

[0094] Step 403, based on the protocol layer and according to a preset conversion configuration file, convert the data format of the control data into the data format of the target device to obtain target control data;

[0095] In this step, the device monitoring platform converts the data format of the control data into the data format of the target device based on the protocol layer according to the preset conversion configuration file to obtain the target control data. Exemplarily, the control instruction is an instruction generated based on the CAN communication protocol, and the protocol layer can parse the control instruction based on the preset parsing rules of the CAN communication protocol to obtain the control data, and the control data is the data of the CAN communication protocol. At this time, the protocol layer determines the communication protocol supported by the target device to which the control data needs to be sent. If the target device supports the USB communication protocol and the WiFi communication protocol, it is determined that the data format supported by the target device is Little-endian (Intel format), and the control data is converted from Big-endian (Motorola format) to Little-endian (Intel format) to obtain the target control data.

[0096] For example, when capturing device data of the CAN communication protocol, the device monitoring platform uses regular expression technology to automatically identify and extract various data elements of the device data of the CAN communication protocol. This technology does not depend on the specific platform data packet format. It improves the efficiency and accuracy of data parsing by simplifying the unpacking code and reducing manual configuration. This method makes the platform more compatible and versatile when facing device data of the CAN communication protocol from different sources.

[0097] Step 404: sending the target control data to the communication layer based on the protocol layer, and sending the target control data to the target device through the target communication protocol interface based on the communication layer.

[0098] In this step, the device monitoring platform sends the target control data to the communication layer based on the protocol layer, and sends the target control data to the target device through the target communication protocol interface based on the communication layer. Specifically, the communication layer encapsulates support for communication protocols such as CAN, USB HID and Wi-Fi. The communication layer can select the corresponding communication interface to connect to the target device according to the communication protocol of the target device. When the target device supports the USB communication protocol, the communication layer connects to the target device through the interface of the USB HID communication protocol and sends the target control data to the target device.

[0099] The device monitoring platform of this embodiment converts the data format of the control data based on the protocol layer, and sends the control data with the converted data format to the target device based on the communication layer, thereby realizing the device monitoring platform sending control data to target devices with different communication protocols, thereby improving the applicability and versatility of the device monitoring platform.

[0100] Please refer to Figure 5 , Figure 5 This is the fifth embodiment of the present application. The difference between the fifth embodiment and the first to fourth embodiments is that after obtaining the operating status of the target device, the method includes:

[0101] Step 501, if the operating state is an abnormal operating state, obtaining device parameters of the target device;

[0102] In this step, if the device monitoring platform determines that the operating state of the target device is an abnormal operating state, the device parameters of the target device are obtained. Specifically, the abnormal operating state includes the device being offline, the hardware being unavailable, the device being under development, etc. The device parameters of the target device obtained include: hardware parameters, electrical parameters, power requirement parameters, electrical interface parameters, communication protocol parameters, functional parameters, sensor and actuator parameters, software and firmware parameters, security and authentication parameters, maintenance and scalability parameters, environmental impact parameters, etc.

[0103] Step 502, creating a virtual device in the application layer according to the device parameters;

[0104] In this step, the device monitoring platform creates virtual devices in the application layer according to the device parameters. Specifically, the process of creating virtual devices in the application layer according to the device parameters includes multiple steps such as demand analysis, parameter collection, modeling tool selection, physical and electrical modeling, control system modeling, simulation and optimization, verification and iteration, and document generation.

[0105] Step 503: Debug the target device based on the communication layer, the application layer and the virtual device.

[0106] In this step, the device monitoring platform debugs the target device based on the communication layer, application layer and virtual device.

[0107] Specifically, the communication layer includes a virtual data interface, and the debugging of the target device based on the communication layer, the application layer and the virtual device includes:

[0108] Step 5031, generating debugging data based on the virtual data interface in the communication layer, and sending the debugging data to the application layer;

[0109] In this step, the device monitoring platform generates debugging data based on the virtual data interface in the communication layer and sends the debugging data to the application layer. The virtual data interface in the communication layer can generate random data or import data from a historical data file for device debugging and testing.

[0110] Step 5032: Based on the application layer, according to the debugging data and the virtual device, simulate the target device's sending and receiving of data to debug the target device.

[0111] In this step, the device monitoring platform, based on the application layer, according to the debugging data and the virtual device, simulates the target device's sending and receiving of data to debug the target device.

[0112] If the operating state of the device monitoring platform in this embodiment is an abnormal operating state, it acquires the device parameters of the target device; creates a virtual device in the application layer according to the device parameters; and debugs the target device based on the communication layer, the application layer, and the virtual device. Data transmission and reception and system debugging can be carried out without an actual physical device. This ability significantly improves the efficiency of development and testing. Especially in the device production and debugging stages, potential problems can be discovered in advance, reducing the time and cost of on-site debugging.

[0113] This embodiment also provides a device data processing device, as Figure 6 shown. The device data processing device may include:

[0114] An acquisition unit 1001, configured to acquire the operating state of the target device. If the operating state is a normal operating state, acquire the communication protocol of the target device;

[0115] A connection unit 1002, configured to select a target communication protocol interface in the communication layer according to the communication protocol to connect to the target device and acquire the device data of the target device;

[0116] A conversion unit 1003, configured to convert the data format of the device data into a target device data format based on the protocol layer to obtain target device data;

[0117] A processing unit 1004, configured to process the target device data based on the application layer according to the target instruction and display the processing result.

[0118] In an optional example, the connection unit is further configured to:

[0119] Compare the communication protocol with the protocol tags corresponding to each communication protocol interface in the communication layer, and use the communication protocol interface with the same protocol tag as the communication protocol as the target communication protocol interface;

[0120] The target device is connected based on the target communication protocol interface, and the device data of the target device is acquired based on the target communication protocol interface.

[0121] In an optional example, the conversion unit is further configured to:

[0122] Sending the device data to the protocol layer using a preset standard interface based on the communication layer;

[0123] The data format of the device data is compared with the target device data format based on the protocol layer. If the data format is different from the target device data format, the data format is converted into the target device data format to obtain the target device data.

[0124] In an optional example, the conversion unit is further configured to:

[0125] Based on the protocol layer and according to a preset conversion configuration file, the data byte order format of the device data is converted into a target device data byte order format to obtain target device data.

[0126] In an optional example, the device data processing apparatus further includes a control unit, and the control unit is used to:

[0127] Generate a control instruction based on the processing result at the application layer, and send the control instruction to the protocol layer;

[0128] Parsing the control instruction based on the protocol layer to obtain control data;

[0129] Based on the protocol layer and according to a preset conversion configuration file, converting the data format of the control data into the data format of the target device to obtain target control data;

[0130] The target control data is sent to the communication layer based on the protocol layer, and the target control data is sent to the target device through the target communication protocol interface based on the communication layer.

[0131] In an optional example, the device data processing apparatus further includes a debugging unit, and the debugging unit is used to:

[0132] If the operating state is an abnormal operating state, obtaining device parameters of the target device;

[0133] Creating a virtual device in the application layer according to the device parameters;

[0134] The target device is debugged based on the communication layer, the application layer and the virtual device.

[0135] In an optional example, the debug unit is also used to:

[0136] Generate debugging data based on the virtual data interface in the communication layer, and send the debugging data to the application layer;

[0137] Based on the application layer, according to the debugging data and the virtual device, the sending and receiving of data by the target device is simulated to debug the target device.

[0138] The scheme of this embodiment is adopted to obtain the operating status of the target device. If the operating status is a normal operating status, the communication protocol of the target device is obtained; according to the communication protocol, the target communication protocol interface is selected in the communication layer to connect with the target device, and the device data of the target device is obtained; based on the protocol layer, the data format of the device data is converted into the target device data format to obtain the target device data; based on the application layer, the target device data is processed according to the target instruction, and the processing result is displayed. The device monitoring platform can be compatible with multiple communication protocols, and at the same time, the data format of the device data of each communication protocol can be converted into a unified target device data format, which can meet the diversified communication needs of the device and improve the applicability and versatility of the device monitoring platform.

[0139] Accordingly, the present application also provides an electronic device, such as Figure 7 As shown, Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 1100 includes a processor 1101 having one or more processing cores, a memory 1102 having one or more computer-readable storage media, and a computer program stored in the memory 1102 and executable on the processor. The processor 1101 is electrically connected to the memory 1102. It will be understood by those skilled in the art that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0140] The processor 1101 is the control center of the electronic device 1100, and uses various interfaces and lines to connect various parts of the entire electronic device 1100. By running or loading software programs and / or units stored in the memory 1102, and calling data stored in the memory 1102, the processor 1101 executes various functions of the electronic device 1100 and processes data, thereby monitoring the electronic device 1100 as a whole. The processor 1101 can be a processor CPU, a graphics processor GPU, a network processor (Network Processor, NP), etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application.

[0141] In an embodiment of the present application, the processor 1101 in the electronic device 1100 will load the instructions corresponding to the processes of one or more applications into the memory 1102 according to the following steps, and the processor 1101 will run the applications stored in the memory 1102 to implement various functions. The specific implementation can be found in the previous embodiments and will not be repeated here.

[0142] Optional, such as Figure 7 As shown, the electronic device 1100 further includes: a touch screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. The processor 1101 is electrically connected to the touch screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107, respectively. Those skilled in the art can understand that Figure 7 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0143] The touch display screen 1103 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 1103 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-EmittingDiode) and the like. The touch panel can be used to collect the user's touch operation on or near it (such as the user uses any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 1101, and can receive the command sent by the processor 1101 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 1101 to determine the type of touch event, and then the processor 1101 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 1103 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 1103 can also be used as a part of the input unit 1106 to realize the input function.

[0144] The radio frequency circuit 1104 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals between the network device or other electronic devices.

[0145] The audio circuit 1105 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 1105 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 1105 and converted into audio data, and then the audio data is output to the processor 1101 for processing, and then sent to another electronic device through the radio frequency circuit 1104, or the audio data is output to the memory 1102 for further processing. The audio circuit 1105 may also include an earplug jack to provide communication between an external headset and an electronic device.

[0146] The input unit 1106 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0147] The power supply 1107 is used to supply power to various components of the electronic device 1100. Optionally, the power supply 1107 can be logically connected to the processor 1101 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 1107 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0148] although Figure 7 Not shown, the electronic device 1100 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0149] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0150] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0151] To this end, the embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute any device data processing method provided in the embodiment of the present application. The computer program can execute the device data processing method, and the specific implementation can refer to the previous embodiment, which will not be repeated here.

[0152] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0153] Since the computer program stored in the computer-readable storage medium can execute any device data processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any device data processing method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0154] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementations of the above embodiments.

[0155] In the above-mentioned device data processing apparatus, computer-readable storage medium, electronic device, and computer program product embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the above-described device data processing apparatus, computer-readable storage medium, computer program product, electronic device, and corresponding units can refer to the description of the device data processing method in the above embodiment, and will not be repeated here.

[0156] The above is a detailed introduction to a device data processing method, apparatus, device, computer-readable storage medium and computer program product provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A device data processing method, characterized in that: The device data processing method is applied to a device monitoring platform, the device monitoring platform includes a communication layer, a protocol layer and an application layer, and the method includes: Obtaining the operating state of the target device, and if the operating state is a normal operating state, obtaining the communication protocol of the target device; Selecting a target communication protocol interface in the communication layer according to the communication protocol to connect to the target device, and acquiring device data of the target device; Converting the data format of the device data into a target device data format based on the protocol layer to obtain target device data; Based on the application layer, the target device data is processed according to the target instruction, and the processing result is displayed.

2. The device data processing method according to claim 1, characterized in that: The communication layer includes a plurality of communication protocol interfaces, and the step of selecting a target communication protocol interface in the communication layer according to the communication protocol to connect with the target device, and acquiring device data of the target device based on the communication layer includes: Compare the communication protocol with the protocol labels corresponding to each communication protocol interface in the communication layer, and use the communication protocol interface with the same protocol label as the communication protocol as the target communication protocol interface; The target device is connected based on the target communication protocol interface, and the device data of the target device is acquired based on the target communication protocol interface.

3. The device data processing method according to claim 1, characterized in that: The converting the data format of the device data into the target device data format based on the protocol layer to obtain the target device data includes: Sending the device data to the protocol layer using a preset standard interface based on the communication layer; The data format of the device data is compared with the target device data format based on the protocol layer. If the data format is different from the target device data format, the data format is converted into the target device data format to obtain the target device data.

4. The device data processing method according to claim 3, characterized in that: The data format includes: a data byte order format, and the converting of the data format into the target device data format to obtain the target device data includes: Based on the protocol layer and according to a preset conversion configuration file, the data byte order format of the device data is converted into a target device data byte order format to obtain target device data.

5. The device data processing method according to claim 1, characterized in that: The responding target instruction, based on the application layer processing the target device data according to the target instruction and displaying the processing result, includes: Generate a control instruction based on the processing result at the application layer, and send the control instruction to the protocol layer; Parsing the control instruction based on the protocol layer to obtain control data; Based on the protocol layer and according to a preset conversion configuration file, converting the data format of the control data into the data format of the target device to obtain target control data; The target control data is sent to the communication layer based on the protocol layer, and the target control data is sent to the target device through the target communication protocol interface based on the communication layer.

6. The device data processing method according to any one of claims 1 to 5, characterized in that: After obtaining the running status of the target device, the method includes: If the operating state is an abnormal operating state, obtaining device parameters of the target device; Creating a virtual device in the application layer according to the device parameters; The target device is debugged based on the communication layer, the application layer and the virtual device.

7. The device data processing method according to claim 6, characterized in that: The communication layer includes a virtual data interface, and the debugging of the target device based on the communication layer, the application layer and the virtual device includes: Generate debugging data based on the virtual data interface in the communication layer, and send the debugging data to the application layer; Based on the application layer, according to the debugging data and the virtual device, the sending and receiving of data by the target device is simulated to debug the target device.

8. A device data processing apparatus, characterized in that: The device comprises: an acquisition unit, configured to acquire the operating state of the target device, and if the operating state is a normal operating state, acquire the communication protocol of the target device; A connecting unit, configured to select a target communication protocol interface in the communication layer according to the communication protocol to connect to the target device, and obtain device data of the target device; A conversion unit, configured to convert the data format of the device data into a target device data format based on the protocol layer to obtain target device data; A processing unit is used to process the target device data according to the target instruction based on the application layer and display the processing result.

9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program; the processor loads the computer program from the memory to execute the steps of the device data processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps of the device data processing method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Driver online method based on multi-protocol communication, target driver and system

    CN120407456A

  • Data processing method, data processing platform and data processing device

    CN120499302A