Monitoring method, system, electronic device and computer readable storage medium
By designing a method of parsing and forwarding data packets in the monitoring equipment, the problem of existing monitoring equipment being unable to expand channels is solved, enabling channel expansion without replacing equipment, reducing maintenance costs and improving convenience. .
Patent Information
- Application Number
- CN202310131689.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2043-02-15
AI Technical Summary
Due to the limitations of communication protocols, existing monitoring equipment cannot expand channels, resulting in high maintenance costs and low convenience.
By designing a monitoring method, the main device parses and determines the receiving object after receiving the data packet. If it is an expansion device, it sends the data packet to the expansion device so that it can perform the corresponding monitoring function. This method realizes point-to-point communication interaction between the main device and the expansion device, allowing channel expansion without replacing the device.
The channel expansion is performed on the basis of the existing monitoring main equipment, reducing maintenance costs, and improving the maintenance of monitoring equipment.
Smart Images

Figure CN116132318B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data monitoring technology, and in particular to a monitoring method, system, electronic device and computer-readable storage medium. Background Art
[0002] In field monitoring scenarios such as dams and reservoirs, monitoring systems are often composed of multiple units, such as logic units, execution units, etc. Currently, monitoring systems on the market generally have multiple data acquisition channels, for example, 4 channels / 8 channels / 16 channels / 32 channels, etc. The installed monitoring system may need to expand channels in some application scenarios to achieve data acquisition from more channels. However, due to the limitations of communication protocols, current monitoring equipment can only be replaced with new equipment and reinstalled and debugged if channel expansion is required after the monitoring equipment is installed. This results in high maintenance costs and low convenience. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a monitoring method, system, electronic device and computer-readable storage medium to solve the problem that the channels of current monitoring equipment cannot be expanded due to communication protocol limitations, resulting in high maintenance costs and low convenience.
[0004] In a first aspect, the present invention provides a monitoring method, which is applied to a monitoring system, the monitoring system comprising a main device and an expansion device; the main device is communicatively connected with the expansion device; the method is applied to the main device, comprising: upon receiving a first data packet, parsing the first data packet and determining a receiving object of the first data packet; upon determining that the receiving object of the first data packet is an expansion device, sending the first data packet to the expansion device, so that the expansion device performs a monitoring function corresponding to the first data packet based on the parsed first data packet.
[0005] The monitoring method designed above is that, when the main device designed in this scheme receives the first data packet, it parses the first data packet to determine the receiving object of the first data packet, and when the receiving object is an expansion device, it sends the parsed first data packet to the expansion device, so that the expansion device performs the monitoring function corresponding to the first data packet based on the parsed first data packet. That is, the monitoring method designed in this scheme can enable the main device with a certain number of channels to perform point-to-point communication interaction with the expansion device with the expansion channel, and then the designed interaction method can expand the channel on the basis of the original monitoring main device without replacing the new equipment and reinstalling and debugging, thereby reducing maintenance costs and improving the convenience of monitoring equipment maintenance.
[0006] In an optional implementation of the first aspect, wherein the expansion device includes a second logic unit and a second execution unit, the method further includes: when it is determined that the receiving object of the first data packet is the second logic unit, sending the parsed first data packet to the second logic unit, so that the second logic unit performs a monitoring function corresponding to the first data packet based on the parsed first data packet.
[0007] In an optional implementation of the first aspect, the expansion device includes a second logic unit and a second execution unit; the method further includes: when it is determined that the receiving object of the first data packet is the second execution unit, sending the parsed first data packet to the second logic unit, so that the second logic unit forwards the received parsed first data packet to the second execution unit, thereby causing the second execution unit to perform the monitoring function corresponding to the first data packet according to the parsed first data packet. In this implementation, when the receiving object is the second execution unit of the expansion device, the second logic unit of the expansion device only plays a data routing function, forwarding data packets that are not sent to itself to the second execution unit, thereby realizing point-to-point communication between each unit in the main device of the monitoring device and each unit of the expansion device.
[0008] In an optional implementation of the first aspect, the main device includes a first logic unit and a first execution unit, and the method further includes: when it is determined that the receiving object of the first data packet is the first execution unit, sending the parsed first data packet to the first execution unit; the first execution unit is used to execute the monitoring function corresponding to the first data packet based on the parsed first data packet.
[0009] In an optional implementation of the first aspect, the main device includes a first logic unit and a first execution unit; the method is specifically executed by the first logic unit, and the method also includes: when it is determined that the receiving object of the first data packet is the first logic unit, executing the monitoring function corresponding to the first data packet based on the parsed first data packet.
[0010] In an optional implementation of the first aspect, the main device includes a first logic unit and a first execution unit; the method is specifically executed by the first logic unit, and the method also includes: receiving a parsed second data packet sent by the expansion device, and when the receiving object of the parsed second data packet is the first execution unit, forwarding the parsed second data packet to the first execution unit; when the receiving object of the parsed second data packet is the first logic unit, executing the monitoring function corresponding to the first data packet based on the parsed second data packet.
[0011] In an optional implementation of the first aspect, parsing the first data packet to determine the receiving object of the first data packet includes: parsing the first data packet to obtain a receiving object identifier in the first data packet; determining the receiving object of the first data packet according to the receiving object identifier; wherein each unit in the main device and the expansion device has a corresponding unique object identifier. In this implementation, a unique object identifier is set for each unit in the main device and the expansion device, so that the main device can identify the receiving object of the first data packet based on the receiving object identifier obtained by parsing, so that the communication protocol between the main device and the expansion device can realize point-to-point communication, and then the installed main device can realize the channel expansion function, thereby improving applicability.
[0012] In an optional implementation of the first aspect, the monitoring system further includes a debugging unit; the debugging unit is communicatively connected to the main device; before parsing the first data packet to determine the receiving object of the first data packet, the method further includes: receiving a debugging data packet sent by the debugging unit; in the case of receiving the debugging data packet, parsing the debugging data packet to determine the receiving object of the debugging data packet; in the case of determining that the receiving object of the debugging data packet is an extension device, sending the parsed debugging data packet to the extension device to debug the extension device. The debugging unit designed in this implementation can communicate point-to-point with any unit in the monitoring system. Compared with the existing debugging unit that can only communicate with units directly connected to the hardware, there is no need to replace the debugging unit to the corresponding device for on-site debugging. Thereby, the convenience of on-site debugging of the monitoring system is improved.
[0013] In a second aspect, the present invention provides a monitoring method, which is applied to a monitoring system, the monitoring system comprising a main device and an expansion device, the main device being communicatively connected with the expansion device, the method being applied to the expansion device, comprising: upon receiving a second data packet, parsing the second data packet and determining a receiving object of the second data packet; upon determining that the receiving object of the second data packet is the main device, sending the parsed second data packet to the main device, so that the main device performs a monitoring function corresponding to the second data packet based on the parsed second data packet.
[0014] The monitoring method designed above is that when the expansion device designed in this scheme receives the second data packet, it parses the second data packet to determine the receiving object of the second data packet, and when the receiving object is the main device, it sends the parsed second data packet to the main device, so that the main device performs the monitoring function corresponding to the second data packet based on the parsed second data packet. That is, the monitoring method designed in this scheme can enable the main device with a certain number of channels to perform point-to-point communication interaction with the expansion device with the expansion channel, and then the designed interaction method can expand the channel on the basis of the original monitoring main device without replacing the new equipment and reinstalling and debugging, thereby reducing maintenance costs and improving the convenience of monitoring equipment maintenance.
[0015] In an optional implementation of the second aspect, the main device includes a first logic unit and a first execution unit, and the method further includes: when it is determined that the receiving object of the second data packet is the first execution unit, sending the parsed second data packet to the first logic unit, so that the first logic unit forwards the parsed second data packet to the first execution unit, so that the first execution unit executes the monitoring function corresponding to the second data packet based on the parsed second data packet.
[0016] In an optional implementation of the second aspect, the main device includes a first logic unit and a first execution unit, and the method also includes: when it is determined that the receiving object of the second data packet is the first logic unit, sending the parsed second data packet to the first logic unit, so that the first logic unit executes the monitoring function corresponding to the second data packet based on the parsed second data packet.
[0017] In a third aspect, the present application provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method in the first aspect, any optional implementation in the first aspect, or the second aspect, any optional implementation in the second aspect is executed.
[0018] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method in the first aspect, any optional implementation in the first aspect, or the second aspect, any optional implementation in the second aspect is performed.
[0019] In a fifth aspect, the present application provides a computer program product, which, when running on a computer, enables the computer to execute the method in the first aspect, any optional implementation of the first aspect, or the second aspect, any optional implementation of the second aspect.
[0020] In a sixth aspect, the present invention provides a monitoring system, which includes a main device and an expansion device, wherein the main device is communicatively connected with the expansion device; the main device is used to parse the first data packet to determine the receiving object of the first data packet when receiving the first data packet; and send the parsed first data packet to the expansion device when determining that the receiving object of the first data packet is; the expansion device is used to execute the monitoring function corresponding to the first data packet based on the parsed first data packet; the expansion device is also used to parse the second data packet to determine the receiving object of the second data packet when receiving the second data packet; and send the parsed second data packet to the main device when determining that the receiving object of the second data packet is the main device; the main device is also used to execute the monitoring function corresponding to the second data packet based on the parsed second data packet.
[0021] In the monitoring system designed above, when the main device designed in this scheme receives the first data packet, it parses the first data packet to determine the receiving object of the first data packet, and when the receiving object is an extension device, it sends the parsed first data packet to the extension device, so that the extension device performs the monitoring function corresponding to the first data packet based on the parsed first data packet; when the extension device receives the second data packet, it parses the second data packet to determine the receiving object of the second data packet, and when the receiving object is the main device, it sends the parsed second data packet to the main device, so that the main device performs the monitoring function corresponding to the second data packet based on the parsed second data packet. That is, the monitoring system designed in this scheme can enable the main device with a certain number of channels to perform point-to-point communication interaction with the extension device with the extension channel, and then the designed interaction method can expand the channel on the basis of the original monitoring main device without replacing the new equipment and reinstalling and debugging, thereby reducing the maintenance cost and improving the convenience of monitoring equipment maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 A first structural diagram of a monitoring system provided in an embodiment of the present application;
[0024] Figure 2 A first flow chart of the monitoring method provided in an embodiment of the present application;
[0025] Figure 3 An example diagram of a command object provided in an embodiment of the present application;
[0026] Figure 4 A second structural diagram of the monitoring system provided in an embodiment of the present application;
[0027] Figure 5 A schematic diagram of object identification provided in an embodiment of the present application;
[0028] Figure 6 A third structural diagram of the monitoring system provided in an embodiment of the present application;
[0029] Figure 7 A second flow chart of the monitoring method provided in an embodiment of the present application;
[0030] Figure 8A fourth structural diagram of the monitoring system provided in an embodiment of the present application;
[0031] Fig. 9 A fifth structural diagram of the monitoring system provided in an embodiment of the present application;
[0032] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0033] Icon: 10 - main device; 110 - first logic unit; 120 - first execution unit; 20 - expansion device; 210 - second logic unit; 220 - second execution unit; 30 - debugging unit; 100 - electronic device; 1001 - processor; 1002 - memory; 1003 - communication bus. DETAILED DESCRIPTION
[0034] The following embodiments of the technical solution of the present application will be described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0036] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0037] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0038] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0039] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0040] In the description of the embodiments of the present application, the technical terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the embodiments of the present application.
[0041] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0042] The present application provides a monitoring method, which can be applied to Figure 1 The monitoring system shown in the figure includes a main device 10 and an expansion device 20, the main device 10 and the expansion device 20 are in communication connection, and the monitoring method can enable the main device 10 to communicate and interact with the expansion device 20, so that the expansion device 20 can be added on the basis of the original main device, thereby realizing channel expansion, please refer to Figure 2 , the monitoring method can be implemented by the following methods, including:
[0043] Step S200: When receiving the first data packet, the master device parses the first data packet and determines a receiving object of the first data packet.
[0044] Step S210: When the main device determines that the recipient of the first data packet is the extension device, the main device sends the parsed first data packet to the extension device.
[0045] Step S220: the extension device performs a monitoring function corresponding to the first data packet based on the parsed first data packet.
[0046] In the above implementation, the first data packet can be various functional data packets. For example, the first data packet can be a data packet for acquiring device information, or a sensor collection data packet, etc., so as to realize device information monitoring, external environment data monitoring collected by sensors, etc.
[0047] The main device can communicate and interact with the external device, receive the first data packet sent by the external device, and thus obtain the first data packet, wherein the external device can be a monitoring management platform that communicates and interacts with the main device, or it can be other electronic devices that communicate and interact with the main device, such as a logical master control device, etc.
[0048] When the master device obtains the first data packet, the master device can parse the first data packet and determine the receiving object of the first data packet. Specifically, the first data packet may include a protocol header, a command type, a message content, and verification information. The command type may include command object information and command number information. The command object information may include the sender and receiving object of the first data packet. The command number information represents the function code of the function performed by the first data packet.
[0049] As a possible example, Figure 3 As shown, the command type can be represented by 2 bytes, a total of 16 bits. The upper 3 bits in the command object represent the sender, and the lower 3 bits in the command object represent the receiving object. Each unit of the main device and the expansion device has a corresponding object identifier, and different devices have different object identifiers. When a data packet is generated, the object identifier of the data packet sending object and the object identifier of the data packet receiving object can be set in the command object of the data packet.
[0050] On the basis of the above, after parsing the first data packet, the main device can obtain the receiving object identifier in the first data packet, and the receiving object of the first data packet can be determined according to the receiving object identifier. If the main device determines that the receiving object of the first data packet is an extended device, the main device sends the parsed first data packet to the extended device, and the extended device executes the monitoring function corresponding to the first data packet based on the parsed first data packet. For example, if the function code in the first data packet is sensor acquisition monitoring, then the extended device executes the sensor data acquisition monitoring function according to the parsed first data packet.
[0051] The monitoring method designed above is that, when the main device designed in this scheme receives the first data packet, it parses the first data packet to determine the receiving object of the first data packet, and when the receiving object is an expansion device, it sends the parsed first data packet to the expansion device, so that the expansion device performs the monitoring function corresponding to the first data packet based on the parsed first data packet. That is, the monitoring method designed in this scheme can enable the main device with a certain number of channels to perform point-to-point communication interaction with the expansion device with the expansion channel, and then the designed interaction method can expand the channel on the basis of the original monitoring main device without replacing the new equipment and reinstalling and debugging, thereby reducing maintenance costs and improving the convenience of monitoring equipment maintenance.
[0052] In an optional implementation of this embodiment, if Figure 4 As shown, the main device 10 may specifically include a first logic unit 110 and a first execution unit 120, and the expansion device 20 may specifically include a second logic unit 210 and a second execution unit 220, wherein the first logic unit 110 is communicatively connected with the first execution unit 120 and the second logic unit 210, and the second logic unit 210 is communicatively connected with the second execution unit 220. The first logic unit 110 and the second logic unit 210 may be communicatively connected via an R485 interface, and the first logic unit 110 and the first execution unit 120, and the second logic unit 210 and the second execution unit 220 may be communicatively connected via a TTL serial port.
[0053] Based on the monitoring system designed above, it is described above that each unit in the main device and the expansion device has a corresponding object identifier. As a possible example, Figure 5 As shown, the first logic unit 110 may use 001 as the object identifier, the first execution unit may use 010 as the object identifier, the second logic unit may use 011 as the object identifier, and the second execution unit may use 100 as the object identifier.
[0054] Based on the monitoring system designed above, when the main device determines that the receiving object of the first data packet is the second logical unit, and according to the example, when the object identifier obtained by the main device parsing the first data packet is 011, the main device sends the parsed first data packet to the second logical unit of the expansion device, and the second logical unit of the expansion device executes the monitoring function corresponding to the first data packet based on the parsed first data packet.
[0055] As another possible implementation, when the master device determines that the recipient of the first data packet is the second execution unit of the extension device, and according to the example in which the master device parses the first data packet and obtains an object identifier of 100, the master device may send the parsed first data packet to the second logic unit of the extension device, and the second logic unit of the extension device forwards the parsed first data packet to the second execution unit, and the second execution unit performs the monitoring function corresponding to the first data packet according to the parsed first data packet. In this implementation, when the recipient is the second execution unit of the extension device, the second logic unit of the extension device only plays a data routing function, and forwards data packets that are not sent to itself to the second execution unit, thereby realizing point-to-point communication between each unit in the master device in the monitoring device and each unit in the extension device.
[0056] As another possible implementation, the data packet receiving and parsing process and the process of determining the receiving object of the data packet described above can be executed by the first logic unit in the main device. On this basis, when the first logic unit determines that the receiving object of the first data packet is the first execution unit of the main device itself, according to the example where the object identifier obtained by the main device parsing the first data packet is 010, the first logic unit sends the parsed first data packet to the first execution unit, and the first execution unit executes the monitoring function corresponding to the first data packet based on the parsed first data packet.
[0057] As another possible implementation, when the first logic unit determines that the receiving object of the first data packet is the first logic unit of the master device itself, and according to the example in which the object identifier obtained by the master device parsing the first data packet is 001, the first logic unit directly executes the monitoring function corresponding to the first data packet based on the parsed first data packet.
[0058] In an optional implementation of this embodiment, if Figure 6 As shown, the monitoring system may further include a debugging unit 30, and the debugging unit 30 may be communicatively connected with the first logic unit 110 in the main device 10. Specifically, the debugging unit 30 and the main device 10 may be communicatively connected via an RS232 interface.
[0059] On the basis of the above, the debugging unit 30 can send a debugging data packet to the first logic unit 110, wherein the debugging data packet has a similar structure to the first data packet but has a different execution function. On this basis, the first logic unit 110 can parse the debugging data packet, determine the receiving object corresponding to the debugging data packet, and then send the parsed debugging data packet to the corresponding receiving object, so that the receiving object of the debugging data packet executes the corresponding debugging function according to the parsed debugging data packet.
[0060] For example, the first logic unit determines that the receiving object corresponding to the debug data packet is the second execution unit, then the first logic unit sends the parsed debug data packet to the second logic unit, the second logic unit sends the parsed debug data packet to the second execution unit, and the second execution unit executes the corresponding debugging function according to the parsed debug data packet. The debugging unit designed in this embodiment can communicate point-to-point with any unit in the monitoring system. Compared with the existing debugging unit that can only communicate with units directly connected to the hardware, there is no need to adjust the connection position of the debugging unit for on-site debugging, thereby improving the convenience of on-site debugging of the monitoring system.
[0061] As a possible implementation, the recipient of the first data packet may also be a debugging unit. When the main device determines that the recipient of the first data packet is the debugging unit, the first logic unit sends the parsed first data packet to the debugging unit, so that the debugging unit performs the corresponding monitoring function based on the parsed first data packet.
[0062] In an optional implementation of this embodiment, after the receiving object of the first data packet receives the parsed first data packet, the receiving object of the first data packet may feedback response data to the main device, so that the main device can determine whether the receiving object of the first data packet has successfully received the parsed first data packet based on the response data.
[0063] In an optional implementation of this embodiment, when the expansion device receives the data packet, the expansion device may also actively communicate and interact with the main device. Specifically, Figure 7 As shown, including:
[0064] Step S700: when receiving the second data packet, the extension device parses the second data packet and determines a receiving object of the second data packet.
[0065] Step S710: When the expansion device determines that the recipient of the second data packet is the main device, the expansion device sends the parsed second data packet to the main device.
[0066] Step S720: the master device executes the monitoring function corresponding to the second data packet based on the parsed second data packet.
[0067] In the above implementation, the second data packet may also be various functional data packets, for example, a data packet for acquiring device information, or a sensor acquisition data packet, etc., so as to realize device information monitoring, external environment data monitoring acquired by sensors, etc.
[0068] The expansion device may also communicate and interact with the external device, and receive a second data packet sent by the external device, thereby obtaining a second data packet, wherein the structure of the second data packet is similar to that of the first data packet, and will not be described in detail here.
[0069] The expansion device can parse the second data packet, obtain the receiving object identifier of the second data packet, determine the receiving object of the second data packet based on the receiving object identifier of the second data packet, and then send the parsed second data packet to the receiving object of the second data packet, so that the receiving object executes the monitoring function corresponding to the second data packet according to the parsed second data packet.
[0070] As a possible implementation, when the expansion device determines that the recipient of the second data packet is the main device, the expansion device may send the parsed second data packet to the main device, and the main device performs the monitoring function corresponding to the second data packet according to the parsed second data packet.
[0071] The monitoring method designed above is that when the expansion device designed in this scheme receives the second data packet, it parses the second data packet to determine the receiving object of the second data packet, and when the receiving object is the main device, it sends the parsed second data packet to the main device, so that the main device performs the monitoring function corresponding to the second data packet based on the parsed second data packet. That is, the monitoring method designed in this scheme can enable the main device with a certain number of channels to perform point-to-point communication interaction with the expansion device with the expansion channel, and then the designed interaction method can expand the channel on the basis of the original monitoring main device without replacing the new equipment and reinstalling and debugging, thereby reducing maintenance costs and improving the convenience of monitoring equipment maintenance.
[0072] As another possible implementation, please refer to Figure 4 In the case where the main device 10 includes a first logic unit 110 and a first execution unit 120, if the expansion device determines that the receiving object of the second data packet is the first logic unit of the main device, the expansion device sends the parsed second data packet to the first logic unit, and the first logic unit executes the monitoring function corresponding to the second data packet according to the parsed second data packet.
[0073] If the expansion device determines that the receiving object of the second data packet is the first execution unit of the main device, the expansion device sends the parsed second data packet to the first logic unit, and the first logic unit executes the monitoring function corresponding to the second data packet according to the parsed second data packet.
[0074] As another possible implementation, please refer to Figure 4In the case where the expansion device 20 includes the second logic unit 210 and the second execution unit 220, the process of receiving and parsing the second data packet and determining the receiving object of the second data packet described above can be performed by the second logic unit 210. On this basis, if the second logic unit 210 determines that the receiving object of the second data packet is the second execution unit 220, the second logic unit sends the parsed second data packet to the second execution unit, and the second execution unit performs the monitoring function corresponding to the second data packet according to the parsed second data packet.
[0075] If the second logic unit 210 determines that the recipient of the second data packet is the second logic unit itself, the second logic unit 210 directly performs the monitoring function corresponding to the second data packet according to the parsed second data packet.
[0076] As another possible implementation, Figure 8 As shown, the monitoring system may further include a debugging unit 30, which is communicatively connected to the second logic unit 210. On this basis, the debugging unit 30 may send a debugging data packet to the second logic unit 210, wherein the debugging data packet has a similar structure to the first data packet and the second data packet, but has a different execution function. On this basis, the second logic unit 210 may parse the debugging data packet, determine a receiving object corresponding to the debugging data packet, and then send the parsed debugging data packet to the corresponding receiving object, so that the receiving object of the debugging data packet executes the corresponding debugging function according to the parsed debugging data packet.
[0077] For example, the second logic unit determines that the receiving object corresponding to the debug data packet is the first execution unit, then the second logic unit sends the parsed debug data packet to the first logic unit, the first logic unit sends the parsed debug data packet to the first execution unit, and the first execution unit executes the corresponding debugging function according to the parsed debug data packet.
[0078] As a possible implementation, the recipient of the second data packet may also be a debugging unit. When the expansion device determines that the recipient of the second data packet is the debugging unit, the second logic unit sends the parsed second data packet to the debugging unit, so that the debugging unit performs the corresponding monitoring function based on the parsed second data packet.
[0079] In an optional implementation of this embodiment, if Fig. 9 As shown, there can be multiple expansion devices 20 in the monitoring system, and multiple expansion devices 20 are communicatively connected to the main device 10 via a bus, so that the main device 10 can perform point-to-point communication with each unit in each expansion device 20, thereby realizing channel expansion of the main device.
[0080] According to some embodiments of the present application, Fig.10As shown, the present application provides an electronic device 100, including: a processor 1001 and a memory 1002, the processor 1001 and the memory 1002 are interconnected and communicate with each other through a communication bus 1003 and / or other forms of connection mechanisms (not marked), the memory 1002 stores a computer program executable by the processor 1001, and when the computing device is running, the processor 1001 executes the computer program to execute the method executed by the external terminal in any optional implementation method, such as steps S200 to S220: when the main device receives a first data packet, the first data packet is parsed to determine the receiving object of the first data packet; when the main device determines that the receiving object of the first data packet is an extension device, the main device sends the parsed first data packet to the extension device; the extension device performs the monitoring function corresponding to the first data packet based on the parsed first data packet. Or execute steps S700 to S720: when the expansion device receives the second data packet, it parses the second data packet and determines the recipient of the second data packet; when the expansion device determines that the recipient of the second data packet is the main device, it sends the parsed second data packet to the main device; the main device executes the monitoring function corresponding to the second data packet based on the parsed second data packet.
[0081] The present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method in any of the aforementioned optional implementations is executed.
[0082] Among them, the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0083] The present application provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the method in any optional implementation manner.
[0084] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and they should all be included in the scope of the claims and specification of the present application. In particular, as long as there is no structural conflict, the various technical features mentioned in the various embodiments can be combined in any way. The present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions that fall within the scope of the claims.
Claims
1. A monitoring method, characterized in that: The monitoring method is applied to a monitoring system, which includes a main device and an expansion device; The main device is in communication connection with the expansion device; The method is applied to a master device, comprising: When a first data packet is received, parsing the first data packet to determine a recipient of the first data packet; When it is determined that the recipient of the first data packet is an extension device, sending the parsed first data packet to the extension device, so that the extension device performs a monitoring function corresponding to the first data packet based on the parsed first data packet; Wherein, the expansion device includes a second logic unit and a second execution unit; and the method further includes: When it is determined that the receiving object of the first data packet is the second execution unit, sending the parsed first data packet to the second logic unit, so that the second logic unit forwards the received parsed first data packet to the second execution unit, thereby causing the second execution unit to perform the monitoring function corresponding to the first data packet according to the parsed first data packet; The master device includes a first logic unit and a first execution unit; the method is specifically executed by the first logic unit, and the method further includes: receiving a parsed second data packet sent by the extension device, and forwarding the parsed second data packet to the first execution unit when the receiving object of the parsed second data packet is the first execution unit; In a case where the receiving object of the parsed second data packet is the first logical unit, executing a monitoring function corresponding to the first data packet based on the parsed second data packet; Wherein, the monitoring system further comprises a debugging unit; the debugging unit is communicatively connected with the main device; Before parsing the first data packet to determine a receiving object of the first data packet, the method further includes: Receiving a debugging data packet sent by the debugging unit; When receiving a debugging data packet, parsing the debugging data packet to determine a receiving object of the debugging data packet; When it is determined that the recipient of the debugging data packet is an extension device, the parsed debugging data packet is sent to the extension device to debug the extension device.
2. The method according to claim 1, characterized in that in, The expansion device includes a second logic unit and a second execution unit, and the method further includes: When it is determined that the receiving object of the first data packet is the second logical unit, the parsed first data packet is sent to the second logical unit, so that the second logical unit performs the monitoring function corresponding to the first data packet based on the parsed first data packet.
3. The method according to claim 1, characterized in that in, The master device includes a first logic unit and a first execution unit, and the method further includes: When it is determined that the receiving object of the first data packet is the first execution unit, sending the parsed first data packet to the first execution unit; The first execution unit is used to execute a monitoring function corresponding to the first data packet based on the parsed first data packet.
4. The method according to claim 1, characterized in that: in, The master device includes a first logic unit and a first execution unit; the method is specifically executed by the first logic unit, and the method further includes: When it is determined that the receiving destination of the first data packet is the first logical unit, a monitoring function corresponding to the first data packet is executed based on the parsed first data packet.
5. The method according to claim 1, characterized in that The parsing the first data packet to determine a receiving object of the first data packet includes: Parsing the first data packet to obtain a receiving object identifier in the first data packet; The receiving object of the first data packet is determined according to the receiving object identifier; wherein each unit in the main device and the expansion device has a corresponding unique object identifier.
6. A monitoring method, characterized in that: The monitoring method is applied to a monitoring system, the monitoring system includes a main device and an expansion device, the main device is used to execute the method according to any one of claims 1 to 5, the main device is communicatively connected with the expansion device, and the method is applied to the expansion device, including: When receiving the second data packet, parsing the second data packet to determine a recipient of the second data packet; When it is determined that the recipient of the second data packet is the master device, the parsed second data packet is sent to the master device, so that the master device performs a monitoring function corresponding to the second data packet based on the parsed second data packet.
7. The method according to claim 6, characterized in that The master device includes a first logic unit and a first execution unit, and the method further includes: When it is determined that the receiving object of the second data packet is the first execution unit, the parsed second data packet is sent to the first logical unit, so that the first logical unit forwards the parsed second data packet to the first execution unit, so that the first execution unit executes the monitoring function corresponding to the second data packet based on the parsed second data packet.
8. The method according to claim 6, characterized in that The master device includes a first logic unit and a first execution unit, and the method further includes: When it is determined that the receiving object of the second data packet is the first logical unit, the parsed second data packet is sent to the first logical unit, so that the first logical unit performs a monitoring function corresponding to the second data packet based on the parsed second data packet.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method of any one of claims 1 to 5 or claims 6 to 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method of any one of claims 1 to 5 or claims 6 to 8 is implemented.
11. A collection system, characterized in that: The acquisition system comprises a main device and an expansion device, wherein the main device is in communication connection with the expansion device, and the main device is used to execute the method according to any one of claims 1 to 5; The main device is configured to, upon receiving a first data packet, parse the first data packet to determine a receiving object of the first data packet; and, upon determining that the receiving object of the first data packet is, send the parsed first data packet to the expansion device; The expansion device is used to perform a monitoring function corresponding to the first data packet based on the parsed first data packet; The expansion device is further configured to, upon receiving the second data packet, parse the second data packet to determine a recipient of the second data packet; and, upon determining that the recipient of the second data packet is the main device, send the parsed second data packet to the main device; The master device is further configured to execute a monitoring function corresponding to the second data packet based on the parsed second data packet.
Citation Information
Patent Citations
Data processing method, extension device, control system and storage medium
CN115118795A
Method and platform / system for creating a web-based form that incorporates an embedded knowledge base, wherein the form provides automatic feedback to a user during and following completion of the form
US20180301222A1