A cross-platform collaborative working method for embedded intelligent terminals
By constructing collaborative work module data tables and relationship tables, and dynamically binding terminal devices, security verification and resource optimization are achieved, solving the security and resource waste problems of IoT systems, and improving the system's scalability and automatic repair capabilities.
Patent Information
- Application Number
- CN202210729752.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-06-24
AI Technical Summary
Existing IoT solutions do not perform security verification on connected devices, allowing any terminal device to connect to the system and making it vulnerable to attacks. Terminal device binding causes the entire collaborative function module to fail in the event of a malfunction, resulting in significant resource waste and high difficulty in troubleshooting.
The collaborative work module data table and relationship data table are constructed to record terminal device information. Through server-side listening and timeout detection, terminal devices are dynamically bound, realizing the dynamic selection of binding, non-release connection and release connection. Terminal devices report registration information in real time for security verification.
It improves system security and resource utilization, dynamically binds terminal devices to make the system highly scalable, enables functional modules to start up quickly, has strong automatic repair capabilities, and ensures that the system can still run normally when some parts are enabled.
Smart Images

Figure CN116016572B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of embedded systems and communications, and relates to a cross-platform collaborative working method for embedded intelligent terminals. Background Art
[0002] Based on the universal application of the Internet, terminal devices can realize cross-platform collaboration of multiple terminals through interconnected applications, information exchange, and mutual operation. A complex system usually has multiple different types of intelligent terminals, and all intelligent terminals work together to enable the system to build rich functions.
[0003] However, the IoT solutions in the prior art usually have the following technical problems:
[0004] 1. Failure to verify the security of connected devices allows any terminal device to connect to the system, making the system vulnerable to attacks.
[0005] 2. Terminal devices that collaborate with each other are usually bound together, resulting in the inability of the entire collaborative function module to operate when any terminal device fails.
[0006] 3. The mutual exclusivity between terminal devices leads to waste of resources.
[0007] 4. Due to the binding of devices, the complexity of repairing the collaborative function module increases when an exception occurs. Summary of the invention
[0008] In view of the technical problems of the prior art, the present invention provides a cross-platform collaborative working method for embedded intelligent terminals, comprising the following steps:
[0009] S100: Building a system operating environment. The system includes multiple different working modules. Step S100 includes the following steps:
[0010] S101: constructing a collaborative work module data table, including a collaborative work module unique identifier and the work content of the collaborative work module, wherein the collaborative work module includes a plurality of terminal devices;
[0011] S102: constructing a collaborative work relationship data table, including a collaborative work module unique identifier, a terminal device type, a collaborative work mode, and a terminal device unique identifier, wherein the collaborative work mode includes binding, non-release connection, and release connection;
[0012] S103: Recording the information of the terminal device, including the unique identifier of the terminal device and the type of the terminal device;
[0013] S200: Building collaborative working modules:
[0014] S201: Creating a collaborative working module as a current working module, including the following steps:
[0015] S2011: Set the collaborative working module unique flag to the current working module_unique flag;
[0016] S2012: Setting the work content of the collaborative work module to the current work module_work content;
[0017] S2013: Write the current working module_unique flag and the current working module_working content into the collaborative working module data table;
[0018] S202: Setting the working relationship data of the current working module as the current working relationship includes the following steps:
[0019] S2021: Set the collaborative work module unique flag of the current work relationship as the current work module_unique flag;
[0020] S2022: Set the terminal device type to the current working relationship_device type;
[0021] S2023: Set the collaborative working mode to current working relationship_collaboration;
[0022] S2024: Write the current working module_unique flag, current working relationship_equipment type, and current working relationship_collaboration into the collaborative working relationship data table;
[0023] S300: The server enables service monitoring, including the following steps:
[0024] S301: construct a terminal dictionary by using the unique identifier of the terminal device as a key and the communication channel as a value;
[0025] S302: Building an online terminal list: recording online terminal devices in the list;
[0026] S303: The server enables TCP service monitoring;
[0027] S304: Waiting for connection to a terminal device;
[0028] S305: When the terminal device is online, it is recorded as an online terminal, and the current communication channel is recorded as an online channel;
[0029] S306: Execute timeout detection;
[0030] S400: Enabling the collaborative work module, including the following steps:
[0031] S401: Setting the working module to be enabled as the module to be enabled, and setting the occupied terminal list as the occupied list;
[0032] S402: Obtain a unique flag of the module to be enabled as the unique flag to be enabled;
[0033] S403: Read the collaborative work relationship data table and obtain the collaborative work module unique flag as the unique flag to be enabled, and record it as a collaborative work relationship list;
[0034] S404: traverse the collaborative work relationship list to determine whether there is data. If yes, record it as a collaborative relationship and execute step S405. Otherwise, execute step S40C.
[0035] S405: obtaining the terminal device type in the collaborative relationship and recording it as collaborative relationship_device type, obtaining the connection mode in the collaborative relationship and recording it as collaborative relationship_connection mode, obtaining the working terminal unique flag in the collaborative relationship and recording it as collaborative relationship_working terminal unique flag;
[0036] S406: Determine whether the collaborative relationship_connection mode is binding, if yes, execute step S407, otherwise, execute step S408;
[0037] S407: Execute the binding of the terminal device and execute step S404;
[0038] S408: Determine whether the collaborative relationship_connection mode is a non-release connection. If yes, execute step S409; otherwise, execute step S40A.
[0039] S409: Execute a non-release connection of the terminal device and execute step S404;
[0040] S40A: Determine whether the collaborative relationship_connection mode is a releasable connection. If yes, execute step S40B; otherwise, execute step S404;
[0041] S40B: Execute the releasable connection of the terminal device and execute step S404;
[0042] S40C: End the activation of the collaborative work module;
[0043] S500: Registering the terminal device, including the following steps:
[0044] S501: The terminal device executes a TCP connection, and the channel established between the server and the terminal device is defined as a communication channel;
[0045] S502: After the terminal device is successfully connected, it actively reports the terminal device registration information, including the terminal device unique identifier and the terminal device type.
[0046] Preferably, the binding is configured such that: once the terminal device is occupied, it is not released;
[0047] The non-releasable connection is set to: after the terminal device is occupied, the connection is released only after the system is restarted;
[0048] The releasable connection is set to: connect only when the terminal device is connected and the current terminal device is available when the online list is queried in real time, and release the connection after data interaction and operation are completed.
[0049] Preferably, step S306 includes the following steps:
[0050] S3061: Start the timeout detection thread, set the initial value of the timeout to 0, and set the waiting timeout threshold as the timeout threshold;
[0051] S3062: After the terminal device is successfully connected, it actively sends the terminal device information to the server, obtains the data of the terminal device through the communication channel, and records it as terminal data;
[0052] S3063: Determine whether the terminal device has been registered, if yes, execute step S3064, otherwise, execute step S306A;
[0053] S3064: Obtain information of the online terminal device from the registration information, including a registration unique identifier and a registered device type;
[0054] S3065: Create a terminal device and record it as a registered terminal;
[0055] S3066: Using the unique identifier of the registered terminal as the registered unique identifier, and using the type of the registered terminal as the registered device type;
[0056] S3067: Add the registered terminal to the online terminal list;
[0057] S3068: Using the registered unique flag as a key and the communication channel as a value, add the communication channel to the terminal dictionary;
[0058] S3069: Execute step S304;
[0059] S306A: Sleep 50 milliseconds
[0060] S306B: timeout count = timeout count + 50;
[0061] S306C: Determine whether the timeout count is greater than the timeout threshold. If so, close the online channel and execute step S304. Otherwise, execute step S3062.
[0062] Preferably, step S407 includes the following steps:
[0063] S4071: Determine whether the collaborative relationship_working terminal unique flag is empty, if so, execute step S4072, otherwise, execute step S4077;
[0064] S4072: traverse the online terminal list to determine whether the element exists. If yes, record it as a device to be associated and execute step S4073. Otherwise, execute step S4078.
[0065] S4073: Obtain a unique identifier of the device to be associated and record it as the device to be associated_unique identifier;
[0066] S4074: Query whether the terminal device whose cooperative working module unique flag is the device to be associated_unique flag and whose cooperative mode is binding has a binding relationship in the cooperative working relationship table, and the query result is set as a query list;
[0067] S4075: Determine whether the query list is empty. If so, it means that the terminal device is not permanently occupied, and execute step S4076. Otherwise, execute step S4072.
[0068] S4076: traverse the occupied terminal list and determine whether there is an element. If yes, record it as an occupied terminal and execute step S4077. Otherwise, execute step S4078.
[0069] S4077: Determine whether the unique identifier of the occupied terminal is the same as the unique identifier of the device to be associated. If yes, execute step S4072; otherwise, execute step S4076;
[0070] S4078: Update the unique flag in the collaborative work relationship table to the unique flag to be enabled, and update the unique flag of the work terminal to the unique flag of the device to be associated;
[0071] S4079: Determine whether the collaborative work terminal device is online and execute S407A;
[0072] S407A: Determine whether the online flag is true. If so, it indicates that the collaborative relationship is working normally, and execute step S407C. Otherwise, execute step S407B.
[0073] S407B: Report an alarm indicating that the current collaboration relationship cannot work;
[0074] S407C: Execute step 404.
[0075] Preferably, step S4079 includes the following steps:
[0076] S40791: Set the terminal device online flag to the online flag, and set the initial value to false;
[0077] S40792: traverse the online terminal list to determine whether the element exists. If yes, record it as a device to be determined and execute step S40793. Otherwise, execute step S407A.
[0078] S40793: Determine whether the unique identifier of the device to be determined is the same as the unique identifier of the device to be associated. If yes, execute step S40793-1; otherwise, execute step S40793-2.
[0079] S40793-1: Set the line flag to true and execute step S40794;
[0080] S40793-2: Set line flag to false;
[0081] S40794: Determine whether the online flag is true, if so, execute step S407A, otherwise, execute step S40792.
[0082] Preferably, step S409 includes the following steps:
[0083] S4091: traverse the online terminal list to determine whether there is an element. If yes, record it as a device to be associated and execute step S4092. Otherwise, execute step S4093.
[0084] S4092: Determine whether the device to be associated is occupied. If yes, execute step S4091. Otherwise, update the unique identifier of the working terminal to the unique identifier of the device to be associated, and execute step S4093.
[0085] S4093: Determine whether the unique flag of the working terminal is empty, if so, execute step S4094, otherwise, execute step S4095;
[0086] S4094: Reports an alarm indicating that the current collaboration relationship cannot work;
[0087] S4095: Execute step S404.
[0088] Preferably, step S40B comprises the following steps:
[0089] S40B1: The terminal device initiates data transmission;
[0090] S40B2: The terminal device initiates a device connection, and the connection method is the same as the non-release connection method;
[0091] S40B3: According to the unique device identifier of the terminal device obtained in step S40B2, obtain the channel from the terminal dictionary and transmit data;
[0092] S40B4: After data transmission is completed, the occupied terminal device is removed from the online list according to the unique identifier of the device and step S404 is performed.
[0093] The present invention has the following beneficial effects:
[0094] 1. The terminal device reports the registration information in real time to verify whether the connected terminal device can work normally.
[0095] 2. Verify the registration information of the terminal device to improve the security of the entire system.
[0096] 3. Dynamic binding between terminal devices makes the system highly scalable.
[0097] 4. Dynamic selection of bound terminal devices enables high utilization of resources.
[0098] 5. Dynamically select the settings of collaborative terminal devices, so that functional modules can be started quickly and achieve the effect of automatic repair.
[0099] 6. Functional modules can be partially enabled to make the system run normally as much as possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] Figure 1 The overall flow chart of the method provided by the present invention;
[0101] Figure 2 A specific flow chart of performing timeout detection in the method provided by the present invention;
[0102] Figure 3 A specific flow chart of enabling the collaborative working module in the method provided by the present invention;
[0103] Figure 4 A specific flow chart for executing the binding of terminal devices in the method provided by the present invention;
[0104] Figure 5 A specific flow chart of determining whether a collaborative working terminal device is online in the method provided by the present invention;
[0105] Figure 6 The present invention is a specific flow chart of executing a non-releasable connection of a terminal device in the method provided by the present invention. DETAILED DESCRIPTION
[0106] Figure 1 The overall flow chart of the method provided by the present invention is shown. Figure 1 As shown, the method of the present invention comprises the following steps:
[0107] S100: Building a system operating environment. The system includes multiple different working modules. Step S100 includes the following steps:
[0108] S101: constructing a collaborative work module data table, including a collaborative work module unique identifier and the work content of the collaborative work module, wherein the collaborative work module includes a plurality of terminal devices;
[0109] S102: constructing a collaborative work relationship data table, including a collaborative work module unique identifier, a terminal device type, a collaborative work mode, and a working terminal unique identifier, wherein the collaborative work mode includes binding, non-release connection, and release connection;
[0110] The binding is set to: once the terminal device is occupied, it will not be released;
[0111] The non-releasable connection is set to: after the terminal device is occupied, the connection is released only after the system is restarted;
[0112] The releasable connection is set to: connect only when the terminal device is connected and the current terminal device is available in the online list in real time, and release the connection after data interaction and operation are completed;
[0113] S103: Recording the information of the terminal device, including the unique identifier of the terminal device and the type of the terminal device;
[0114] S200: Building collaborative working modules:
[0115] S201: Creating a collaborative working module as a current working module, including the following steps:
[0116] S2011: Set the collaborative working module unique flag to the current working module_unique flag;
[0117] S2012: Setting the work content of the collaborative work module to the current work module_work content;
[0118] S2013: Write the current working module_unique flag and the current working module_working content into the collaborative working module data table;
[0119] S202: Setting the working relationship data of the current working module as the current working relationship includes the following steps:
[0120] S2021: Set the collaborative work module unique flag of the current work relationship as the current work module_unique flag;
[0121] S2022: Set the terminal device type to the current working relationship_device type;
[0122] S2023: Set the collaborative working mode to current working relationship_collaboration;
[0123] S2024: Write the current working module_unique flag, current working relationship_equipment type, and current working relationship_cooperation into the collaborative working module data table;
[0124] S300: The server enables service monitoring, including the following steps:
[0125] S301: construct a terminal dictionary by using the unique identifier of the terminal device as a key and the communication channel as a value;
[0126] S302: Building an online terminal list: recording online terminal devices in the list;
[0127] S303: The server enables TCP service monitoring;
[0128] S304: Waiting for connection to a terminal device;
[0129] S305: When the terminal device is online, it is recorded as an online terminal, and the communication channel is recorded as an online channel;
[0130] S306: Execute timeout detection.
[0131] Figure 2 FIG. 2 shows a specific flow chart of performing timeout detection in the method provided by the present invention. Figure 2 As shown, the following steps are included:
[0132] S3061: Start the timeout detection thread, set the initial value of the timeout to 0, and set the waiting timeout threshold as the timeout threshold;
[0133] S3062: After the terminal device is successfully connected, it actively sends the terminal device information to the server, obtains the data of the terminal device through the communication channel, and records it as terminal data;
[0134] S3063: Determine whether the terminal device has been registered, if yes, execute step S3064, otherwise, execute step S306A;
[0135] S3064: Obtain information of the online terminal device from the registration information, including a registration unique identifier and a registered device type;
[0136] S3065: Create a terminal device and record it as a registered terminal.
[0137] S3066: Using the unique identifier of the registered terminal as the registered unique identifier, and using the type of the registered terminal as the registered device type;
[0138] S3067: Add the registered terminal to the online terminal list.
[0139] S3068: Using the registered unique flag as a key and the communication channel as a value, add the communication channel to the terminal dictionary;
[0140] S3069: Execute step S304;
[0141] S306A: Sleep for 50 milliseconds: In this embodiment, the sleep time is set to 50 milliseconds;
[0142] S306B: timeout count = timeout count + 50;
[0143] S306C: Determine whether the timeout count is greater than the timeout threshold. If so, close the online channel and execute step S304. Otherwise, execute step S3062.
[0144] S400: Enable the collaborative work module. Figure 3 FIG. 2 shows a specific flow chart of enabling the collaborative working module in the method provided by the present invention. Figure 3 As shown, the following steps are included:
[0145] S401: Setting the working module to be enabled as the module to be enabled, and setting the occupied terminal list as the occupied list;
[0146] S402: Obtain a unique flag of the module to be enabled as the unique flag to be enabled;
[0147] S403: Read the collaborative work relationship data table and obtain the collaborative work module unique flag as the unique flag to be enabled, and record it as a collaborative work relationship list.
[0148] S404: traverse the collaborative work relationship list to determine whether there is data. If yes, record it as a collaborative relationship and execute step S405. Otherwise, execute step S40C.
[0149] S405: obtaining the terminal device type in the collaborative relationship and recording it as collaborative relationship_device type, obtaining the connection mode in the collaborative relationship and recording it as collaborative relationship_connection mode, obtaining the working terminal unique flag in the collaborative relationship and recording it as collaborative relationship_working terminal unique flag;
[0150] S406: Determine whether the collaborative relationship_connection mode is binding, if yes, execute step S407, otherwise, execute step S408;
[0151] S407: Execute binding of the terminal device and execute step S404.
[0152] Figure 4 FIG. 2 shows a specific flow chart of executing the binding of terminal devices in the method provided by the present invention. Figure 4 As shown, the following steps are included:
[0153] S4071: Determine whether the collaborative relationship_working terminal unique flag is empty, if so, execute step S4072, otherwise, execute step S4077;
[0154] S4072: traverse the online terminal list to determine whether the element exists. If yes, record it as a device to be associated and execute step S4073. Otherwise, execute step S4078.
[0155] S4073: Obtain a unique identifier of the device to be associated and record it as the device to be associated_unique identifier;
[0156] S4074: Query whether the terminal device whose cooperative working module unique flag is the device to be associated_unique flag and whose cooperative mode is binding has a binding relationship in the cooperative working relationship table, and the query result is set as a query list;
[0157] S4075: Determine whether the query list is empty. If so, it means that the terminal device is not permanently occupied, and execute step S4076. Otherwise, execute step S4072.
[0158] S4076: traverse the occupied terminal list and determine whether there is an element. If yes, record it as an occupied terminal and execute step S4077. Otherwise, execute step S4078.
[0159] S4077: Determine whether the unique identifier of the occupied terminal is the same as the unique identifier of the device to be associated. If yes, execute step S4072; otherwise, execute step S4076;
[0160] S4078: Update the unique flag in the collaborative work relationship table to the unique flag to be enabled, and update the unique flag of the work terminal to the unique flag of the device to be associated;
[0161] S4079: Determine whether the collaborative work terminal device is online and execute S407A.
[0162] Figure 5 The specific flow chart of determining whether a cooperative working terminal device is online in the method provided by the present invention is shown. Figure 5 As shown, the following steps are included:
[0163] S40791: Set the terminal device online flag to the online flag, and set the initial value to false;
[0164] S40792: traverse the online terminal list to determine whether the element exists. If yes, record it as a device to be determined and execute step S40793. Otherwise, execute step S407A.
[0165] S40793: Determine whether the unique identifier of the device to be determined is the same as the unique identifier of the device to be associated. If yes, execute step S40793-1; otherwise, execute step S40793-2.
[0166] S40793-1: Set the line flag to true and execute step S40794;
[0167] S40793-2: Set line flag to false;
[0168] S40794: Determine whether the online flag is true, if so, execute step S407A, otherwise, execute step S40792;
[0169] S407A: Determine whether the online flag is true. If so, it indicates that the collaborative relationship is working normally, and execute step S407C. Otherwise, execute step S407B.
[0170] S407B: Report an alarm indicating that the current collaboration relationship cannot work;
[0171] S407C: Execute step 404;
[0172] S408: Determine whether the collaborative relationship_connection mode is a non-release connection. If yes, execute step S409; otherwise, execute step S40A.
[0173] S409: Execute a non-release connection of the terminal device and execute step S404. Figure 6 FIG. 2 shows a specific flow chart of executing a non-releasable connection of a terminal device in the method provided by the present invention. Figure 6 As shown, the following steps are included:
[0174] S4091: traverse the online terminal list to determine whether there is an element. If yes, record it as a device to be associated and execute step S4092. Otherwise, execute step S4093.
[0175] S4092: Determine whether the device to be associated is occupied. If yes, execute step S4091. Otherwise, update the unique identifier of the working terminal to the unique identifier of the device to be associated, and execute step S4093.
[0176] S4093: Determine whether the unique flag of the working terminal is empty, if so, execute step S4094, otherwise, execute step S4095;
[0177] S4094: Reports an alarm indicating that the current collaboration relationship cannot work;
[0178] S4095: Execute step S404;
[0179] S40A: Determine whether the collaborative relationship_connection mode is a releasable connection. If yes, execute step S40B; otherwise, execute step S404;
[0180] S40B: Execute the releasable connection of the terminal device and execute step S404;
[0181] S40B1: The terminal device initiates data transmission;
[0182] S40B2: The terminal device initiates a device connection, and the connection method is the same as the non-release connection method;
[0183] S40B3: According to the unique device identifier of the terminal device obtained in step S40B2, obtain the channel from the terminal dictionary and transmit data;
[0184] S40B4: After the data transmission is completed, the occupied terminal device is removed from the online list according to the unique device identifier and step S404 is performed;
[0185] S40C: End the activation of the collaborative work module;
[0186] S500: Registering the terminal device, including the following steps:
[0187] S501: The terminal device executes a TCP connection, and the channel established by both parties is defined as a communication channel.
[0188] S502: Actively report terminal device registration information after successful connection, where the terminal device registration information includes a unique identification mark and terminal device type.
[0189] The method provided by the present invention solves the technical problem that there is no cross-platform collaborative working method for embedded intelligent terminals in the prior art.
[0190] It should be understood that the present invention is not limited to the above examples. For those skilled in the art, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A cross-platform collaborative working method for embedded intelligent terminals, characterized in that The following steps are involved: S100: Building a system operating environment. The system includes multiple different working modules. Step S100 includes the following steps: S101: constructing a collaborative work module data table, including a collaborative work module unique identifier and the work content of the collaborative work module, wherein the collaborative work module includes a plurality of terminal devices; S102: constructing a collaborative work relationship data table, including a collaborative work module unique identifier, a terminal device type, a collaborative work mode, and a terminal device unique identifier, wherein the collaborative work mode includes binding, non-release connection, and release connection; S103: Recording the information of the terminal device, including the unique identifier of the terminal device and the type of the terminal device; S200: Constructing a collaborative work module, including the following steps: S201: Creating a collaborative working module as a current working module, including the following steps: S2011: Set the collaborative working module unique flag to the current working module_unique flag; S2012: Set the work content of the collaborative work module to the current work module_work content; S2013: Write the current working module_unique flag and the current working module_working content into the collaborative working module data table; S202: Setting the working relationship data of the current working module as the current working relationship includes the following steps: S2021: Set the collaborative work module unique flag of the current work relationship as the current work module_unique flag; S2022: Set the terminal device type to the current working relationship_device type; S2023: Set the collaborative working mode to current working relationship_collaboration; S2024: Write the current working module_unique flag, current working relationship_equipment type, and current working relationship_collaboration into the collaborative working relationship data table; S300: The server enables service monitoring, including the following steps: S301: construct a terminal dictionary by using the unique identifier of the terminal device as a key and the communication channel as a value; S302: Building an online terminal list: recording online terminal devices in the list; S303: The server enables TCP service monitoring; S304: Waiting for connection to a terminal device; S305: When the terminal device is online, it is recorded as an online terminal, and the current communication channel is recorded as an online channel; S306: Execute timeout detection; S400: Enabling the collaborative work module, including the following steps: S401: Setting the working module to be enabled as the module to be enabled, and setting the occupied terminal list as the occupied list; S402: Obtain a unique flag of the module to be enabled as the unique flag to be enabled; S403: Read the collaborative work relationship data table and obtain the collaborative work module unique flag as the unique flag to be enabled, and record it as a collaborative work relationship list; S404: traverse the collaborative work relationship list to determine whether there is data. If yes, record it as a collaborative relationship and execute step S405. Otherwise, execute step S40C. S405: obtaining the terminal device type in the collaborative relationship and recording it as collaborative relationship_device type, obtaining the connection mode in the collaborative relationship and recording it as collaborative relationship_connection mode, obtaining the working terminal unique flag in the collaborative relationship and recording it as collaborative relationship_working terminal unique flag; S406: Determine whether the collaborative relationship_connection mode is binding, if yes, execute step S407, otherwise, execute step S408; S407: Execute the binding of the terminal device and execute step S404; S408: Determine whether the collaborative relationship_connection mode is a non-release connection. If yes, execute step S409; otherwise, execute step S40A. S409: Execute a non-release connection of the terminal device and execute step S404; S40A: Determine whether the collaborative relationship_connection mode is a releasable connection. If yes, execute step S40B; otherwise, execute step S404; S40B: Execute the releasable connection of the terminal device and execute step S404; S40C: End the activation of the collaborative work module; S500: Registering the terminal device, including the following steps: S501: The terminal device executes a TCP connection, and the channel established between the server and the terminal device is defined as a communication channel; S502: After the terminal device is successfully connected, it actively reports the terminal device registration information, including the terminal device unique identifier and the terminal device type.
2. A cross-platform collaborative working method for embedded intelligent terminals according to claim 1, characterized in that: The binding is set so that once the terminal device is occupied, it will not be released; The non-releasable connection is set to: after the terminal device is occupied, the connection is released only after the system is restarted; The releasable connection is set to: connect only when the terminal device is connected and the current terminal device is available when the online list is queried in real time, and release the connection after the data interaction and operation are completed.
3. A cross-platform collaborative working method for embedded intelligent terminals according to claim 1, characterized in that: Step S306 includes the following steps: S3061: Start the timeout detection thread, set the initial value of the timeout to 0, and set the waiting timeout threshold as the timeout threshold; S3062: After the terminal device is successfully connected, it actively sends the terminal device information to the server, obtains the data of the terminal device through the communication channel, and records it as terminal data; S3063: Determine whether the terminal device has been registered, if yes, execute step S3064, otherwise, execute step S306A; S3064: Obtain information of the online terminal device from the registration information, including a registration unique identifier and a registration device type; S3065: Create a terminal device and record it as a registered terminal; S3066: Using the unique identifier of the registered terminal as the registered unique identifier, and using the type of the registered terminal as the registered device type; S3067: Add the registered terminal to the online terminal list; S3068: Using the registered unique flag as a key and the communication channel as a value, add the communication channel to the terminal dictionary; S3069: Execute step S304; S306A: Sleep for N milliseconds, where N is a natural number; S306B: timeout=timeout+N; S306C: Determine whether the timeout count is greater than the timeout threshold. If so, close the online channel and execute step S304. Otherwise, execute step S3062.
4. A cross-platform collaborative working method for embedded intelligent terminals according to claim 1, characterized in that: Step S407 includes the following steps: S4071: Determine whether the collaborative relationship_working terminal unique flag is empty, if so, execute step S4072, otherwise, execute step S4077; S4072: traverse the online terminal list to determine whether the element exists. If yes, record it as a device to be associated and execute step S4073. Otherwise, execute step S4078. S4073: Obtain a unique identifier of the device to be associated and record it as the device to be associated_unique identifier; S4074: Query whether the terminal device whose cooperative working module unique flag is the device to be associated_unique flag and whose cooperative mode is binding has a binding relationship in the cooperative working relationship table, and the query result is set as a query list; S4075: Determine whether the query list is empty. If so, it means that the terminal device is not permanently occupied, and execute step S4076. Otherwise, execute step S4072. S4076: traverse the occupied terminal list and determine whether there is an element. If yes, record it as an occupied terminal and execute step S4077. Otherwise, execute step S4078. S4077: Determine whether the unique identifier of the occupied terminal is the same as the unique identifier of the device to be associated. If yes, execute step S4072; otherwise, execute step S4076; S4078: Update the unique flag in the collaborative work relationship table to the unique flag to be enabled, and update the unique flag of the work terminal to the unique flag of the device to be associated; S4079: Determine whether the collaborative work terminal device is online and execute S407A; S407A: Determine whether the online flag is true. If so, it indicates that the collaborative relationship is working normally, and execute step S407C. Otherwise, execute step S407B. S407B: Report an alarm indicating that the current collaboration relationship cannot work; S407C: Execute step 404.
5. A cross-platform collaborative working method for embedded intelligent terminals according to claim 4, characterized in that: Step S4079 includes the following steps: S40791: Set the terminal device online flag to the online flag, and set the initial value to false; S40792: traverse the online terminal list to determine whether the element exists. If yes, record it as a device to be determined and execute step S40793. Otherwise, execute step S407A. S40793: Determine whether the unique identifier of the device to be determined is the same as the unique identifier of the device to be associated. If yes, execute step S40793-1; otherwise, execute step S40793-2. S40793-1: Set the line flag to true and execute step S40794; S40793-2: Set line flag to false; S40794: Determine whether the online flag is true, if so, execute step S407A, otherwise, execute step S40792.
6. A cross-platform collaborative working method for embedded intelligent terminals according to claim 1, characterized in that: Step S409 includes the following steps: S4091: traverse the online terminal list to determine whether there is an element. If yes, record it as a device to be associated and execute step S4092. Otherwise, execute step S4093. S4092: Determine whether the device to be associated is occupied. If yes, execute step S4091. Otherwise, update the unique identifier of the working terminal to the unique identifier of the device to be associated, and execute step S4093. S4093: Determine whether the unique flag of the working terminal is empty, if so, execute step S4094, otherwise, execute step S4095; S4094: Reports an alarm indicating that the current collaboration relationship cannot work; S4095: Execute step S404.
7. A cross-platform collaborative working method for embedded intelligent terminals according to claim 1, characterized in that: Step S40B includes the following steps: S40B1: The terminal device initiates data transmission; S40B2: The terminal device initiates a device connection, and the connection method is the same as the non-release connection method; S40B3: According to the unique device identifier of the terminal device obtained in step S40B2, obtain the channel from the terminal dictionary and transmit data; S40B4: After data transmission is completed, the occupied terminal device is removed from the online list according to the unique device identifier and step S404 is performed.
