Traditional Chinese medicine equipment control method and system based on Internet of Things platform
Through the control method of traditional Chinese medicine equipment on the Internet of Things platform, the automatic startup of traditional Chinese medicine physiotherapy equipment is achieved using QR code and Internet of Things technology, solving the problems of slow response and inconvenient management of existing equipment, and improving user experience and service quality .
Patent Information
- Application Number
- CN202411317517.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2024-12-27
AI Technical Summary
When existing traditional Chinese medicine physiotherapy equipment is used simultaneously by multiple users, managers need to manually verify their identity and operate it manually, resulting in slow response, long wait time for users, poor experience, and lack of real-time feedback and intelligent maintenance.
Using the traditional Chinese medicine device control method based on the Internet of Things platform, the Chinese medicine physiotherapy device is powered on and sent a QR code to obtain instructions. The Internet of Things control device generates and returns to the QR code on the startup page. After the user scans the code, the identity authentication and the device automatically starts. , feedback the equipment status and service progress in real time to achieve intelligent maintenance.
It simplifies the operational steps of users and managers, improves the efficiency of automatic start-up and management of the equipment, ensures the security of the equipment and real-time status monitoring, and improves the user experience and service quality.
Smart Images

Figure CN119211310A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent physiotherapy technology, and in particular to a traditional Chinese medicine equipment control method and system based on an Internet of Things platform. Background Art
[0002] Traditional Chinese medicine therapy equipment (such as moxibustion devices, massagers, hot compresses, etc.) can help people relieve body pain, improve blood circulation, and promote health. Traditional Chinese medicine therapy equipment usually requires manual control by the operator and lacks intelligent management. In recent years, intelligent Chinese medicine therapy equipment has gradually entered the market. Chinese medicine therapy equipment has begun to integrate Internet technology, intelligent control and data analysis functions, which has improved the convenience of operation and can quickly meet the personalized needs of users.
[0003] At present, when multiple users come to the store to use different physiotherapy equipment at the same time, store managers need to verify the identity of each user and manually operate the physiotherapy equipment. Therefore, they may not be able to respond quickly to the user's physiotherapy needs, and the user has to wait for a long time, which affects the experience and reduces satisfaction. In addition, the control of traditional Chinese medicine physiotherapy equipment usually lacks a real-time feedback mechanism. Store managers cannot obtain information on equipment status and service progress in a timely manner, cannot handle physiotherapy equipment failures in a timely manner, and cannot achieve intelligent equipment maintenance.
[0004] Therefore, it is necessary to propose a traditional Chinese medicine equipment control method and system based on the Internet of Things platform, which can quickly complete identity authentication and automatic startup based on QR code and Internet of Things technology, provide real-time feedback on the working status of physiotherapy equipment, ensure the transparency and controllability of the service process, realize intelligent equipment maintenance, and improve the convenience of multi-user autonomous control of equipment, thereby improving service quality and user satisfaction. Summary of the invention
[0005] In view of this, the present invention provides a method and system for controlling traditional Chinese medicine equipment based on an Internet of Things platform, so as to solve the technical problems that existing traditional Chinese medicine physiotherapy equipment cannot quickly respond to users' physiotherapy needs, users have long waiting time, and the user experience is poor.
[0006] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a method for controlling a traditional Chinese medicine device based on an Internet of Things platform, comprising:
[0008] After the TCM physiotherapy device is powered on, it sends a QR code to obtain instructions;
[0009] After the IoT control device intercepts the QR code acquisition instruction, it generates and returns a startup page QR code carrying a device number parameter;
[0010] The traditional Chinese medicine physiotherapy device displays the startup page QR code;
[0011] After the IoT control device obtains the remote start instruction sent by the IoT cloud server, it sends a device start instruction to the TCM therapy device; wherein the remote start instruction is generated based on the authentication result after the user scans the QR code on the startup page displayed by the TCM therapy device;
[0012] The TCM therapy device responds to the device start-up instruction, displays the conditioning service plan selection interface and obtains user input instructions, and sends the device working status and service progress to the Internet of Things control device in real time according to the preset communication mechanism until the TCM therapy service is completed.
[0013] Furthermore, the preset communication mechanism is formulated based on the MQTT protocol, using TCP and TLS encrypted access, and the message mode adopts the publish / subscribe mode;
[0014] The Internet of Things control device and the traditional Chinese medicine physiotherapy device store and push information through a message queue and transmit data through message instructions;
[0015] The message queue includes a message topic, a device type constant and a device number; the message topic is used to indicate a subscription topic; the device type constant is used to indicate the conditioning type of a traditional Chinese medicine therapy device; the device number is set when the IoT control device leaves the factory, and each IoT control device has a unique device number;
[0016] The message instruction includes an instruction body and a check code, and the message instruction is used to indicate the content of the transmitted data; the check code is used to verify the validity of the message during the transmission process.
[0017] Furthermore, the instruction body includes a header, a message length, an instruction type, and a running time; the header adopts a preset fixed value; the message length is converted according to the instruction type and the running time, and is expressed in hexadecimal; the instruction type includes device start and stop, service timing start and end, device status reading and setting, device status active reporting, device parameter active change, and QR code acquisition and update; the running time is expressed in hexadecimal;
[0018] The check code converts every two digits in the instruction body from hexadecimal to decimal digits and then adds them in sequence, and converts the decimal digits obtained by the addition into hexadecimal.
[0019] Furthermore, the preset communication mechanism also includes: the communication process adopts blocking calls, and the timeout periods of communication connection, message subscription and message publishing are all set to a first preset time; the connection status of the network is detected by heartbeat messages, and the sending period of the heartbeat messages is a second preset time range.
[0020] In a second aspect, the present invention provides a traditional Chinese medicine equipment control system based on the Internet of Things, comprising:
[0021] An Internet of Things cloud server, a plurality of Internet of Things control devices and a plurality of traditional Chinese medicine physiotherapy devices; each of the Internet of Things control devices is connected to a corresponding traditional Chinese medicine physiotherapy device via a serial port and is connected to the Internet of Things cloud server via an antenna;
[0022] The TCM physiotherapy device is used to send a QR code acquisition instruction after power-on, receive and display a startup page QR code; it is also used to receive and respond to a device startup instruction, display a conditioning service plan selection interface and obtain a user input instruction, complete the physiotherapy service according to the user input instruction, and send the device working status and service progress to the IoT control device in real time;
[0023] The IoT control device is used to listen to the QR code acquisition instruction sent by the TCM physiotherapy device, generate and return a startup page QR code carrying a device number parameter; and is also used to obtain a remote startup instruction sent by the IoT cloud server, and send a device startup instruction to the TCM physiotherapy device according to the remote startup instruction;
[0024] The Internet of Things cloud server is used to authenticate the user based on the identity information after the user scans the QR code on the startup page displayed by the traditional Chinese medicine therapy device, and after the authentication is passed, send a remote startup instruction to the Internet of Things control device, and interact with the Internet of Things control device through a preset communication mechanism.
[0025] Furthermore, the Internet of Things control device is developed based on a real-time operating system and supports cross-platform transplantation.
[0026] Furthermore, the IoT cloud server performs authentication based on the identity information of the user after scanning the QR code on the startup page displayed by the TCM physiotherapy device, including:
[0027] Receiving parsing information sent by the user after scanning the QR code on the startup page, extracting and caching the device QR code and the first user ID from the parsing information, and obtaining a device-user data set;
[0028] Receive a service start instruction sent by the user, parse the device number and the second user ID in the start instruction, compare the second user ID with the first user ID in the device-user data group corresponding to the device number, and if the first user ID and the second user ID are consistent, send a remote start instruction to the Internet of Things control device.
[0029] Furthermore, the IoT cloud server uses Redis as a cache database and uses the device number as an identifier for storing data.
[0030] Furthermore, the IoT cloud server connects devices according to the device numbers of the IoT control devices and creates a unique message queue.
[0031] In a third aspect, the present invention provides a method for remotely controlling a traditional Chinese medicine device, which is applied to a traditional Chinese medicine device control system based on an Internet of Things platform as described in any of the above-mentioned solutions, comprising:
[0032] The TCM physiotherapy equipment sends a QR code to obtain instructions after powering on;
[0033] After the IoT control device intercepts the QR code acquisition instruction, it generates and returns a startup page QR code carrying a device number parameter, and sends the device information to the IoT cloud server;
[0034] The traditional Chinese medicine therapy device displays the startup page QR code;
[0035] After the IoT control device obtains the remote start instruction sent by the IoT cloud server, it sends a device start instruction to the TCM therapy device; wherein the remote start instruction is generated based on the authentication result after the user scans the QR code on the startup page displayed by the TCM therapy device;
[0036] After the IoT control device obtains the remote start instruction sent by the IoT cloud server, it sends a device start instruction to the traditional Chinese medicine therapy device;
[0037] The TCM therapy device responds to the device start-up instruction, displays the conditioning service plan selection interface and obtains user input instructions, and sends the device working status and service progress to the Internet of Things control device in real time according to the preset communication mechanism until the TCM therapy service is completed.
[0038] Compared with the prior art, the method and system provided by the present invention automatically send a QR code to obtain instructions after the traditional Chinese medicine therapy equipment is powered on, and the Internet of Things control device generates and returns a startup page QR code. The user completes the connection between the Internet of Things control device and the Internet of Things cloud server by scanning the QR code, thereby realizing the automatic startup process of the traditional Chinese medicine therapy equipment and simplifying the operation steps of store managers and users; the remote startup instruction is generated based on the identity information of the user after scanning the code, ensuring that only authenticated users can start the device, providing higher security and preventing unauthorized access and operation; the traditional Chinese medicine therapy equipment can feed back the equipment working status and service progress to the Internet of Things control device in real time, so that users and managers can timely understand the operation status of the equipment, and issue alarm information in time when abnormalities or failures occur, so as to facilitate rapid problem handling.
[0039] The present invention performs remote control and management through the Internet of Things platform, facilitates unified management of multiple devices, and improves management efficiency and convenience; through the device display startup page QR code and conditioning service plan selection interface, users can intuitively set and operate the device, improve user experience, and users can choose conditioning service plans according to actual needs, which improves the flexibility and personalization of the service. In addition, the method can be seamlessly integrated into the existing Internet of Things platform, supports compatibility with other devices and systems, and promotes the popularization of intelligent Chinese medicine physiotherapy equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of the flow chart of the method for controlling traditional Chinese medicine equipment based on the Internet of Things platform provided by the present invention;
[0041] Figure 2 Provides a schematic diagram of instruction sets for traditional Chinese medicine physiotherapy equipment and Internet of Things control equipment for the present invention;
[0042] Figure 3 A communication sequence diagram between the traditional Chinese medicine therapy device and the Internet of Things control device provided by the present invention;
[0043] Figure 4 A schematic diagram of the communication timing of the fault situation provided by the present invention;
[0044] Figure 5 This is a schematic diagram of the structure of the traditional Chinese medicine equipment control system based on the Internet of Things platform provided by the present invention. DETAILED DESCRIPTION
[0045] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0046] The present invention provides a method and system for controlling traditional Chinese medicine equipment based on an Internet of Things platform, which are described below respectively.
[0047] Combination Figure 1 As shown, a specific embodiment of the present invention discloses a method for controlling traditional Chinese medicine equipment based on an Internet of Things platform, comprising:
[0048] Step S101: After the TCM physiotherapy device is powered on, it sends a QR code acquisition instruction;
[0049] Step S102: After the IoT control device intercepts the QR code acquisition instruction, it generates and returns a startup page QR code carrying a device number parameter;
[0050] Step S103: the TCM physiotherapy device displays the startup page QR code;
[0051] Step S104: After the IoT control device obtains the remote start instruction sent by the IoT cloud server, it sends a device start instruction to the TCM therapy device; wherein the remote start instruction is generated based on the authentication result after the user scans the QR code on the startup page displayed by the TCM therapy device;
[0052] Step S105: The TCM therapy device responds to the device start-up instruction, displays the conditioning service plan selection interface and obtains user input instructions, and sends the device working status and service progress to the Internet of Things control device in real time according to the preset communication mechanism until the TCM therapy service is completed.
[0053] The method of this embodiment, after the Chinese medicine therapy device is powered on, it automatically sends a QR code to obtain instructions, the Internet of Things control device generates and returns a startup page QR code, and the user completes the connection between the Internet of Things control device and the Internet of Things cloud server by scanning the QR code, realizing the automatic startup process of the Chinese medicine therapy device, simplifying the operation steps of store managers and users; the generation of remote startup instructions is based on the identity information of the user after scanning the code, ensuring that only authenticated users can start the device, providing higher security, and preventing unauthorized access and operation; the Chinese medicine therapy device can feedback the device working status and service progress to the Internet of Things control device in real time, so that users and managers can timely understand the operation of the device, and issue alarm information in time when an abnormality or failure occurs, which is convenient for rapid problem handling. The method of this embodiment, through the Internet of Things platform for remote control and management, convenient for unified management of multiple devices, improves the efficiency and convenience of management; through the device to display the startup page QR code and the conditioning service plan selection interface, users can intuitively set and operate the device, improve the user experience, and users can choose the conditioning service plan according to actual needs, which improves the flexibility and personalization of the service. In addition, the method can be seamlessly integrated into the existing Internet of Things platform, supports compatibility with other devices and systems, and promotes the popularization of intelligent Chinese medicine therapy equipment.
[0054] As a preferred embodiment, the preset communication mechanism is formulated based on the MQTT protocol, using TCP and TLS encrypted access, and the message mode adopts the publish / subscribe mode; TCP and TLS are used in combination to provide secure and reliable data transmission. TCP is responsible for reliable data transmission and flow control, while TLS is responsible for encryption and security.
[0055] The Internet of Things control device and the traditional Chinese medicine physiotherapy device store and push information through a message queue and transmit data through message instructions;
[0056] The message queue includes a message topic, a device type constant and a device number; the message topic is used to indicate a subscription topic; the device type constant is used to indicate the conditioning type of a traditional Chinese medicine therapy device; the device number is set when the IoT control device leaves the factory, and each IoT control device has a unique device number;
[0057] The message instruction includes an instruction body and a check code, and the message instruction is used to indicate the content of the transmitted data; the check code is used to verify the validity of the message during the transmission process.
[0058] Furthermore, the instruction body includes a header, a message length, an instruction type, and a running time; the header adopts a preset fixed value; the message length is converted according to the instruction type and the running time, and is expressed in hexadecimal; the instruction type includes device start and stop, service timing start and end, device status reading and setting, device status active reporting, device parameter active change, and QR code acquisition and update; the running time is expressed in hexadecimal;
[0059] The check code converts every two digits in the instruction body from hexadecimal to decimal digits and then adds them in sequence, and converts the decimal digits obtained by the addition into hexadecimal.
[0060] As a preferred embodiment, the preset communication mechanism also includes: the communication process adopts blocking calls, and the timeout periods of communication connection, message subscription and message publishing are all set to a first preset time; the connection status of the network is detected by heartbeat messages, and the sending period of the heartbeat messages is a second preset time range.
[0061] Combine the following Figures 2 to 4 The communication mechanism and communication process between traditional Chinese medicine therapy equipment and Internet of Things control equipment are explained through specific embodiments.
[0062] First, the timeout period of MQTT blocking calls (including connection, subscription, publication, etc.) is 5000 milliseconds (i.e., the first preset time mentioned above). The default buffer size for sending and receiving messages of the protocol is 2048 bytes, and the maximum supported is 16KB. The default heartbeat message sending cycle is 15 seconds, and the maximum value is 690 seconds (i.e., the second preset time range is 15-690 seconds). The heartbeat message of the sender generally includes a PING request and a will message, and the heartbeat message returned by the receiver generally includes a PING response. Through the heartbeat message, the protocol can effectively detect and handle connection problems and maintain the stability and reliability of the system.
[0063] Secondly, the naming rule of the message queue is: topic + device type constant + " / " + device number, example: topicTYPE01 / 77780240. It should be noted here that according to the actual application requirements of the device, the device number rule is 8 digits, which can be flexibly expanded to 12 digits according to actual needs. The device type indicates the function or purpose of the device, such as: fumigation equipment or moxibustion equipment. The benefits of establishing such a naming rule for message queues include: 1. Clear organizational structure: By combining the device type constant and the device number, the message queue can be clearly organized and classified for easy management and retrieval. 2. Easy to expand: This structure supports expansion by device type and device number, and can easily add new device types or numbers without affecting existing queues. 3. Efficient routing: The source and target of the message can be quickly located according to the name of the queue, improving the routing efficiency of the message. 4. Reduce conflicts: Through clear naming rules, naming conflicts between different devices or types are reduced, ensuring the uniqueness of the message queue.
[0064] The message instruction format is "instruction body" + "check code". The instruction body consists of: header + message length + instruction type + hexadecimal running time. Specifically,
[0065] The packet header has a fixed value ACAC; by setting a fixed packet header value, the starting point of the data packet can be quickly identified, making data reception and parsing more efficient and reliable.
[0066] The command types include: A1 starts the device, A2 stops the device, A3 pauses the device, A4 starts timing, B1 reads the device type, B2 reads the device status, B3 reads the device parameters, B4 sets the device parameters, C1 stops the device timing, C2 starts reporting actively, C3 pauses reporting actively, C4 stops reporting actively, C5 reports device parameter changes, C6 updates the QR code, and C7 obtains the QR code; Figure 2 As shown, Figure 2 Displayed Chinese medicine physiotherapy equipment ( Figure 2 An example of an instruction set between the "mainboard" in the system and the IoT control device ("module"). The instruction types cover a variety of management needs from device control to information reading and parameter setting, improving the overall performance of the system. The instructions are clearly classified so that users and system administrators can quickly understand the role of each instruction, reducing the possibility of incorrect use or misunderstanding. The system can provide corresponding feedback based on the instruction type, making it easier for users to understand and process the status or execution results of the device.
[0067] The message length is calculated as follows: instruction type + running time in hexadecimal + "0000" to get a string. The length of the string is divided by 2 and then converted to a 4-digit hexadecimal number. For example, the length of A10e100000 = 10, and 10 / 2 is converted to 4-digit hexadecimal = 0005. Embedding the message length into the message can help the receiver verify that the message is complete and has not been tampered with. If the received message length is inconsistent with the calculated length, data loss or corruption may occur. The receiver can quickly determine the start and end positions of the message based on the length information, which facilitates parsing and processing of the message content. By including the length information, certain errors can be detected in data transmission, such as partial message loss due to transmission problems.
[0068] There are several benefits to using hexadecimal to represent the running time: it saves storage space, improves processing efficiency, and hexadecimal numbers are more direct and concise in computer systems. For example, if the running time of a device is 10,000 seconds, it is represented as "10000" in decimal. Converted to hexadecimal, it is "0x2710". This representation is more compact and helps reduce data transmission and storage overhead.
[0069] Furthermore, the calculation method of the checksum is: convert each two digits in the instruction from hexadecimal to decimal and add them in sequence, and convert the obtained number into hexadecimal. For example: the instruction body is ACAC0005A10e10, divide the instruction body into groups of two digits, and the addition result is:
[0070] 172+172+0+5+161+14+16=540 (decimal), 540 converted to hexadecimal is 21c, so the check code is 021c. Final instruction: instruction body + check code, that is: ACAC0005A10e10021c.
[0071] like Figure 3As shown, after the user turns on the power of the TCM therapy device, the TCM therapy device powers on and sends a QR code acquisition instruction C7 to the IoT control device. Within 3 minutes after powering on, the IoT control device will keep listening for the QR code acquisition instruction. After acquisition, a link address of the device startup page carrying the device number parameter is generated, and the link address is displayed to the user in the form of a QR code through the therapy device for scanning. After the user scans the QR code and completes the information entry and product code scanning, the IoT cloud server remotely starts the device. The IoT control device controls the TCM therapy device according to the startup instructions and sends the A1 instruction. The TCM therapy device displays the service page to the user and waits for the user to enter instructions. It should be noted here that the content displayed on the service page includes specific parameters such as service items, therapy intensity, and therapy time. Customers make choices based on their personalized needs. The TCM therapy device sets parameters based on user needs and sends the working status to the IoT control device in real time. The working status here is as follows: Figure 2 The instruction set and Figure 3 As shown in the timing diagram, it at least includes parameter adjustment, start or pause, user active termination, etc. The IoT control device sends a reply to the TCM therapy device through a status code. After the conditioning is completed, the TCM conditioning device actively queries the QR code and displays the QR code scanning interface to start the next conditioning.
[0072] like Figure 4 As shown in the figure, when a Chinese medicine therapy device fails, it actively sends the D1 instruction, which includes a status code of 1 byte + an abnormal fault code of 1 byte. The IoT control device forwards the fault instruction to the IoT cloud platform for reporting. At this time, the server first sends the A2 instruction, and then sends C7 after an interval of 1 second, in order to stop the current conditioning and enter the QR code display interface. If the device does not have a package page (initial service interface), you can ignore the A2 instruction and directly apply to stop conditioning at C7 and display the startup page QR code.
[0073] This embodiment also provides a traditional Chinese medicine equipment control system based on the Internet of Things, such as Figure 5 As shown, the system includes: an Internet of Things cloud server, multiple Internet of Things control devices and multiple traditional Chinese medicine physiotherapy devices; each of the Internet of Things control devices is connected to the corresponding traditional Chinese medicine physiotherapy device through a serial port and is connected to the Internet of Things cloud server through an antenna;
[0074] The TCM physiotherapy device is used to send a QR code acquisition instruction after power-on, receive and display a startup page QR code; it is also used to receive and respond to a device startup instruction, display a conditioning service plan selection interface and obtain a user input instruction, complete the physiotherapy service according to the user input instruction, and send the device working status and service progress to the IoT control device in real time;
[0075] The IoT control device is used to listen to the QR code acquisition instruction sent by the TCM physiotherapy device, generate and return a startup page QR code carrying a device number parameter; and is also used to obtain a remote startup instruction sent by the IoT cloud server, and send a device startup instruction to the TCM physiotherapy device according to the remote startup instruction;
[0076] The Internet of Things cloud server is used to authenticate the user based on the identity information after the user scans the QR code on the startup page displayed by the traditional Chinese medicine therapy device, and after the authentication is passed, send a remote startup instruction to the Internet of Things control device, and interact with the Internet of Things control device through a preset communication mechanism.
[0077] As a preferred embodiment, the IoT control device is developed based on a real-time operating system and supports cross-platform migration. The framework extracts the hardware platform abstraction layer and can quickly and easily access IoT communications based on different platforms.
[0078] As a preferred embodiment, the IoT cloud server uses Redis as a cache database, based on the device number as an identifier for storing data. By combining the prefix and the device number into a unique Key, the cache data related to a specific device number can be quickly retrieved, ensuring the efficiency and accuracy of cache queries. Specifically, the device number is concatenated with the prefix "bindingQrCode:" as the Key, and the ID and device status of the currently bound user are used as the value and stored in the Redis cache.
[0079] Furthermore, the IoT cloud server connects devices according to the device numbers of the IoT control devices and creates a unique message queue.
[0080] As a specific embodiment, the user scans the QR code on the startup page to open the device startup page of the WeChat applet, and the IoT cloud server binds the device number to the user ID; the user clicks to turn on the device, and the server queries the Redis cache based on the device number. If the user ID bound to the device is inconsistent with the ID of the current scanning user, the device cannot be started.
[0081] In some embodiments, in order to manage materials, after scanning the device code, the user also needs to scan the product code, which identifies the specific product used for conditioning (such as moxa sticks, medicine bags, etc.). When the IoT cloud platform authenticates the user, it binds the user, device, and product information together.
[0082] When scanning a product code, when querying Redis, you also need to confirm whether the product code is being used. If there is a user ID and it is inconsistent with the ID of the current scanning user, the device cannot be started. This ensures that the product has one code for each item, and once the product has been used, it cannot be used again.
[0083] In some embodiments, if the command reception fails because the IoT control device is not connected to the IoT cloud server, a reverse notification will be sent to the customer's mobile phone indicating the startup failure.
[0084] This embodiment also provides a method for remotely controlling a traditional Chinese medicine device, which is applied to a traditional Chinese medicine device control system based on an Internet of Things platform described in any of the above technical solutions, and includes:
[0085] The TCM physiotherapy equipment sends a QR code to obtain instructions after powering on;
[0086] After the IoT control device intercepts the QR code acquisition instruction, it generates and returns a startup page QR code carrying a device number parameter, and sends the device information to the IoT cloud server;
[0087] The traditional Chinese medicine therapy device displays the startup page QR code;
[0088] After the IoT control device obtains the remote start instruction sent by the IoT cloud server, it sends a device start instruction to the TCM therapy device; wherein the remote start instruction is generated based on the authentication result after the user scans the QR code on the startup page displayed by the TCM therapy device;
[0089] After the IoT control device obtains the remote start instruction sent by the IoT cloud server, it sends a device start instruction to the traditional Chinese medicine therapy device;
[0090] The TCM therapy device responds to the device start-up instruction, displays the conditioning service plan selection interface and obtains user input instructions, and sends the device working status and service progress to the Internet of Things control device in real time according to the preset communication mechanism until the TCM therapy service is completed.
[0091] The TCM equipment control method and system based on the Internet of Things platform provided in this embodiment only requires users to scan the code to automatically start the physiotherapy equipment, which reduces the difficulty of operation for users; the safety of equipment use is guaranteed through identity authentication, and unified management of equipment and materials is facilitated; through a customized communication mechanism, data can be efficiently transmitted between devices, which helps managers and users understand the equipment status and service progress in real time, ensuring the efficiency and timeliness of services. This method integrates Internet of Things technology with traditional TCM equipment, and improves the convenience of equipment operation and service quality through intelligent means, reduces the workload of store managers, and improves management efficiency and user satisfaction.
[0092] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for controlling traditional Chinese medicine equipment based on the Internet of Things platform, characterized in that: include: After the TCM physiotherapy device is powered on, it sends a QR code to obtain instructions; After the IoT control device intercepts the QR code acquisition instruction, it generates and returns a startup page QR code carrying a device number parameter; The traditional Chinese medicine physiotherapy device displays the startup page QR code; After the IoT control device obtains the remote start instruction sent by the IoT cloud server, it sends a device start instruction to the TCM therapy device; wherein the remote start instruction is generated based on the authentication result after the user scans the QR code on the startup page displayed by the TCM therapy device; The TCM therapy device responds to the device start-up instruction, displays the conditioning service plan selection interface and obtains user input instructions, and sends the device working status and service progress to the Internet of Things control device in real time according to the preset communication mechanism until the TCM therapy service is completed.
2. The method for controlling traditional Chinese medicine equipment based on the Internet of Things platform according to claim 1 is characterized in that: The preset communication mechanism is formulated based on the MQTT protocol, using TCP and TLS encrypted access, and the message mode adopts the publish / subscribe mode; The Internet of Things control device and the traditional Chinese medicine physiotherapy device store and push information through a message queue and transmit data through message instructions; The message queue includes a message topic, a device type constant and a device number; the message topic is used to indicate a subscription topic; the device type constant is used to indicate the conditioning type of a traditional Chinese medicine therapy device; the device number is set when the IoT control device leaves the factory, and each IoT control device has a unique device number; The message instruction includes an instruction body and a check code, and the message instruction is used to indicate the content of the transmitted data; the check code is used to verify the validity of the message during the transmission process.
3. The method for controlling traditional Chinese medicine equipment based on the Internet of Things platform according to claim 2 is characterized in that: The instruction body includes a header, a message length, an instruction type, and a running time; the header adopts a preset fixed value; the message length is converted according to the instruction type and the running time, and is expressed in hexadecimal; the instruction types include device start and stop, service timing start and end, device status reading and setting, device status active reporting, device parameter active change, and QR code acquisition and update; the running time is expressed in hexadecimal; The check code converts every two digits in the instruction body from hexadecimal to decimal digits and then adds them in sequence, and converts the decimal digits obtained by the addition into hexadecimal.
4. The method for controlling traditional Chinese medicine equipment based on the Internet of Things platform according to claim 2 is characterized in that: The preset communication mechanism also includes: the communication process adopts blocking call, and the timeout time of communication connection, message subscription and message publishing are all set to the first preset time; the connection status of the network is detected by heartbeat message, and the sending cycle of the heartbeat message is the second preset time range.
5. A control system for traditional Chinese medicine equipment based on the Internet of Things, characterized in that: include: IoT cloud server, multiple IoT control devices and multiple traditional Chinese medicine therapy equipment; Each of the IoT control devices is connected to the corresponding TCM physiotherapy device via a serial port and connected to the IoT cloud server via an antenna; The TCM physiotherapy device is used to send a QR code acquisition instruction after power-on, receive and display a startup page QR code; it is also used to receive and respond to a device startup instruction, display a conditioning service plan selection interface and obtain a user input instruction, complete the physiotherapy service according to the user input instruction, and send the device working status and service progress to the IoT control device in real time; The IoT control device is used to listen to the QR code acquisition instruction sent by the TCM physiotherapy device, generate and return a startup page QR code carrying a device number parameter; and is also used to obtain a remote startup instruction sent by the IoT cloud server, and send a device startup instruction to the TCM physiotherapy device according to the remote startup instruction; The Internet of Things cloud server is used to authenticate the user based on the identity information after the user scans the QR code on the startup page displayed by the traditional Chinese medicine therapy device, and after the authentication is passed, send a remote startup instruction to the Internet of Things control device, and interact with the Internet of Things control device through a preset communication mechanism.
6. The TCM equipment control system based on the Internet of Things platform according to claim 5 is characterized in that: The Internet of Things control device is developed based on a real-time operating system and supports cross-platform transplantation.
7. The TCM equipment control system based on the Internet of Things platform according to claim 5 is characterized in that: The IoT cloud server performs authentication based on the identity information of the user after scanning the QR code on the startup page displayed by the TCM physiotherapy device, including: Receiving parsing information sent by the user after scanning the QR code on the startup page, extracting and caching the device QR code and the first user ID from the parsing information, and obtaining a device-user data set; Receive a service start instruction sent by the user, parse the device number and the second user ID in the start instruction, compare the second user ID with the first user ID in the device-user data group corresponding to the device number, and if the first user ID and the second user ID are consistent, send a remote start instruction to the Internet of Things control device.
8. The TCM equipment control system based on the Internet of Things platform according to claim 5 is characterized in that: The IoT cloud server uses Redis as a cache database and uses the device number as an identifier for storing data.
9. The TCM equipment control system based on the Internet of Things platform according to claim 8 is characterized in that: The IoT cloud server connects devices according to the device numbers of IoT control devices and creates a unique message queue.
10. A remote control method for traditional Chinese medicine equipment, applied to a traditional Chinese medicine equipment control system based on an Internet of Things platform as described in any one of claims 5 to 9, characterized in that: include: The TCM physiotherapy equipment sends a QR code to obtain instructions after powering on; After the IoT control device intercepts the QR code acquisition instruction, it generates and returns a startup page QR code carrying a device number parameter, and sends the device information to the IoT cloud server; The traditional Chinese medicine therapy device displays the startup page QR code; After the IoT control device obtains the remote start instruction sent by the IoT cloud server, it sends a device start instruction to the TCM therapy device; wherein the remote start instruction is generated based on the authentication result after the user scans the QR code on the startup page displayed by the TCM therapy device; After the IoT control device obtains the remote start instruction sent by the IoT cloud server, it sends a device start instruction to the traditional Chinese medicine therapy device; The TCM therapy device responds to the device start-up instruction, displays the conditioning service plan selection interface and obtains user input instructions, and sends the device working status and service progress to the Internet of Things control device in real time according to the preset communication mechanism until the TCM therapy service is completed.