Large instrument sharing intelligent control method and terminal based on linkage of Bluetooth communication and WeChat applet
By using a Bluetooth communication mechanism linked to a WeChat mini-program to initiate pre-registration status messages and supplement operation logs, the problem of inconsistent status synchronization and billing for large-scale instruments and equipment was solved. This ensured the reliability of the equipment startup process and the accuracy of billing, thereby improving the stability and traceability of management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, the reservation registration and on-site start-stop control of large instruments are separated, resulting in inconsistencies between the actual on/off time of the equipment and the platform record. This affects the accuracy of cost accounting and the stability of equipment use management. Furthermore, the unstable connection between the WeChat mini-program and Bluetooth communication makes it difficult to synchronize the equipment status.
By linking with WeChat Mini Program via Bluetooth communication, a pre-registration status message mechanism is introduced. Combined with relay control and non-volatile memory recording, reliable confirmation of device status and billing consistency are achieved. Operation logs are re-uploaded and idempotently stored in the database when the network fluctuates.
It improves the reliability and billing accuracy of the startup process of large instruments, enhances the traceability and robustness of equipment management, and solves the problems of equipment status synchronization and billing errors.
Smart Images

Figure CN121815205A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of large-scale instrument sharing and intelligent control technology, and in particular to a large-scale instrument sharing intelligent control method and terminal based on Bluetooth communication and WeChat mini-program linkage. Background Technology
[0002] Large scientific instruments in universities and research institutions are typically made available to internal or external users through a reservation system. To meet the management needs of shared use, the management platform generally needs to register reservation information and user information, and record the instrument's activation and deactivation times to facilitate cost accounting and usage statistics, while reducing management costs associated with personnel turnover.
[0003] In existing technologies, a common practice is to separate reservation registration and on-site start / stop control into different stages. For example, reservation registration is completed by a management platform, and then on-site personnel manually close the circuit breaker or an independent power supply control device performs the on / off operation. Because there is no means of confirming the execution result between the records on the management platform and the actual on / off operation on the field side, when network fluctuations, unstable command transmission, control device malfunctions, or improper personnel operation occur, the start / stop time recorded by the platform can easily become inconsistent with the actual power-on time of the instrument, thus affecting the accuracy of cost accounting and equipment usage management.
[0004] Furthermore, short-range control via WeChat mini-programs relies on the mobile terminal's Bluetooth communication capabilities. However, different mobile operating systems vary in Bluetooth scanning, connection, and parameter negotiation, which can easily lead to issues such as unstable connections, failed reconnections, or fluctuating command response delays. Meanwhile, power outages and restarts may occur on-site. Without a system for recording, processing, and reporting incomplete start-up and shutdown processes, the platform cannot obtain accurate device operating status and start-up / shutdown results in a timely manner, thus affecting the stability and management effectiveness of the shared usage process. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies, the purpose of this invention is to provide a large-scale instrument sharing intelligent control method and terminal based on Bluetooth communication and WeChat mini-program linkage. Through Bluetooth local control and cloud status coordination mechanism, reliable control and billing status consistency of the large-scale instrument startup process are achieved, avoiding the common problems of false startup and false billing in existing technologies.
[0006] To achieve the above objectives, the present invention provides the following solution: A method for shared intelligent control of large-scale instruments based on Bluetooth communication and WeChat mini-program integration includes: Obtain the device identifier of the target instrument and the reservation order number in the reservation information corresponding to the target instrument, and obtain the user identity information; Establish a low-power Bluetooth communication connection between the WeChat mini-program and the Bluetooth control terminal, obtain the operating system type of the user's mobile terminal, and determine the Bluetooth connection parameters from the preset parameter template library based on the operating system type. The WeChat mini program sends a start command via the Bluetooth communication connection, and after receiving the start command, sends a start pre-registration status message to the sharing platform server. The start pre-registration status message includes device identifier, user identity information, reservation number and timestamp, so that the sharing platform server sets the device status to pending execution and temporarily does not start billing. The drive relay controls the power supply of the target instrument's display, and generates a start confirmation result based on the execution result feedback signal; when the start confirmation result is successful, a start confirmation message is reported, causing the shared platform server to advance the device status to the running state and start billing; When the Bluetooth control terminal experiences a power outage and restart, it queries the unfinished state record and automatically retryes the start control a preset number of times if the unfinished state record exists; the unfinished state record is the record corresponding to the one that has generated the start pre-registration status message but has not received the start confirmation message; The operation logs are written to non-volatile memory and then transmitted to the shared platform server in sequence after the network is restored. The shared platform server performs idempotent storage based on the unique sequence number of the operation logs to avoid duplicate billing.
[0007] Preferably, the Bluetooth connection parameters are determined from a preset parameter template library based on the operating system type, including: Establish the correspondence between operating system type and connection interval, ATT MTU and reconnection strategy in the preset parameter template library; When the operating system type is iOS, configure the connection interval to 15–30ms and enable cached service discovery to avoid duplicate scans; When the operating system type is Android, the connection interval is configured to 40–100ms and background heartbeat keep-alive is enabled, wherein the background heartbeat keep-alive is to send an empty command every 30s; When the operating system type is HarmonyOS Next, the connection interval is configured to be no more than 20ms and the ATT MTU is negotiated to be no less than 247 bytes. At the same time, the transmit power is increased to improve connection stability.
[0008] Preferably, establishing a low-power Bluetooth communication connection between the WeChat mini-program and the Bluetooth control terminal includes: The user's mobile terminal scans the QR code displayed on the Bluetooth control terminal to trigger the WeChat mini program to launch and initiate a Bluetooth connection request; Before initiating the Bluetooth connection request, the user permissions corresponding to the user identity information are verified, and the Bluetooth control terminal to be connected is determined based on the device identifier; When a connection is established, the operating system type of the user's mobile terminal is written to the Bluetooth control terminal along with the initial feature value, so that the Bluetooth control terminal can subsequently determine the Bluetooth connection parameters.
[0009] Preferably, the WeChat mini-program sends a start command via the Bluetooth communication connection, and upon receiving the start command, sends a start pre-registration status message to the sharing platform server, including: On the shared platform server side, a finite state machine is maintained for the device identifier to represent the device state; the finite state machine includes at least an Idle state, a pending state, a running state, and a stopped state. Upon receiving the pre-registration status message, the device status corresponding to the device identifier is set to pending execution and the confirmation timeout is started. Upon receiving the startup confirmation message, the device status is advanced to the running state; If the start confirmation message is not received after the confirmation timeout period, the device status will be marked as abnormal and suspended, triggering manual review.
[0010] Preferably, the driving relay controls the power supply to the display of the target instrument, and generates a start confirmation result based on the execution result feedback signal, including: After the relay completes the connection action, the current of the display circuit of the target instrument is collected by the current sensor and compared with the current threshold to generate the execution result feedback signal, wherein the current threshold is 50mA; When the current in the display circuit is greater than the current threshold, the startup confirmation result is determined to be successful; When the display circuit current is not greater than the current threshold or an overcurrent is detected, the startup confirmation result is determined to be a failure; or The auxiliary contact of the relay is used to output a dry contact signal to the main controller GPIO to generate the execution result feedback signal, and the start confirmation result is determined based on the execution result feedback signal.
[0011] Preferably, when the startup confirmation result is successful, a startup confirmation message is reported, including: When the startup confirmation result is a failure, a status message containing a failure identifier is reported to the sharing platform server to cause the sharing platform server to roll back the device status, and a local alarm is triggered on the Bluetooth control terminal; the local alarm includes at least one of beeping or displaying a prompt.
[0012] Preferably, when the Bluetooth control terminal experiences a power outage and restart, the system queries the unfinished state record and automatically retryes the restart control a preset number of times if the unfinished state record exists, including: When the Bluetooth control terminal restarts after a power outage, it queries the sharing platform server for the most recent unterminated record of the device identifier. When the unfinished state record exists and there is no final state confirmation, the startup control is automatically retried a preset number of times, and the security monitoring window is extended after each retry; the maximum value of the preset number of times is 2. If the startup confirmation result is still not obtained after retrying, the recovery failure status is reported and the device status corresponding to the device identifier is locked to notify the administrator to perform remote intervention.
[0013] Preferably, the operation log is written to a non-volatile memory and then sequentially transmitted to the shared platform server after network recovery, including: The operation log records the user's identity information, the device identifier, the timestamp, and the instruction type. The operation log is written to the non-volatile memory as FRAM; After network recovery is detected, the operation logs are retransmitted to the shared platform server in ascending order of the unique sequence number corresponding to the generation order of the operation logs.
[0014] Preferably, the shared platform server performs idempotent data entry based on the unique sequence number of the operation log to avoid duplicate billing, including: The shared platform server provides an idempotent interface and uses the unique serial number as the idempotent key; When an operation log carrying the same unique serial number is received, deduplication or ignoring duplicate writes is performed so that billing is triggered only based on the operation log of the first successful data entry.
[0015] A Bluetooth control terminal for sharing intelligent control of target instruments via Bluetooth wireless communication with a WeChat mini-program includes: an AC-DC power supply module, a BLE5.0 Bluetooth module, a main controller, a relay drive module, a display screen, a serial port circuit, and a safety protection module. The AC-DC power module is used to input AC power and convert it into DC power to power the BLE5.0 Bluetooth module and the main controller; the BLE5.0 Bluetooth module is used to communicate wirelessly with the WeChat mini-program to receive control commands and upload device status data, and supports serial port firmware upgrades; the control commands include at least a start command for starting detection and a stop command for stopping detection; the serial port circuit is used for firmware upgrades and debugging of the BLE5.0 Bluetooth module; The main controller is electrically connected to the BLE5.0 Bluetooth module, the relay drive module, the display screen, and the safety protection module, and has a built-in non-volatile memory for parsing the control commands to control the relay drive module and collecting data from the safety protection module to drive the display screen to display device information. The relay drive module is used to receive instructions from the main controller to control the power supply of the target instrument's display. The safety protection module is used to trigger the main controller to cut off the power supply when an overcurrent, short circuit, or high temperature abnormality is detected. Furthermore, the main controller is configured to: upon receiving the start command, first send a start pre-registration status message to the shared platform server; after sending the start pre-registration status message, drive the relay drive module to control the power supply of the target instrument's display; generate a start confirmation result based on the execution result feedback signal and report the start confirmation message; query the unfinished state record when the Bluetooth control terminal experiences a power outage and restart; and automatically retry the start control a preset number of times if the unfinished state record exists; and write the operation log to the non-volatile memory and retransmit it to the shared platform server in sequence after the network is restored.
[0016] The present invention discloses the following technical effects: (1) This invention introduces a "startup pre-registration status message" mechanism after the startup command is triggered, enabling the sharing platform to enter a pending execution state before the device is actually powered on, and only proceeding to the running state and starting billing after receiving a startup confirmation message. This fundamentally avoids the billing error caused by billing before the device has successfully started. Compared with the existing technology that relies solely on front-end clicks or device online for billing, this invention achieves strong consistency between startup behavior and billing logic through a status confirmation mechanism, improving the reliability and traceability of shared device operation management.
[0017] (2) This invention improves the stability and controllability of device startup by combining local Bluetooth control with cloud-based status coordination. This invention uses a WeChat mini-program to directly control the instrument's power supply via Bluetooth communication, enabling startup commands to be executed without relying on a public network environment. Simultaneously, status synchronization and management are performed through a shared platform server. This invention overcomes the strong dependence of traditional cloud control modes on network real-time performance. Even in cases of network instability or short-term network outages, physical startup control of the device can still be completed, and status compensation is performed after network recovery, effectively improving reliability in large-scale instrument sharing scenarios.
[0018] (3) This invention avoids misoperation and abnormal operation through startup confirmation and timeout mechanisms. This invention introduces a startup confirmation mechanism and a confirmation timeout judgment mechanism into the startup process. The device is only confirmed to be in operation after a genuine execution feedback is detected. If no confirmation is made within the timeout period, it is automatically marked as an abnormal state and manual processing is triggered. Compared to existing technologies that lack startup feedback verification, this invention can effectively avoid the "false startup" problem caused by relay failure, power supply abnormalities, or equipment malfunctions, thereby improving the safety of equipment operation and the accuracy of management.
[0019] (4) This invention improves system robustness under abnormal scenarios through unfinished state recovery and automatic retry mechanisms. When the Bluetooth control terminal experiences a power outage or abnormal restart, this invention queries the unfinished state record and automatically retryes the startup control, ensuring the recoverability of the startup process after an abnormal interruption. This mechanism avoids the problems of state loss, billing interruption, or increased manual intervention costs caused by device restarts, enabling the system to maintain continuity and consistency in complex operating environments, and significantly improving system robustness.
[0020] (5) This invention prevents duplicate billing through operation logs and an idempotent data entry mechanism. This invention writes each control operation into a non-volatile memory with a unique sequence number and retransmits it to the shared platform server in sequence after network recovery. The idempotent data entry mechanism ensures that the same operation is billed only once. This design effectively solves the problem of duplicate billing in scenarios such as network fluctuations and duplicate reporting, making the billing logic of the shared platform traceable and consistent, and significantly improving the commercial availability and data reliability of the system. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A flowchart of the method provided in an embodiment of the present invention; Figure 2 An overall architecture diagram provided for embodiments of the present invention; Figure 3 This is a schematic diagram of the WeChat Mini Program functional module structure provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the cross-operating system Bluetooth connection stability optimization process provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the device abnormal state recovery and cloud status synchronization process provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the operation log storage and retransmission mechanism provided in an offline environment according to an embodiment of the present invention. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] The purpose of this invention is to provide a large-scale instrument sharing intelligent control method and terminal based on Bluetooth communication and WeChat mini-program linkage. Through start-up confirmation, anomaly recovery and idempotent log mechanism, the stability, controllability and traceability of shared instruments in complex network environment are improved, which has good engineering application value.
[0025] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0026] Figure 1 The method flowchart provided in the embodiments of the present invention is as follows: Figure 1 As shown, this invention provides a method for shared intelligent control of large-scale instruments based on Bluetooth communication and WeChat mini-program linkage, including: Step 100: Obtain the device identifier of the target instrument and the reservation order number in the reservation information corresponding to the target instrument, and obtain the user identity information; Step 200: Establish a low-power Bluetooth communication connection between the WeChat mini-program and the Bluetooth control terminal, obtain the operating system type of the user's mobile terminal, and determine the Bluetooth connection parameters from the preset parameter template library based on the operating system type; Step 300: The WeChat mini program sends a start command via Bluetooth communication connection, and after receiving the start command, sends a start pre-registration status message to the sharing platform server; the start pre-registration status message includes device identifier, user identity information, reservation number and timestamp, so that the sharing platform server sets the device status to pending execution and temporarily does not start billing; Step 400: Drive the relay to control the power supply of the target instrument's display, and generate a start confirmation result based on the execution result feedback signal; if the start confirmation result is successful, report the start confirmation message, so that the shared platform server advances the device status to the running state and starts billing; Step 500: When the Bluetooth control terminal experiences a power outage and restart, query the unfinished state record, and automatically retry the start control a preset number of times if the unfinished state record exists; the unfinished state record is the record corresponding to the one for which a start pre-registration status message has been generated but a start confirmation message has not been received; Step 600: Write the operation log to non-volatile memory and retransmit it to the shared platform server in sequence after the network is restored. The shared platform server performs idempotent storage based on the unique sequence number of the operation log to avoid duplicate billing.
[0027] Specifically, this embodiment provides a Bluetooth control terminal that, together with a WeChat mini-program, a large-scale instrument sharing platform server, and instruments and equipment, constitutes a shared intelligent control system. Figure 2 As shown. Specifically, after the user completes the login and reservation process through the WeChat mini-program, the WeChat mini-program obtains the device identifier and reservation number corresponding to the target instrument. When the user initiates the use operation, a communication connection is established by scanning the QR code displayed on the Bluetooth control terminal screen. The screen is a 4.3-inch IPS display with a resolution that meets the requirements for clear display of device information and QR codes.
[0028] During the connection establishment process, the WeChat mini-program sends a connection request to the Bluetooth control terminal and simultaneously transmits the user's mobile terminal's operating system type information during the connection establishment phase. This allows the Bluetooth control terminal to select the corresponding Bluetooth communication parameters from a preset parameter template library based on the operating system type. The Bluetooth communication uses the BLE 5.0 protocol, with different connection interval configurations for different operating system environments: when the operating system is iOS, the connection interval is set to 15 to 30 milliseconds; when the operating system is Android, the connection interval is set to 40 to 100 milliseconds, and heartbeat data packets are periodically sent at 30-second intervals; when the operating system is HarmonyOS Next, the connection interval is no more than 20 milliseconds, and the negotiated ATT MTU is no less than 247 bytes to improve communication stability.
[0029] After Bluetooth communication is established, the WeChat mini program sends control commands to the Bluetooth control terminal. The control commands include at least a start command to start the device and a stop command to stop the device, thereby entering the device control process.
[0030] In this embodiment, the Bluetooth control terminal includes an AC-DC power module, a BLE5.0 Bluetooth module, a main controller, a relay driver module, a display screen, a serial port circuit, and a safety protection module. The AC-DC power module converts 220V AC power to 3.3V and 5V DC power to supply power to the Bluetooth module and the main controller. The main controller is electrically connected to the BLE5.0 Bluetooth module, the relay driver module, the display screen, and the safety protection module, respectively, and is used to parse control commands from the WeChat mini-program and generate corresponding control signals. The main controller also has a built-in non-volatile memory for storing device operation logs and status information. The relay driver module adopts an optocoupler isolation structure, and its output is connected to the power input of the target instrument's display to control the on / off state of the display power. The relay's rated control current is 10 amps, and the output interface uses a new national standard five-hole socket. The safety protection module includes a fuse for overcurrent protection, a circuit structure for short-circuit detection, and a temperature sensor for high-temperature detection. When an abnormal current or temperature exceeding a set threshold is detected, the safety protection module triggers the main controller to cut off the relay output, thereby putting the target instrument into a power-off protection state.
[0031] The serial port circuit is connected to the BLE5.0 Bluetooth module and is used to write firmware data to the Bluetooth module during maintenance or upgrade scenarios to update terminal functions.
[0032] In this embodiment, after the main controller receives the start command via the BLE5.0 Bluetooth module, it first generates a start pre-registration status message and sends it to the sharing platform server. This start pre-registration status message includes at least the device identifier, user identity information, reservation number, and timestamp information, causing the sharing platform server to set the device status to pending execution and temporarily halt billing. Subsequently, the main controller drives the relay module to power on the target instrument's display and generates an execution result feedback signal by collecting the display circuit current. A start is considered successful when the collected current is greater than 50 mA, and a start is considered failed when the current is less than 50 mA or abnormal fluctuations are detected. In the case of successful start, the main controller reports a start confirmation message, causing the sharing platform server to advance the device status to running and begin billing. When the Bluetooth control terminal experiences a power outage and restart, the main controller reads the historical operation logs from the non-volatile memory and queries the sharing platform server for any incomplete state records. These incomplete state records are those where a pre-registration startup status message has been generated but a startup confirmation message has not been received. Upon detecting such a record, the main controller automatically retries the operation logs a preset number of times, with a maximum of two retry attempts. After network recovery, the main controller uploads the operation logs to the sharing platform server in the order they were generated. The sharing platform server then performs idempotent data entry processing based on the unique sequence number carried in the operation logs, thereby avoiding duplicate billing issues caused by repeated reporting.
[0033] Furthermore, in this embodiment, step 200 is initiated by the WeChat mini-program and completed with the cooperation of the Bluetooth control terminal to establish a low-power Bluetooth communication connection and form the Bluetooth connection parameters required for subsequent control. Specifically, after the user completes the reservation and selects the target instrument, the WeChat mini-program determines the Bluetooth control terminal to be connected based on the device identifier of the target instrument, and the user's mobile terminal obtains its own operating system type information; the operating system type is used to characterize the system category of the user's mobile terminal so that a connection strategy matching the system category can be adopted in the subsequent connection negotiation process, thereby improving the success rate and stability of the Bluetooth connection.
[0034] In this embodiment, a preset parameter template library is set in the Bluetooth control terminal to store the correspondence between operating system types and Bluetooth connection parameters. The Bluetooth connection parameters include at least the connection interval, ATT MTU, and reconnection policy. The connection interval limits the connection period of the Bluetooth communication link to affect communication real-time performance and power consumption. The ATT MTU limits the maximum effective payload of a single data interaction to affect data transmission efficiency. The reconnection policy determines the reconnection trigger condition and reconnection method when the Bluetooth link is abnormally disconnected. After receiving the operating system type, the Bluetooth control terminal selects the corresponding connection parameters from the preset parameter template library and completes the configuration of the Bluetooth communication connection parameters accordingly.
[0035] In this embodiment, when the operating system type is iOS, the Bluetooth control terminal selects the corresponding parameter template for iOS from the preset parameter template library, sets the connection interval to 15 to 30 milliseconds, and enables the cached service discovery mechanism to avoid repeatedly executing the service and feature value scanning process, thereby reducing connection latency and reducing resource consumption during communication; through the above method, the efficiency of command interaction is improved while ensuring connection stability.
[0036] In this embodiment, when the operating system type is Android, the Bluetooth control terminal selects the corresponding parameter template for Android from the preset parameter template library, sets the connection interval to 40 to 100 milliseconds, and enables the background heartbeat keep-alive mechanism. The background heartbeat keep-alive is implemented by sending null commands every 30 seconds, which is used to maintain the Bluetooth connection state when there is no business data transmission, thereby avoiding link interruption caused by system background restrictions and improving communication continuity.
[0037] In this embodiment, the Bluetooth Low Energy communication connection is established via QR code scanning: the user's mobile terminal scans the QR code displayed on the Bluetooth control terminal to trigger the launch of the WeChat mini-program and initiate a Bluetooth connection request; before initiating the Bluetooth connection request, the WeChat mini-program verifies the permissions corresponding to the user's identity information and determines the Bluetooth control terminal to be connected based on the device identifier to avoid accidental connection or unauthorized control; during the connection establishment process, the operating system type of the user's mobile terminal is transmitted to the Bluetooth control terminal during the initial feature value writing process. The initial feature value writing is used to complete system information synchronization in the early stage of connection establishment, enabling the Bluetooth control terminal to determine subsequent communication parameters accordingly; when the operating system type is HarmonyOS Next, the Bluetooth control terminal sets the connection interval to no more than 20 milliseconds and negotiates an ATTMTU of no less than 247 bytes, while increasing the transmission power to improve connection stability and data transmission reliability in complex environments.
[0038] Optionally, in step 300 of this embodiment, after the WeChat mini-program sends a start command to the Bluetooth control terminal via Bluetooth Low Energy communication, the Bluetooth control terminal, upon receiving the start command, encapsulates the device identifier, user identity information, reservation number, and current time information corresponding to the start command into a start pre-registration status message (as shown in Table 1), and sends the start pre-registration status message to the sharing platform server; wherein, the time information is used to identify the initiation time of the start request for subsequent status consistency judgment. After receiving the start pre-registration status message, the sharing platform server does not immediately trigger the billing operation, but updates the device status corresponding to the device identifier to the pending execution state, so that the device enters the pending start stage at the logical level, thereby avoiding the problem of the device entering the billing state before it has successfully started.
[0039] Table 1. Examples of Pre-registration Status Message Fields
[0040] In this embodiment, the shared platform server maintains a set of finite state machines for each device identifier to characterize the device's operating status. The finite state machine includes at least an idle state, a pending state, a running state, and a stopped state. The idle state indicates that the device has not been reserved or occupied; the pending state indicates that a startup request has been received but startup confirmation has not yet been completed; the running state indicates that the device has successfully started and entered the usage phase; and the stopped state indicates that the device has ceased use or has been forcibly terminated. Upon receiving the startup pre-registration status message, the shared platform server switches the corresponding device's state from the idle state to the pending state and simultaneously starts a confirmation timeout mechanism. This confirmation timeout mechanism limits the maximum waiting time for the device to complete startup confirmation, preventing prolonged state stagnation under abnormal circumstances.
[0041] In this embodiment, when the sharing platform server receives a startup confirmation message reported by the Bluetooth control terminal within the confirmation timeout period, it advances the device status from the pending state to the running state and initiates the billing process accordingly. If the startup confirmation message is not received within the confirmation timeout period, the startup process is deemed abnormal, the device status is marked as abnormally suspended, and a manual review process is triggered for subsequent processing. The abnormally suspended state indicates that the device has experienced startup failure, communication abnormalities, or inconsistent status, thereby preventing incorrect billing when the device is not actually in use. Through the above-mentioned status control mechanism, the device startup process forms a closed loop of request-confirmation-billing at the logical level, ensuring the consistency and traceability of startup and billing behaviors.
[0042] Specifically, in step 400 of this embodiment, after the Bluetooth control terminal completes the pre-registration process, the main controller drives a relay to power on the target instrument's display, triggering the target instrument to enter the startup state. Upon receiving the control signal from the main controller, the relay closes, providing power to the target instrument's display. After the relay completes its connection, the main controller collects the operating current of the target instrument's display circuit and generates an execution result feedback signal based on the collected current value. This execution result feedback signal characterizes whether the target instrument has truly entered the powered-on working state, thus providing a basis for subsequent startup confirmation.
[0043] In this embodiment, the execution result feedback signal is obtained by detecting the display circuit current. Specifically, after the relay is turned on, a current sensor is used to sample the display power supply circuit in real time, and the collected current value is compared with a preset current threshold, wherein the current threshold is set to 50 mA. When the collected display circuit current is greater than the current threshold, it is determined that the target instrument display has been powered on normally, and the startup confirmation result is determined to be successful. When the collected display circuit current is not greater than the current threshold, or abnormal current fluctuations are detected, the startup process is determined to be abnormal, and the startup confirmation result is determined to be failed. By using the above method, the situation where the device has been successfully started is avoided by relying solely on the result of the command issuance, thereby improving the accuracy of the startup determination.
[0044] In this embodiment, in addition to generating an execution result feedback signal based on current detection, a dry contact signal can also be output to the general input interface of the main controller via a relay auxiliary contact to form another startup status judgment method. The main controller generates a corresponding execution result feedback signal based on the on / off state of the dry contact signal and determines the startup confirmation result accordingly. When the startup confirmation result is successful, the Bluetooth control terminal reports a startup confirmation message to the sharing platform server, causing the sharing platform server to advance the device status from the pending execution state to the running state and start billing. When the startup confirmation result is unsuccessful, the Bluetooth control terminal reports a status message containing a failure identifier to the sharing platform server, causing the sharing platform server to roll back the device status. At the same time, a local alarm is triggered on the Bluetooth control terminal side. The local alarm includes at least one of a buzzer prompt or a display prompt to remind on-site personnel to perform manual verification and processing, thereby avoiding misbilling or misoperation in abnormal device states.
[0045] Furthermore, in step 500 of this embodiment, after the Bluetooth control terminal experiences a power outage and completes a restart, the main controller enters a recovery process to avoid inconsistencies in the startup process or billing risks arising from abnormal interruptions. Specifically, the main controller initiates a status query to the shared platform server based on the stored device identifier to obtain the most recent unfinished state record corresponding to the device identifier. The unfinished state record is the record corresponding to the generation of a startup pre-registration status message but the receipt of a startup confirmation message, used to characterize the situation where the device has entered a pending execution state at the logical level but has not yet formed a final state confirmation. By performing the above query after restarting, the Bluetooth control terminal can determine whether there is a startup session that needs to be continued during the recovery phase, thereby avoiding prolonged device state stagnation or repeated triggering of billing.
[0046] In this embodiment, when the unfinished state record exists and no final state confirmation is obtained, the main controller automatically retryes the startup control a preset number of times. The maximum value of the preset number of times is set to 2 to control the risk of repeated startups in abnormal scenarios. Each retry includes the process of re-triggering the relay connection control and generating a startup confirmation result, and the safety monitoring window is extended after the retry. The safety monitoring window is used to continuously observe the power-on status of the device after the retry to identify misjudgments caused by transient current fluctuations, short-term poor contact, or link jitter, thereby improving the reliability of the retry result judgment. By linking the number of retryes with the monitoring window, the recovery process has both automated continuation capabilities and can avoid equipment anomalies caused by frequent retries.
[0047] In this embodiment, if a successful startup confirmation is not obtained after the preset number of retries, the main controller reports a recovery failure status to the shared platform server, thus enabling the shared platform server to establish a clear entry point for anomaly handling on the management side. Simultaneously, the shared platform server locks the device status corresponding to the device identifier to prevent repeated triggering of the pending execution state or the generation of new startup sessions on the same device identifier, thereby reducing the risk of status conflicts and incorrect billing. Upon receiving the recovery failure status, the administrator can perform remote intervention to check and handle power supply, relay status, or instrument malfunctions of the field equipment, thereby completing the closed-loop anomaly handling and restoring equipment availability.
[0048] Furthermore, in step 600 of this embodiment, to ensure control traceability and billing consistency under network fluctuations or short-term offline scenarios, the Bluetooth control terminal generates a corresponding operation log each time it receives a control command from the WeChat mini-program and writes the operation log to non-volatile memory. The operation log records at least user identity information, device identifier, timestamp, and command type. The command type characterizes the business meaning of the control command and includes at least a start command or a stop command. The timestamp identifies the time when the control command occurred, ensuring consistent event sequence during retransmission and data entry. By creating operation logs locally, control events occurring during offline periods can be fully traced back after network recovery, thereby avoiding billing disputes caused by data loss.
[0049] In this embodiment, the non-volatile memory uses FRAM to support data retention during power outages and high-frequency write requirements. After generating the operation log, the main controller writes the operation log into the FRAM and assigns a unique sequence number to each operation log entry. This unique sequence number characterizes the log generation order and serves as the basis for subsequent idempotent processing. To ensure the deterministic nature of the log order, the unique sequence numbers are generated in an incrementing manner, ensuring that the unique sequence number corresponding to any later-generated operation log is greater than the unique sequence number corresponding to an earlier-generated operation log. By writing the operation log and the unique sequence number together into the FRAM, the Bluetooth control terminal can still restore the log queue and maintain consistent order after a power outage and restart based on the unique sequence number.
[0050] In this embodiment, upon detecting network recovery, the main controller initiates a retransmission process and retransmits the operation logs to the sharing platform server in ascending order of the unique sequence numbers corresponding to the generation order of the operation logs. This avoids state rollback or billing misalignment caused by log out-of-order transmission during the retransmission process. To improve the integrity of the retransmission, the main controller records the retransmission progress after each retransmission, enabling the next retransmission to continue sending from the unfinished unique sequence number, thereby reducing communication redundancy caused by repeated retransmissions. Simultaneously, by retransmitting in ascending order of unique sequence numbers, the sharing platform server can replay control events in the same order and maintain consistency with the device state change process.
[0051] In this embodiment, the shared platform server performs idempotent data entry based on the unique sequence number of the operation log to avoid duplicate billing. Specifically, the shared platform server provides an idempotent interface and uses the unique sequence number as the idempotent key. When an operation log is received, it first determines whether the unique sequence number has been successfully entered into the database. If not, it performs the write operation and triggers billing or status updates accordingly. If the log has been entered, it performs deduplication or ignores duplicate writes, ensuring that billing is triggered only based on the first successfully entered operation log. By using the unique sequence number as the idempotent key, even in scenarios where network jitter causes duplicate retransmissions or multiple retransmissions, the shared platform server can maintain consistency between data entry and billing behavior, thereby avoiding duplicate billing and improving the reliability of platform-side data.
[0052] As an optional implementation method, such as Figure 3 As shown, in this embodiment, the functional modules of the WeChat mini program are uniformly scheduled with user role recognition as the entry point.
[0053] After a user logs in, the system first identifies the user's role based on their account information. Based on the identification results, the user is categorized as a regular user, instrument administrator, or institute-level administrator, and the corresponding functional modules are dynamically loaded accordingly. These functional modules include a reservation module, an approval module, an equipment control module, and a testing progress module. The reservation module provides various reservation methods, such as time-based reservations, project-based reservations, and reservation-free reservations, and verifies the available time slots for the target instrument when the user submits reservation information. The approval module displays the reservation information to be approved to users with approval permissions and supports approving, rejecting, or vetoing reservation applications. The equipment control module sends control commands to the Bluetooth control terminal after permission verification to control the start and stop of the equipment. The testing progress module displays the status of submitted testing tasks and supports querying testing progress information by conditions such as order number and instrument name, thereby achieving unified management of the entire testing process.
[0054] In this embodiment, the WeChat mini-program also includes an operating system identification module and a QR code scanning module to ensure the stability and consistency of terminal communication. Specifically, before the user performs the QR code scanning operation, the WeChat mini-program obtains the operating system type of the user's mobile terminal by calling the system interface and sends the operating system type along with the Bluetooth connection request to the Bluetooth control terminal for subsequent matching of corresponding communication parameters. During the QR code scanning process, the user scans the QR code on the display screen of the Bluetooth control terminal to establish a communication connection. Before connecting, the system verifies the user's permissions and the current status of the device, and automatically restores the corresponding process based on the device's historical status when an abnormal interruption or power failure restart is detected. At the same time, the screen control module is used by the administrator to configure the device display content, including device name, administrator information, and QR code content updates, to ensure the consistency of device information and platform data. Through the collaboration of the above modules, the WeChat mini-program forms a complete closed loop between user operation, device control, and status management, thereby realizing unified scheduling and controllable management of the shared use of large instruments.
[0055] As another alternative implementation method, such as Figure 4 As shown, to address the issues of high connection failure rates and large connection latency caused by differences in Bluetooth protocol stacks across different mobile operating systems, this invention constructs a cross-operating system Bluetooth connection stability optimization mechanism. Specifically, before the mini-program initiates a Bluetooth connection, the operating system type of the user's mobile terminal is first identified, and the identified operating system identifier is transmitted to the Bluetooth control terminal along with the initial feature value writing process. The operating system identifier is used to indicate the system type of the Bluetooth terminal's current connection object, serving as the basis for subsequent connection parameter configuration. The main controller of the Bluetooth control terminal has multiple built-in communication parameter templates and dynamically selects the corresponding template based on the received operating system identifier, thereby completing adaptive parameter configuration during the connection establishment phase and avoiding connection failures or negotiation timeouts caused by system differences.
[0056] In this embodiment, differentiated connection parameters are set for different operating systems: when identified as an iOS system, the Bluetooth connection interval is set to 15 to 30 milliseconds, and a cached service discovery mechanism is enabled to avoid connection delays caused by repeated scanning; when identified as an Android system, the connection interval is set to 40 to 100 milliseconds, and a background heartbeat keep-alive mechanism is enabled to maintain connection activity by sending null commands every 30 seconds; when identified as a HarmonyOS Next system, the connection interval is controlled to no more than 20 milliseconds, and the ATT MTU is negotiated to the range of 128 to 247 bytes, while the broadcast transmission power is increased to enhance connection stability in complex environments. Through the above differentiated configuration, the Bluetooth terminal can obtain a better combination of connection parameters in different system environments, significantly improving the connection success rate and command transmission reliability; according to actual tests, in complex network environments, the mechanism can increase the Bluetooth connection success rate from approximately 76% to 98.5%, thereby effectively ensuring the stability and continuity of the device control process.
[0057] As another alternative implementation, such as Figure 5 As shown, in this embodiment, to address the interruption of the startup process caused by power outages, relay malfunctions, and main controller malfunctions, this invention constructs a two-way state mirror between the cloud and the terminal, combined with a state recovery mechanism for malfunction self-diagnosis and recovery. Specifically, when the user clicks "Start Detection" to trigger the startup process on the WeChat mini-program, the Bluetooth control terminal sends a "Start Pending" state message to the shared platform server before executing relay control, causing the shared platform server to set the device state to "Pending Execution." Subsequently, the Bluetooth control terminal executes relay connection control and generates a confirmation or failure status report based on the detection result after the relay action is completed. The Bluetooth control terminal collects the display circuit current through a current sensor or obtains on / off feedback through a feedback pin to determine whether the power supply is actually connected. When it is determined to be successfully connected, a confirmation status message is reported; when it is determined to be a failure or an abnormality such as overcurrent or short circuit is detected, a failure status message is reported and a local alarm is triggered, thereby forming a consistent closed loop between the cloud state and the on-site execution result of the device startup process.
[0058] When the Bluetooth control terminal experiences a power outage and restart, the main controller enters the recovery process and actively queries the shared platform server for the most recently incomplete state record corresponding to the device identifier. If the query result indicates a pending state without final confirmation, the Bluetooth control terminal automatically retryes the power-on command a preset number of times, extending the safety monitoring window after each retry to reduce the risk of misjudgment caused by transient fluctuations. If no confirmation is obtained after the retry, the shared platform server maintains the device state as abnormally suspended and provides an administrator intervention entry point, allowing administrators to view the abnormally suspended state and perform remote intervention on the WeChat mini-program. Simultaneously, the shared platform server maintains a finite state machine for each device identifier. This finite state machine includes at least an idle state, a pending state, a running state, and a stopped state. The device state is only advanced from the pending state to the running state after receiving a confirmation status message reported by the Bluetooth control terminal, thereby avoiding state misalignment and incorrect billing issues caused by terminal abnormalities, network jitter, or repeated reporting, ensuring the consistency and traceability of the device control logic.
[0059] As another alternative implementation, such as Figure 6 As shown in this embodiment, to ensure data integrity and billing consistency in the event of network interruption or communication anomalies, this invention constructs a reliable data storage and retransmission mechanism for network outage environments. Specifically, each time the Bluetooth control terminal generates a control action, it writes the corresponding operation log into the terminal's local non-volatile memory. The operation log includes at least user identity information, device identifier, timestamp, and instruction type, thus ensuring complete preservation of operation records even in the event of power failure or network unavailability. When the system detects that the network connection has been restored, the Bluetooth control terminal automatically retransmits the log data to the sharing platform server sequentially according to the generation order of the operation log, based on the unique serial number, to ensure the temporal consistency of log uploads. The sharing platform server sets up an idempotent interface for the operation logs and uses the unique serial number as the idempotency judgment criterion. When data corresponding to a duplicate serial number is received, deduplication processing is performed or the data is directly ignored, thereby avoiding duplicate billing issues caused by duplicate uploads. Through the above mechanism, device operation data can be completely preserved and reliably transmitted in complex network environments such as network outages and reconnections, ensuring that the platform-side billing is consistent with the actual operating status of the device.
[0060] In this invention, a cross-platform Bluetooth adaptive communication engine is constructed to achieve stable connection and consistent control across different mobile operating system environments. Specifically, the communication engine integrates an operating system fingerprinting mechanism to identify the terminal operating system type before initiating a connection in the WeChat mini-program, and dynamically configures connection parameters, including connection interval, maximum transmission unit, and reconnection strategy, based on a pre-set parameter template library, thereby eliminating the impact of differences in Bluetooth protocol stack implementations across different operating systems. Simultaneously, by introducing a dynamic MTU negotiation mechanism and a platform-specific reconnection strategy on the Bluetooth terminal side, the communication process can automatically adjust communication behavior according to the current system environment, avoiding connection interruptions caused by system limitations or link jitter. Combined with an optimized antenna layout design and a watchdog mechanism, the Bluetooth connection is automatically restored in the event of communication anomalies, thus significantly improving the stability and success rate of Bluetooth connections without increasing system complexity, achieving unified adaptation to multi-platform environments.
[0061] Furthermore, this invention constructs a cloud-edge collaborative state recovery mechanism. Through a closed-loop process of "pre-registration - execution feedback - fault retrieval - automatic retry," it achieves traceable and recoverable control of equipment operating status. Before executing control, the terminal synchronizes its status to the cloud; after execution, it confirms the result based on sensor feedback, thus ensuring consistency between the cloud status and the physical device status. In the event of power outages, abnormal restarts, or communication interruptions, the terminal can automatically recover the operating process based on historical status, avoiding status errors or billing anomalies. Simultaneously, by introducing optocoupler-isolated relay drives and a dual current and temperature detection mechanism at the hardware layer, proactive protection against abnormal states is achieved. Combined with the device status mirror maintained in the cloud, even in complex usage scenarios, it can accurately reproduce user operation intentions, ensuring the continuity and security of reservation, billing, and equipment control processes. Based on the above technical solutions, this invention achieves reliable control and status awareness of large-scale scientific instruments in a non-intrusive manner, significantly improving the stability, versatility, and engineering applicability of the shared management system while ensuring equipment safety.
[0062] Furthermore, it should be understood that the functional modules, communication methods, and control flows described in the above embodiments are merely preferred implementations of the present invention and are not intended to limit the present invention. Without departing from the overall technical concept of the present invention, those skilled in the art can replace or adjust some of the technical solutions according to actual application scenarios. For example, in terms of human-computer interaction on the terminal side, the WeChat mini-program can be replaced with an independently developed mobile application to achieve more complex data processing logic or offline operation capabilities; in terms of near-field communication, an NFC module can be used instead of a Bluetooth module, enabling device identification and control through proximity sensing of the mobile phone, adapting to application scenarios with higher response speed requirements but shorter communication distances; in terms of communication architecture, a WiFi communication module can be added to Bluetooth communication to form a dual-mode communication method where Bluetooth and WiFi work together, improving data transmission stability and system reliability in complex network environments. The above substitution methods only change the specific implementation form and do not affect the core technical concept and its implementation effect proposed by the present invention.
[0063] Furthermore, the state management mechanism, communication control logic, and security protection methods involved in this invention are all built around the overall design concept of "perceptible device status, traceable operation process, and recoverable abnormal situation." Even under different hardware platforms, communication methods, or software architectures, as long as the core mechanisms such as pre-registration upon startup, execution feedback confirmation, abnormal state identification, and cloud state synchronization are still adopted, they should all be considered to fall within the scope of the technical concept of this invention. Therefore, any equivalent substitutions, modifications, or improvements made to the structural form, implementation method, or application scenario based on the technical concept of this invention should be included within the protection scope of this invention, and should not be limited to the specific embodiments listed in this specification.
[0064] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0065] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for shared intelligent control of large-scale instruments based on Bluetooth communication and WeChat mini-program linkage, characterized in that, include: Obtain the device identifier of the target instrument and the reservation order number in the reservation information corresponding to the target instrument, and obtain the user identity information; Establish a low-power Bluetooth communication connection between the WeChat mini-program and the Bluetooth control terminal, obtain the operating system type of the user's mobile terminal, and determine the Bluetooth connection parameters from the preset parameter template library based on the operating system type. The WeChat mini program sends a start command via the Bluetooth communication connection, and after receiving the start command, sends a start pre-registration status message to the sharing platform server. The start pre-registration status message includes device identifier, user identity information, reservation number and timestamp, so that the sharing platform server sets the device status to pending execution and temporarily does not start billing. The drive relay controls the power supply of the target instrument's display, and generates a start confirmation result based on the execution result feedback signal; when the start confirmation result is successful, a start confirmation message is reported, causing the shared platform server to advance the device status to the running state and start billing; When the Bluetooth control terminal experiences a power outage and restart, it queries the unfinished state record and automatically retryes the start control a preset number of times if the unfinished state record exists; the unfinished state record is the record corresponding to the one that has generated the start pre-registration status message but has not received the start confirmation message; The operation logs are written to non-volatile memory and then transmitted to the shared platform server in sequence after the network is restored. The shared platform server performs idempotent storage based on the unique sequence number of the operation logs to avoid duplicate billing.
2. The method for shared intelligent control of large instruments based on Bluetooth communication and WeChat mini-program linkage according to claim 1, characterized in that, Based on the operating system type, Bluetooth connection parameters are determined from a preset parameter template library, including: Establish the correspondence between operating system type and connection interval, ATT MTU and reconnection strategy in the preset parameter template library; When the operating system type is iOS, configure the connection interval to 15–30ms and enable cached service discovery to avoid duplicate scans; When the operating system type is Android, the connection interval is configured to 40–100ms and background heartbeat keep-alive is enabled, wherein the background heartbeat keep-alive is to send an empty command every 30s; When the operating system type is HarmonyOS Next, the connection interval is configured to be no more than 20ms and the negotiated ATTMTU is no less than 247 bytes, while the transmit power is increased to improve connection stability.
3. The method for shared intelligent control of large instruments based on Bluetooth communication and WeChat mini-program linkage according to claim 1, characterized in that, Establishing a low-power Bluetooth communication connection between the WeChat mini-program and the Bluetooth control terminal includes: The user's mobile terminal scans the QR code displayed on the Bluetooth control terminal to trigger the WeChat mini program to launch and initiate a Bluetooth connection request; Before initiating the Bluetooth connection request, the user permissions corresponding to the user identity information are verified, and the Bluetooth control terminal to be connected is determined based on the device identifier; When a connection is established, the operating system type of the user's mobile terminal is written to the Bluetooth control terminal along with the initial feature value, so that the Bluetooth control terminal can subsequently determine the Bluetooth connection parameters.
4. The method for shared intelligent control of large instruments based on Bluetooth communication and WeChat mini-program linkage according to claim 1, characterized in that, The WeChat mini-program sends a start command via the Bluetooth communication connection, and upon receiving the start command, sends a start pre-registration status message to the sharing platform server, including: On the shared platform server side, a finite state machine is maintained for the device identifier to represent the device state; the finite state machine includes at least an Idle state, a pending state, a running state, and a stopped state. Upon receiving the pre-registration status message, the device status corresponding to the device identifier is set to pending execution and the confirmation timeout is started. Upon receiving the startup confirmation message, the device status is advanced to the running state; If the start confirmation message is not received after the confirmation timeout period, the device status will be marked as abnormal and suspended, triggering manual review.
5. The method for shared intelligent control of large instruments based on Bluetooth communication and WeChat mini-program linkage according to claim 1, characterized in that, The drive relay controls the power supply to the target instrument's display, and generates a start confirmation result based on the execution result feedback signal, including: After the relay completes the connection action, the current of the display circuit of the target instrument is collected by the current sensor and compared with the current threshold to generate the execution result feedback signal, wherein the current threshold is 50mA; When the current in the display circuit is greater than the current threshold, the startup confirmation result is determined to be successful; When the display circuit current is not greater than the current threshold or an overcurrent is detected, the startup confirmation result is determined to be a failure; or The auxiliary contact of the relay is used to output a dry contact signal to the main controller GPIO to generate the execution result feedback signal, and the start confirmation result is determined based on the execution result feedback signal.
6. The method for shared intelligent control of large instruments based on Bluetooth communication and WeChat mini-program linkage according to claim 1, characterized in that, The startup confirmation result is a successful startup confirmation message reported, including: When the startup confirmation result is a failure, a status message containing a failure identifier is reported to the sharing platform server to cause the sharing platform server to roll back the device status, and a local alarm is triggered on the Bluetooth control terminal; the local alarm includes at least one of beeping or displaying a prompt.
7. The method for shared intelligent control of large instruments based on Bluetooth communication and WeChat mini-program linkage according to claim 1, characterized in that, When the Bluetooth control terminal experiences a power outage and restart, it queries the unfinished state record and automatically retryes the restart control a preset number of times if the unfinished state record exists, including: When the Bluetooth control terminal restarts after a power outage, it queries the sharing platform server for the most recent unterminated record of the device identifier. When the unfinished state record exists and there is no final state confirmation, the startup control is automatically retried a preset number of times, and the security monitoring window is extended after each retry; the maximum value of the preset number of times is 2. If the startup confirmation result is still not obtained after retrying, the recovery failure status is reported and the device status corresponding to the device identifier is locked to notify the administrator to perform remote intervention.
8. The method for shared intelligent control of large instruments based on Bluetooth communication and WeChat mini-program linkage according to claim 1, characterized in that, The operation log is written to a non-volatile memory and then sequentially transmitted to the shared platform server after network recovery, including: The operation log records the user's identity information, the device identifier, the timestamp, and the instruction type. The operation log is written to the non-volatile memory as FRAM; After network recovery is detected, the operation logs are retransmitted to the shared platform server in ascending order of the unique sequence number corresponding to the generation order of the operation logs.
9. The method for shared intelligent control of large instruments based on Bluetooth communication and WeChat mini-program linkage according to claim 1, characterized in that, The shared platform server performs idempotent data entry based on the unique sequence number of the operation log to avoid duplicate billing, including: The shared platform server provides an idempotent interface and uses the unique serial number as the idempotent key; When an operation log carrying the same unique serial number is received, deduplication or ignoring duplicate writes is performed so that billing is triggered only based on the operation log of the first successful data entry.
10. A Bluetooth control terminal for achieving shared intelligent control of a target instrument via Bluetooth wireless communication with a WeChat mini-program, characterized in that, include: AC-DC power supply module, BLE5.0 Bluetooth module, main controller, relay driver module, display screen, serial port circuit and safety protection module; The AC-DC power module is used to input AC power and convert it into DC power to power the BLE5.0 Bluetooth module and the main controller; the BLE5.0 Bluetooth module is used to communicate wirelessly with the WeChat mini-program to receive control commands and upload device status data, and supports serial port firmware upgrades; the control commands include at least a start command for starting detection and a stop command for stopping detection; the serial port circuit is used for firmware upgrades and debugging of the BLE5.0 Bluetooth module; The main controller is electrically connected to the BLE5.0 Bluetooth module, the relay drive module, the display screen, and the safety protection module, and has a built-in non-volatile memory for parsing the control commands to control the relay drive module and collecting data from the safety protection module to drive the display screen to display device information. The relay drive module is used to receive instructions from the main controller to control the power supply of the target instrument's display. The safety protection module is used to trigger the main controller to cut off the power supply when an overcurrent, short circuit, or high temperature abnormality is detected. Furthermore, the main controller is configured to: upon receiving the start command, first send a start pre-registration status message to the shared platform server; after sending the start pre-registration status message, drive the relay driver module to control the power supply of the target instrument's display; generate a start confirmation result based on the execution result feedback signal and report the start confirmation message; query the unfinished state record when the Bluetooth control terminal experiences a power outage and restart; and automatically retry the start control a preset number of times if the unfinished state record exists; and write the operation log to the non-volatile memory and retransmit it to the shared platform server in sequence after the network is restored.