Annotation data synchronization method, device, electronic device and storage medium

By receiving and processing the data annotation tasks submitted by users, and using the application program interface for encapsulation and mounting path management, the efficient synchronization of Label Studio annotation data to the AI platform is achieved, solving the problem of high development and maintenance difficulties, and improving synchronization efficiency and accuracy.

CN120256169BActive Publication Date: 2025-08-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510712860.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-08-08
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

The method of synchronizing data marked by Label Studio to the AI platform is difficult to develop and maintain, resulting in low efficiency and low accuracy of labeled data synchronization.

Method used

By receiving data annotation tasks submitted by users, calling the storage interface to store tasks in the storage database, allocating computing resources to the tasks, starting the built-in data annotation tool, creating a mount path for tasks in the storage database, setting read and write permissions and execution permissions, running the data annotation task, uploading the data to be marked to the mount path for labeling, and uploading the annotation data to the mount path, and finally obtaining the annotation data from the mount path for model training, and encapsulating it using the application program interface.

Benefits of technology

It reduces the development and maintenance difficulty of Label Studio labeled data synchronization to the AI platform, improves the efficiency and accuracy of labeled data synchronization, ensures the consistency and accuracy of data on different platforms, reduces dependence on specific programming languages and libraries, and simplifies the maintenance process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256169B_ABST
    Figure CN120256169B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and storage medium for synchronizing annotated data, which relates to the field of artificial intelligence technology. The method includes storing the data annotation tasks submitted by users in a storage database, allocating computing resources for the data annotation tasks, and encapsulating the data annotation tasks through an application program interface; starting a data annotation tool; creating a mount path for the data annotation tasks in the storage database, setting the artificial intelligence platform and the data annotation tool to have read, write and execute permissions for the mount path; running the data annotation task, uploading the data to be annotated to the mount path, so that the data annotation tool obtains the data to be annotated from the mount path for annotation, and uploads the annotated data to the mount path; obtaining the annotated data from the mount path, and performing model training based on the annotated data. The method solves the technical problem of high difficulty in developing and maintaining the annotated data synchronization method in the related art, and achieves the technical effect of reducing the difficulty of development and maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to methods, devices, electronic devices, and storage media for synchronizing labeled data. Background Art

[0002] With the advancement of artificial intelligence (AI) technology, the demand for high-quality labeled data continues to grow. Label Studio, an open-source data labeling tool, supports multimodal data labeling. This labeled data can be synchronized with AI platforms for model training. This technology utilizes Label Studio's Python Software Development Kit (SDK) and the AI platform's Python SDK to synchronize Label Studio labeled data with the AI platform.

[0003] However, the method of synchronizing data annotated by Label Studio to the AI platform in related technologies is difficult to develop and maintain. Summary of the Invention

[0004] This application provides a method, device, electronic device and storage medium for synchronizing labeled data to at least solve the problem of high difficulty in developing and maintaining the method of synchronizing Label Studio labeled data to the AI platform in the related art.

[0005] This application provides a method for synchronizing annotation data, including:

[0006] Receive data annotation tasks submitted by users, call the storage interface, store the data annotation tasks in the storage database, and allocate computing resources for the data annotation tasks. The data annotation tasks are encapsulated through the application program interface;

[0007] Start the built-in data annotation tool;

[0008] Create a mount path for storing data annotation tasks in the database, and set the AI platform and data annotation tools to have read, write, and execute permissions on the mount path;

[0009] Run the data labeling task and upload the data to be labeled to the mount path. This allows the data labeling tool to obtain the data to be labeled from the mount path, label the data to be labeled, and upload the labeled data to the mount path.

[0010] Get the labeled data from the mount path and perform model training based on the labeled data.

[0011] This application also provides a device for synchronizing annotation data, including:

[0012] The receiving module is used to receive data annotation tasks submitted by users, call the storage interface, store the data annotation tasks in the storage database, and allocate computing resources for the data annotation tasks. The data annotation tasks are encapsulated through the application program interface;

[0013] Startup module, used to start the built-in data annotation tool;

[0014] Create a module to create a mount path for storing data annotation tasks in the database, and set the AI platform and data annotation tools to have read, write, and execute permissions on the mount path;

[0015] The running module is used to run the data labeling task, upload the data to be labeled of the data labeling task to the mount path, so that the data labeling tool can obtain the data to be labeled from the mount path, label the data to be labeled, and upload the labeled data to the mount path;

[0016] The acquisition module is used to obtain labeled data from the mount path and perform model training based on the labeled data.

[0017] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned annotation data synchronization methods when executing the computer program.

[0018] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned annotation data synchronization methods are implemented.

[0019] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned annotation data synchronization methods when executed by a processor.

[0020] Through this application, due to receiving data labeling tasks submitted by users, calling the storage interface, storing the data labeling tasks in the storage database, and allocating computing resources for the data labeling tasks, wherein the data labeling tasks are encapsulated through the application program interface; starting the built-in data labeling tool; creating a mount path for the data labeling tasks in the storage database, setting the artificial intelligence platform and the data labeling tool to have read, write and execute permissions of the mount path; running the data labeling task, uploading the data to be labeled of the data labeling task to the mount path, so that the data labeling tool obtains the data to be labeled from the mount path, labels the data to be labeled, and uploads the labeled data to the mount path; obtaining the labeled data from the mount path, and performing model training based on the labeled data. By encapsulating the data labeling task using an application program interface, the synchronization of labeled data can be achieved by running the data labeling task. Since the application program interface only requires a tool that can send HyperText Transfer Protocol (HTTP) requests, it reduces the dependence on specific programming languages and libraries. Therefore, it can solve the technical problem of the high difficulty in developing and maintaining the method of synchronizing the data labeled by Label Studio to the AI platform in the related technology, and achieve the technical effect of reducing the difficulty in developing and maintaining the method of synchronizing the data labeled by Label Studio to the AI platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0022] Figure 1 A schematic diagram of the structure of a labeling data synchronization system provided in an embodiment of the present application;

[0023] Figure 2 A flowchart of a method for synchronizing annotation data provided in an embodiment of the present application;

[0024] Figure 3 A flowchart for creating a data annotation task provided in an embodiment of the present application;

[0025] Figure 4 A flowchart of another method for synchronizing annotated data provided in an embodiment of the present application;

[0026] Figure 5 An interactive diagram for synchronizing data annotated by a data annotation tool to an AI platform, provided in an embodiment of the present application;

[0027] Figure 6A schematic diagram of the structure of a device for synchronizing annotation data provided in an embodiment of the present application;

[0028] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0030] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.

[0031] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0032] With the widespread application of artificial intelligence (AI) in fields such as autonomous driving, medical imaging, and industrial quality inspection, the demand for high-quality labeled data is growing exponentially. When developing AI projects, companies and research institutions are increasingly prioritizing the quality and efficiency of data labeling, as well as the seamless integration of labeled data with subsequent model training and evaluation.

[0033] As a comprehensive tool for AI development, the AI platform provides a one-stop work environment for everything from data management to model training, evaluation, and deployment. Throughout this process, high-quality labeled data is the foundation of model training and directly determines the success of AI projects.

[0034] Label Studio is an open-source data labeling tool that supports annotation of various data types, including text, images, and audio. It provides a rich set of labeling features and a user-friendly interface, helping users quickly and efficiently complete data labeling tasks. However, the labeled data generated by Label Studio must be used in conjunction with an AI platform to complete model training. Therefore, synchronizing the labeled data generated by Label Studio with the AI platform to complete model training is essential for ensuring both accurate and efficient model training.

[0035] In related technologies, when synchronizing Label Studio annotated data to an AI platform, the Label Studio Python SDK is commonly used. As a powerful open source data annotation tool, Label Studio provides developers with the Label Studio Python SDK, which allows developers to easily establish a connection between the AI platform and the Label Studio server. Specifically, by configuring the necessary information such as the Uniform Resource Locator (URL) and Application Programming Interface (API) key of the Label Studio server in a Python script or application, the connection process is completed and the annotated data is obtained.

[0036] Once the AI platform is successfully connected to the Label Studio server, developers can retrieve various types of labeled data objects by calling various methods in the Label Studio Python SDK. These labeled data objects contain detailed information about the task, such as the task identifier (ID), annotator information, and the labeling results. Based on these labeled data objects, developers can perform a variety of operations and processing, such as filtering labeling results for specific tasks, converting the labeling results to the format required by the AI platform, or extracting key information.

[0037] However, simply acquiring and processing Label Studio's labeled data isn't enough to synchronize data with an AI platform. This requires integration with the AI platform's Python SDK or third-party libraries. Different AI platforms provide their own Python SDKs to facilitate integration. Developers can use these AI platform's Python SDKs or third-party libraries to upload data acquired from Label Studio to the target AI platform. However, the upload process must adhere to the data format and interface specifications specified by the target AI platform.

[0038] It can be seen that in the relevant technology, by writing scripts in the Python environment and connecting the Label Studio Python SDK and the AI platform's Python SDK, the data annotated by Label Studio can be synchronized to the AI platform.

[0039] However, this approach requires developers to master the Label Studio Python SDK and the target platform's Python SDK, and be familiar with their API documentation and usage. This involves different concepts, data structures, and operational processes, creating a steep learning curve for novices, which can take considerable time and effort to master. Furthermore, manually exporting data files from Label Studio and then importing them into the AI platform results in inefficient data synchronization and low data accuracy.

[0040] Synchronizing Label Studio-annotated data to the AI platform requires writing code to complete multiple steps, including data acquisition, processing, conversion, and upload. To meet the requirements of different platforms, complex data format conversion and error handling logic may also be required. As functionality increases and requirements change, the code becomes increasingly complex, making it increasingly difficult to maintain and expand.

[0041] Python SDKs often rely on multiple third-party libraries, which can have version compatibility issues. This can lead to code errors in different development and production environments due to inconsistent library versions. Furthermore, when a dependent library is updated, the code must be adjusted and tested accordingly, increasing the development and maintenance workload.

[0042] To solve the above technical problems, the embodiments of the present application provide a method, device, electronic device and storage medium for synchronizing annotated data. The method for synchronizing annotated data includes: receiving a data annotation task submitted by a user, calling a storage interface, storing the data annotation task in a storage database, and allocating computing resources for the data annotation task, wherein the data annotation task is encapsulated through an application program interface; starting a built-in data annotation tool; creating a mount path for the data annotation task in the storage database, and setting the artificial intelligence platform and the data annotation tool to have read, write and execute permissions for the mount path; running the data annotation task, uploading the data to be annotated of the data annotation task to the mount path, so that the data annotation tool obtains the data to be annotated from the mount path, annotates the data to be annotated, and uploads the annotated data to the mount path; obtaining the annotated data from the mount path, and performing model training based on the annotated data. The method provided by the above solution encapsulates the data labeling task using an application program interface, and can realize the synchronization of labeled data by running the data labeling task. Since the application program interface only requires a tool that can send HTTP requests, it reduces the dependence on specific programming languages and libraries. Therefore, it can solve the technical problem of high difficulty in developing and maintaining the method of synchronizing the data labeled by Label Studio to the AI platform in the related technology, and achieve the technical effect of reducing the difficulty of developing and maintaining the data labeled by Label Studio to the AI platform.

[0043] And the application program interface usually maintains a certain degree of stability and backward compatibility. Therefore, when the application program interface is updated, developers only need to make corresponding adjustments to the application program interface according to the new API documentation. Unlike using the Python SDK, there is no need to wait for the Python SDK to be updated and perform complex version upgrades before it can be used. This makes it easier to maintain and upgrade when updating the application program interface, where the application program interface is the API.

[0044] Furthermore, API calls are lightweight operations based on the HTTP protocol, eliminating the need to load the entire SDK library like using the Python SDK. When synchronizing large amounts of annotation data, API calls offer faster response times, reducing unnecessary resource consumption and improving the efficiency of annotation data synchronization.

[0045] Since application interface calls are based on HTTP requests, developers can easily implement parallel processing and send multiple requests simultaneously to obtain and synchronize annotation data, thereby fully utilizing the system's multi-core processors and network bandwidth to further improve the performance of annotation data synchronization.

[0046] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the annotation data synchronization method depends, the specific application environment architecture or specific hardware architecture is described here.

[0047] The labeling data synchronization method, device, electronic device and storage medium provided in the embodiments of the present application are suitable for synchronizing the labeling data of Label Studio to the AI platform. Figure 1 As shown, this is a structural diagram of the annotation data synchronization system based on this application, which includes an artificial intelligence platform and a data annotation tool, wherein the artificial intelligence platform is used to receive data annotation tasks submitted by users, call the storage interface, store the data annotation tasks in the storage database, and allocate computing resources for the data annotation tasks, wherein the data annotation tasks are encapsulated through the application program interface; start the built-in data annotation tool, create a mount path for the data annotation tasks in the storage database, and set the artificial intelligence platform and the data annotation tool to have read, write and execute permissions on the mount path; run the data annotation task, upload the data to be annotated of the data annotation task to the mount path, so that the data annotation tool obtains the data to be annotated from the mount path, annotates the data to be annotated, and uploads the annotated data to the mount path; obtains the annotated data from the mount path, and performs model training based on the annotated data. It can be understood that the data annotation tool is built into the artificial intelligence platform in the form of a data annotation tool image, and the built-in data annotation tool is started by starting the built-in data annotation tool image.

[0048] The embodiment of the present application provides a method for synchronizing annotated data, which is applied to an AI platform. Figure 2 A flowchart of the method for synchronizing annotation data provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the process includes:

[0049] Step S201: receive a data labeling task submitted by a user, call a storage interface, store the data labeling task in a storage database, and allocate computing resources for the data labeling task, wherein the data labeling task is encapsulated through an application program interface.

[0050] Figure 3 This is a flowchart for creating a data annotation task provided in the embodiment of this application. Figure 3 As shown in the figure, when a user submits a data annotation task to the AI platform, the data annotation task needs to be created in the AI platform. First, the storage interface is called to store the data annotation task in the storage database and computing resources are allocated for the data annotation task. Figure 3 Not shown.

[0051] It should be noted that the storage interface is the istorage interface. Istorage is a storage service. Data labeling tasks consist of multiple projects. Storing data labeling tasks in a storage database involves storing the data labeling tasks and their projects in an istorage database table. Computing resources include central processing unit (CPU) resources and graphics processing unit (GPU) resources.

[0052] Step S202: Start the built-in data annotation tool.

[0053] Then, start the data annotation tool image built into the AI platform to start the data annotation tool built into the AI platform. The data annotation tool is Label Studio. Figure 3 Not shown.

[0054] It is understandable that users select Label Studio image to start in the development environment.

[0055] Step S203: Create a mount path for storing the data annotation task in the database, and set the artificial intelligence platform and data annotation tool to have read, write, and execute permissions on the mount path.

[0056] Finally, create a mount path for the data labeling task in the storage database and set the AI platform and LabelStudio to have read, write, and execute permissions on the mount path. That is, set the permissions of the mount path to 775. The first 7 in 775 represents the permissions of the file owner (User), which means read, write, and execute permissions. The second 7 represents the permissions of the group to which the file belongs (Group), which means users in the group to which the file belongs also have read, write, and execute permissions. The third 5 represents the permissions of others (Others), which means read and execute permissions but not write permissions.

[0057] After the above steps S201 to S203 are completed, the data annotation task is created on the AI platform by calling the resource (iresource) interface.

[0058] Step S204: run the data labeling task, upload the data to be labeled of the data labeling task to the mount path, so that the data labeling tool obtains the data to be labeled from the mount path, labels the data to be labeled, and uploads the labeled data to the mount path.

[0059] It should be noted that after the AI platform completes the creation of the data labeling task, it runs the data labeling task to complete the connection between the AI platform and the data labeling tool and synchronize the data labeled by the data labeling tool to the AI platform.

[0060] It is understandable that the data to be labeled includes the data to be labeled in each project in the data labeling task. The AI platform creates a data synchronization form by calling the underlying API interface of the data labeling tool to inform the data labeling tool which data needs to be processed. The AI platform's iStorage service calls the local storage data synchronization API to synchronize the data to be labeled in the data labeling task to the mount path according to the project to which it belongs. At the same time, a local data synchronization function is created in Label Studio. After starting the local data synchronization function, Label Studio scans the data to be labeled under the mount path and lists all the data to be labeled that can be synchronized to Label Studio, that is, the synchronization list. Based on the synchronization list, the data to be labeled is obtained from the mount path and synchronized to the corresponding project in Label Studio.

[0061] The AI platform's iStorage service calls the data synchronization API interface for the data to be labeled to track LabelStudio's processing progress on the labeled data in real time.

[0062] The AI platform calls the data annotation tool's Export Annotation Results API at preset intervals, causing the tool to upload the incremental annotation data generated during the preset period to the mount path. The preset period is set by the technician and is not specifically limited here. For example, the preset period is 10 seconds. The data annotation task includes the data annotation tool's Export Annotation Results API.

[0063] As you can understand, the AI platform can call the data annotation tool's Export Annotation Results API to select and export the annotated data corresponding to the unannotated data for one or more projects in the data annotation task to the mount path. This means that the API allows for flexible configuration of data synchronization parameters and rules, such as synchronization frequency and data filtering criteria. Administrators can adjust these configurations at any time to meet business needs at different stages.

[0064] Step S205: Obtain the labeled data from the mount path, and perform model training based on the labeled data.

[0065] The labeled data is obtained from the mount path at intervals of a preset time period to obtain the latest labeled data, and the model training is performed based on the latest labeled data.

[0066] The AI platform calls the AI platform's import labeled data API to obtain labeled data from the mount path and performs model training based on the labeled data. The data labeling task includes the import labeled data API.

[0067] The annotation data synchronization method provided in the embodiment of the present application, by means of API interfaces, including import annotation data API and export annotation result API interfaces, builds a data high-speed channel between Label Studio and the AI platform, automatically synchronizes the annotation data to the AI platform, avoids the manual import / export process, saves a lot of time and energy, and improves efficiency, especially when processing large-scale annotation data. And after the data annotation tool completes the new annotation data or modifies the existing annotation data, it can immediately synchronize the updated annotation data to the mount path through the API interface, and then synchronize it to the AI platform, so that the AI platform always uses the latest annotation data for model training and optimization, avoiding problems such as model training errors or inaccurate evaluations due to data inconsistency, ensuring the consistency and accuracy of the annotation data at different stages and on different platforms, and accelerating the AI development process.

[0068] And because the application interface only requires a tool that can send HTTP requests, it reduces dependence on specific programming languages and libraries. Therefore, it can solve the technical problem of high difficulty in developing and maintaining the method of synchronizing Label Studio-annotated data to the AI platform in related technologies, and achieve the technical effect of reducing the difficulty of developing and maintaining the method of synchronizing Label Studio-annotated data to the AI platform.

[0069] The API ensures that no information is lost during the transmission of labeled data, completely synchronizing the labeled data from LabelStudio to the AI platform. Furthermore, the labeled data can be verified and corrected during the transmission process, further ensuring data quality. Real-time labeled data synchronization and accurate data quality ensure that the AI platform's models can be trained and optimized more efficiently, improving model performance and effectiveness while reducing the additional costs associated with model inaccuracies.

[0070] The embodiment of the present application provides a method for synchronizing annotated data, which is applied to an AI platform. Figure 4 A flowchart of the method for synchronizing annotation data provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the process includes:

[0071] Step S401: Receive the data annotation task submitted by the user, call the storage interface, store the data annotation task in the storage database, and allocate computing resources for the data annotation task. The data annotation task is encapsulated through the application program interface. Figure 2Step S201 of the illustrated embodiment will not be described in detail here.

[0072] Step S402: Start the built-in data annotation tool. Figure 2 Step S202 of the illustrated embodiment will not be described in detail here.

[0073] Step S403: Create a target mount path for the data annotation task in the storage database, and set the artificial intelligence platform and data annotation tool to have read, write, and execute permissions on the target mount path. Figure 2 Step S203 of the illustrated embodiment will not be described in detail here.

[0074] Step S404: run the data labeling task, upload the data to be labeled of the data labeling task to the target mount path, so that the data labeling tool obtains the data to be labeled from the mount path, labels the data to be labeled, and uploads the labeled data to the mount path.

[0075] Specifically, the above step S404 includes:

[0076] Step S4041, run the data labeling task, upload the data to be labeled of the data labeling task to the mount path, redirect the data labeling task to the data labeling tool address, so that the data labeling tool automatically executes the data labeling task, obtains the data to be labeled from the mount path, labels the data to be labeled, and uploads the labeled data to the mount path.

[0077] It should be noted that after running the data labeling task, the underlying layer will automatically redirect the data labeling task to the Label Studio address, and the address redirection will be performed by iStorage. At the same time, the redirected address is the project list of Label Studio.

[0078] Step S405: Obtain the labeled data from the mount path and perform model training based on the labeled data. Figure 2 Step S205 of the illustrated embodiment will not be described in detail here.

[0079] The annotated data synchronization method provided in the embodiments of this application enables the data annotation tool to automatically obtain the data to be annotated from the mount path without manual intervention, reducing the time and errors of manual operations. After the annotation is completed, the annotated data is automatically uploaded to the mount path, realizing the automation of the entire process and improving overall efficiency.

[0080] In some optional implementations, while starting the built-in data annotation tool, the annotated data synchronization method further includes:

[0081] Step a1: Inject the user authentication information of the artificial intelligence platform as an environment variable into the data annotation tool so that the permissions of the users of the artificial intelligence platform in the data annotation tool are consistent with their permissions on the artificial intelligence platform.

[0082] User authentication information includes username, password, user authentication information (token), etc. The AI platform can use this token to call the API of the data annotation tool to implement functions such as project creation and synchronous storage.

[0083] The annotated data synchronization method provided in this application embodiment reduces the need for repeated configuration of user permissions by injecting user authentication information as environment variables into the data annotation tool. The consistent permission design effectively prevents unauthorized behavior and ensures that users can only access and operate the data and functions for which they are authorized.

[0084] In some optional implementations, before performing model training based on the labeled data, the labeled data synchronization method further includes:

[0085] Step b1: Map the labeled data into a data format that meets the requirements of the artificial intelligence platform.

[0086] The labeled data exported by the data labeling tool is JSON data. The labeled data is parsed and mapped to the data format required by the AI platform.

[0087] Label Studio and various AI platforms may use different data formats and storage methods. The annotation data synchronization method provided in the embodiments of the present application converts and adapts the annotation data exported by the data annotation tool to ensure the smooth flow of data between Label Studio and the AI platform, thereby improving the compatibility and integration of the system and solving the problem of differences in data formats and communication protocols between Label Studio and different AI platforms.

[0088] In some optional implementations, before uploading the unlabeled data of the data labeling task to the target mount path, the labeled data synchronization method further includes:

[0089] Step c1: determine whether the file extension of the data to be labeled meets the preset file extension requirements.

[0090] The preset file extensions are required to be set by the technicians and include multiple file extensions. The data to be annotated exists in the form of files.

[0091] Step c2: If the file extension of the data to be annotated meets the preset file extension requirement, it is determined whether the naming of the data to be annotated meets the preset naming specification.

[0092] It is understandable that if the file extension of the data to be labeled does not meet the preset file extension requirement, the file that does not meet the preset file extension requirement in the data to be labeled will be deleted.

[0093] Step c3: if the naming of the data to be annotated does not conform to the preset naming specification, the data to be annotated is renamed based on the preset naming specification.

[0094] Among them, the preset naming convention is set by technical personnel.

[0095] Step c4: Obtain the hash value corresponding to each file in the data to be labeled that conforms to the preset naming specification or the renamed data to be labeled.

[0096] Step c5: determine whether there are at least two files with the same hash value.

[0097] Step c6: If there are at least two files with the same hash value, one of the at least two files with the same hash value is retained, and the remaining files of the at least two files with the same hash value are deleted.

[0098] Among them, if the hash values corresponding to at least two files are the same, it means that there are duplicate files in the data to be labeled. In this case, only one of the duplicate files needs to be retained, and the redundant files in the duplicate files are deleted.

[0099] Step c7: performing integrity check on each file in the data to be labeled that conforms to the preset naming specification or the renamed data to be labeled.

[0100] In step c8, for any file in the data to be labeled that conforms to the preset naming specification or the renamed data to be labeled, if the file fails the integrity check, the file is determined to be a damaged file.

[0101] Step c9: deleting the data to be annotated that conforms to the preset naming specification or the damaged files in the renamed data to be annotated.

[0102] The annotation data synchronization method provided in the embodiment of the present application ensures the correctness of the data format of the data to be annotated, improves the naming consistency of the data to be annotated, reduces the redundant data of the data to be annotated, ensures the data integrity of the data to be annotated, and improves the accuracy of the annotation of the data to be annotated.

[0103] In some optional implementations, the above step S201 includes:

[0104] Step d1: Obtain the amount of data to be labeled and the labeling complexity of the data labeling task.

[0105] The labeling complexity of the data labeling task is determined based on the type of the data to be labeled in the data labeling task, and a corresponding relationship between the type of the data to be labeled and the labeling complexity is preset.

[0106] Step d2: Allocate computing resources to the data labeling task based on the amount of data to be labeled and the labeling complexity of the data labeling task;

[0107] The more data to be labeled and the higher the complexity of labeling, the more computing resources will be allocated.

[0108] Specifically, based on the amount of data to be labeled in the data labeling task, the first computing resources allocated to the data labeling task are determined; based on the labeling complexity of the data labeling task, the second computing resources allocated to the data labeling task are determined; based on the first computing resources and the second computing resources, the total computing resources allocated to the data labeling task are determined.

[0109] When the amount of data to be labeled in the data labeling task exceeds a first data amount threshold, the first computing resource allocated to the data labeling task is determined to be a third computing resource.

[0110] When the amount of data to be annotated for the data annotation task exceeds a second data volume threshold, the first computing resource allocated to the data annotation task is determined to be a fourth computing resource, wherein the first data volume threshold is less than the second data volume threshold, and the third computing resource is less than the fourth computing resource.

[0111] When the labeling complexity of the data labeling task exceeds the preset complexity, the second computing resource allocated to the data labeling task is determined to be the fifth computing resource.

[0112] When the labeling complexity of the data labeling task does not exceed the preset complexity, the second computing resource allocated to the data labeling task is determined to be the sixth computing resource, wherein the fifth computing resource is greater than the sixth computing resource.

[0113] The labeled data synchronization method provided in the embodiment of the present application realizes resource allocation for data labeling tasks based on the amount of data to be labeled and the labeling complexity of the data labeling tasks, thereby improving resource utilization and enhancing the execution efficiency of data labeling tasks.

[0114] In some optional implementations, the above step S204 includes:

[0115] Step e1: determine whether the amount of data to be labeled in the data labeling task is greater than a preset data amount threshold.

[0116] The preset data volume threshold is set by technical personnel and is not specifically limited here.

[0117] Step e2: if the amount of the data to be labeled in the data labeling task is greater than a preset data amount threshold, the data to be labeled is divided into a plurality of data blocks to be labeled.

[0118] It is understandable that the data to be labeled can be evenly divided into multiple data blocks to be labeled.

[0119] Step e3: encrypt each data block to be marked.

[0120] Step e4: compress the multiple encrypted data blocks to be marked to obtain compressed data blocks to be marked.

[0121] Step e5: Upload the compressed data blocks to be labeled to the mount path.

[0122] It is understandable that the data annotation tool obtains the compressed data block to be annotated, decompresses and decrypts it, and then annotates the data to be annotated.

[0123] In order to make the annotation data synchronization method provided in the embodiment of the present application clearer, Figure 5 To explain, Figure 5 The interactive diagram for synchronizing the data annotated by the data annotation tool to the AI platform provided in the embodiment of this application is not shown in the diagram. The interactive process after running the data annotation task is described. Figure 5 As shown, the interaction process includes:

[0124] On the AI platform interface, users click on the data annotation task name to enter the task details interface, where they can view detailed information about the data annotation task. The AI platform interface provides users with quick instructions for using the data annotation tool to help new users understand the basic operation process.

[0125] The task details interface includes a list of all projects under the task. This list displays all specific projects included in the current data annotation task. This list can be obtained by calling the istorage project interface in the istorage service. The istorage project interface retrieves the list of all projects under the task by calling the project list interface in the data annotation tool. This list allows users to understand the specific work content of the data annotation task and select actions to take.

[0126] The task details interface also includes a local storage synchronization interface, where users initiate a request to synchronize locally stored data, i.e., data to be annotated, to the mount path. The data to be annotated is synchronized to the mount path by calling the istorage local storage list and synchronization interface in the istorage service. The istorage local storage list and synchronization interface synchronize the data to be annotated to the data annotation tool by calling the local storage list and synchronization interface in the data annotation tool. This means that the data annotation tool obtains the data to be annotated from the mount path.

[0127] The task details interface also includes an annotation data export interface, where users initiate an annotation data export request and obtain the annotation data from the mount path by calling the istorage annotation data export interface in the istorage service. The istorage annotation data export interface obtains the annotation data from the mount path by calling the annotation data export interface in the data annotation tool.

[0128] This embodiment of the application uses Label Studio's API to obtain the annotation data for a specified project and converts the data obtained from Label Studio to meet the requirements of the AI platform. The converted data is uploaded to the AI platform using the AI platform's import API, completing the data acquisition, conversion, and upload operations. This achieves the goal of synchronizing the annotation data generated in Label Studio to the AI platform, enabling direct transmission of the annotation data and avoiding the intermediate steps of manual export / import.

[0129] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.

[0130] The embodiment of the present application also provides a device for synchronizing annotation data, such as Figure 6 As shown, including:

[0131] The receiving module 601 is used to receive the data labeling task submitted by the user, call the storage interface, store the data labeling task in the storage database, and allocate computing resources for the data labeling task, wherein the data labeling task is encapsulated through the application program interface.

[0132] The startup module 602 is used to start the built-in data annotation tool.

[0133] A creation module 603 is used to create a mount path for the data annotation task in the storage database, and set the artificial intelligence platform and data annotation tool to have read, write and execute permissions on the mount path.

[0134] The running module 604 is used to run the data labeling task, upload the data to be labeled of the data labeling task to the mount path, so that the data labeling tool obtains the data to be labeled from the mount path, labels the data to be labeled, and uploads the labeled data to the mount path.

[0135] The acquisition module 605 is used to obtain the labeled data from the mount path and perform model training based on the labeled data.

[0136] In some optional implementations, the operation module 604 includes:

[0137] The running unit is used to run the data labeling task, upload the data to be labeled of the data labeling task to the mount path, redirect the data labeling task to the data labeling tool address, so that the data labeling tool automatically executes the data labeling task, obtains the data to be labeled from the mount path, labels the data to be labeled, and uploads the labeled data to the mount path.

[0138] In some optional implementations, the annotation data synchronization apparatus further includes:

[0139] The injection unit is used to inject the user authentication information of the artificial intelligence platform into the data annotation tool as an environment variable, so that the permissions of the users of the artificial intelligence platform in the data annotation tool are consistent with their permissions in the artificial intelligence platform.

[0140] In some optional implementations, the annotation data synchronization apparatus further includes:

[0141] The mapping unit is used to map the labeled data into a data format that meets the requirements of the artificial intelligence platform.

[0142] In some optional implementations, the annotation data synchronization apparatus further includes:

[0143] The first judgment unit is used to judge whether the file extension of the data to be marked meets the preset file extension requirement.

[0144] The second judgment unit is configured to judge whether the naming of the data to be labeled complies with a preset naming specification if the file extension of the data to be labeled complies with a preset file extension requirement.

[0145] The renaming unit is used to rename the data to be annotated based on the preset naming specification if the naming of the data to be annotated does not conform to the preset naming specification.

[0146] The first acquisition unit is used to obtain the hash value corresponding to each file in the data to be labeled that conforms to a preset naming specification or the renamed data to be labeled.

[0147] The third judgment unit is used to judge whether there are at least two files with the same hash value.

[0148] The first deleting unit is configured to retain one of the at least two files with the same Hash value if there are at least two files with the same Hash value, and delete the remaining files of the at least two files with the same Hash value.

[0149] The verification unit is used to perform integrity verification on each file in the data to be labeled that meets the preset naming specification or the renamed data to be labeled.

[0150] The determination unit is used to determine that any file in the data to be labeled that meets the preset naming specification or the renamed data to be labeled is a damaged file if the file fails to pass the integrity check.

[0151] The second deleting unit is used to delete the data to be labeled that meets the preset naming specification or the damaged files in the renamed data to be labeled.

[0152] In some optional implementations, the receiving module 601 includes:

[0153] The second acquisition unit is used to obtain the amount of data to be labeled and the labeling complexity of the data labeling task.

[0154] The allocation unit is used to allocate computing resources to the data labeling task based on the amount of data to be labeled and the labeling complexity of the data labeling task.

[0155] The more data to be labeled and the higher the complexity of labeling, the more computing resources will be allocated.

[0156] In some optional implementations, the operation module 604 includes:

[0157] The fourth judgment unit is used to judge whether the data volume of the to-be-annotated data of the data annotation task is greater than a preset data volume threshold.

[0158] The division unit is used to divide the data to be labeled into multiple data blocks to be labeled if the data volume of the data to be labeled of the data labeling task is greater than a preset data volume threshold.

[0159] The encryption unit is used to encrypt each data block to be marked.

[0160] The compression unit is used to compress the plurality of encrypted data blocks to be marked to obtain compressed data blocks to be marked.

[0161] The upload unit is used to upload the compressed data blocks to be labeled to the mount path.

[0162] For the description of the features in the embodiment corresponding to the annotation data synchronization device, please refer to the relevant description of the embodiment corresponding to the annotation data synchronization method, which will not be repeated here.

[0163] The embodiment of the present application also provides an electronic device, such as Figure 7 As shown, it includes a processor 701 and a memory 702, wherein the memory 702 stores a computer program, and the processor 701 is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the annotation data synchronization method.

[0164] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned annotation data synchronization method embodiments when running.

[0165] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0166] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned annotation data synchronization method embodiments are implemented.

[0167] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of any of the above-mentioned annotation data synchronization method embodiments.

[0168] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0169] The above is a detailed introduction to a method, device, electronic device and storage medium for synchronizing annotation data provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A method for synchronizing annotation data, characterized in that: include: Receive data annotation tasks submitted by users, call the storage interface, store the data annotation tasks in the storage database, and allocate computing resources for the data annotation tasks, wherein the data annotation tasks are encapsulated through application programming interfaces (APIs), which include an import annotation data API and an export annotation result API; Start the built-in data annotation tool; Create a mount path for storing the data annotation task in the database, and set the artificial intelligence platform and data annotation tool to have read, write, and execute permissions on the mount path; Running the data annotation task, uploading the data to be annotated of the data annotation task to the mount path, so that the data annotation tool obtains the data to be annotated from the mount path, annotates the data to be annotated, and uploads the annotated data to the mount path, wherein uploading the annotated data to the mount path includes: synchronizing the annotated data to the mount path through an application program interface; The labeled data is obtained from the mount path, and model training is performed based on the labeled data.

2. The method according to claim 1, characterized in that The running of the data labeling task, uploading the data to be labeled of the data labeling task to the mount path, so that the data labeling tool obtains the data to be labeled from the mount path, labels the data to be labeled, and uploads the labeled data to the mount path, includes: Run the data labeling task, upload the data to be labeled of the data labeling task to the mount path, redirect the data labeling task to the data labeling tool address so that the data labeling tool automatically executes the data labeling task, obtains the data to be labeled from the mount path, labels the data to be labeled, and uploads the labeled data to the mount path.

3. The method according to claim 1, characterized in that While starting the built-in data annotation tool, the method further includes: Inject the user authentication information of the artificial intelligence platform as an environment variable into the data annotation tool so that the permissions of the users of the artificial intelligence platform in the data annotation tool are consistent with their permissions on the artificial intelligence platform.

4. The method according to claim 1, wherein Before performing model training based on the labeled data, the method further includes: Map the labeled data into a data format that meets the requirements of the artificial intelligence platform.

5. The method according to claim 1, wherein Before uploading the data to be labeled of the data labeling task to the mounting path, the method further includes: Determine whether the file extension of the data to be labeled meets the preset file extension requirements; If the file extension of the data to be annotated meets the preset file extension requirement, then determining whether the naming of the data to be annotated meets the preset naming specification; If the naming of the data to be annotated does not conform to the preset naming specification, renaming the data to be annotated based on the preset naming specification; Obtain the hash value corresponding to each file in the data to be annotated that conforms to the preset naming specification or the renamed data to be annotated; Determine whether there are at least two files with the same hash value; If there are at least two files with the same hash value, keep one of the at least two files with the same hash value, and delete the remaining files of the at least two files with the same hash value; Perform integrity check on each file in the data to be annotated that complies with the preset naming specifications or the renamed data to be annotated; For any file in the data to be annotated that complies with the preset naming specification or the renamed data to be annotated, if the file fails the integrity check, the file is determined to be a damaged file; Delete the data to be labeled that meets the preset naming specification or the damaged files in the renamed data to be labeled.

6. The method according to claim 1, wherein Allocating computing resources for the data labeling task includes: Obtaining the amount of data to be labeled for the data labeling task and the labeling complexity of the data labeling task; Allocating computing resources to the data labeling task based on the amount of data to be labeled and the labeling complexity of the data labeling task; The more data to be labeled and the higher the complexity of labeling, the more computing resources will be allocated.

7. The method according to claim 1, characterized in that The uploading of the data to be annotated of the data annotation task to the mounting path includes: Determine whether the amount of data to be annotated in the data annotation task is greater than a preset data amount threshold; If the amount of the data to be labeled of the data labeling task is greater than a preset data amount threshold, dividing the data to be labeled into a plurality of data blocks to be labeled; Performing encryption processing on each of the data blocks to be marked respectively; Compressing the plurality of encrypted data blocks to be marked to obtain compressed data blocks to be marked; The compressed data block to be labeled is uploaded to the mount path.

8. A device for synchronizing annotation data, characterized in that: include: A receiving module is used to receive data annotation tasks submitted by users, call a storage interface, store the data annotation tasks in a storage database, and allocate computing resources for the data annotation tasks, wherein the data annotation tasks are encapsulated through application programming interfaces (APIs), including an import annotation data API and an export annotation result API; Startup module, used to start the built-in data annotation tool; A creation module is used to create a mount path for storing the data annotation task in the database, and to set the artificial intelligence platform and data annotation tool to have read, write, and execute permissions on the mount path; A running module, configured to run the data labeling task, upload the data to be labeled of the data labeling task to the mount path, so that the data labeling tool obtains the data to be labeled from the mount path, labels the data to be labeled, and uploads the labeled data to the mount path, wherein uploading the labeled data to the mount path includes: synchronizing the labeled data to the mount path through an application program interface; An acquisition module is used to obtain the labeled data from the mount path and perform model training based on the labeled data.

9. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the annotation data synchronization method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the annotation data synchronization method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data labeling method and device

    CN114090534A

  • Task processing method, system and platform and automatic question answering method

    CN116431316A