A method for monitoring device status information under unstable communication conditions
The equipment status monitoring is simplified through periodic query and reply mechanisms, and the complexity of equipment status monitoring in unstable communication states is solved, and efficient interaction of equipment status information and optimized and adapted hardware resources are achieved.
Patent Information
- Application Number
- CN202211727757.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-31
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2042-12-31
AI Technical Summary
In an unstable communication state, the information validity identification logic of the device status monitoring software is complex, resulting in increased implementation and maintenance difficulties, and the computing resources of the device controller are limited, so the interaction mechanism needs to be simplified to adapt to hardware resources.
The device monitoring software periodically sends device status query information. The device controller only publishes the status when it receives the query information, and issues control information when there is no command to be executed. It uses a query-reply mechanism to interact information, simplifying the type of packets and interaction mechanism.
By reducing the type of packets and optimizing the interaction mechanism, the reliability of device status information monitoring and the adaptability of hardware resources are improved, and the implementation and maintenance of device status monitoring are simplified.
Smart Images

Figure CN116002476B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for sampling and controlling device information that is applicable to effectively process the status information of on-line devices under unreliable data transmission quality and then complete the monitoring and control of the operating status of specific devices, and more particularly to a method for monitoring the status information of devices under unstable communication conditions. Background Art
[0002] Since the quality of network communication on ships cannot be guaranteed (for example: when the operation of specific devices triggers the energy management on the ship, resulting in temporary power outages in some areas, and the relevant digital information communication network works abnormally briefly), information may be lost, retransmitted, or the order may be reversed during the transmission process. This makes the logic complexity of the validity discrimination of the device status information collected by the software for monitoring the status of specific devices (hereinafter referred to as "device monitoring software") become higher, and the implementation, use, and maintenance difficulties of the device monitoring software increase significantly.
[0003] It is necessary to adopt a certain method to reduce the logic complexity of information reliability discrimination, and then reduce the difficulties in the reality, use, and maintenance of the software. At the same time, due to the constraints of the shipboard use environment, the computing resources of the device-side controller are lower than those of commercial products with the same functions. There is also an urgent need for the device controller to complete the information interaction with the external device monitoring software in a mechanism as simple as possible. Summary of the Invention
[0004] To solve the above problems, a method for monitoring the status information of devices under unstable communication conditions is provided.
[0005] The object of the present invention is achieved in the following manner:
[0006] A method for monitoring the status information of devices under unstable communication conditions, the method comprising:
[0007] S1: The device monitoring software periodically and cyclically sends "device status query information" to the device controller;
[0008] S2: The device controller publishes "device operation status information" only when it receives the "device status query information", and sends it at most once. When it does not receive the "device status query information", it remains silent and does not publish any message;
[0009] S3: When the device has no pending instructions and all relevant mechanisms are in a static and in-place state, the device monitoring software can send "device control information" to the device controller;
[0010] S4: When the device controller receives the issued "device control information", it processes the control instructions included in the "device control information";
[0011] S5: Process the device control.
[0012] The content of the "device status query information" is agreed as follows:
[0013] a) Device identifier
[0014] The content of the "device operation status information" is agreed as follows:
[0015] a) The control instruction part, respectively:
[0016] ① The currently received device operation control command;
[0017] ② The currently pending device operation control command;
[0018] ③ The currently executing device operation control command;
[0019] b) The status of each moving component mechanism of the device;
[0020] c) Device operation failure information;
[0021] The content of the "device control information" is agreed as follows:
[0022] a) Device identifier;
[0023] b) The operation control command that must be issued currently.
[0024] Each sent device status query information in S1 may contain a unique identification word to distinguish it from other device status query information.
[0025] The specific processing of the control instruction of the "device control information" in S4 includes: when the device has no pending instruction and all relevant mechanisms are in a static and in-place state, the device monitoring software can issue a control instruction to the device controller;
[0026] After the device controller receives the issued control instruction, it fills in the corresponding content in the "currently received device operation control command" part of the device operation status information;
[0027] The device controller checks the legality of the control instruction written in the "currently received device operation control command" part. If it is legal, it synchronizes the content of this field to the "currently pending device operation control command" part;
[0028] The on-site device operator controls the device to start running according to the actual operation requirements of the device. After starting to run, the device controller synchronizes the content of the "currently pending device operation control command" to the "currently executing device operation control command" part;
[0029] After the device finishes execution, the device controller clears the contents of three fields: "Received device operation control command", "Current device operation control command to be executed", and "Current device operation control command in execution".
[0030] The S5 device control process is as follows:
[0031] Establish the following buffers:
[0032] ① Instruction area to be issued;
[0033] ② Issued instruction area;
[0034] ③ Current device operation status information storage area;
[0035] ④ Previous device operation status information storage area;
[0036] a) When the timing of the device sampling timer reaches, start the device status monitoring processing flow;
[0037] b) Turn off the timing of the sampling timer;
[0038] c) Check the current device operation status information storage area:
[0039] If it is found that the status information is empty or in an invalid state, send "Device status query information" and exit the current sampling processing flow;
[0040] If it is found that the status information is valid, execute step d);
[0041] d) Check whether there is a command to be issued currently:
[0042] 1) If there is a command to be issued currently, send "Device control information" to the fixed device and execute step e);
[0043] 2) If there is no command to be issued currently, send device status query information;
[0044] e) Check the instruction part content included in the current device operation status information: If the received control instruction or the control instruction to be executed included in the current device operation status information is the same as the current control instruction to be issued, it is considered that the instruction has been successfully issued, and an instruction issuance success message is published externally. At the same time, move the instruction stored in the instruction area to be issued to the issued instruction area; According to the control instruction in the current issued instruction area and in combination with the device operation logic mechanism, check the status of each moving component mechanism of the device included in the current device operation status information for any missing status processes. If necessary, supplement the missing status processes and sequentially publish the device operation status information externally;
[0045] f) According to the control instructions in the currently issued instruction area, combined with the device operation logic mechanism, check the status of each moving component mechanism of the device included in the current device operation status information, whether there is any missing status process. If necessary, supplement the missing status process and sequentially publish the simulated device operation status information externally;
[0046] g) Compare the content of the device operation status information saved in the current device operation status information storage area and the content of the device operation status information saved in the previous device operation status information storage area:
[0047] 1) If the content of the two messages is exactly the same, exit the current sampling processing flow;
[0048] 2) If the content of the two messages is not exactly the same, publish the current device operation status information according to the defined communication method, and at the same time move the current device operation status information to the previous device operation status information;
[0049] h) Re-open the sampling timer for timing.
[0050] After the device monitoring software receives the device operation status information, it writes this information into the "current device operation status information storage area" mentioned in the device control processing process.
[0051] Advantages of the present invention: Since the device status information externally published by the device controller end includes the control instruction part (the message received by the device), by reading and comparing this information (the received input information), the relevant communication completion effect can be judged. Therefore, only one status information message needs to be defined, reducing the types of messages; the device controller end uses a "query - reply" mechanism to interact with the monitoring software, and only sends the device operation status information externally when receiving the device status query message, and the query timing (time interval) can be adjusted according to the computing resources of the device - side controller, simplifying the interaction mechanism and improving the adaptability of the interaction mechanism to hardware resources. Brief Description of the Drawings
[0052] Figure 1 It is a schematic diagram of the cycle timing description of the device control processing process.
[0053] Figure 2 It is a schematic diagram of the structure of the message related to the device status monitoring and control function.
[0054] Figure 3 It is a flow control diagram of the management mechanism of the to - be - issued instructions and the already - issued instructions in this embodiment.
[0055] Figure 4 Schematic diagram of the operation of the relevant mechanism in this embodiment I.
[0056] Figure 5 Schematic diagram of the operation of the relevant mechanism in this embodiment II. Detailed implementation manners
[0057] The present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners.
[0058] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same technical meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs.
[0059] A method for monitoring device status information under unstable communication conditions, the method comprising:
[0060] S1: The device monitoring software periodically sends "device status query information" to the device controller in a loop to make a sampling application, and the interval of the period is determined by the technical status of the controller responsible for externally publishing the operating status information at the device end (the computing power of the controller itself and the number of IO ports controlled);
[0061] S2: The device controller only publishes "device operating status information" when it receives the "device status query information", and sends it at most once. When it does not receive the "device status query information", it remains silent and does not publish any messages externally;
[0062] S3: When the device currently has no instructions to be executed and all relevant mechanisms are in a stationary and in-place state, the device monitoring software can send "device control information" to the device controller;
[0063] S4: When the device controller receives the issued "device control information", it processes the control instructions included in the "device control information";
[0064] S5: Perform device control processing.
[0065] The content of the "device status query information" is agreed as follows:
[0066] a) Device identifier
[0067] The content of the "device operating status information" is agreed as follows:
[0068] a) The control instruction part (information received by the device), respectively:
[0069] ① The currently received device operation control command;
[0070] ② The currently pending device operation control command;
[0071] ③ The currently executing device operation control command;
[0072] b) Status of each moving component mechanism of the device (device self-status information);
[0073] c) Equipment operation failure information (equipment failure information);
[0074] The content convention of the device control information is as follows:
[0075] a) Device identification;
[0076] b) The operation control command to be issued currently.
[0077] Each sent device status query information in S1 may contain a unique identification word to distinguish it from other device status query information.
[0078] The processing of the control instruction for the "device control information" in S4 specifically includes: when the device has no instruction to be executed and all relevant mechanisms are in a stationary and in-place state, the device monitoring software can issue a control instruction to the device controller;
[0079] When the device controller receives the issued control instruction, it fills in the corresponding content in the "currently received device operation control command" part of the device operation status information;
[0080] The device controller performs a legality check on the control instruction written in the "currently received device operation control command" part. If it is legal, it synchronizes the content of this field to the "currently to-be-executed device operation control command" part;
[0081] The on-site device operator controls the device to start running according to the actual operation requirements of the device. After starting to run, the content of the "currently to-be-executed device operation control command" is synchronized to the "currently executing device operation control command" part;
[0082] After the device finishes execution, the device controller clears the content of the three fields of "received device operation control command", "currently to-be-executed device operation control command", and "currently executing device operation control command".
[0083] The device control processing process of S5 is as follows:
[0084] Establish the following buffers:
[0085] ① Area for instructions to be issued;
[0086] ② Area for issued instructions;
[0087] ③ Current device operation status information storage area;
[0088] ④ Storage area for the previous device operation status information;
[0089] a) When the timing of the device sampling timer reaches, start the device status monitoring processing flow;
[0090] b) Turn off the sampling timer timing (to prevent re - entry of timing);
[0091] (Information query and instruction issuance processing flow)
[0092] c) Check the current device operation status information storage area:
[0093] If it is found that the status information is empty or in an invalid state, send "device status query information" and exit the current sampling processing flow;
[0094] If it is found that the status information is valid, execute step d);
[0095] d) Check whether there is a pending instruction currently:
[0096] 1) If there is a pending instruction currently, send device control information (instruction) to the fixed device and execute step e);
[0097] 2) If there is no pending instruction currently, send device status query information;
[0098] (Device operation status information processing flow)
[0099] e) Check the content of the instruction part included in the current device operation status information: If the received control instruction or the pending control instruction included in the current device status information is the same as the current pending control instruction, it is considered that the instruction issuance is successful, externally publish the instruction issuance success information, and at the same time move the instruction stored in the pending instruction area to the issued instruction area; According to the control instruction in the current issued instruction area, combined with the device operation logic mechanism, check the status of each moving component mechanism of the device included in the current device operation status information, whether there is any missing status process, if necessary, supplement the missing status process, and sequentially externally publish the device operation status information;
[0100] f) According to the control instruction in the current issued instruction area, combined with the device operation logic mechanism, check the status of each moving component mechanism of the device included in the current device operation status information, whether there is any missing status process, if necessary, supplement the missing status process, and sequentially externally publish the device operation status information;
[0101] g) Compare the content of the device operation status information saved in the current device operation status information storage area and the content of the device operation status information saved in the previous device operation status information storage area:
[0102] 1) If the two message contents are exactly the same, exit the current sampling processing flow;
[0103] 2) If the contents of the two messages are not exactly the same, the current device operation status information is published externally, and the current device operation status information is moved to the previous device operation status information;
[0104] h) Restart the sampling timer.
[0105] After receiving the equipment operation status information, the equipment monitoring software writes the information into the "current equipment operation status information storage area" mentioned in the equipment control process.
[0106] The method of the present invention has the following characteristics when monitoring equipment:
[0107] a) The device status information released by the device controller includes the received input information. By reading and comparing the information (the received input information), the completion effect of the relevant communication can be determined. Therefore, only one status information message needs to be defined, which reduces the types of messages.
[0108] b) The device controller uses a "query-reply" mechanism to interact with the monitoring software. The device operation status information is sent only when the device status query message is received. The query timing (time interval) can be adjusted according to the computing resources of the device controller, which simplifies the interaction mechanism and improves the adaptability of the interaction mechanism to hardware resources.
[0109] c) The device status information receiving end can send messages such as "command issuance success information", "simulated device operation status information" (if necessary), "device operation status information" in sequence by parsing the device controller end, simplifying the internal complex causal logic processing mechanism caused by message loss or transmission sequence errors.
[0110] Example:
[0111] This solution is a monitoring solution for elevators on a large ship: there are 8 monitored elevator devices involved, and the communication protocol of the relevant messages adopts the UDP multicast method. The sampling cycle mechanism is: every 5 seconds, the equipment monitoring end executes the processing process described in the equipment control processing process on the 8 monitored devices in turn at an interval of 0.2 seconds. The timing diagram is as follows Figure 1 shown.
[0112] The "device status query information", "device operation status information" and "device control information" involved all have a standard message header, which includes: sending address, sending time, receiving address, receiving time, message identification and other information. In addition, the above three messages also include the same: monitoring device identification and other fields. "Monitoring device identification" (56~57 bytes) is to distinguish the specific device targeted by the current message.
[0113] In the device operation status information message: "Currently received operation instruction" (59 bytes) defines the device control instruction word currently received by the device controller; "Currently executed instruction of the device" (60 bytes) defines the instruction actually executed by the device currently (according to the actual technical status of the device, the controller does not set the instruction to be executed currently). Through relevant content, it can be determined whether the currently issued instruction has been successfully issued, whether the currently received instruction has started to be executed, etc. "Current position of the device's lifting platform" (62 bytes), "Action of the device's lifting platform mechanism" (63 bytes), "Action of the device's watertight cover mechanism" (64 bytes), "Status of the device's pumping station" (65 bytes), etc. are the status information of the device mechanism, and it can be determined whether the current device is in a standby state through this information.
[0114] In the software compiled according to the above-mentioned implementation manner as Figure 3 shown, the communication method for the external status information interaction of the controller adopts the UDP multicast method. UDP does not guarantee the communication quality, which is consistent with the implementation background of the invention. In Figure 4 , it can be seen the query information externally published by the upper computer every 5 seconds and the status information replied by the controller. Refer to the message information displayed as "status query" at times such as 16:31:34, 16:31:39, 16:31:44, etc. In Figure 5 , it can be seen the instruction management mechanism after the instruction is issued: After the instruction "to Deck 9" is issued at 18:44:35, the controller receives this instruction at 18:44:40 (displayed as: "R: to Deck 9 (E: waiting for a new instruction)"), an event of simulating the elevator operation confirmation button is triggered at 18:44:43, and the elevator runs at 18:44:45. At this time, it can be seen that the instruction moves and changes (displayed as: "R: waiting for a new instruction (E: to Deck 9)").
[0115] In summary, the engineering feasibility of the above-mentioned implementation manner is proved.
[0116] Although the specific implementation manner of the present invention is described above in conjunction with the drawings, it is not a limitation to the protection scope of the present invention. Those skilled in the art should understand that based on the technical solution of the present invention, various modifications or deformations that can be made by those skilled in the art without creative labor are still within the protection scope of the present invention.
Claims
1. A method for monitoring device status information under unstable communication conditions, characterized in that: The method includes: S1: The device monitoring software periodically sends "device status query information" to the device controller in a loop; S2: The device controller publishes "device operation status information" only when it receives the "device status query information", and sends it at most once. When it does not receive the "device status query information", it remains silent and does not publish any message externally; S3: When the "device operation status information" shows that there are no pending instructions currently and all relevant mechanisms are in a stationary and in-place state, the device monitoring software can issue "device control information" to the device controller; S4: When the device controller receives the issued "device control information", it processes the control instructions included in the "device control information"; The specific processing of the control instructions in the "device control information" in S4 includes: When the device has no pending instructions currently and all relevant mechanisms are in a stationary and in-place state, the device monitoring software can issue control instructions to the device controller; When the device controller receives the issued control instructions, it fills in the corresponding content in the "currently received device operation control command" part of the device operation status information; The device controller performs a legality check on the control instructions written in the "currently received device operation control command" part. If legal, it synchronizes the content of this field to the "currently pending device operation control command" part; The on-site device operator controls the device to start running according to the actual operation requirements of the device. After the device starts running, the device controller synchronizes the content of the "currently pending device operation control command" to the "currently executing device operation control command" part; After the device finishes execution, the device controller clears the content of the three fields: "received device operation control command", "currently pending device operation control command", and "currently executing device operation control command"; S5: Perform device control processing.
2. The method for monitoring device status information in an unstable communication state according to claim 1, wherein: The content of the "device status query information" is agreed as follows: a) Device identification The content of the "device operation status information" is agreed as follows: a) The control instruction part includes: ① Currently received device operation control command; ② Currently pending device operation control command; ③ Currently executing device operation control command; b) The status of each moving component mechanism of the device; c) Device operation failure information; The content of the "device control information" is agreed as follows: a) Device identification; b) Currently to be issued operation control command.
3. The method for monitoring device status information in an unstable communication state according to claim 1, characterized in that: Each sent device status query information in S1 can include a unique identification word to distinguish it from other device status query information.
4. The method for monitoring device status information in an unstable communication state according to claim 1, wherein: The device control processing process in S5 is as follows: Establish the following buffers: ① Area for instructions to be issued; ② Area for issued instructions; ③ Area for saving the current device operation status information; ④ Area for saving the previous device operation status information; a) When the timing time of the device sampling timer arrives, start the device status monitoring processing flow; b) Turn off the timing of the sampling timer; c) Check the area for saving the current device operation status information: If it is found that the status information is empty or in an invalid state, send the "device status query information" and exit the current sampling processing flow; If the status information is found to be valid, step d) is executed; d) Check whether there is a command to be issued currently: 1) If there is a command to be issued currently, issue the "device control information" to the fixed device and execute step e); 2) If there is no command to be issued currently, send the device status query information; e) Check the content of the command part included in the current device operation status information: If the received control command or the control command to be executed included in the current device status information is the same as the current control command to be issued, it is considered that the command has been successfully issued, and the information indicating the successful command issuance is externally published. At the same time, the command stored in the area of commands to be issued is moved to the area of issued commands; According to the control command in the current area of issued commands and in combination with the device operation logic mechanism, check the status of each moving component mechanism of the device included in the current device operation status information to see if there is any missing status process. If necessary, supplement and simulate the missing status process, and externally publish the device operation status information in the agreed sequence; f) According to the control command in the current area of issued commands and in combination with the device operation logic mechanism, check the status of each moving component mechanism of the device included in the current device operation status information to see if there is any missing status process. If necessary, simulate and supplement the missing status, and externally publish the device operation status information in the agreed sequence; g) Compare the content of the device operation status information saved in the current device operation status information storage area and the content of the device operation status information saved in the previous device operation status information storage area: 1) If the contents of the two messages are exactly the same, exit the current sampling processing flow; 2) If the contents of the two messages are not exactly the same, externally publish the current device operation status information, and at the same time move the current device operation status information to the previous device operation status information; h) Restart the sampling timer for timing.
5. The method for monitoring device status information under an unstable communication state according to claim 4, characterized in that: After receiving the device operation status information, the device monitoring software writes this information into the "current device operation status information storage area" mentioned in the device control processing.
Citation Information
Patent Citations
3D printing method and device and 3D printing Internet of Things system
CN113419691A