A stepless tagging method based on uniform resource identifier
Through the stepless annotation method based on unified resource identifiers, the problems of single functions and poor flexibility of existing annotation tools are solved, and flexible annotation of multi-field and multi-grained data are achieved, which improves the labeling efficiency and accuracy.
Patent Information
- Application Number
- CN202411718891.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-11-28
AI Technical Summary
The existing annotation tool has a single function and cannot meet the annotation needs in multiple fields at the same time, resulting in manual adjustment and configuration of cross-grained annotation, which increases the complexity and workload of the annotation work.
Using a stepless annotation method based on a unified resource identifier (URI), by obtaining the data resources to be marked and determining their resource identifiers, labeling the target annotation object according to the preset annotation method, and generating annotation identifiers, which flexibly adapts to For labeling requirements of different granularity, index data of data resources is generated to characterize the correspondence between the labeling identifier and the resource identifier.
Stepless annotation of multi-field and multi-grained data is realized, which avoids the complexity of manual adjustment and configuration, improves the efficiency and accuracy of data annotation, and significantly reduces labor and time costs.
Smart Images

Figure CN119202731B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data annotation technology, and specifically relates to a stepless annotation method, device, equipment and storage medium based on a uniform resource identifier. Background Art
[0002] With the rapid development of artificial intelligence technology, intelligent models are being used more and more widely in various fields. In order to improve the performance and accuracy of the model, the amount of data and data quality required for model training are also increasing. Especially in fields such as computer vision and natural language processing, high-quality training data sets are crucial for model training. However, building these training data sets usually requires a lot of manpower and time investment. Existing annotation tools have many limitations in function and applicability, and it is difficult to meet the needs of multi-field and multi-granular data annotation.
[0003] At present, there are many open source annotation tools on the market, which are mainly used for annotation of image, text and other data. For example, the annotation tools commonly used in the field of computer vision can be used to classify images, detect targets, and so on. The annotation tools in the field of natural language processing can be used to annotate texts for named entity recognition, sentiment analysis, and so on.
[0004] However, these tools have single functions and cannot meet the annotation needs of multiple fields at the same time, which limits their scope of application. Therefore, when processing annotations of different granularities, they lack flexibility and cannot achieve imperceptible cross-granularity annotation. Manual adjustment and configuration are often required, which increases the complexity and workload of the annotation work. Summary of the invention
[0005] The present application aims to provide a stepless labeling method, apparatus, device and storage medium for resource identifiers, at least to solve the problem that cross-granularity labeling requires manual adjustment and configuration due to the inability to simultaneously meet the labeling requirements of multiple fields during the data labeling process.
[0006] In a first aspect, an embodiment of the present application discloses a stepless tagging method based on a uniform resource identifier, comprising:
[0007] Acquire a data resource to be labeled, and determine a resource identifier of the data resource; the resource identifier is used to characterize the data type of the data resource;
[0008] According to a preset annotation method, in the data resource, a target annotation object corresponding to the annotation method is annotated, and an annotation identifier of each target annotation object in the data resource is generated according to the annotation method; the annotation identifier has a corresponding index code; the length of the index code is positively correlated with the subdivision degree of the annotation method corresponding to the annotation identifier;
[0009] The index data of the data resource is generated according to the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource; the index data is used to characterize the correspondence between the annotation identifier and the resource identifier of each data resource.
[0010] In a second aspect, the embodiment of the present application further discloses a stepless labeling device based on a uniform resource identifier, comprising:
[0011] A resource identification module, used to obtain the data resource to be marked and determine the resource identifier of the data resource; the resource identifier is used to represent the data type of the data resource;
[0012] A labeling identification module is used to label the target labeling object corresponding to the labeling method in the data resource according to a preset labeling method, and generate a labeling identifier for each target labeling object in the data resource according to the labeling method; the labeling identifier has a corresponding index code; the length of the index code is positively correlated with the subdivision degree of the labeling method corresponding to the labeling identifier;
[0013] An index establishment module is used to generate index data of the data resource based on the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource; the index data is used to characterize the correspondence between the annotation identifier and the resource identifier of each data resource.
[0014] In the third aspect, an embodiment of the present application further discloses an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the stepless labeling method based on a uniform resource identifier as described in the first aspect are implemented.
[0015] In a fourth aspect, an embodiment of the present application further discloses a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the stepless labeling method based on a uniform resource identifier as described in the first aspect are implemented.
[0016] In summary, in the embodiment of the present application, by obtaining the data resource to be annotated and determining its resource identifier, the data type of the data resource can be effectively characterized, so that the corresponding annotation method can be adopted for different types of data resources, and then the target annotation object can be annotated according to the preset annotation method, and the annotation identifier can be generated. By flexibly adapting to the annotation requirements of different granularities, the complexity of manual adjustment and configuration required in the prior art is avoided, and imperceptible cross-granularity annotation is realized; then, according to the resource identifier of the data resource and the annotation identifier of all target annotation objects, the index data of the data resource is generated, and the corresponding relationship between the annotation identifier and the resource identifier is clearly characterized, which is convenient for subsequent data retrieval and management. Therefore, based on the method of the embodiment of the present application, by obtaining the data resource and determining its resource identifier, annotating and generating the annotation identifier according to the preset annotation method, and generating the index data of the data resource, the stepless annotation of multi-field and multi-granularity data is realized, which overcomes the defects of the annotation tool in the prior art such as single function, poor flexibility, and manual adjustment and configuration, improves the efficiency and accuracy of data annotation, and significantly reduces the manpower and time costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In the attached picture:
[0018] Figure 1 It is a flowchart of a step-less tagging method based on a uniform resource identifier provided in an embodiment of the present application;
[0019] Figure 2 It is a marking process provided by an embodiment of the present application;
[0020] Figure 3 It is a flowchart of another stepless marking method based on uniform resource identifier provided in an embodiment of the present application;
[0021] Figure 4 is a block diagram of a system under an embodiment of the present application;
[0022] Figure 5 is based on Figure 4 A block diagram of the resource management module of the system block diagram;
[0023] Figure 6 is based on Figure 4 A block diagram of a URI management module of a system block diagram;
[0024] Figure 7 is based on Figure 4 The block diagram of the training set generation module of the system block diagram;
[0025] Figure 8 is based on Figures 4 to 7 A data resource acquisition and labeling process under an embodiment of the present invention;
[0026] Fig. 9 It is a block diagram of a stepless labeling device based on a uniform resource identifier provided in an embodiment of the present application;
[0027] Fig.10 is a block diagram of an electronic device according to an embodiment of the present application;
[0028] Fig.11 It is a block diagram of an electronic device of another embodiment provided by the embodiments of the present application. DETAILED DESCRIPTION
[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0031] Figure 1 This embodiment provides a stepless labeling method based on a uniform resource identifier.
[0032] The method may include the following steps:
[0033] Step 101: Acquire a data resource to be labeled and determine a resource identifier of the data resource.
[0034] The resource identifier is used to represent the data type of the data resource.
[0035] In some embodiments of the present application, data resources to be annotated are obtained, and resource identifiers of these data resources are determined. Resource identifiers are used to characterize the data type of the data resource, such as pictures, text, audio, or video. By determining the resource identifier, basic information can be provided for the subsequent annotation process, so that the system can select an appropriate annotation method according to the data type.
[0036] For example, during the annotation process, the system first collects a batch of image resources from a preset website. These image resources are stored in the resource management module of the system. Next, the system generates a unique resource identifier for each image resource. For example, the content of the resource identifier can be established according to the records in the following table:
[0037] Table 1
[0038]
[0039] Then, the resource identifier is in the form of:
[0040] picture / visible / ea2165c.jpeg. This resource identifier not only uniquely identifies the image resource, but also indicates that the image is a visible light image type. In this way, the system can effectively manage and identify different types of data resources, laying the foundation for subsequent annotation work.
[0041] Step 102 : annotate target annotated objects corresponding to the annotation method in the data resource according to the preset annotation method, and generate an annotation identifier for each target annotated object in the data resource according to the annotation method.
[0042] The annotation identifier has a corresponding index code; the length of the index code is positively correlated with the subdivision degree of the annotation method corresponding to the annotation identifier.
[0043] In some embodiments of the present application, the target annotation objects in the data resource are annotated according to a preset annotation method, and an annotation identifier for each target annotation object is generated. The annotation identifier has a corresponding index code, and the length of the index code is positively correlated with the subdivision degree of the annotation method corresponding to the annotation identifier. This means that the longer the index code of the annotation identifier, the higher the subdivision degree of the annotation method, so that the target annotation object can be described more finely.
[0044] For example, Figure 2 As shown in case a in Figure 1, during a labeling process, the system has acquired a visible light image. Assuming that at this time, according to the preset target detection labeling method, the system needs to label the ships in the image. Then the system can Figure 2As shown in case b in the figure, the pixel range of the ship is marked in the image (for example, the area with coordinates from 200,100 to 300,500), and the corresponding annotation identifier / # / 200,100-300,500 / ship / objectdetection is generated. Among them, # / 200,100-300,500 represents the marked pixel range, ship represents the target category, and objectdetection represents the annotation method. The index encoding length of the annotation identifier reflects the degree of subdivision of the annotation method, making the annotation information more accurate and detailed.
[0045] Step 103: Generate index data of the data resource according to the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource.
[0046] The index data is used to represent the corresponding relationship between the annotation identifier and the resource identifier of each data resource.
[0047] In some embodiments of the present application, index data of the data resource is generated based on the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource. The index data is used to characterize the correspondence between the annotation identifier and the resource identifier of each data resource. The purpose of this step is to clearly describe and manage the association between the data resource and its annotation objects through the index data, so as to facilitate subsequent data retrieval and management.
[0048] For example, in a labeling process, the system has generated a resource identifier for a visible light image, `picture / visible / ea2165c.jpeg`, and annotated the ship in the image, generating the label identifier: ` / # / 200,100-300,500 / ship / objectdetection`. At this time, the system will generate index data based on these identifiers, for example:
[0049] picture / visible / ea2165c.jpeg / # / 200,100-300,500 / ship / objectdetection. In this way, the index data clearly represents the correspondence between annotation identifiers and resource identifiers, allowing the system to efficiently manage and retrieve annotation data.
[0050] In summary, in the embodiment of the present application, by obtaining the data resource to be annotated and determining its resource identifier, the data type of the data resource can be effectively characterized, so that the corresponding annotation method can be adopted for different types of data resources, and then the target annotation object can be annotated according to the preset annotation method, and the annotation identifier can be generated. By flexibly adapting to the annotation requirements of different granularities, the complexity of manual adjustment and configuration required in the prior art is avoided, and imperceptible cross-granularity annotation is realized; then, according to the resource identifier of the data resource and the annotation identifier of all target annotation objects, the index data of the data resource is generated, and the corresponding relationship between the annotation identifier and the resource identifier is clearly characterized, which is convenient for subsequent data retrieval and management. Therefore, based on the method of the embodiment of the present application, by obtaining the data resource and determining its resource identifier, annotating and generating the annotation identifier according to the preset annotation method, and generating the index data of the data resource, the stepless annotation of multi-field and multi-granularity data is realized, which overcomes the defects of the annotation tool in the prior art such as single function, poor flexibility, and manual adjustment and configuration, improves the efficiency and accuracy of data annotation, and significantly reduces the manpower and time costs.
[0051] Figure 3 This is another stepless labeling method based on a uniform resource identifier provided in an embodiment of the present application.
[0052] The method may include the following steps:
[0053] Step 201: Acquire the data resource to be labeled and determine the resource identifier of the data resource.
[0054] The resource identifier is used to represent the data type of the data resource.
[0055] The method shown in this step has been explained in step 101 and will not be repeated here.
[0056] Step 202 : annotate target annotated objects corresponding to the annotation method in the data resource according to the preset annotation method, and generate an annotation identifier for each target annotated object in the data resource according to the annotation method.
[0057] The annotation identifier has a corresponding index code; the length of the index code is positively correlated with the subdivision degree of the annotation method corresponding to the annotation identifier.
[0058] The method shown in this step has been explained in step 102 and will not be repeated here.
[0059] Optionally, the data resource is an image data resource. In order to annotate the target annotation object corresponding to the annotation method in the data resource according to a preset annotation method, step 202 includes the following sub-steps:
[0060] Sub-step 2021: input the image data resource into a preset image recognition model to determine a first target annotated object in the image data resource.
[0061] The first target annotation object is an image area in the image data resource.
[0062] In some embodiments of the present application, the image data resource is input into a preset image recognition model to determine the first target annotation object in the image data resource. The image recognition model is an artificial intelligence algorithm that can automatically analyze the image content and identify a specific target object. By inputting the image data resource, the model can identify and locate the target area in the image, such as an object, a person, or a specific image feature. The purpose of this step is to automatically determine the image area that needs to be annotated, reduce manual intervention, and improve annotation efficiency.
[0063] For example, in a labeling process, the system has acquired a visible light image and generated a resource identifier picture / visible / ea2165.jpeg for it. In order to label the ship in the image, the system inputs the image into a preset image recognition model. The model automatically analyzes the image content, identifies the ship in the image, and determines the image area where it is located, for example, the area with coordinates from 200,100 to 300,500. In this way, the system can automatically determine the first target labeling object in the image, laying the foundation for subsequent labeling work.
[0064] Sub-step 2022: adding a circle mark to the first target annotation object to annotate the first target annotation object.
[0065] In some embodiments of the present application, a circle mark is added to the first target annotation object to mark the target annotation object. Circle mark is a visual annotation method that clarifies the scope and position of the annotation object by drawing a bounding box or other marks on the image. The purpose of this step is to make the annotation object clearly visible in the image by adding a circle mark, thereby facilitating subsequent annotation processing and data analysis.
[0066] For example, in a labeling process, the system has determined the area of a ship in a visible light image through the image recognition model, with coordinates from 200,100 to 300,500. In order to label the ship, the system adds a rectangular bounding box to the image to circle the area. In this way, the system clearly marks the location of the ship in the image, making the labeled object clear in the image, which is convenient for subsequent labeling data processing and analysis.
[0067] Optionally, the data resource is a text data resource. In order to annotate the target annotation object corresponding to the annotation method in the data resource according to a preset annotation method, step 202 includes the following sub-steps:
[0068] Sub-step 2023: inputting the text data resource into a preset text recognition model to determine a second target annotation object in the text data resource.
[0069] The second target annotation object is a text paragraph in the text data resource.
[0070] In some embodiments of the present application, the text data resource is input into a preset text recognition model to determine the second target annotation object in the text data resource. The text recognition model is a natural language processing algorithm that can automatically analyze the text content and identify specific text paragraphs or other target objects. By inputting the text data resource, the model can identify and locate paragraphs, sentences or other text structures in the text. The purpose of this step is to automatically determine the text paragraphs that need to be annotated, reduce manual intervention, and improve annotation efficiency.
[0071] For example, in a labeling process, the system has obtained a Chinese article and generated a resource identifier for it: doc / chinese / article / ea2165.txt. In order to label the paragraphs in the article, the system inputs the text into a preset text recognition model. The model automatically analyzes the text content, identifies the paragraphs in the article, and determines their location and range. Assuming that the model identifies the first paragraph as "What is the best hero in League of Legends", the system uses this paragraph as the second target labeling object. In this way, the system can automatically determine the paragraphs in the text, laying the foundation for subsequent labeling work.
[0072] Sub-step 2024: adding a reference mark to the second target annotated object to annotate the second target annotated object.
[0073] In some embodiments of the present application, a reference mark will be added to the second target annotation object to annotate the target annotation object. Reference marks are a text annotation method that clarifies the scope and position of the annotation object by adding specific marking symbols or labels in the text paragraph. The purpose of this step is to make the annotation object clearly visible in the text by adding reference marks, thereby facilitating subsequent annotation processing and data analysis.
[0074] For example, taking semantic similarity calculation as an example, in a labeling process, the system has identified a paragraph in a Chinese article "What is the best hero in League of Legends" through the text recognition model and generated a resource identifier doc / chinese / paragraph / ea2165.txt for it. In order to label the paragraph, the system adds labeling identifiers to the text according to Table 2.
[0075] Table 2
[0076]
[0077] Then the paragraph will be marked as: doc / chinese / sentence / ea2165.sentence / & / doc / chinese / sentence / ea2165.sentence / 1 / semanticsimilarity, where the special symbol & indicates the parallel relationship of resources of the same type, that is, ea2165.sentence and ea2165.sentence exist in the training set in a parallel form. The suffix semanticsimilarity indicates the field of semantic similarity calculation, and also indicates the name of the training set to be formed, and the number 1 indicates the similarity score. In this way, the system clearly marks the position and content of the paragraph in the text, making the annotated object clear at a glance in the text, which is convenient for subsequent annotated data processing and analysis.
[0078] Optionally, the data resource is an audio data resource. In order to annotate a target annotation object corresponding to the annotation method in the data resource according to a preset annotation method, step 202 includes the following sub-steps:
[0079] Sub-step 2025: input the audio data resource into a preset audio recognition model to determine the timestamp corresponding to the third target annotated object in the audio data resource.
[0080] The third target annotation object is an audio segment in the audio data resource; the timestamp is used to represent the start time and / or end time of the audio segment in the audio data resource.
[0081] In some embodiments of the present application, the audio data resource is input into a preset audio recognition model to determine the timestamp corresponding to the third target annotation object in the audio data resource. The audio recognition model is an artificial intelligence algorithm that can automatically analyze the audio content and identify specific audio segments. The timestamp is used to characterize the start time and / or end time of the audio segment in the audio data resource. The purpose of this step is to automatically determine the audio segments that need to be annotated and their time range, reduce manual intervention, and improve annotation efficiency.
[0082] For example, in a labeling process, the system has obtained an audio file and generated a resource identifier audio / ea2165.mp3 for it. In order to label a specific paragraph in the audio, the system inputs the audio file into the preset audio recognition model. The model automatically analyzes the audio content, identifies a paragraph in the audio, and determines its timestamp as the start time 00:01:30 and the end time 00:02:00. In this way, the system can automatically determine the third target labeling object in the audio and its time range, laying the foundation for subsequent labeling work.
[0083] Sub-step 2026, generates a marked text to record the timestamp or obtains the audio segment from the audio data resource according to the timestamp, so as to complete the marking of the audio data resource through the marked text or the audio segment.
[0084] In some embodiments of the present application, a marked text is generated to record the timestamp, or an audio segment is obtained from the audio data resource according to the timestamp, so as to complete the marking of the audio data resource through the marked text or the audio segment. The marked text is a text file that records the marking information, including the timestamp and other relevant information of the audio segment. The audio segment is the audio content within a specific time range extracted from the audio data resource. The purpose of this step is to complete the marking of the audio data resource by recording the timestamp or extracting the audio segment, so that the marked information is more specific and usable.
[0085] For example, in a labeling process, the system has determined a target segment in an audio file through the audio recognition model, with timestamps of start time 00:01:30 and end time 00:02:00. In order to label the audio segment, the system generates a labeling text, which is recorded as follows:
[0086] {
[0087] "resourceURI": "audio / ea2165c092fa0428b3d850e159ca1bd1.mp3",
[0088] "annotation": {
[0089] "startTime": "00:01:30",
[0090] "endTime": "00:02:00",
[0091] "description": "Speech segment discussing key topic"
[0092] }
[0093] }
[0094] Alternatively, the system can extract the audio segment from the audio file according to the timestamp and generate a new audio file audio / ea2165c092fa0428b3d850e159ca1bd1_segment.mp3 as a labeling file. In this way, the system can complete the labeling of audio data resources by labeling text or audio segments, making the labeling information more specific and easy to manage.
[0095] Step 203: Generate index data of the data resource according to the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource.
[0096] The index data is used to represent the corresponding relationship between the annotation identifier and the resource identifier of each data resource.
[0097] The method shown in this step has been explained in step 103 and will not be repeated here.
[0098] Optionally, step 203 includes the following sub-steps:
[0099] Sub-step 2031 , recording the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource as a long character string according to a preset index format.
[0100] The index format includes a first separator and a second separator, the first separator is used to separate the resource identifier and the annotation identifier, and the second separator is used to separate different annotation identifiers.
[0101] In some embodiments of the present application, the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource are recorded as a long string according to a preset index format. The index format includes a first separator and a second separator, the first separator is used to separate the resource identifier and the annotation identifier, and the second separator is used to separate different annotation identifiers. In this way, the resource identifier and multiple annotation identifiers can be integrated into a long string for easy storage and retrieval.
[0102] For example, in a labeling process, the system has acquired a visible light image and generated a resource identifier picture / visible / ea2165.jpeg for it. There are two target labeling objects in the image, namely a ship and a building, and the corresponding labeling identifiers are / # / 200,100-300,500 / ship / objectdetection and 400,200-500,600 / building / objectdetection. Then according to the preset index format, the system records the resource identifier and the labeling identifier as a long string, using the first separator | to separate the resource identifier and the labeling identifier, and using the second separator / # / to separate different labeling identifiers. The generated long string is as follows:
[0103] picture / visible / ea2165.jpeg|200,100-300,500 / ship / objectdetection / # / 400,200-500,600 / building / objectdetection,In this way, the system can integrate resource identifiers and multiple annotation identifiers into a long string, which is convenient for subsequent storage and retrieval operations.
[0104] Step 204 , in response to the selection of the target annotation method, generating a target annotation data set corresponding to the target annotation method.
[0105] Among them, the target annotation data set is used to store data resources annotated according to the target annotation method.
[0106] In some embodiments of the present application, in response to the selection of the target annotation method, a target annotation data set corresponding to the annotation method is generated. The target annotation data set is used to store data resources annotated according to the target annotation method. The purpose of this step is to automatically generate a corresponding data set according to the annotation method selected by the user, so as to facilitate subsequent model training and data analysis.
[0107] For example, in a labeling, the user selects target detection as the labeling method. The system will generate a target detection dataset based on this selection. Assume that the system has labeled a batch of image resources, including an image with a resource identifier of picture / visible / ea2165.jpeg, and the labeling identifier of the image is:
[0108] picture / visible / ea2165.jpeg / # / 200,100-300,500 / ship / objectdetection. Then the system will aggregate all the labeled data that meet the target detection labeling method and generate a target detection data set. In this way, the system can automatically generate and store the corresponding target labeling data set according to the labeling method selected by the user, which is convenient for subsequent model training and data analysis.
[0109] Optionally, step 204 includes the following sub-steps:
[0110] Sub-step 2041 , in response to the selection of the target marking method, determining the target index data including the target marking identifier in all the index data.
[0111] The target annotation identifier is an annotation identifier corresponding to the target annotation method.
[0112] In some embodiments of the present application, in response to the selection of the target annotation method, the target index data containing the target annotation identifier is determined in all the index data. The target annotation identifier is a annotation identifier corresponding to the target annotation method. By screening all the index data, the system can identify the annotation data related to the annotation method selected by the user, thereby determining the target index data. The purpose of this step is to automatically screen out the relevant annotation data according to the annotation method selected by the user, so as to facilitate the subsequent data set generation.
[0113] For example, in a labeling process, the user selects "target detection" as the labeling method. The system will traverse all index data and search for index data containing target detection labeling identifiers. Assume that the system has the following index data:
[0114] picture / visible / ea2165.jpeg|200,100-300,500 / ship / objectdetection / # / 400,200-500,600 / building / objectdetection. At this time, the system will recognize that the first index data contains the target detection annotation identifier objectdetection and determine it as the target index data. In this way, the system can automatically filter out relevant annotation data according to the annotation method selected by the user, laying the foundation for the subsequent generation of target annotation datasets.
[0115] Sub-step 2042, determining the data resources corresponding to the target index data as target data resources, and integrating all target data resources into a target annotation data set.
[0116] In some embodiments of the present application, the data resources corresponding to the target index data are determined as target data resources, and all target data resources are integrated into a target annotation data set. The target data resources refer to the data resources related to the target annotation method that were screened out in the previous step. By integrating these target data resources into one data set, the system can generate a complete annotation data set for a specific annotation task, which is convenient for subsequent model training and data analysis.
[0117] For example, in a labeling process, the user selects "target detection" as the labeling method. The system has determined the target index data containing the target detection labeling identifier in the previous step, so the system can determine the image resources corresponding to these target index data as target data resources. Next, the system integrates all target data resources that conform to the target detection labeling method into a target labeling dataset. In this way, the system can integrate all relevant target data resources into a complete target labeling dataset, which is convenient for subsequent model training and data analysis.
[0118] Optionally, when the target annotation data set includes the target data resource, the stepless annotation method based on the uniform resource identifier provided in the embodiment of the present application further includes the following additional steps:
[0119] Step 205 : hiding or deleting the annotation information of the target annotation object in the target data resource in the target annotation data set that is annotated in a manner other than the target annotation manner.
[0120] In some embodiments of the present application, when the target data resource is included in the target annotation data set, the annotation information of the target annotation object annotated in a manner other than the target annotation manner is hidden or deleted. The purpose of this step is to ensure that the target annotation data set only contains annotation information related to the target annotation manner, thereby avoiding confusion and redundant data and improving the purity and pertinence of the data set.
[0121] For example, in a labeling, the user selected "target detection" as the labeling method and generated a target detection dataset. Suppose there is an image resource in the system, which contains two labeled objects: one is a ship labeled by target detection, and the other is an ocean area labeled by semantic segmentation. Then the system can hide or delete the labeling information (semantic segmentation labeling) in the target labeling dataset that is not related to the target labeling method (target detection). In this way, the system ensures that the target labeling dataset only contains labeling information related to the target labeling method, which improves the purity and pertinence of the dataset.
[0122] refer to Figure 4This is a system block diagram of a stepless annotation tool based on a uniform resource identifier provided in an embodiment of the present application:
[0123] Specifically include: resource management module, uniform resource identifier management module, training set generation module;
[0124] Among them, based on the above system architecture:
[0125] like Figure 5 As shown, the resource management module specifically includes: a resource website structure analysis module, a resource automatic collection module, a resource automatic classification module, a collection resource pool and a classification resource pool;
[0126] like Figure 6 As shown, the uniform resource identifier management module specifically includes: a resource identifier management module, a tag identifier management module and an identifier mapping relationship management module;
[0127] like Figure 7 As shown, the training set generation module specifically includes: a training set format configuration module, a training set annotation module and a training set export module.
[0128] Based on reference Figures 4 to 7 For examples, refer to Figure 8 It is a complete data resource acquisition and labeling process. Specifically, the following steps are used to achieve data resources classified according to labeling requirements:
[0129] Step S1: Data resource acquisition: Through an automated collection process, different types of data resources (such as images, texts, audio, etc.) are acquired from data resource providers, and then the data resources are stored locally.
[0130] Step S2: Classify the acquired data resources according to the labeling requirements: According to the specific labeling requirements, the acquired data resources are classified and labeled in detail. According to different labeling requirements (such as target detection, semantic segmentation, etc.), the data resources are classified and labeled more finely.
[0131] In summary, in the embodiment of the present application, by obtaining the data resource to be annotated and determining its resource identifier, the data type of the data resource can be effectively characterized, so that the corresponding annotation method can be adopted for different types of data resources, and then the target annotation object can be annotated according to the preset annotation method, and the annotation identifier can be generated. By flexibly adapting to the annotation requirements of different granularities, the complexity of manual adjustment and configuration required in the prior art is avoided, and imperceptible cross-granularity annotation is realized; then, according to the resource identifier of the data resource and the annotation identifier of all target annotation objects, the index data of the data resource is generated, and the corresponding relationship between the annotation identifier and the resource identifier is clearly characterized, which is convenient for subsequent data retrieval and management. Therefore, based on the method of the embodiment of the present application, by obtaining the data resource and determining its resource identifier, annotating and generating the annotation identifier according to the preset annotation method, and generating the index data of the data resource, the stepless annotation of multi-field and multi-granularity data is realized, which overcomes the defects of the annotation tool in the prior art such as single function, poor flexibility, and manual adjustment and configuration, improves the efficiency and accuracy of data annotation, and significantly reduces the manpower and time costs.
[0132] refer to Fig. 9 , which shows a stepless tagging device 30 based on a uniform resource identifier provided in an embodiment of the present application, including:
[0133] The resource identification module 301 is used to obtain the data resource to be marked and determine the resource identifier of the data resource; the resource identifier is used to represent the data type of the data resource;
[0134] The annotation identification module 302 is used to annotate the target annotation object corresponding to the annotation method in the data resource according to the preset annotation method, and generate an annotation identifier for each target annotation object in the data resource according to the annotation method; the annotation identifier has a corresponding index code; the length of the index code is positively correlated with the subdivision degree of the annotation method corresponding to the annotation identifier;
[0135] The index building module 303 is used to generate index data of the data resource according to the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource; the index data is used to characterize the correspondence between the annotation identifier and the resource identifier of each data resource.
[0136] Optionally, the data resource is an image data resource, and the marking module 302 includes:
[0137] A first recognition submodule is used to input the image data resource into a preset image recognition model to determine a first target annotation object in the image data resource; the first target annotation object is an image region in the image data resource;
[0138] The first marking submodule is used to add a circle mark to the first target marking object to mark the first target marking object.
[0139] Optionally, the data resource is a text data resource, and the marking module 302 includes:
[0140] A second recognition submodule is used to input the text data resource into a preset text recognition model to determine a second target annotation object in the text data resource; the second target annotation object is a text paragraph in the text data resource;
[0141] The second marking submodule is used to add a reference mark to the second target marking object to mark the second target marking object.
[0142] Optionally, the data resource is an audio data resource, and the marking and identification module 302 includes:
[0143] A third identification submodule is used to input the audio data resource into a preset audio recognition model to determine a timestamp corresponding to a third target annotation object in the audio data resource; the third target annotation object is an audio segment in the audio data resource; the timestamp is used to represent the start time and / or end time of the audio segment in the audio data resource;
[0144] The third annotation submodule is used to generate an annotation text to record the timestamp or obtain an audio segment from the audio data resource according to the timestamp, so as to complete the annotation of the audio data resource through the annotation text or the audio segment.
[0145] Optionally, the index building module 303 includes:
[0146] The index establishment submodule is used to record the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource as a long character string according to a preset index format; the index format includes a first separator and a second separator, the first separator is used to separate the resource identifier and the annotation identifier, and the second separator is used to separate different annotation identifiers.
[0147] Optionally, the stepless labeling device 30 based on the uniform resource identifier further includes:
[0148] The data set module is used to generate a target annotation data set corresponding to the target annotation method in response to the selection of the target annotation method; the target annotation data set is used to store data resources annotated according to the target annotation method.
[0149] Optional dataset modules include:
[0150] The index query submodule is used to determine the target index data including the target annotation identifier in all the index data in response to the selection of the target annotation mode; the target annotation identifier is the annotation identifier corresponding to the target annotation mode;
[0151] The data set submodule is used to determine the data resources corresponding to the target index data as the target data resources, and integrate all the target data resources into a target annotation data set.
[0152] Optionally, the target annotation data set includes a target data resource, and the stepless annotation device 30 based on the uniform resource identifier further includes:
[0153] The marking cancellation module is used to hide or delete the marking information of the target marking object marked in the target data resource in the target marking data set according to the marking method other than the target marking method.
[0154] In summary, in the embodiment of the present application, by obtaining the data resource to be annotated and determining its resource identifier, the data type of the data resource can be effectively characterized, so that the corresponding annotation method can be adopted for different types of data resources, and then the target annotation object can be annotated according to the preset annotation method, and the annotation identifier can be generated. By flexibly adapting to the annotation requirements of different granularities, the complexity of manual adjustment and configuration required in the prior art is avoided, and imperceptible cross-granularity annotation is realized; then, according to the resource identifier of the data resource and the annotation identifier of all target annotation objects, the index data of the data resource is generated, and the corresponding relationship between the annotation identifier and the resource identifier is clearly characterized, which is convenient for subsequent data retrieval and management. Therefore, based on the method of the embodiment of the present application, by obtaining the data resource and determining its resource identifier, annotating and generating the annotation identifier according to the preset annotation method, and generating the index data of the data resource, the stepless annotation of multi-field and multi-granularity data is realized, which overcomes the defects of the annotation tool in the prior art such as single function, poor flexibility, and manual adjustment and configuration, improves the efficiency and accuracy of data annotation, and significantly reduces the manpower and time costs.
[0155] Reference Fig.10 , the electronic device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .
[0156] The processing component 502 generally controls the overall operation of the electronic device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0157] The memory 504 is used to store various types of data to support the operation of the electronic device 500. Examples of such data include instructions for any application or method operating on the electronic device 500, contact data, phone book data, messages, pictures, multimedia, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0158] The power supply component 506 provides power to the various components of the electronic device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 500.
[0159] The multimedia component 508 includes an interface that provides an output interface between the electronic device 500 and the user. In some embodiments, the interface may include a liquid crystal display (LCD) and a touch panel (TP). If the interface includes a touch panel, the interface may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the electronic device 500 is in an operating mode, such as a shooting mode or a multimedia mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0160] The audio component 510 is used to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the electronic device 500 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is used to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0161] The input / output I / O interface 512 provides an interface between the processing component 502 and the peripheral interface module, which may be a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0162] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the electronic device 500. For example, the sensor assembly 514 can detect the open / closed state of the electronic device 500, the relative positioning of components, such as the display and keypad of the electronic device 500, and the sensor assembly 514 can also detect the position change of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, the orientation or acceleration / deceleration of the electronic device 500, and the temperature change of the electronic device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0163] The communication component 516 is used to facilitate wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0164] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to implement the methods provided in the embodiments of the present application.
[0165] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by a processor 520 of an electronic device 500 to perform the above method. For example, the non-transitory storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0166] Fig.11 FIG. 6 is a block diagram of an electronic device 600 according to another embodiment of the present invention. For example, the electronic device 600 may be provided as a server.
[0167] Reference Fig.11 , the electronic device 600 includes a processing component 622, which further includes one or more processors, and a memory resource represented by a memory 632, for storing instructions that can be executed by the processing component 622, such as an application. The application stored in the memory 632 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 622 is configured to execute instructions to perform the method provided in the embodiment of the present application.
[0168] The electronic device 600 may also include a power supply component 626 configured to perform power management of the electronic device 600, a wired or wireless network interface 650 configured to connect the electronic device 600 to a network, and an input / output (I / O) interface 658. The electronic device 600 may operate based on an operating system stored in the memory 632, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0169] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0170] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A stepless tagging method based on uniform resource identifier, characterized in that: include: Acquire a data resource to be labeled, and determine a resource identifier of the data resource; the resource identifier is used to characterize the data type of the data resource; According to a preset annotation method, in the data resource, a target annotation object corresponding to the annotation method is annotated, and an annotation identifier of each target annotation object in the data resource is generated according to the annotation method; the annotation identifier has a corresponding index code; the length of the index code is positively correlated with the subdivision degree of the annotation method corresponding to the annotation identifier; Generate index data of the data resource according to the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource; the index data is used to represent the corresponding relationship between the annotation identifier and the resource identifier of each data resource; In the case where the data resource is an image data resource, the step of labeling a target labeling object corresponding to the labeling method in the data resource according to a preset labeling method includes: Inputting the image data resource into a preset image recognition model to determine a first target annotated object in the image data resource; the first target annotated object is an image region in the image data resource; Adding a circle mark to the first target marked object to mark the first target marked object; In the case where the data resource is a text data resource, the step of marking a target marking object corresponding to the marking method in the data resource according to a preset marking method includes: Inputting the text data resource into a preset text recognition model to determine a second target annotation object in the text data resource; the second target annotation object is a text paragraph in the text data resource; A reference mark is added to the second target marked object to mark the second target marked object.
2. The stepless tagging method based on uniform resource identifier according to claim 1, characterized in that: The generating the index data of the data resource according to the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource comprises: According to a preset index format, the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource are recorded as a long character string; the index format includes a first separator and a second separator, the first separator is used to separate the resource identifier and the annotation identifier, and the second separator is used to separate different annotation identifiers.
3. The stepless tagging method based on uniform resource identifier according to claim 1, characterized in that: The method further comprises: In response to the selection of the target labeling method, a target labeling data set corresponding to the target labeling method is generated; the target labeling data set is used to store the data resource labeled according to the target labeling method.
4. The stepless tagging method based on uniform resource identifier according to claim 3, characterized in that: The step of generating a target annotation data set corresponding to the target annotation method in response to the selection of the target annotation method includes: In response to the selection of the target marking method, determining the target index data including the target marking identifier in all the index data; the target marking identifier is a marking identifier corresponding to the target marking method; The data resource corresponding to the target index data is determined as the target data resource, and all the target data resources are integrated into the target annotation data set.
5. The stepless tagging method based on uniform resource identifier according to claim 3, characterized in that: The target annotation data set includes target data resources, and the method further includes: The labeling information of the target labeling object in the target data resource in the target labeling data set that is labeled in a labeling method other than the target labeling method is hidden or deleted.
6. A stepless tagging device based on uniform resource identifier, characterized in that: include: A resource identification module, used to obtain the data resource to be marked and determine the resource identifier of the data resource; the resource identifier is used to represent the data type of the data resource; A labeling identification module is used to label the target labeling object corresponding to the labeling method in the data resource according to a preset labeling method, and generate a labeling identifier for each target labeling object in the data resource according to the labeling method; the labeling identifier has a corresponding index code; the length of the index code is positively correlated with the subdivision degree of the labeling method corresponding to the labeling identifier; An index building module, used to generate index data of the data resource according to the resource identifier of the data resource and the annotation identifiers of all target annotation objects in the data resource; the index data is used to characterize the corresponding relationship between the annotation identifier and the resource identifier of each data resource; In the case where the data resource is an image data resource, the marking and identification module includes: A first recognition submodule, configured to input the image data resource into a preset image recognition model to determine a first target annotated object in the image data resource; the first target annotated object is an image region in the image data resource; A first labeling submodule, used to add a circle mark to the first target labeling object to label the first target labeling object; In the case where the data resource is a text data resource, the marking and identification module includes: A second recognition submodule is used to input the text data resource into a preset text recognition model to determine a second target annotation object in the text data resource; the second target annotation object is a text paragraph in the text data resource; The second labeling submodule is used to add a reference mark to the second target labeling object to label the second target labeling object.
7. An electronic device, characterized in that: include: A processor, a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the stepless tagging method based on uniform resource identifier as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the stepless tagging method based on a uniform resource identifier as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Context awareness tagging interface
CN102945269A
Text processing method and device, model training method and device, equipment and storage medium
CN115718801A