Data monitoring method and apparatus, and electronic device and storage medium
By using the MQTT protocol between the data acquisition terminal and the intelligent factory system to send subject and will information, the problem of inaccurate judgment of equipment connection status in the existing technology is solved, and the accurate status monitoring and abnormal processing of the data acquisition terminal is realized, reducing the Cost and error rate in the production process.
Patent Information
- Application Number
- PCT/CN2023/114125
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-13
- Filing Date
- 2023-08-21
- Publication Date
- 2024-12-19
AI Technical Summary
When the prior art determines whether the device is normally connected through the heartbeat packet, it is impossible to distinguish whether the electronic control device is offline or the data acquisition terminal is abnormal, resulting in the data acquisition terminal being off-network and inaccurate data, which increases the communication and management costs of the production process.
By using a message queue telemetry transmission server (MQTT) between the data acquisition terminal and the intelligent factory system, the subject information is sent in a normal state and the will information is sent in an abnormal state, including the operation information of the electronic control equipment and the network signal strength information, and Restart the terminal when the network is disconnected to ensure the consistency of information between the data acquisition terminal and the smart factory system.
Improve the accuracy of data monitoring, avoid data statistics errors, reduce communication and management costs, and ensure data reliability in the production process.
Smart Images

Figure CN2023114125_19122024_PF_FP_ABST
Abstract
Description
Data monitoring method, device, electronic device and storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 13, 2023, with application number 2023107032286 and application name “Data Monitoring Method, Device, Electronic Device and Storage Medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a data monitoring method, device, electronic device, and storage medium. Background Art
[0003] Intelligent electronic control equipment in the sewing and textile industry is usually wirelessly connected to the smart factory system through data acquisition terminals to upload data and issue instructions, greatly improving the factory's production efficiency.
[0004] However, this requires a highly stable network connection between devices. Any network anomalies not only affect the interaction between electronic control devices and the smart factory system but also cause errors in factory status statistics. Currently, data acquisition terminals on the market confirm normal communication between electronic control devices and the smart factory system by sending heartbeat packets. If no response is received, the electronic control device is considered offline.
[0005] However, the method of using heartbeat packets to determine whether the device is connected normally cannot determine whether it is due to the electronic control equipment being offline or the data acquisition terminal being abnormal. As a result, there is no way to accurately count the disconnected data of the data acquisition terminal, which is not conducive to optimizing the performance of the data acquisition terminal. In addition, due to unclear data feedback, management personnel lack reliable data basis, which also increases the communication and management costs of the production process.
[0006] Summary of the Invention
[0007] The present application provides a data monitoring method, device, electronic device and storage medium to solve the problem in the prior art that when a heartbeat packet is used to determine whether a device is connected normally, it is impossible to determine whether it is due to the electronic control device being offline or the data acquisition terminal being abnormal, and thus there is no way to accurately record the disconnected data of the data acquisition terminal, which is not conducive to optimizing the performance of the data acquisition terminal; and because the data feedback is unclear, the management personnel lack reliable data basis, which also increases the communication cost and management cost of the production process.
[0008] In one aspect, the present application provides a data monitoring method, which is applied to a data acquisition terminal connected to an electronic control device, and includes:
[0009] Collecting operating information of the electronic control device; wherein the operating information includes operating status and operating data;
[0010] If the data acquisition terminal is in a normal state, the pre-subscribed topic information is periodically sent to the smart factory system through the message queue telemetry transmission server according to the preset sending rules; the topic information includes the operation information and the network signal strength information of the data acquisition terminal;
[0011] If the data acquisition terminal is in an abnormal state, the message queue telemetry transmission server is triggered to send a will information to the smart factory system; wherein, the will information is used to indicate that the data acquisition terminal is in an abnormal state.
[0012] Optionally, according to preset sending rules, the message queue telemetry transmission server periodically sends pre-subscribed topic information to the smart factory system, including:
[0013] Based on a first preset time interval, periodically sending the operation information to the smart factory system through a message queue telemetry transmission server;
[0014] Based on a second preset time interval, the network signal strength information is periodically sent to the smart factory system through a message queue telemetry transmission server; wherein the first preset time interval is greater than the second preset time interval.
[0015] Optionally, the abnormal state includes a disconnected state and an offline state. If it is determined that the data acquisition terminal is in the disconnected state, the method further includes:
[0016] Triggering a restart program of the data acquisition terminal to restart the data acquisition terminal;
[0017] If it is determined that the data acquisition terminal is still in an offline state after restarting, the step of triggering the message queue telemetry transmission server to send the will information to the smart factory system is executed.
[0018] Optionally, the method further includes:
[0019] Obtain configuration parameters; wherein the configuration parameters include the wireless network and password to which the data acquisition terminal is to be connected, and the connection parameters of the message queue telemetry transmission server, wherein the connection parameters include the address of the message queue telemetry transmission server, the connection user name, the connection password, the subscription topic, and the client account;
[0020] In response to the acquisition of the configuration parameters, a binding connection between the data acquisition terminal and the message queue telemetry transmission server is determined.
[0021] On the other hand, the present application also provides another data monitoring method, which is applied to a smart factory system and includes:
[0022] Receive and save subject information sent by the data acquisition terminal, or receive and save will information sent by the data acquisition terminal; wherein, the subject information is pre-subscribed information that is periodically sent to the smart factory system through the message queue telemetry transmission server according to preset sending rules when the data acquisition terminal is in a normal state; the subject information includes operation information and network signal strength information of the data acquisition terminal, and the operation information includes the operation status and operation data of the electronic control equipment collected by the data acquisition terminal; the will information is information that is triggered by the message queue telemetry transmission server to be periodically sent to the smart factory system when the data acquisition terminal is in an abnormal state; the will information is used to indicate that the data acquisition terminal is in an abnormal state;
[0023] Control the display screen to display the subject information or the will information in real time.
[0024] Optionally, the method further includes:
[0025] Determining the total number of network disconnections of the data acquisition terminal and the duration of each network disconnection;
[0026] Based on the total number of network disconnections, the duration of each network disconnection, and preset reminder rules, the user is prompted to optimize the data collection terminal.
[0027] On the other hand, the present application provides a data monitoring device, which is applied to a data acquisition terminal, and the data acquisition terminal is connected to an electronic control device, and the device includes:
[0028] A collection unit, configured to collect operating information of the electronic control device; wherein the operating information includes operating status and operating data;
[0029] a first sending unit, configured to periodically send pre-subscribed topic information to the smart factory system via a message queue telemetry transmission server according to a preset sending rule if the data acquisition terminal is in a normal state; the topic information includes the operating information and the network signal strength information of the data acquisition terminal;
[0030] The second sending unit is used to trigger the message queue telemetry transmission server to send a will information to the smart factory system if the data acquisition terminal is in an abnormal state; wherein the will information is used to indicate that the data acquisition terminal is in an abnormal state.
[0031] Optionally, the first sending unit is specifically configured to: periodically send the operation information to the smart factory system through a message queue telemetry transmission server based on a first preset time interval;
[0032] It is also used to periodically send the network signal strength information to the smart factory system through the message queue telemetry transmission server based on a second preset time interval; wherein the first preset time interval is greater than the second preset time interval.
[0033] Optionally, the abnormal state includes a disconnected state and an offline state, and the second sending unit also includes a restart module, and the restart module is used to trigger the restart program of the data acquisition terminal and restart the data acquisition terminal if it is determined that the data acquisition terminal is in a disconnected state; if it is determined that the data acquisition terminal is still in a disconnected state after restarting, execute the step of triggering the message queue telemetry transmission server to send the will information to the smart factory system.
[0034] Optionally, the device further includes a configuration unit, which includes an acquisition module and a determination module.
[0035] The acquisition module is used to acquire configuration parameters; wherein the configuration parameters include the wireless network and password to which the data acquisition terminal is to be connected, and the connection parameters of the message queue telemetry transmission server, wherein the connection parameters include the address of the message queue telemetry transmission server, the connection user name, the connection password, the subscription topic, and the client account;
[0036] The determining module is configured to determine a binding connection between the data acquisition terminal and the message queue telemetry transmission server in response to the acquisition of the configuration parameters.
[0037] On the other hand, the present application also provides another data monitoring device, which is applied to a smart factory system and includes:
[0038] A receiving unit, configured to receive and save subject information sent by a data acquisition terminal, or to receive and save will information sent by the data acquisition terminal; wherein the subject information is pre-subscribed information periodically sent to the smart factory system via a message queue telemetry transmission server according to preset sending rules when the data acquisition terminal is in a normal state; the subject information includes operating information and network signal strength information of the data acquisition terminal, and the operating information includes the operating status and operating data of the electronic control equipment collected by the data acquisition terminal; the will information is information triggered by the message queue telemetry transmission server to be periodically sent to the smart factory system when the data acquisition terminal is in an abnormal state; the will information is used to indicate that the data acquisition terminal is in an abnormal state;
[0039] The control module is used to control the large display screen to display the subject information or the will information in real time.
[0040] Optionally, the device further comprises a statistical unit and a prompting unit;
[0041] The statistical unit is used to determine the total number of network disconnections of the data acquisition terminal and the duration of each network disconnection;
[0042] The prompting unit is used to prompt the user to optimize the data acquisition terminal based on the total number of network disconnections, the duration of each network disconnection and preset reminder rules.
[0043] On the other hand, the present application further provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0044] The memory stores computer-executable instructions;
[0045] The processor executes the computer-executable instructions stored in the memory to implement any of the aforementioned methods.
[0046] On the other hand, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement any of the methods described above.
[0047] On the other hand, the present application also provides a computer program product, comprising a computer program, which is used to implement any of the aforementioned methods when executed by a processor.
[0048] On the other hand, the present application also provides a computer program, which is used to implement any of the above methods when executed by a processor.
[0049] The present application provides a data monitoring method, device, electronic device, and storage medium. One of the methods is applied to a data acquisition terminal connected to an electronic control device. The method includes: collecting operating information of the electronic control device; wherein the operating information includes operating status and operating data; if the data acquisition terminal is in a normal state, periodically sending a pre-subscribed topic message to a smart factory system via a message queue telemetry transmission server according to a preset sending rule; the topic message includes the operating information and network signal strength information of the data acquisition terminal; if the data acquisition terminal is in an abnormal state, triggering the message queue telemetry transmission server to send a will message to the smart factory system; wherein the will message is used to indicate that the data acquisition terminal is in an abnormal state. By sending different information when the data acquisition terminal is in different states, the smart factory system will receive the corresponding information regardless of whether the data acquisition terminal is in a normal state or an abnormal state. The smart factory system can then determine the actual status of the data acquisition terminal and the electronic control device based on the received information, thereby preventing data inconsistency and improving the accuracy of the monitoring data. At the same time, it also solves the problem of data statistical errors caused by unclear monitoring data feedback, increased communication costs, and management costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0051] FIG1 is a flow chart of a data monitoring method provided in an embodiment of the present application;
[0052] FIG2 is a flow chart of another data monitoring method provided in an embodiment of the present application;
[0053] FIG3 is a schematic structural diagram of a data monitoring device provided in an embodiment of the present application;
[0054] FIG4 is a schematic structural diagram of another data monitoring device provided in an embodiment of the present application;
[0055] FIG5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
[0056] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION
[0057] Intelligent electronic control equipment in the sewing and textile industry is typically wirelessly connected to smart factory systems via data acquisition terminals, enabling data upload and command issuance, significantly improving factory production efficiency. As an auxiliary device, the data acquisition terminal collects operating information from electronic control equipment and transmits it to the smart factory system. The smart factory system, in turn, uses the data acquisition terminal to send information such as start-up and shutdown commands and production plans to the electronic control equipment, enabling intelligent factory management.
[0058] However, this requires that the connection network between each device must be very stable. Once a network anomaly occurs, it will not only affect the interaction between the electronic control equipment and the smart factory system, but also cause errors in the factory status statistical data.
[0059] In one example, heartbeat packets are sent to confirm normal communication between electronic control equipment and the smart factory system. If no response is received, the electronic control equipment is assumed to be offline. However, using heartbeat packets to determine whether the device is connected properly cannot determine whether the electronic control equipment is offline or the data acquisition terminal is abnormal. Consequently, the disconnection data of the data acquisition terminal cannot be accurately counted, which is not conducive to optimizing the performance of the data acquisition terminal. In addition, due to unclear data feedback, the status of the electronic control equipment in the smart factory system may be inconsistent with the actual status, resulting in data statistics errors, lacking reliable data for management personnel, and increasing communication and management costs in the production process.
[0060] In order to solve the above problems, the present application provides a data monitoring method, device, electronic device and storage medium, which collects the operating information of the electric control equipment through a configured data acquisition terminal, and sends the pre-subscribed topic information to the smart factory system through the message queue telemetry transmission server (i.e., MQTT server) when the data acquisition terminal is in a normal state, and triggers the message queue telemetry transmission server (i.e., MQTT server) to send a will message to the smart factory system when the data acquisition terminal is in an abnormal state, so as to inform the smart factory system that the data acquisition terminal is abnormal. Through this solution, the abnormal situation of the data acquisition terminal can be clearly identified, the consistency of each data can be guaranteed, more accurate data can be provided to managers, and more accurate data statistics and analysis can be carried out by the smart factory system.
[0061] MQTT stands for Message Queuing Telemetry Transport, and is an ISO-standardized messaging protocol based on the publish / subscribe paradigm. This application incorporates support for the MQTT protocol into the data collection terminal, enabling it to implement the solution of this application.
[0062] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0063] Figure 1 is a flow chart of a data monitoring method provided in an embodiment of the present application. The method provided in this embodiment is applied to a data acquisition terminal connected to an electronic control device. The execution subject can be the data acquisition terminal, or a data monitoring device, system, or module located on the data acquisition terminal, without limitation in this application.
[0064] Among them, the electronic control equipment mentioned in this application refers to intelligent electronic control equipment in the sewing and textile industry, such as: intelligent sewing machines, intelligent garment making machines, intelligent hosiery machines and other intelligent mechanical equipment with computer control systems in the sewing and textile industry. This application does not impose any restrictions.
[0065] This embodiment is described in detail by taking the execution subject as a data collection terminal as an example. As shown in Figure 1, the data monitoring method provided by this embodiment includes:
[0066] S101. Collect operating information of electronic control equipment; wherein the operating information includes operating status and operating data.
[0067] For example, a data acquisition terminal may be provided with a universal Ethernet port or serial port. Alternatively, the serial port may be configured to resemble an Ethernet port while retaining its functionality, allowing the data acquisition terminal to connect to electronically controlled equipment via either the Ethernet or serial port. The specific interface selected may be determined based on the interface configured on the electronically controlled equipment, and this application does not impose any limitations. For example, the data acquisition terminal may be a 2.4G / 5.8G Wi-Fi-to-serial and Ethernet module that can connect to a 485 serial port device or an electronically controlled equipment with an Ethernet port to achieve bidirectional data transmission with the smart factory system.
[0068] For example, when data monitoring is to be performed, the electronic control device is powered on, and the pre-configured data acquisition terminal is also powered on. The data acquisition terminal can then collect the operating information of the electronic control device. The operating information may include the operating status and operating data of the electronic control device. The operating status refers to information that characterizes the state of the electronic control device, such as whether the electronic control device is operating normally or is currently operating. Operating data may refer to related information such as the operating time or duration of the device, the name of the product being produced, and the output volume. The specific data information to be monitored can be determined based on actual needs, and this application does not impose any restrictions.
[0069] S102. If the data acquisition terminal is in a normal state, the pre-subscribed topic information is periodically sent to the smart factory system through the message queue telemetry transmission server according to the preset sending rules; the topic information includes operation information and network signal strength information of the data acquisition terminal.
[0070] For example, the data acquisition terminal may be provided with a self-test program that can determine the terminal's own status information and network signal strength information. Determining this status information primarily serves to determine whether the terminal can normally collect and send pre-subscribed topic information. For example, the terminal's status information can be determined by determining whether the network is normal or whether power is normally supplied. The data acquisition terminal's network signal strength information may include information indicating the strength of the network signal, such as signal strength and network quality.
[0071] If the data acquisition terminal's self-test program determines that the terminal is in a normal state, the terminal can periodically send pre-subscribed topic information to the smart factory system via a message queue telemetry transmission server (also known as an MQTT server) according to preset sending rules. This topic information may include the operating information of the electronic control equipment collected by the data acquisition terminal and the data acquisition terminal's own network signal strength information. This allows management personnel to determine the above information about the electronic control equipment and the data acquisition terminal through the smart factory system, thereby conducting faster and more effective troubleshooting and effectively resolving problems in actual production.
[0072] In addition, the subject message sent can also include other information, such as the model of the electronic control equipment, the actual geographical location (such as which workshop), the actual operator, the name of the connected network, etc., so that managers can better understand the information of each device and better solve problems encountered in practice.
[0073] In one example, according to a preset sending rule, the message queue telemetry transmission server periodically sends pre-subscribed topic information to the smart factory system, which may include:
[0074] S1. Based on a first preset time interval, periodically send operation information to the smart factory system through the message queue telemetry transmission server.
[0075] S2. Based on a second preset time interval, periodically send network signal strength information to the smart factory system through the message queue telemetry transmission server; wherein the first preset time interval is greater than the second preset time interval.
[0076] For example, the data acquisition terminal can collect the operating information of the electric control equipment in real time, and can also determine its own network signal strength information and other information in real time. However, in actual applications, the operating information of the electric control equipment and the network signal strength information of the data acquisition terminal will not change significantly in a short period of time, and the changes in a short period of time will not have a significant impact on actual production. In addition, managers have different requirements for the real-time nature of data. Therefore, in order to reduce the data processing pressure of the data acquisition terminal, when the pre-subscribed topic information is periodically sent to the smart factory system through the message queue telemetry transmission server (also known as the MQTT server), the data acquisition terminal can send the operating information of the electric control equipment to the smart factory system through the message queue telemetry transmission server (also known as the MQTT server) at every first preset time interval, and send the network signal strength information of the data acquisition terminal to the smart factory system through the message queue telemetry transmission server (also known as the MQTT server) at every second preset time interval, and set the first preset time interval to be greater than the second preset time interval.
[0077] The present application does not limit the specific values of the first preset time interval and the second preset time interval. For example, the first preset time interval can be set to 30 seconds, and the second preset time interval can be set to 10 seconds. That is, every 30 seconds, the data acquisition terminal sends the operating information of the electronic control equipment to the smart factory system via the MQTT server; and every 10 seconds, the data acquisition terminal sends the network signal strength information of the data acquisition terminal to the smart factory system via the MQTT server.
[0078] By sending the operating information of the electronic control equipment and the network signal strength information of the data acquisition terminal at different time intervals, it can not only meet the user's data monitoring needs, but also reduce the data processing pressure of the data acquisition terminal, thereby improving the overall performance of the data acquisition terminal.
[0079] In addition to electronic equipment operation information and data acquisition terminal network signal strength information, other information transmission rules can also be used to transmit information when there are other situations such as electronic equipment status changes, pattern delivery, employee login, and product embroidery completion. For example, real-time transmission, periodic / non-periodic transmission, etc. can be based on actual needs. This application does not impose any restrictions and can be configured according to actual needs.
[0080] S103. If the data acquisition terminal is in an abnormal state, the message queue telemetry transmission server is triggered to send a will information to the smart factory system; wherein the will information is used to indicate that the data acquisition terminal is in an abnormal state.
[0081] For example, if the data acquisition terminal's self-test program determines that the data acquisition terminal is in an abnormal state, the data acquisition terminal will trigger the message queue telemetry transmission server (i.e., MQTT server) to send a will message to the smart factory system to inform the smart factory system that the data acquisition terminal is in an abnormal state. The will message is a pre-set, designated message that will be sent when the data acquisition terminal is in an abnormal state.
[0082] The abnormal state may include a disconnected state and an offline state. If it is determined that the data acquisition terminal is in a disconnected state, the method of the present application may further include:
[0083] Trigger the restart program of the data acquisition terminal to restart the data acquisition terminal; if it is determined that the data acquisition terminal is still in an offline state after the restart, execute the step of triggering the message queue telemetry transmission server to send the will information to the smart factory system.
[0084] For example, if it is determined that the data acquisition terminal is in an offline state, the corresponding solution can only be taken to solve the problem after determining the reason for the offline of the data acquisition terminal. Therefore, the only way is to send a will message directly to the smart factory system to inform the smart factory system that the data acquisition terminal is in an abnormal state and the staff will handle the offline problem. If it is determined that the data acquisition terminal is in an offline state, the abnormality may be caused by problems such as unstable network or device crash. Therefore, the data acquisition terminal can be restarted and reconnected to the network to determine whether the data acquisition terminal is really in an offline state due to network problems. If the data acquisition terminal is still in an offline state after restarting the data acquisition terminal, the step of triggering the message queue telemetry transmission server (i.e., MQTT server) to send a will message to the smart factory system is executed to inform the smart factory system that the data acquisition terminal is in an abnormal state; and if the data acquisition terminal is in a normal state after restarting, the topic information can be sent normally.
[0085] Among them, when sending the will information to the smart factory system, the abnormal reason of the data acquisition terminal can also be carried in the will information, so as to accurately determine whether the data acquisition terminal is a network abnormality or an offline abnormality, and thus solve the problem better and faster.
[0086] In addition, when restarting the data acquisition terminal to reconnect to the network, if it is determined that the data acquisition terminal is still in a disconnected state after restarting the data acquisition terminal, the data acquisition terminal can be set to repeatedly connect to the pre-configured wireless network until it is connected to the network, or the data acquisition terminal can be restarted again after the disconnection time reaches the set disconnection interval and try to connect to the network again, so as to restore the function of the data acquisition terminal as soon as possible.
[0087] The data monitoring method provided in the embodiment of the present application is applied to a data acquisition terminal, which is connected to an electric control device and collects operating information of the electric control device; wherein the operating information includes operating status and operating data; if the data acquisition terminal is in a normal state, then according to a preset sending rule, a pre-subscribed topic information is periodically sent to the smart factory system through a message queue telemetry transmission server; the topic information includes operating information and network signal strength information of the data acquisition terminal; and if the data acquisition terminal is in an abnormal state, then the message queue telemetry transmission server is triggered to send a will information to the smart factory system; wherein the will information is used to indicate that the data acquisition terminal is in an abnormal state. In the scheme of the present application, regardless of whether the data acquisition terminal is in a normal state or an abnormal state, the smart factory system will receive the corresponding information, and can determine the actual status of the data acquisition terminal and the electric control device based on the received information, so that data inconsistency will not occur, thereby improving the accuracy of the monitoring data, and also solving the problem of data statistical errors caused by unclear monitoring data feedback, increased communication costs and management costs.
[0088] Based on the embodiment of FIG1 , in some examples, the data acquisition terminal is not pre-configured. Therefore, before performing data monitoring, the data acquisition terminal needs to be configured. In one example, the process of configuring the data acquisition terminal may include:
[0089] S10. Obtain configuration parameters; wherein the configuration parameters include the wireless network and password to which the data acquisition terminal is to be connected, and the connection parameters of the message queue telemetry transmission server. The connection parameters include the address of the message queue telemetry transmission server, the connection user name, the connection password, the subscription topic, and the client account.
[0090] S20. In response to the acquisition of the configuration parameters, determine a binding connection between the data acquisition terminal and the message queue telemetry transmission server.
[0091] For example, the user can connect the data acquisition terminal to the computer through the network port of the data acquisition terminal, enter the configuration parameters in the configuration interface of the computer, so that the data acquisition terminal obtains the configuration parameters and is configured as a data acquisition terminal that can implement the solution of the present application.
[0092] Among them, the configuration parameters may include the wireless network and password that the data acquisition terminal is to connect to, that is, the user enters the wifi name and wifi password that the data acquisition terminal is to connect to in the configuration interface. In addition, the configuration parameters also include the connection parameters of the message queue telemetry transmission server (also known as the MQTT server), and the connection parameters include the address of the message queue telemetry transmission server, the connection username, the connection password, the subscription topic, and the client account. The user can enter the address of the message queue telemetry transmission server (also known as the MQTT server), the connection username, the connection password, the subscription topic, and the client account in the configuration interface according to the prompts. Among them, the subscription topic represents the information content that the data acquisition terminal needs to send to the smart factory system when it is in normal state; the client account can be the MAC address of the data acquisition terminal (MAC stands for: Media Access Control Address, which literally means media access control address), which can uniquely identify the data acquisition terminal.
[0093] In addition, the configuration parameters may also include other parameters, which are not limited in this application. For example, when the data acquisition terminal is connected to an intelligent hosiery machine, the serial port baud rate of the data acquisition terminal may also need to be set, which can be configured according to real-time needs.
[0094] For example, after the data acquisition terminal obtains the configuration parameters, in response to the acquisition of the configuration parameters, the data acquisition terminal can be uniquely bound to the message queue telemetry transmission server (i.e., the MQTT server). In this way, regardless of whether the data acquisition terminal is in a normal state or an abnormal state, the corresponding message can be sent through the MQTT server to inform the monitoring data of the smart factory system equipment, thereby improving the accuracy of the monitoring data.
[0095] Figure 2 is a flow chart of another data monitoring method provided in an embodiment of the present application. The method provided in this embodiment is applied to a smart factory system. The execution subject of this embodiment can be the smart factory system, or it can be a data monitoring device or module located on the smart factory system. The smart factory system can be installed and run on an electronic device, which can be a mobile phone, computer, tablet, etc., without limitation in this application.
[0096] This embodiment is described in detail using the smart factory system as an example. As shown in Figure 2, the data monitoring method provided by this embodiment includes:
[0097] S201. Receive and save the subject information sent by the data acquisition terminal, or receive and save the will information sent by the data acquisition terminal; wherein the subject information is the pre-subscribed information that is periodically sent to the smart factory system through the message queue telemetry transmission server according to the preset sending rules when the data acquisition terminal is in a normal state; the subject information includes the operation information and the network signal strength information of the data acquisition terminal, and the operation information includes the operation status and operation data of the electric control equipment collected by the data acquisition terminal; the will information is the information that is periodically sent to the smart factory system by the message queue telemetry transmission server when the data acquisition terminal is in an abnormal state; the will information is used to indicate that the data acquisition terminal is in an abnormal state.
[0098] For example, when monitoring the operating information of electronic control equipment through a data acquisition terminal, the smart factory system will receive pre-subscribed topic information that is periodically sent to the smart factory system via a message queue telemetry transmission server according to preset sending rules when the data acquisition terminal is in a normal state; or receive a will information that is periodically sent to the smart factory system by a message queue telemetry transmission server when the data acquisition terminal is in an abnormal state. When the smart factory system receives the topic information, it can determine that the data acquisition terminal is in a normal state. It can also determine whether the electronic control equipment and the data acquisition terminal are faulty based on the network signal strength information of the data acquisition terminal and the operating information of the electronic control equipment. When the smart factory system receives the will information, it can determine that the data acquisition terminal is in an abnormal state and needs to perform fault processing on the data acquisition terminal.
[0099] Among them, the subject information may include the operating status and operating data of the electric control equipment collected by the data acquisition terminal, as well as the network signal strength information of the data acquisition terminal itself; the operating status indicates whether the electric control equipment is operating normally, and the operating data indicates the operating time or duration of the electric control equipment, the name of the product being produced, the output and other related information. The specific data information that needs to be monitored can be determined according to actual needs; and the network signal strength information of the data acquisition terminal itself may include signal strength, network quality and other information that can indicate the strength of the network signal, which is not limited in this application. The smart factory system can save this data in the corresponding database so that these monitoring data can be processed later to solve the faults and problems encountered in actual production.
[0100] S202: Control the large display screen to display the subject information or will information in real time.
[0101] For example, after the smart factory system receives and saves the subject information or will information, it can control the display of the received subject information or will information on the large screen so that managers can view the latest data acquisition terminal networking status and electronic control equipment operation information.
[0102] Among them, the display screen can be a display screen set up in the workshop. The workshop maintenance personnel or management personnel can view the subject information and will information sent by different data acquisition terminals through the display screen, and timely determine the information of each electronic control equipment and data acquisition terminal in each workshop, discover problems in time, and solve problems faster.
[0103] The data monitoring method provided in this embodiment is applied to a smart factory system. It receives and stores subject information sent by a data acquisition terminal, or receives and stores testamentary information sent by a data acquisition terminal, and controls the large screen to display the subject information or testamentary information in real time. This allows the smart factory system to receive the corresponding information regardless of whether the data acquisition terminal is in a normal or abnormal state, and displays it on the large screen for viewing by workshop managers and maintenance personnel. This provides them with more accurate monitoring data, eliminates data inconsistencies, reduces communication and management costs caused by unclear monitoring data feedback, and improves the user experience.
[0104] Based on the embodiment of Figure 2, after receiving the subject information and will information sent by the data collection terminal, the smart factory system can also perform data statistics based on this information to optimize the performance of the data collection terminal. In one example, the smart factory system can also: determine the total number of network disconnections and the duration of each disconnection of the data collection terminal; and based on the total number of network disconnections, the duration of each disconnection, and preset reminder rules, prompt the user to optimize the data collection terminal.
[0105] For example, after receiving and storing information sent by a data acquisition terminal over a period of time, the smart factory system can count the total number of network disconnections and the duration of each disconnection during this period. Based on the total number of disconnections, the duration of each disconnection, and preset reminder rules, the system can prompt the user to optimize the data acquisition terminal. For example, if the total number of disconnections exceeds a preset number and / or the duration of each disconnection exceeds a preset duration, the system can send a maintenance reminder message to the user, prompting the user to optimize the chip in the data acquisition terminal, thereby providing better service to the user.
[0106] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0107] Figure 3 is a schematic diagram of the structure of a data monitoring device provided in an embodiment of the present application. Device 30 of this embodiment is applied to a data acquisition terminal, which is connected to an electronic control device. As shown in Figure 3, device 30 includes an acquisition unit 301, a first sending unit 302, and a second sending unit 303.
[0108] The acquisition unit 301 is used to acquire the operation information of the electronic control device; wherein the operation information includes the operation status and operation data.
[0109] The first sending unit 302 is used to periodically send pre-subscribed topic information to the smart factory system through the message queue telemetry transmission server according to preset sending rules if the data acquisition terminal is in a normal state; the topic information includes operation information and network signal strength information of the data acquisition terminal.
[0110] The second sending unit 303 is used to trigger the message queue telemetry transmission server to send a will information to the smart factory system if the data acquisition terminal is in an abnormal state; wherein the will information is used to indicate that the data acquisition terminal is in an abnormal state.
[0111] In one example, the first sending unit 302 is specifically used to: based on a first preset time interval, periodically send operation information to the smart factory system through the message queue telemetry transmission server; based on a second preset time interval, periodically send network signal strength information to the smart factory system through the message queue telemetry transmission server; wherein the first preset time interval is greater than the second preset time interval.
[0112] In one example, abnormal states include disconnected state and offline state. The second sending unit 303 also includes a restart module 3031. The restart module 3031 is used to trigger the restart program of the data acquisition terminal and restart the data acquisition terminal if it is determined that the data acquisition terminal is in a disconnected state; if it is determined that the data acquisition terminal is still in a disconnected state after restart, the step of triggering the message queue telemetry transmission server to send the will information to the smart factory system is executed.
[0113] In one example, the device 30 further includes a configuration unit 304 , and the configuration unit 304 includes an acquisition module 3041 and a determination module 3042 .
[0114] The acquisition module 3041 is used to obtain configuration parameters; wherein, the configuration parameters include the wireless network and password to which the data acquisition terminal is to be connected, and the connection parameters of the message queue telemetry transmission server. The connection parameters include the address of the message queue telemetry transmission server, the connection user name, the connection password, the subscription topic, and the client account.
[0115] The determination module 3042 is used to determine the binding connection between the data acquisition terminal and the message queue telemetry transmission server in response to the acquisition of the configuration parameters.
[0116] The device provided in this embodiment can be used to execute the method of the above embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.
[0117] FIG4 is a schematic diagram of the structure of another data monitoring device provided in an embodiment of the present application. The device 40 of this embodiment is applied to a smart factory system. As shown in FIG4 , the device 40 includes a receiving unit 401 and a control module 402 .
[0118] Among them, the receiving unit 401 is used to receive and save the subject information sent by the data acquisition terminal, or to receive and save the will information sent by the data acquisition terminal; wherein the subject information is the pre-subscribed information that is periodically sent to the smart factory system through the message queue telemetry transmission server according to the preset sending rules when the data acquisition terminal is in a normal state; the subject information includes the operation information and the network signal strength information of the data acquisition terminal, and the operation information includes the operation status and operation data of the electric control equipment collected by the data acquisition terminal; the will information is the information that is triggered by the message queue telemetry transmission server to be periodically sent to the smart factory system when the data acquisition terminal is in an abnormal state; the will information is used to indicate that the data acquisition terminal is in an abnormal state.
[0119] The control module 402 is used to control the large screen to display the subject information or will information in real time.
[0120] In one example, the device 40 further includes a statistics unit 403 and a prompt unit 404 .
[0121] The statistical unit 403 is used to determine the total number of network disconnections of the data collection terminal and the duration of each network disconnection.
[0122] The prompting unit 404 is used to prompt the user to optimize the data collection terminal based on the total number of network disconnections, the duration of each network disconnection, and preset reminder rules.
[0123] The device provided in this embodiment can be used to execute the method of the above embodiment. Its implementation principle and technical effects are similar and will not be described in detail here.
[0124] It should be noted that it should be understood that the division of the various modules of the above device is merely a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. Moreover, these modules can all be implemented in the form of software called by processing elements; they can also all be implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. In addition, they can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, these modules can all or partly be integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by the hardware integrated logic circuit in the processor element or by instructions in the form of software.
[0125] Figure 5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in Figure 5, the electronic device 50 includes: a processor 501 and a memory 502 communicatively connected to the processor.
[0126] The memory 502 stores computer-executable instructions; the processor 501 executes the computer-executable instructions stored in the memory 502 to implement any of the aforementioned methods.
[0127] In the specific implementation of the above-mentioned electronic device, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or any conventional processor. The method disclosed in conjunction with the embodiments of the present application can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.
[0128] An embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement any of the aforementioned methods.
[0129] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with computer instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0130] An embodiment of the present application further provides a computer program product, comprising a computer program, which is used to implement any of the aforementioned methods when executed by a processor.
[0131] An embodiment of the present application also provides a computer program, which, when executed by a processor, is used to implement any of the aforementioned methods.
[0132] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0133] It should be understood that the present application is not limited to the exact structure described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A data monitoring method, characterized in that: The method is applied to a data acquisition terminal, the data acquisition terminal is connected to an electric control device, and the method comprises: Collecting the operation information of the electronic control device; wherein the operation information includes the operation status and operation data; If the data acquisition terminal is in a normal state, the pre-subscribed topic information is periodically sent to the smart factory system through the message queue telemetry transmission server according to the preset sending rules; the topic information includes the operation information and the network signal strength information of the data acquisition terminal; If the data acquisition terminal is in an abnormal state, the message queue telemetry transmission server is triggered to send a will information to the smart factory system; wherein the will information is used to indicate that the data acquisition terminal is in an abnormal state.
2. The method according to claim 1, characterized in that According to the preset sending rules, the message queue telemetry transmission server periodically sends pre-subscribed topic information to the smart factory system, including: Based on a first preset time interval, periodically sending the operation information to the smart factory system through a message queue telemetry transmission server; Based on a second preset time interval, the network signal strength information is periodically sent to the smart factory system through a message queue telemetry transmission server; wherein the first preset time interval is greater than the second preset time interval.
3. The method according to claim 1 or 2, characterized in that: The abnormal state includes a disconnected state and an offline state. If it is determined that the data acquisition terminal is in a disconnected state, the method further includes: Triggering a restart program of the data acquisition terminal to restart the data acquisition terminal; If it is determined that the data acquisition terminal is still in an offline state after restarting, the step of triggering the message queue telemetry transmission server to send the will information to the smart factory system is executed.
4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Acquire configuration parameters; wherein the configuration parameters include the wireless network and password to be connected by the data acquisition terminal, the connection parameters of the message queue telemetry transmission server, and the connection parameters The data includes the address of the message queue telemetry transmission server, the connection user name, the connection password, the subscription topic, and the client account; In response to the acquisition of the configuration parameters, a binding connection between the data acquisition terminal and the message queue telemetry transmission server is determined.
5. A data monitoring method, characterized in that: The method is applied to a smart factory system, and the method comprises: Receive and save the subject information sent by the data acquisition terminal, or receive and save the will information sent by the data acquisition terminal; wherein the subject information is the pre-subscribed information periodically sent to the smart factory system through the message queue telemetry transmission server according to the preset sending rules when the data acquisition terminal is in a normal state; the subject information includes the operation information and the network signal strength information of the data acquisition terminal, and the operation information includes the operation status and operation data of the electric control equipment collected by the data acquisition terminal; the will information is the information that triggers the message queue telemetry transmission server to periodically send to the smart factory system when the data acquisition terminal is in an abnormal state; the will information is used to indicate that the data acquisition terminal is in an abnormal state; Control the large display screen to display the subject information or the will information in real time.
6. The method according to claim 5, characterized in that The method further comprises: Determine the total number of network disconnections of the data acquisition terminal and the duration of each network disconnection; Based on the total number of network disconnections, the duration of each network disconnection and preset reminder rules, the user is prompted to optimize the data collection terminal.
7. A data monitoring device, characterized in that: The device is applied to a data acquisition terminal, the data acquisition terminal is connected to an electric control device, and the device comprises: A collection unit, used to collect the operation information of the electronic control device; wherein the operation information includes operation status and operation data; A first sending unit is used to periodically send pre-subscribed topic information to the smart factory system through a message queue telemetry transmission server according to a preset sending rule if the data acquisition terminal is in a normal state; the topic information includes the operation information and the network signal strength information of the data acquisition terminal; The second sending unit is used to trigger the message queue telemetry transmission server to send a will information to the smart factory system if the data acquisition terminal is in an abnormal state; wherein the will information is used to indicate that the data acquisition terminal is in an abnormal state.
8. A data monitoring device, characterized in that: The device is applied to a smart factory system, and the device comprises: A receiving unit, used for receiving and saving subject information sent by a data acquisition terminal, or receiving and saving will information sent by the data acquisition terminal; wherein the subject information is pre-subscribed information periodically sent to the smart factory system by a message queue telemetry transmission server according to a preset sending rule when the data acquisition terminal is in a normal state; the subject information includes operation information and network signal strength information of the data acquisition terminal, and the operation information includes the operation status and operation data of the electric control equipment collected by the data acquisition terminal; the will information is information that is triggered by the message queue telemetry transmission server to periodically send to the smart factory system when the data acquisition terminal is in an abnormal state; the will information is used to indicate that the data acquisition terminal is in an abnormal state; A control module is used to control the large display screen to display the subject information or the will information in real time.
9. An electronic device, characterized in that: The electronic device comprises: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 4, or implements the method according to claim 5 or 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 4, or the method according to claim 5 or 6 when executed by a processor.
11. A computer program product, characterized in that The invention comprises a computer program, which is used to implement the method according to any one of claims 1 to 4, or the method according to claim 5 or 6 when being executed by a processor.
12. A computer program, characterized in that When the computer program is executed by a processor, it is used to implement the method according to any one of claims 1 to 4, or to implement the method according to claim 5 or 6.
Citation Information
Patent Citations
Data acquisition system and method
CN112051816A
Rapid processing system for early warning data
CN112866050A
Message transceiving method based on MQTT protocol for acquisition terminals
CN113722121A
Information interaction method between intelligent terminal and acquisition terminal
CN114584614A
Equipment remote operation and maintenance method and device based on 5G and storage medium
CN115277666A
