Sewing equipment state monitoring method and device, equipment and storage medium

By introducing state data acquisition drivers and daemons into the operating system core of sewing equipment, the device status data is directly written to the database, which solves the real-time and accuracy problems of high-automated device status monitoring, reduces costs and improves the stability of equipment operation.

CN120406381APending Publication Date: 2025-08-01TIANJIN ZAIDENG SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410241445.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-04
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In sewing equipment with a high degree of automation, how to effectively monitor the equipment status to ensure the normal operation of the production process and optimize the production efficiency, especially when there are many equipment and fewer personnel, it is difficult for the prior art to achieve real-time and accurate status monitoring.

Method used

By introducing state data acquisition drivers into the operating system kernel of industrial control equipment, the sewing device status files are generated, and the daemon reads these files in real time, and the status data is directly written to the database to avoid intermediate forwarding. The high-speed data acquisition capabilities of the operating system kernel and the stable operation of the daemon are used to ensure the real-time and accuracy of the data.

Benefits of technology

It reduces the cost of status monitoring, simplifies the data process, avoids data loss, and ensures the real-time and accuracy of the status data of the sewing equipment, thereby ensuring the normal operation of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120406381A_ABST
    Figure CN120406381A_ABST
Patent Text Reader

Abstract

The invention discloses a sewing equipment state monitoring method and device, equipment and a storage medium. The method comprises the following steps: reading a sewing equipment state file generated in an operating system kernel of industrial control equipment through a daemon; the daemon is always kept in a running state when the industrial control equipment is in a power-on state; wherein the sewing equipment state file is generated by acquiring a sensor signal associated with the sewing equipment by a state data acquisition drive in an operating system kernel; reading the sewing equipment state file through a daemon to obtain sewing equipment state data; and writing the sewing equipment state data into a database in a queue form through a daemon, so that a main business program operated in the industrial control equipment reads the sewing equipment state data from the database, and monitors the state of the sewing equipment. According to the technical scheme, the state of the sewing equipment can be monitored in real time, and normal operation of the sewing equipment is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of sewing equipment automation, and particularly to a method, device, equipment and storage medium for monitoring the state of sewing equipment. Background Art

[0002] With the transformation of the manufacturing industry towards automation and intelligence, in the actual production process, more and more sewing equipment with a high degree of automation is used.

[0003] In production sites where these highly automated sewing equipment are used, there are often fewer personnel arrangements. In the case of a large number of sewing equipment, how to monitor the state of the sewing equipment is very important for ensuring the normal production process, optimizing production efficiency, and ensuring sewing quality. Summary of the Invention

[0004] The present invention provides a method, device, equipment and storage medium for monitoring the state of sewing equipment to monitor the state of sewing equipment in real time and ensure the normal operation of the sewing equipment.

[0005] According to one aspect of the present invention, there is provided a method for monitoring the state of sewing equipment, including:

[0006] Reading, by a daemon program, a sewing equipment status file generated in the operating system kernel of an industrial control device; the daemon program always remains in a running state when the industrial control device is powered on;

[0007] wherein, the sewing equipment status file is generated by a status data acquisition driver in the operating system kernel collecting sensor signals associated with the sewing equipment;

[0008] Reading, by the daemon program, the sewing equipment status file to obtain sewing equipment status data;

[0009] Writing, by the daemon program, the sewing equipment status data into a database in the form of a queue, so that a main business program running in the industrial control device reads the sewing equipment status data from the database to monitor the state of the sewing equipment.

[0010] According to another aspect of the present invention, there is provided a device for monitoring the state of sewing equipment, including:

[0011] A file reading module, configured to read, by a daemon program, a sewing equipment status file generated in the operating system kernel of an industrial control device; the daemon program always remains in a running state when the industrial control device is powered on;

[0012] wherein, the sewing equipment status file is generated by a status data acquisition driver in the operating system kernel collecting sensor signals associated with the sewing equipment;

[0013] A status data acquisition module, configured to read the sewing device status file through a daemon program to obtain sewing device status data;

[0014] A status data writing module, configured to write the sewing device status data into a database in the form of a queue through a daemon program, so that a main business program running in an industrial control device reads the sewing device status data from the database to monitor the status of the sewing device.

[0015] According to another aspect of the present invention, there is provided an electronic device, including:

[0016] At least one processor; and

[0017] A memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the status monitoring method of the sewing device according to any embodiment of the present invention.

[0019] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the status monitoring method of the sewing device according to any embodiment of the present invention when executed.

[0020] In the technical solution of the embodiment of the present invention, the industrial control device reads the sewing device status file generated in the operating system kernel of the industrial control device through a daemon program, reads the sewing device status file to obtain sewing device status data, and finally writes the sewing device status data into the database in the form of a queue, so that a main business program running in the industrial control device reads the sewing device status data from the database to monitor the status of the sewing device. Compared with the method of introducing a dedicated single-chip microcomputer for status monitoring, the status monitoring cost of the sewing device can be reduced, and there is no need to go through links such as forwarding of status data, simplifying the data flow, avoiding data loss, ensuring the real-time and accuracy of status data, and thus ensuring the normal operation of the sewing device.

[0021] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0023] Figure 1 is a flowchart of a method for monitoring the state of a sewing device according to Embodiment 1 of the present invention;

[0024] Figure 2 is a flowchart of a method for monitoring the state of a sewing device according to Embodiment 2 of the present invention;

[0025] Figure 3 is a flowchart of a method for monitoring the state of a sewing device according to Embodiment 3 of the present invention;

[0026] Figure 4 is a schematic structural diagram of a device for monitoring the state of a sewing device according to Embodiment 4 of the present invention;

[0027] Figure 5 is a schematic structural diagram of an electronic device for implementing the method for monitoring the state of a sewing device in the embodiments of the present invention. Detailed Embodiments

[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products, or devices.

[0030] Embodiment 1

[0031] Figure 1 The following is a flowchart of a method for monitoring the state of a sewing device provided in the first embodiment of the present invention. This embodiment is applicable to the situation where the sensor signals associated with the sewing device are directly obtained by using an industrial control device. This method can be executed by a state monitoring device of the sewing device. The state monitoring device of the sewing device can be implemented in the form of hardware and / or software, and the state monitoring device of the sewing device can be configured in various general computing devices. As Figure 1 shown, the method includes:

[0032] S110. Read the sewing device status file generated in the operating system kernel of the industrial control device through a daemon process; the daemon process always remains in a running state when the industrial control device is powered on;

[0033] Among them, the sewing device status file is generated by the status data acquisition driver in the operating system kernel collecting the sensor signals associated with the sewing device. The daemon process is started immediately after the operating system of the industrial control device starts running and always runs in the background until the operating system is shut down.

[0034] The operating system kernel is the core part of the operating system, which is used to manage system processes, memory, device drivers, files, and network systems, etc. The status data acquisition driver is an interrupt driver pre-written in the operating system kernel, which is used to generate a kernel file containing the sewing device status data, here called the sewing device status file. Among them, the sewing device status data includes the trigger times of each I / O pin of the sensor. In the embodiment of the present invention, the status data acquisition driver is pre-written in the operating system kernel of the industrial control device, and the trigger mode of the sensor I / O pin is pre-selected, for example, high-level trigger, low-level trigger, rising-edge trigger, or falling-edge trigger, etc. Add the input / output (Input / Outpu, abbreviated as I / O) pins of the sensors to be collected in the device tree description file in the operating system.

[0035] The status data acquisition driver can obtain the level signals sent by the sensor I / O pins according to the sensor I / O pins in the device tree description file and the pre-configured I / O pin trigger mode, and then generate a kernel file containing the sewing device status data based on the level signals, that is, the sewing device status file. During the running process, the daemon process can read the above sewing device status file from the operating system kernel according to a set time period.

[0036] In a specific example, the operating system kernel is a Linux operating system kernel based on an ARM processor, which includes a status data acquisition driver. The status data acquisition driver records the flag information and trigger times of the sensor I / O pins associated with the sewing device in the kernel file based on a preset trigger mode of the sensor I / O pins, and generates a sewing device status file. The daemon reads the sewing device status file in the Linux operating system kernel based on the ARM processor according to a set period.

[0037] The above method can use a Linux operating system based on an ARM processor to replace a dedicated single-chip microcomputer to collect sensor signals associated with the sewing device, reduce the addition of unnecessary single-chip microcomputer boards, reduce hardware costs, improve the resource utilization rate of the ARM processor, and the status data acquisition driver in the operating system kernel can collect sewing device status data quickly without an intermediate forwarding link, which can reduce data loss and improve the efficiency and reliability of signal acquisition. And by using a continuously running daemon to obtain the sewing device status file, the stability of file acquisition can be maintained, and data loss caused by sudden program shutdown can be avoided.

[0038] S120. Read the sewing device status file through the daemon to obtain the sewing device status data.

[0039] The sewing device status data is obtained by the status data acquisition driver by collecting the level signals of the sensor I / O pins associated with the sewing device. Exemplarily, the sewing device status data is the trigger times of each I / O pin of the sensor.

[0040] Optionally, the sewing device status data includes at least one of the rotation speed, working voltage, working current of the sewing device, and the production volume in the current production cycle.

[0041] In the embodiment of the present invention, after the daemon obtains the sewing device status file, it reads the content in the sewing device status file to obtain the sewing device status data. Specifically, the corresponding data of each sensor I / O pin in the sewing device status file is separated by a set delimiter, for example, a comma or a semicolon, etc. The daemon reads the content in the sewing device status file into a string, and then separates the data of each sensor I / O pin according to the preset delimiter to obtain the sewing device status data.

[0042] In addition, a dedicated sub-thread can be started in the user's QT program to obtain the sewing device status file from the Linux operating system kernel of the ARM processor every set time interval, such as 500 milliseconds. Further, the cat command is executed through the start method in the Qprocess class to read the content of the sewing device status file and store it in a set array (such as QByteArray). Further, the array is converted into a string (such as QStringList). Storing the data in the array first and then converting it into a string can avoid memory crashes caused by directly reading the data into the string.

[0043] Further, traverse the string and split the string by commas to obtain the key-value pairs associated with each sensor I / O pin. Each key-value pair is split into left and right parts by the "=" symbol. The left side of the "=" symbol is the "key", representing the identifier of the sensor I / O pin, and the right side of the "=" symbol is the "value", representing the number of trigger times of the current sensor I / O pin. Since the characters in the string are in text format, the "value" in the key-value pair needs to be converted into a numeric form. If the conversion is successful and the corresponding "key" is within the preset legal range, it is stored as sewing device status data in the corresponding position of the IN array. Finally, the sub-thread can send the read sewing device status data to the main thread, enabling the main thread to monitor the status of the sewing device based on the received sewing device status data.

[0044] S130. Write the sewing device status data into the database in the form of a queue through a daemon program, so that the main business program running in the industrial control device reads the sewing device status data from the database and monitors the status of the sewing device.

[0045] In the embodiment of the present invention, after the daemon program reads the sewing device status data, it writes the sewing device status data into the database in the form of a queue, which can avoid data loss due to power failure. Further, the main business program running in the industrial control device can read the sewing device status data from the database and monitor the status of the sewing device. Specifically, the database is pre-installed in the operating system and a database table is established. The daemon program includes the logic of reading the sewing device status file and writing the sewing device status file into the database. This involves opening a file, reading the file content, and constructing an SQL statement to insert the data into the database. Here, the API provided by the database can be used to execute the SQL statement to achieve data insertion, update, deletion, and query. Storing the sewing device status data in the database can avoid data loss and can also record the data timestamp, which is helpful for subsequent data analysis.

[0046] In the technical solution of the embodiment of the present invention, the industrial control device reads the sewing device status file generated in the operating system kernel of the industrial control device through a daemon program, reads the sewing device status file to obtain sewing device status data, and finally writes the sewing device status data into the database in the form of a queue, so that the main business program running in the industrial control device reads the sewing device status data from the database to monitor the status of the sewing device. Compared with the method of introducing a dedicated single-chip microcomputer for status monitoring, the status monitoring cost of the sewing device can be reduced, and there is no need to go through links such as forwarding of status data, simplifying the data flow, avoiding data loss, and ensuring the real-time and accuracy of status data, thereby ensuring the normal operation of the sewing device.

[0047] Embodiment 2

[0048] Figure 2 FIG. is a flowchart of a method for monitoring the status of a sewing device provided in Embodiment 2 of the present invention. This embodiment is further refined on the basis of the above embodiment and provides specific steps for reading the sewing device status file through a daemon program to obtain sewing device status data. As Figure 2 shown, the method includes:

[0049] S210. Read the sewing device status file generated in the operating system kernel of the industrial control device through a daemon program; the daemon program always remains in a running state when the industrial control device is powered on;

[0050] Among them, the sewing device status file is generated by the status data acquisition driver in the operating system kernel to acquire the sensor signals associated with the sewing device.

[0051] Optionally, the operating system kernel is a Linux operating system kernel based on an ARM processor.

[0052] Optionally, the industrial control device is configured with at least one external port, and each external port is provided with a corresponding peripheral circuit to adapt to the sensors associated with the sewing device.

[0053] In this optional embodiment, the industrial control device is configured with at least one external port, and each external port is provided with a corresponding peripheral circuit to adapt to the sensors associated with the sewing device. For example, an optocoupler isolation sensor is externally connected to the ARM processor to convert the voltage of the signal sent by the sensor I / O pin to the rated voltage of the ARM processor.

[0054] In the above optional embodiment, the operating system kernel is a Linux operating system kernel based on an ARM (Advanced RISC Machine) processor. Since it is necessary to connect the sensor to the ARM processor, if the voltage of the electrical signal transmitted from the sensor I / O pin is higher than the maximum voltage that the ARM processor can withstand, the ARM processor may be damaged. Therefore, the circuit is modified to use an optocoupler to isolate the direct contact between the sensor and the ARM processor, and convert the level transmitted from the sensor I / O pin to the rated voltage of the ARM processor.

[0055] Exemplarily, the rated voltage of the ARM processor is 3.3 volts, and the voltage of the electrical signal transmitted from the sensor I / O pin is 5 volts. At this time, the optocoupler isolation sensor can be used to convert the signal to 3.3 volts. By connecting the optocoupler isolation sensor, the range of sensors that the ARM processor can directly collect can be expanded, and the availability of the solution can be improved. Another example is that by cooperating with a 485 chip and a driver, it is possible to read external working devices such as a Programmable Logic Controller (PLC).

[0056] Optionally, the status data acquisition driver collects sensor signals based on the sensor input / output I / O pins defined in the device tree description file and the corresponding triggering method of the sensor I / O pins.

[0057] The device tree description file is a file used to store relevant devices in the Linux system. The I / O pins of the sensors to be collected can be written in the device tree description file in advance, and the new device tree description file and the new operating system kernel with the signal acquisition driver added are burned together.

[0058] In this optional embodiment, after the new operating system kernel is started based on the above, the status data acquisition driver in the kernel can collect the sewing device status data based on the sensor I / O pins written in the device description file and generate a sewing device status file.

[0059] S220. Read the sewing device status file and save the read data in an array.

[0060] In the embodiment of the present invention, after obtaining the sewing device status file, first read the sewing device status file and save the read data in an array. Exemplarily, the start method of the Qprocess class executes the cat command to read the content of the sewing device status file and saves it in a variable of the pre-set array QbyteArray.

[0061] S230. Convert the array to a string, traverse the string, and obtain the sewing device status data.

[0062] In an embodiment of the present invention, after the data in the read sewing device status file is saved in an array, the array is further converted into a string, and then by traversing the string, the sewing device status data therein is obtained. By first saving the content of the sewing device status file in an array and then converting the array into a string, compared with the method of directly writing the read sewing device status data into a string, program crashes can be avoided and memory safety can be ensured.

[0063] Optionally, traversing the string to obtain the sewing device status data includes:

[0064] Traversing the string and splitting the string based on a preset delimiter to obtain key-value pairs composed of pin identifiers and pin triggered data;

[0065] Based on a preset key-value flag character, extracting the pin triggered data in the key-value pair as the sewing device status data.

[0066] In this optional embodiment, a specific method for traversing the string to obtain the sewing device status data is provided: First, traverse the string and split the string based on a preset delimiter to obtain key-value pairs composed of pin identifiers and pin triggered data. Further, based on a preset key-value identifier, extract the pin triggered data in the key-value pair as the sewing device status data.

[0067] In a specific example, traverse the string, split the string by commas to obtain key-value pairs associated with each sensor I / O pin. Among them, each key-value pair is split into two parts on the left and right by the "=" symbol. The left side of the "=" symbol is the "key", representing the identifier of the sensor I / O pin, and the right side of the "=" symbol is the "value", representing the trigger count of the current sensor I / O pin. Since the characters in the string are all in text format, the "value" in the key-value pair needs to be converted into a numerical form. If the conversion is successful and the corresponding "key" is within the preset legal range, it is stored as the sewing device status data in the corresponding position of the IN array.

[0068] S240. Write the sewing device status data into the database in the form of a queue through a daemon program, so that the main business program running in the industrial control device reads the sewing device status data from the database to monitor the status of the sewing device.

[0069] Optionally, read the sewing device status data from the database through a subroutine and send the sewing device status data to the main business program according to a set sending period.

[0070] In the embodiments of the present invention, in addition to obtaining the sewing device status data by the daemon program, the process of obtaining the sewing device status data can also be placed in a subroutine in the user program. After the subroutine reads the sewing device status data, the sewing device status data is sent to the main business program so that the main business program can perform corresponding operations using the sewing device status data. For example, the sewing device status data is displayed on the sensor display interface, or the sewing device status data is encapsulated in Message Queuing Telemetry Transport (MQTT for short) and sent to the server through a wireless network or other means for statistical analysis of the data, or it can be saved to the local database.

[0071] By placing the operations of obtaining the sewing device status file and reading the data in the subroutine, the main business program only needs to receive and use the sewing device status data, which will not affect the task processing efficiency of the main business program and saves system overhead.

[0072] In this optional embodiment, the subroutine reads the sewing device status data from the database and sends the sewing device status data to the main business program according to the set sending period, thereby avoiding waste of main program resources caused by querying and reading the sewing device status data. In addition, the subroutine does not directly update the user interface after querying the data, but sends a signal to notify the main thread that the data has been read. After receiving the signal, the main thread will display the newly read sewing device status data. This method can make the normal interaction of the industrial control computer and the time-consuming data query run in parallel, improving the user experience and adding the function of obtaining external input at the same time.

[0073] In the technical solution of the embodiments of the present invention, by adding a status data acquisition driver to the operating system kernel of the industrial control computer, and then obtaining and reading the sewing device status file produced by the status data acquisition driver in the daemon program to obtain the sewing device status data. Compared with the method of setting up a dedicated single-chip microcomputer to collect the sewing device status data and transmitting the sewing device status data to the device through a serial port or network, there is no need to add a dedicated data acquisition single-chip microcomputer, which reduces the hardware cost and reduces the intermediate forwarding link. In addition, placing the acquisition and reading of the sewing device status file in the sub-thread will not affect the running efficiency of the main thread, can save system overhead, and improve the efficiency of sewing device status data acquisition.

[0074] Embodiment III

[0075] Figure 3 It is a flowchart of a method for monitoring the status of a sewing device provided in Embodiment III of the present invention. This embodiment is applicable to the situation of directly obtaining the sensor signals associated with the sewing device by using industrial control equipment. As Figure 3 shown, the method includes:

[0076] S310. Based on the set acquisition period, obtain the sewing device status file generated in the operating system kernel through a sub-thread;

[0077] Among them, the sewing device status file is generated by the status data acquisition driver in the operating system kernel collecting the sensor signals associated with the sewing device.

[0078] In a scenario where there is a need to read the device rotation speed, the sub-thread needs to obtain the sewing device status file according to the set acquisition period to ensure the real-time nature of the rotation speed reading. For example, based on the number of trigger times of the sensor I / O pin at the current time and the latest trigger times 500 milliseconds later, the current trigger times are recorded as old_speed, and the trigger times 500 milliseconds later are recorded as new_speed. It can be inferred that the rotation speed should be: rpm (revolutions per minute) = (new_speed - old_speed) * 2 * 60. In this way, the rotation speed of the device can be calculated.

[0079] S320. Read the sewing device status file to obtain the sewing device status data.

[0080] S330. Based on the set sending period, send the sewing device status data to the main thread.

[0081] In the embodiment of the present invention, after the sub-thread obtains the sewing device status data, the sewing device status data needs to be sent to the main thread according to the set sending period. The main thread can use the sewing device status data to process corresponding services, or can display or store the sewing device status data.

[0082] Exemplarily, the sub-thread sends the sewing device status data to the main thread once every 500 milliseconds. Using the signal-slot mechanism of Qt, when the sub-thread emits the gpioValueChanged signal, the handleGPIOValue function of the main thread will be called, and the corresponding sewing device status data will be displayed on the interface.

[0083] The technical solution of the embodiment of the present invention, by adding a status data acquisition driver in the operating system kernel, and then obtaining and reading the sewing device status file produced by the status data acquisition driver in the user program to obtain the sewing device status data. Compared with the method of setting up a dedicated single-chip microcomputer to collect the sewing device status data and transmitting the sewing device status data to the device through a serial port or network, on the one hand, there is no need to add a dedicated data acquisition single-chip microcomputer, reducing the hardware cost and reducing the intermediate forwarding link. On the other hand, using the status data acquisition driver in the operating system kernel to collect sensor signals will not affect the operation of the user program, and can effectively improve the efficiency of collecting the sewing device status data while saving system overhead.

[0084] Embodiment 4

[0085] Figure 4 The following is a schematic structural diagram of a state monitoring device for a sewing device provided in Embodiment 4 of the present invention. As Figure 4 shown, the device includes:

[0086] A file reading module 410, configured to read a sewing device status file generated in the operating system kernel of an industrial control device through a daemon; the daemon always remains in a running state when the industrial control device is powered on;

[0087] Wherein, the sewing device status file is generated by a status data acquisition driver in the operating system kernel by acquiring sensor signals associated with the sewing device;

[0088] A status data acquisition module 420, configured to read the sewing device status file through a daemon to obtain sewing device status data;

[0089] A status data writing module 430, configured to write the sewing device status data into a database in the form of a queue through a daemon, so that a main service program running in the industrial control device reads the sewing device status data from the database to monitor the status of the sewing device.

[0090] According to the technical solution of the embodiment of the present invention, the industrial control device reads the sewing device status file generated in the operating system kernel of the industrial control device through a daemon, reads the sewing device status file to obtain sewing device status data, and finally writes the sewing device status data into the database in the form of a queue, so that the main service program running in the industrial control device reads the sewing device status data from the database to monitor the status of the sewing device. Compared with the method of introducing a dedicated single-chip microcomputer for status monitoring, the status monitoring cost of the sewing device can be reduced, and there is no need to go through links such as forwarding of status data, simplifying the data flow, avoiding data loss, ensuring the real-time and accuracy of status data, and thus ensuring the normal operation of the sewing device.

[0091] Optionally, the status data acquisition driver acquires sensor signals associated with the sewing device based on the sensor input / output I / O pins defined in the device tree description file and the trigger mode corresponding to the sensor I / O pins.

[0092] Optionally, the status data acquisition module 420 includes:

[0093] A file reading unit, configured to read the sewing device status file and save the read data in an array;

[0094] A data reading unit, which converts the array into a string and traverses the string to obtain the sewing device status data.

[0095] Optionally, the data reading unit is specifically configured to:

[0096] Traverse the string, and split the string based on a preset delimiter to obtain key-value pairs composed of pin identifiers and pin trigger data;

[0097] Based on a preset key-value flag character, extract the pin trigger data in the key-value pair as the sewing device status data.

[0098] Optionally, the sewing device status data includes at least one of the rotational speed, working voltage, working current of the sewing device, and the production volume in the current production cycle.

[0099] Optionally, the industrial control device is configured with at least one external port, and each external port is provided with a corresponding peripheral circuit to adapt to the sensors associated with the sewing device.

[0100] Optionally, the sewing device status monitoring device further includes:

[0101] A sewing device status data sending module, configured to read the sewing device status data in the database through a subroutine, and send the sewing device status data to the main business program according to a set sending period.

[0102] The status monitoring device of the sewing device provided by the embodiments of the present invention can execute the status monitoring method of the sewing device provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0103] Embodiment Five

[0104] Figure 5 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described herein and / or claimed.

[0105] As Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. The memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0106] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0107] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the state monitoring method of the sewing device.

[0108] In some embodiments, the state monitoring method of the sewing device can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the state monitoring method of the sewing device described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the state monitoring method of the sewing device by any other appropriate means (e.g., by means of firmware).

[0109] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.

[0110] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer programs can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

[0111] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0112] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0113] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0114] A computing system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0115] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and this is not limited herein.

[0116] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for monitoring the state of a sewing device, characterized in that, Applied to industrial control equipment, including: Reading, through a daemon program, a sewing equipment status file generated in the operating system kernel of the industrial control equipment; the daemon program always remains in a running state when the industrial control equipment is powered on; wherein, the sewing equipment status file is generated by a status data acquisition driver in the operating system kernel for acquiring sensor signals associated with the sewing equipment; Reading, through the daemon program, the sewing equipment status file to obtain sewing equipment status data; Writing, through the daemon program, the sewing equipment status data into a database in the form of a queue, so that a main business program running in the industrial control equipment reads the sewing equipment status data from the database to perform status monitoring on the sewing equipment.

2. The method according to claim 1, wherein The status data acquisition driver acquires sensor signals associated with the sewing equipment based on the sensor input / output I / O pins defined in the device tree description file and the trigger mode corresponding to the sensor I / O pins.

3. The method according to claim 1, wherein The step of reading, through the daemon program, the sewing equipment status file to obtain sewing equipment status data includes: Reading the sewing equipment status file and storing the read data in an array; Converting the array into a string and traversing the string to obtain the sewing equipment status data.

4. The method according to claim 3, wherein The step of traversing the string to obtain the sewing equipment status data includes: Traversing the string and splitting the string based on a preset delimiter to obtain key-value pairs composed of pin identifiers and triggered pin data; Extracting the triggered pin data as the sewing equipment status data from the key-value pairs based on a preset key-value flag character.

5. The method according to claim 1, wherein The sewing equipment status data includes at least one of the rotational speed, operating voltage, operating current of the sewing equipment, and the production volume in the current production cycle.

6. The method according to claim 1, wherein The industrial control equipment is configured with at least one external port, and each external port is provided with a corresponding peripheral circuit to adapt to sensors associated with the sewing equipment.

7. The method according to claim 1, characterized in that, It also includes: Reading, through a subroutine, sewing equipment status data in the database and sending the sewing equipment status data to the main business program according to a set sending period.

8. A state monitoring device for a sewing machine, characterized in that, Configured in the industrial control equipment, including: A file reading module for reading, through a daemon program, a sewing equipment status file generated in the operating system kernel of the industrial control equipment; the daemon program always remains in a running state when the industrial control equipment is powered on; wherein, the sewing equipment status file is generated by a status data acquisition driver in the operating system kernel for acquiring sensor signals associated with the sewing equipment; A status data acquisition module for reading, through the daemon program, the sewing equipment status file to obtain sewing equipment status data; A status data writing module for writing, through the daemon program, the sewing equipment status data into a database in the form of a queue, so that a main business program running in the industrial control equipment reads the sewing equipment status data from the database to perform status monitoring on the sewing equipment.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the state monitoring method of the sewing device according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for implementing the state monitoring method of the sewing device according to any one of claims 1-7 when the computer instructions are executed by a processor.