Data synchronization methods, smart devices and computer-readable storage media
By binding historical data collection with task and user identifiers, the problem of data mismatch and missing data in multi-user login scenarios in robot teaching and data collection devices is solved, and fast and complete data synchronization is achieved.
Patent Information
- Application Number
- CN202611559824.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-10
- Publication Date
- 2026-11-17
AI Technical Summary
Existing offline data upload methods are prone to problems such as data and user mismatch, missing data, or some data remaining locally and unable to be uploaded in multi-user login scenarios, which is particularly evident in robot teaching and data acquisition devices.
By binding historical data with task and user identifiers, scanning the user credentials of all local users, the upload function is restored without requiring user login. Multiple task groups are uploaded to the cloud separately, and user credentials and task identifiers are used to perform data integrity checks and completions to ensure data matching and integrity.
It effectively avoids the problems of data mismatch between uploaded data and users, as well as data loss, and achieves fast and complete data synchronization, making it suitable for multi-user login scenarios.
Smart Images

Figure CN123123368A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data synchronization technology, specifically providing a data synchronization method, a smart device, and a computer-readable storage medium. Background Technology
[0002] Offline-first applications typically use a local database to temporarily store data and synchronize queues to record operations. Once the network is restored, the queues are replayed for uploading. Existing technologies can not only handle the synchronization of offline modified documents and forms, but also control the scope of data synchronization based on user identity.
[0003] However, existing offline data upload methods are not suitable for scenarios such as multi-user login. For example, in the offline data upload scenario of robot teaching and data acquisition equipment, it is different from ordinary business records. Usually, a data acquisition task includes multiple large files such as video, tracking data and metadata. Moreover, the same device may be used by multiple data acquisition personnel in rotation. If the offline data is uploaded directly after the network connection is restored, it is easy to encounter problems such as data mismatch with users, data loss, or some data remaining locally and unable to be uploaded. Summary of the Invention
[0004] This application aims to solve the aforementioned technical problems, namely, to address the issues that existing offline data uploads often result in data mismatch with users, missing data, or some data remaining locally and unable to be uploaded.
[0005] In a first aspect, this application provides a data synchronization method, comprising:
[0006] In response to the data synchronization command, load the user credentials of all local users, and query the historical data to be uploaded for each local user;
[0007] Based on the pre-stored task identifier, all historical data with the same task identifier among the historical data to be uploaded are divided into a task group, resulting in multiple task groups; each task group includes the user identifier information of the local user to which it belongs;
[0008] Based on the task identifier corresponding to each task group, the user identifier of the user to which each task group belongs, and the user credentials corresponding to the user identifier, the multiple task groups are uploaded to the cloud respectively.
[0009] In some embodiments, before querying the historical data to be uploaded by each local user, the method further includes:
[0010] Verify the validity of user credentials for all local users;
[0011] Based on the test results, valid user credentials are saved for future use. For local users with valid credentials, historical data to be uploaded can be queried separately.
[0012] In some embodiments, before uploading the plurality of task groups to the cloud respectively, the method further includes:
[0013] Perform data integrity checks on each of the multiple task groups;
[0014] When the test result indicates that data is missing, complete the historical data collected in the current task group.
[0015] In some embodiments, after uploading each of the plurality of task groups to the cloud, the method further includes:
[0016] The task completion interface in the cloud is called using the pre-obtained next task identifier, and the list of files uploaded by the current task group is transmitted to the cloud so that the cloud can confirm whether the current task group has completed the upload based on the file list.
[0017] Once the cloud confirms the upload is complete, delete the local files corresponding to the current task group.
[0018] When the cloud indicates that at least some of the historical data collected in the current task group has failed to upload, record the upload failure for the current task group and retain the local files of the current task group.
[0019] In some embodiments, before uploading each of the plurality of task groups to the cloud, the method further includes:
[0020] Determine if the next task identifier corresponding to the current task group is stored locally;
[0021] If so, directly call the cloud-based task completion interface based on the next task identifier stored locally;
[0022] If not, based on the task identifier corresponding to the current task group, send a cloud status setting request to the cloud; receive the next task identifier returned by the cloud in response to the cloud status setting request.
[0023] In some embodiments, before invoking the cloud-based task completion interface using the pre-obtained next task identifier, the method further includes:
[0024] Determine whether the next task identifier is empty;
[0025] If not, then use the next task identifier to call the task completion interface in the cloud.
[0026] In some embodiments, the method further includes:
[0027] When a task group fails to upload, record the upload failure information for the current task group;
[0028] When the upload failure message indicates that the user credential has expired, a reminder to log in again is sent to the user; the refreshed user credential after the user logs in again is obtained and stored locally;
[0029] When the upload failure message indicates that the current task group is missing data, or that the upload of at least some of the historical data collected in the current task group has been cancelled, the current task group is marked as invalid and the invalid status information of the current task group is synchronized to the cloud.
[0030] In some embodiments, before uploading each of the plurality of task groups to the cloud, the method further includes:
[0031] Identify whether the current task group is a joint data collection task;
[0032] If so, obtain the data identifier of the current task group, and upload the current task group to the cloud based on the data identifier of the current task group, the task identifier, the user identifier, and the user credentials.
[0033] In a second aspect, this application provides a smart device comprising:
[0034] At least one processor;
[0035] And, a memory communicatively connected to the at least one processor;
[0036] The memory stores a computer program that, when executed by the at least one processor, implements the method described above.
[0037] In a third aspect, this application provides a computer-readable storage medium storing a plurality of program codes adapted to be loaded and run by a processor to perform the methods described in any of the preceding claims.
[0038] By adopting the above technical solution, this application can restore the upload function or trigger data synchronization without requiring user login by binding historical data with task identifiers and user identifiers and scanning the user credentials of all local users. It can also effectively avoid the problems of mismatch between uploaded data and users and missing uploaded data. Attached Figure Description
[0039] The preferred embodiments of this application are described below with reference to the accompanying drawings, in which:
[0040] Figure 1 This is a flowchart of a method for acquiring historically collected data provided in an embodiment of this application;
[0041] Figure 2 This is a schematic diagram of a data synchronization method provided in Embodiment 1 of this application;
[0042] Figure 3 This is a schematic flowchart of a data synchronization method provided in Embodiment 2 of this application;
[0043] Figure 4 This is a schematic diagram of a data synchronization method provided in Embodiment 3 of this application;
[0044] Figure 5 This is a schematic diagram of a data synchronization method provided in Embodiment 4 of this application;
[0045] Figure 6 This is a schematic diagram of a data synchronization method provided in Embodiment 5 of this application. Detailed Implementation
[0046] Some embodiments of this application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of this application and are not intended to limit the scope of protection of this application.
[0047] As described in the background section, existing offline data upload methods are not well-suited for multi-user login scenarios. They typically process historical user data based on the current user's credentials after the upload function is restored, which can easily lead to cross-user uploads, data mismatches with users, or historical users' pending uploads failing to upload and remaining locally. Furthermore, existing upload methods usually involve single file uploads, which can easily result in data loss.
[0048] Based on this, this application provides a data synchronization method that binds historically collected data with task identifiers and user identifiers, and scans the user credentials of all local users. When the upload function is restored or data synchronization is triggered, user login is not required, and the method effectively avoids problems such as mismatch between uploaded data and users, and missing uploaded data. The data synchronization method provided in this application can be applied to terminals. As an example, the terminal can be a head-mounted display device, which may have video capture capabilities, etc.
[0049] Historical data can be data pre-stored locally before the data synchronization command is triggered, such as data stored locally before network outage. See also Figure 1 As shown, Figure 1 This is a flowchart of a method for obtaining historically collected data provided in an embodiment of this application.
[0050] S11: After a user successfully logs in, the terminal saves the user's credentials and sends a data collection request to the cloud.
[0051] S12: The cloud responds to the terminal's data collection request by returning the task identifier of the current collection task, or the task identifier and data identifier, to the terminal.
[0052] S13: The terminal collects data, obtains the collected data, and stores the collected data locally. When storing, it can save the user identifier and task identifier corresponding to the user of the collected data.
[0053] The collected data obtained above will be used as historical data in the future. One collection can correspond to one task identifier, and the same user identifier can correspond to multiple collection tasks, that is, multiple collection task identifiers.
[0054] By collecting user identifiers corresponding to the data, it is helpful to avoid subsequent cross-user uploads or data mismatches.
[0055] In some embodiments, user credentials may be user identity information stored in a local historical data collection table or secure storage when a user logs in, which can be used as credentials for user identity verification.
[0056] As an example, user credentials may include at least a token corresponding to the username. In some embodiments, they may also include at least one of the following: expiration time, refresh token after re-login, login time upon re-login, credential validity period, server session identifier, last upload time, and local temporary identifier. In other embodiments, an Android keystore, an encrypted database, or a hardware security module may be used to securely store user credentials.
[0057] In some embodiments, historical data can be of various file types, such as video files, tracking data and metadata files. Historical data can be stored in a historical storage table and can record at least one of the following: task identifier, task name, task type, local storage path, expected upload time, effective time, update status, data identifier, whether it is a joint acquisition task and the next task identifier.
[0058] Figure 2 This is a schematic flowchart of a data synchronization method provided in Embodiment 1 of this application. See also... Figure 2 As shown, it may include steps S21 to S23.
[0059] Step S21: In response to the data synchronization command, load the user credentials of all local users and query the historical data to be uploaded for each local user.
[0060] In one embodiment, a data synchronization command can be triggered by: application startup, automatic check at a set time, network recovery, switching of logged-in users, restoration of device focus, meeting terminal charging status requirements, meeting a preset time period such as nighttime idle time, responding to a command issued from the cloud, or manual click by the user. By responding to the data synchronization command, a comprehensive scan of locally stored user activity data can be performed, and user credentials for all local users can be loaded. If the automatic upload switch is off, object storage is not initialized, or the network connection fails, the current scan ends.
[0061] In this application, by loading the user credentials and historical data of all local users, it is not necessary to consider whether a user is currently logged in when the data synchronization command is triggered. Even if no user is logged in or the user has been switched, the historical data can still be uploaded through the local user credentials.
[0062] Step S22: Based on the pre-stored task identifier, divide all historical data to be uploaded with the same task identifier into a task group, resulting in multiple task groups; where each task group includes the user identifier of the local user to which it belongs.
[0063] As an example, when video files, tracking data, and metadata files are acquired simultaneously in a single acquisition task, the video files, tracking data, and metadata files correspond to the same task identifier and can be divided into a task group. Each user identifier can correspond to multiple task groups.
[0064] Step S23: Based on the task identifier corresponding to each task group, the user identifier of the user to which each task group belongs, and the user credentials corresponding to the user identifier, upload the multiple task groups to the cloud respectively.
[0065] Specifically, a data upload request can be sent to the cloud based on the user identifier and user credentials. The cloud can confirm whether the current request is authorized by the user based on the user credentials, and can also confirm whether the user credentials and user identifier match. When it is confirmed that the user is authorized and the user credentials and user identifier match, the terminal uploads the task group, thereby synchronizing the current user's historical data to the cloud.
[0066] In some embodiments, multiple task groups can upload data separately at different times. When uploading to object storage, each task group can resume uploading from where it was interrupted, upload in chunks, or upload small files individually. In some embodiments, the upload order can also be determined based on task group priority. For example, multiple task groups can be sorted according to file size, estimated upload time, network quality, terminal battery level, terminal temperature, or user-manually prioritized results to determine task group priority.
[0067] In some embodiments, in response to a user's cancellation of an upload, the current task group can be marked as having failed to upload, thus preventing further uploads from the current task group.
[0068] When a task group upload fails, the method may further include: recording the upload failure information for the current task group. When the upload failure information indicates that the user credentials have expired, it may further include: sending a reminder to the user to log in again; obtaining the refreshed user credentials after the user logs in again and storing them locally. When the upload failure information indicates that data in the current task group is missing, or that the upload of at least some historical data collected in the current task group has been cancelled, the current task group is marked as invalid and the invalid status information of the current task group is synchronized to the cloud.
[0069] In other embodiments, to avoid using invalid user credentials for data synchronization, the validity of user credentials can be verified before querying the historical data to be uploaded by each local user, thus filtering out invalid user credentials. See details in [link to relevant documentation]. Figure 3 As shown.
[0070] Figure 3 This is a schematic flowchart of a data synchronization method provided in Embodiment 2 of this application, which may include steps S31 to S36.
[0071] Step S31: In response to the data synchronization command, load the user credentials of all local users.
[0072] Step S32: Verify the validity of user credentials for all local users.
[0073] Step S33: Based on the verification results, save the valid user credentials.
[0074] Step S34: For local users with valid user credentials, query the historical data to be uploaded.
[0075] Step S35: Based on the pre-stored task identifier, divide all historical data to be uploaded with the same task identifier into a task group, resulting in multiple task groups; where each task group includes the user identifier of the local user to which it belongs.
[0076] Step S36: Based on the task identifier corresponding to each task group, the user identifier of the user to which each task group belongs, and the user credentials corresponding to the user identifier, upload the multiple task groups to the cloud respectively.
[0077] Step S31 can be implemented using the same method as the corresponding part of step S21, and steps S35 and S36 can be implemented using the same method as S22 and S23. For the sake of brevity, they will not be described in detail here.
[0078] In some embodiments, step S32 may specifically be: verifying the validity of the local user's credentials according to at least one of the following methods: verifying whether the user credentials are empty, whether they have expired, whether there is a disabled record, and whether the cloud provides feedback indicating validity after the terminal initiates a heartbeat request to the cloud based on the current user credentials.
[0079] Among them, the validity period or fixed number of days that can be returned by the cloud, the local login time, the heartbeat result or refresh token status fed back by the cloud can be used to comprehensively determine whether the user's credentials have expired.
[0080] In some embodiments, step S33 may specifically involve filtering out invalid user credentials or user credentials with disabled records based on the inspection results, and saving valid user credentials.
[0081] Step S34 queries the historical data to be uploaded only for local users whose user credentials are valid, which helps to save network resources and improve upload efficiency.
[0082] In some embodiments, to avoid missing uploaded data, before uploading multiple task groups to the cloud separately, it is also possible to check whether the data in the task group is complete. See [link to documentation] for details. Figure 4 As shown.
[0083] It should be noted that this embodiment can be implemented based on either Embodiment 1 or Embodiment 2 described above, and is described here based on Embodiment 1.
[0084] Figure 4 This is a schematic flowchart of a data synchronization method provided in Embodiment 3 of this application, which includes steps S41 to S46.
[0085] Step S41: In response to the data synchronization command, load the user credentials of all local users and query the historical data to be uploaded for each local user.
[0086] Step S42: Based on the pre-stored task identifier, divide all historical data to be uploaded with the same task identifier into a task group, resulting in multiple task groups; where each task group includes the user identifier of the local user to which it belongs.
[0087] Step S43: Perform data integrity checks on each of the multiple task groups.
[0088] When the detection result indicates that the data is missing, proceed to steps S44 and S45; when the detection result indicates that the data is complete, proceed to step S46.
[0089] Step S44: Complete the historical data collection for the current task group.
[0090] Step S45: Upload multiple task groups to the cloud according to the task identifier corresponding to each task group, the user identifier of the user to which each task group belongs, and the user credentials corresponding to the user identifier; among them, for task groups with missing data, upload the completed task group to the cloud according to the user identifier of the user to which the current task group belongs and the user credentials corresponding to the user identifier.
[0091] Step S46: Upload multiple task groups to the cloud according to the task identifier corresponding to each task group, the user identifier of the user to which each task group belongs, and the user credentials corresponding to the user identifier.
[0092] Steps S41, S42, and S46 can be implemented in the same way as the corresponding steps in S21 to S23. In step S45, the task group with missing confirmed data can be replaced with the completed task group, and then implemented in the same way as in S23. For the sake of brevity, these will not be elaborated further here.
[0093] In some embodiments, a task group may be pre-set to include file types, such as video files, tracking data and metadata files. Step S43 may specifically involve detecting whether each file type is complete, whether the records are inconsistent with the file entities, such as the metadata file still being there but the metadata index record being lost, and detecting whether the multiple file types are non-empty files or whether they can be parsed normally.
[0094] In some embodiments, step S44 may specifically involve adding missing data based on file information in the tracking data to complete the historical data collected by the current task group.
[0095] In this embodiment, historical data is divided into multiple task groups by task identifiers, which integrates data of various file types. This is more convenient than uploading a single file and allows for timely confirmation of any missing data, thus enabling rapid and effective data completion and preventing data omissions.
[0096] Figure 5 This is a schematic flowchart of a data synchronization method provided in Embodiment 4 of this application, which may include steps S51 to S56.
[0097] Step S51: In response to the data synchronization command, load the user credentials of all local users and query the historical data to be uploaded for each local user.
[0098] Step S52: Based on the pre-stored task identifier, divide all historical data with the same task identifier into a task group, resulting in multiple task groups; where each task group includes the user identifier of the local user to which it belongs.
[0099] Step S53: Based on the task identifier corresponding to each task group, the user identifier of the user to which each task group belongs, and the user credentials corresponding to the user identifier, upload the multiple task groups to the cloud respectively.
[0100] Step S54: Use the pre-obtained next task identifier to call the cloud's task completion interface and transmit the list of files already uploaded in the current task group to the cloud so that the cloud can confirm whether the current task group has completed the upload based on the file list.
[0101] Once the cloud confirms the upload is complete, proceed to step S55: Delete the local files corresponding to the current task group.
[0102] When the cloud indicates that at least some of the historical data collected in the current task group has failed to upload, execute step S56: record the upload failure of the current task group and retain the local files of the current task group.
[0103] Steps S51 to S53 can be implemented in the same way as the corresponding steps in steps S21 to S23, and will not be described in detail here for the sake of brevity.
[0104] In this embodiment, the next task identifier can be generated by the terminal calling the cloud's in-progress interface based on the task identifier before completing the task group upload. This sends a cloud status setting request to the cloud, causing the cloud to change the current node status from "data acquisition in progress" to "uploading in progress" and then return the next task identifier to the terminal. The terminal can associate the next task identifier with the corresponding task identifier and store it locally.
[0105] The file list can include file information of multiple files that have been uploaded in the current task group and / or the cloud storage path of each type of file, so that the cloud can subsequently compare the file list with the actual cloud storage of the task group to confirm whether the upload is complete.
[0106] The process involves uploading multiple task groups to the cloud, obtaining the next task node returned by the cloud, and then executing step S54 to call the cloud's task completion interface using the next task node to confirm the upload completion. If both stages are successful, step S55 deletes the local file corresponding to the current task group. This facilitates the identification of the task group whose status needs to be recorded as completed based on the next task node, avoiding errors in the cloud status chain or misattribution between the completion node and the task group. It also helps prevent irrecoverable situations caused by deleting local files if the upload fails.
[0107] When the cloud indicates that at least some of the historical data collected in the current task group has failed to upload, that is, as long as there is data failure in the current task group, step S56 is executed to record the current task group as having failed to upload, so as to avoid the data in the current task group not being fully uploaded, thus failing to effectively identify the number of missing data and avoiding the formation of missing modality sample data.
[0108] In some embodiments, to avoid cloud state link errors, before uploading each task group in multiple task groups to the cloud, see [link to relevant documentation]. Figure 5 As shown, the method also includes:
[0109] Determine if the next task identifier corresponding to the current task group is stored locally.
[0110] If so, proceed to step S54, directly calling the task completion interface in the cloud based on the next task identifier stored locally, avoiding repeated retrieval from the cloud.
[0111] If not, based on the task identifier corresponding to the current task group, send a cloud status setting request to the cloud; receive the next task identifier returned by the cloud in response to the cloud status setting request.
[0112] In other embodiments, to ensure the validity of the next task identifier, before executing step S54 to call the cloud-based task completion interface using the pre-obtained next task identifier, the method further includes:
[0113] Determine if the next task identifier is empty; if not, use the next task identifier to call the cloud-based task completion interface.
[0114] If the next task identifier is empty, the task group stored locally will be retained and re-uploaded later.
[0115] Figure 6 This is a schematic flowchart of a data synchronization method provided in Embodiment 5 of this application. See also... Figure 6 As shown, it may include steps S61 to S65.
[0116] Step S61: In response to the data synchronization command, load the user credentials of all local users and query the historical data to be uploaded for each local user.
[0117] Step S62: Based on the pre-stored task identifier, divide all historical data to be uploaded with the same task identifier into a task group, resulting in multiple task groups; where each task group includes the user identifier of the local user to which it belongs.
[0118] Step S63: Identify whether the current task group is a joint data collection task.
[0119] If so, proceed with steps S64 and S65.
[0120] Step S64: Obtain the data identifier of the current task group.
[0121] Step S65: Based on the data identifier, task identifier, user identifier, and user credentials of the current task group, upload the current task group to the cloud.
[0122] It should be noted that this embodiment can be implemented based on any of the above embodiments. Here, it is described based on the first embodiment. Steps S61 and S62 can be implemented in the manner of Embodiment 1. The following mainly focuses on several other steps that are different from the first embodiment.
[0123] Among them, see Figure 1 As shown, the data identifier is returned to the terminal from the cloud in response to the terminal's data acquisition request. The data identifier identifies the cloud data item corresponding to the current acquisition task, ensuring that the data acquired by the terminal, the data acquired by external devices used in conjunction with it, and the cloud data item can be correlated. When the current acquisition task is in joint acquisition mode, the terminal can send the data identifier to the external device, enabling the external device to perform corresponding acquisition or task retrieval based on the same data identifier. The terminal can also verify whether the data identifier returned by the external device is consistent with the data identifier it sent; if they are consistent, it determines that the current external device is the device used for joint acquisition. In some embodiments, the data identifier can be stored in the metadata file corresponding to the current task identifier. After data acquisition is completed, the "Whether to merge" field corresponding to the current historical acquisition data can also be recorded as true.
[0124] Accordingly, step S63 can specifically involve identifying whether the data belongs to a jointly collected task based on the data identifier of the current task group. By executing step S65, the current task group is uploaded to the cloud based on its task identifier, user identifier, and user credentials, and further combined with the data identifier. This helps ensure consistency in the attribution of the task group uploaded by the terminal, the data collected by external devices, and the cloud data items, thus avoiding mismatches in jointly collected data.
[0125] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable storage medium can include any entity or device capable of carrying the computer program code, a medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0126] Another aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the data synchronization method in any of the above embodiments. This computer-readable storage medium can be a storage device comprising various electronic devices. Optionally, in the embodiments of this application, the computer-readable storage medium is a non-transitory computer-readable storage medium.
[0127] Another aspect of this application provides a smart device.
[0128] In one embodiment of a smart device according to this application, the smart device may include at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program, which, when executed by the at least one processor, implements the method described in any of the above embodiments. The smart device described in this application may include head-mounted display devices, driving devices, smart vehicles, robots, and other similar devices.
[0129] The technical solutions of this application have been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of this application is obviously not limited to these specific embodiments. Without departing from the principles of this application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of this application.
Claims
1. A data synchronization method, characterized in that, include: In response to the data synchronization command, load the user credentials of all local users, and query the historical data to be uploaded for each local user; Based on the pre-stored task identifier, all historical data with the same task identifier among the historical data to be uploaded are divided into a task group, resulting in multiple task groups; each task group includes the user identifier information of the local user to which it belongs; Based on the task identifier corresponding to each task group, the user identifier of the user to which each task group belongs, and the user credentials corresponding to the user identifier, the multiple task groups are uploaded to the cloud respectively.
2. The method according to claim 1, characterized in that, Before querying the historical data to be uploaded for each local user, the method further includes: Verify the validity of user credentials for all local users; Based on the test results, valid user credentials are saved for future use. For local users with valid credentials, historical data to be uploaded can be queried separately.
3. The method according to claim 1, characterized in that, Before uploading the multiple task groups to the cloud respectively, the method further includes: Perform data integrity checks on each of the multiple task groups; When the test result indicates that data is missing, complete the historical data collected in the current task group.
4. The method according to any one of claims 1 to 3, characterized in that, After uploading each of the multiple task groups to the cloud, the method further includes: The task completion interface in the cloud is called using the pre-obtained next task identifier, and the list of files uploaded by the current task group is transmitted to the cloud so that the cloud can confirm whether the current task group has completed the upload based on the file list. Once the cloud confirms the upload is complete, delete the local files corresponding to the current task group. When the cloud indicates that at least some of the historical data collected in the current task group has failed to upload, record the upload failure for the current task group and retain the local files of the current task group.
5. The method according to claim 4, characterized in that, Before uploading each of the plurality of task groups to the cloud, the method further includes: Determine if the next task identifier corresponding to the current task group is stored locally; If so, directly call the cloud-based task completion interface based on the next task identifier stored locally; If not, based on the task identifier corresponding to the current task group, send a cloud status setting request to the cloud; receive the next task identifier returned by the cloud in response to the cloud status setting request.
6. The method according to claim 4, characterized in that, Before invoking the cloud-based task completion interface using the pre-obtained next task identifier, the method further includes: Determine whether the next task identifier is empty; If not, then use the next task identifier to call the task completion interface in the cloud.
7. The method according to claim 1, characterized in that, The method further includes: When a task group fails to upload, record the upload failure information for the current task group; When the upload failure message indicates that the user credential has expired, a reminder to log in again is sent to the user; the refreshed user credential after the user logs in again is obtained and stored locally; When the upload failure message indicates that the current task group is missing data, or that the upload of at least some of the historical data collected in the current task group has been cancelled, the current task group is marked as invalid and the invalid status information of the current task group is synchronized to the cloud.
8. The method according to any one of claims 1 to 3, characterized in that, Before uploading each of the plurality of task groups to the cloud, the method further includes: Identify whether the current task group is a joint data collection task; If so, obtain the data identifier of the current task group, and upload the current task group to the cloud based on the data identifier of the current task group, the task identifier, the user identifier, and the user credentials.
9. A smart device, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores a computer program that, when executed by the at least one processor, implements the method of any one of claims 1 to 8.
10. A computer-readable storage medium storing a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by a processor to perform the method of any one of claims 1 to 8.
