Flexible text data intelligent labeling system and method based on function as a service

CN117972013BActive Publication Date: 2026-08-28BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311816593.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2026-08-28
Estimated Expiration
2043-12-26

AI Technical Summary

Technical Problem

[0005]为此,本申请的第一个目的在于提出一种基于函数即服务的灵活文本数据智能标注系统,解决了现有标注方法效率较低、无法灵活应用的问题,能够按照用户要求进行灵活标注,有效提升用户体验度,同时保证了标注效率

Benefits of technology

[0013]本申请实施例的基于函数即服务的灵活文本数据智能标注系统,通过用户编写请求构建函数及解析函数,并指定模型镜像的位置,即可任意选择在数据预标注过程中所调用的模型。解决了当前数据预标注过程中,预标注模型与标注平台高度耦合的问题,有效的提升了数据预标注过程中的灵活性,提高了数据标注的效率,加强了系统针对不同业务细分领域的普适性。并且通过利用云原生的技术,按需创建、释放函数实例和模型实例,提升资源利用率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117972013B_ABST
    Figure CN117972013B_ABST
Patent Text Reader

Abstract

The application provides a flexible text data intelligent labeling system based on a function as a service, comprising: a data acquisition module configured to acquire a to-be-labeled data set and user input; a template management module configured to generate a function template of a labeling task based on the user input, and to acquire a function written by the user for packaging; a function creation module configured to construct a function image based on the packaged data, and to store the function image in a function image database, and to deploy the function image through OpenFaaS; an intelligent labeling module configured to acquire a corresponding model image from the model image database based on the user input, to construct a labeling model based on the model image, and to perform intelligent labeling on the to-be-labeled data set based on the labeling model through OpenFaaS; and a proofreading module configured to perform proofreading to obtain a proofread labeling result. The application with the above scheme enables the user to freely write and use a model to perform intelligent labeling on data according to an actual business scenario, thereby improving the labeling efficiency of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a flexible text data intelligent annotation system and method based on function-as-a-service. Background Technology

[0002] In recent years, with the rapid development of AI technology, numerous AI models have been implemented in various industries, demonstrating the powerful capabilities and potential of AI. Data, as one of the three core elements of AI tasks, often directly determines the accuracy and usability of the final AI model due to its quality.

[0003] Currently, the primary method for producing labeled data still relies on manual labor, which often incurs significant time and manpower costs. Existing data labeling platforms can improve labeling efficiency. Some platforms also offer built-in general labeling models to help labelers pre-label data for subsequent manual verification. However, the effectiveness of these solutions often heavily depends on the platform's built-in models. General labeling models struggle to guarantee accuracy across multiple domains simultaneously, and users often find it difficult to pre-label data using custom-designed models tailored to their specific business scenarios. Summary of the Invention

[0004] This application aims to at least partially address one of the technical problems in the related art.

[0005] Therefore, the first objective of this application is to propose a flexible intelligent text data annotation system based on function-as-a-service, which solves the problems of low efficiency and inflexible application of existing annotation methods. It can perform flexible annotation according to user requirements, effectively improve user experience, and at the same time ensure annotation efficiency.

[0006] The second objective of this application is to propose a flexible intelligent text data annotation method based on function-as-a-service.

[0007] To achieve the above objectives, the first aspect of this application proposes a flexible text data intelligent annotation system based on function-as-a-service, including a data acquisition module, a template management module, a function creation module, an intelligent annotation module, and a proofreading module, wherein...

[0008] The data acquisition module is used to acquire the dataset to be labeled and the model information and model image information input by the user;

[0009] The template management module is used to generate function templates for annotation tasks based on model information, and to obtain and package the request construction function and parsing function written by the user based on the function template.

[0010] The function creation module is used to build function images based on the packaged data, store them in the function image database, and deploy the function images through OpenFaaS;

[0011] The intelligent annotation module is used to obtain the corresponding model image from the annotation model image database based on model information and model image information, construct an annotation model based on the model image, and perform intelligent annotation on the dataset to be annotated through OpenFaaS based on the annotation model.

[0012] The proofreading module is used to proofread the intelligent annotation results and obtain the proofread annotation results.

[0013] This application's embodiment of a flexible text data intelligent annotation system based on Function as a Service allows users to arbitrarily select the model to be called during data pre-annotation by writing request construction and parsing functions and specifying the location of the model mirror. This solves the problem of high coupling between the pre-annotation model and the annotation platform in current data pre-annotation processes, effectively improving the flexibility of the data pre-annotation process, increasing data annotation efficiency, and enhancing the system's universality across different business sub-sectors. Furthermore, by utilizing cloud-native technologies, it creates and releases function instances and model instances on demand, improving resource utilization.

[0014] Optionally, in one embodiment of this application, the model information includes model task type, model image name, model image version, model service request port, model service request path, model service request HTTP method type, and function language. The model image information is used to determine the acquisition method and location of the model image. The model image information includes the request protocol, IP address, port, access path, username, and password of the image repository. The model image name and model image version are used to uniquely identify the model image, and the model service request port, model service request path, and model service request HTTP method type are used to determine how to initiate a request to the model.

[0015] Optionally, in one embodiment of this application, generating a function template for the annotation task based on model information includes:

[0016] Based on the user's input of the function language and model task type, corresponding request construction function templates and parsing function templates are generated.

[0017] Optionally, in one embodiment of this application, function image deployment via OpenFaaS includes:

[0018] Generate a YAML object for function deployment and submit it to OpenFaaS. Then, retrieve the function image from the function image database through OpenFaaS and deploy the function.

[0019] During deployment, the time for function deployment to complete is determined by calling the function repeatedly.

[0020] Optionally, in one embodiment of this application, the system further includes a function processing module, a model request construction module, and a model response module.

[0021] Optionally, in one embodiment of this application, the intelligent annotation module is specifically used for:

[0022] The intelligent annotation module sends the data to be annotated in the dataset to the OpenFaaS gateway, and OpenFaaS forwards the request to the function processing module.

[0023] The received data is preprocessed and parsed by the function processing module, and then handed over to the model request construction module, which includes user-written request construction functions.

[0024] The model request building module constructs the data to be labeled into an abstract request format and then hands it over to the function processing module.

[0025] The PostConstruct function is executed by the function processing module to determine if there are any exceptions, and performs data format conversion and serialization. The result is then sent back to the OpenFaaS gateway, which in turn sends it back to the intelligent annotation module.

[0026] Optionally, in one embodiment of this application, the intelligent annotation module is further configured to:

[0027] The intelligent annotation module initiates an annotation request to the annotation model based on the request port, request path, request HTTP method type information in the request, and model request parameters constructed by the model request construction module. After obtaining the annotation results, the model results are sent to the model response module via the OpenFaaS gateway and function processing module in the same way as the model construction request. The model response module includes a result parsing function written by the user.

[0028] The model response module parses the results of the pre-annotated model into entity objects of the specified task type, and then sends the parsing results back to the intelligent annotation module after passing through the function processing module and the OpenFaaS gateway.

[0029] To achieve the above objectives, a second aspect of the present invention proposes a flexible intelligent text data annotation method based on function-as-a-service, comprising:

[0030] Obtain the dataset to be labeled and the model information and model image information input by the user;

[0031] Generate function templates for annotation tasks based on model information, and package the request construction function and parsing function written by the user based on the function template;

[0032] The packaged data is used to build function images, which are then stored in the function image database and deployed via OpenFaaS.

[0033] Based on model information and model image information, the corresponding model image is obtained from the labeled model image database. A labeled model is constructed based on the model image, and intelligent labeling of the dataset to be labeled is performed using OpenFaaS based on the labeled model.

[0034] The intelligent annotation results are proofread to obtain the proofread annotation results.

[0035] Optionally, in one embodiment of this application, the model information includes model task type, model image name, model image version, model service request port, model service request path, model service request HTTP method type, and function language. The model image information is used to determine the acquisition method and location of the model image. The model image information includes the request protocol, IP address, port, access path, username, and password of the image repository. The model image name and model image version are used to uniquely identify the model image, and the model service request port, model service request path, and model service request HTTP method type are used to determine how to initiate a request to the model.

[0036] Optionally, in one embodiment of this application, function image deployment via OpenFaaS includes:

[0037] Generate a YAML object for function deployment and submit it to OpenFaaS. Then, retrieve the function image from the function image database through OpenFaaS and deploy the function.

[0038] During deployment, the time for function deployment to complete is determined by calling the function repeatedly.

[0039] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0040] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0041] Figure 1 This is a schematic diagram of the structure of a flexible text data intelligent annotation system based on function-as-a-service provided in Embodiment 1 of this application;

[0042] Figure 2 This is a diagram illustrating the architecture of a FaaS-based flexible text data intelligent annotation system according to an embodiment of this application.

[0043] Figure 3 A schematic diagram of the core link created for the annotation task in this application embodiment;

[0044] Figure 4 This is an example diagram of the construction function template for text classification, sentiment recognition, and named entity recognition tasks in embodiments of this application;

[0045] Figure 5 This is an example diagram of Maven dependencies in an embodiment of this application;

[0046] Figure 6 This is an example diagram of the text classification, sentiment recognition, and named entity recognition parsing function templates in embodiments of this application;

[0047] Figure 7 This is a timing diagram of the core data link call in the intelligent annotation operation of this application embodiment;

[0048] Figure 8 Example diagram of the function construction function for forwarding requests in the function processing module of this application embodiment;

[0049] Figure 9 This is an example diagram of the core content of the text classification task function processing module in an embodiment of this application;

[0050] Figure 10 This is an example diagram of the core content of the emotion recognition task function processing module in an embodiment of this application;

[0051] Figure 11 This is an example diagram of the core content of the named entity recognition task function processing module in an embodiment of this application;

[0052] Figure 12 This is an example diagram of the function processing module forwarding result parsing function in an embodiment of this application;

[0053] Figure 13 This is a flowchart illustrating a flexible text data intelligent annotation method based on function-as-a-service provided in an embodiment of this application. Detailed Implementation

[0054] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0055] This application proposes a flexible intelligent data annotation method in a cloud environment. This method utilizes Function as a Service (FaaS) technology to decouple the annotation system and the annotation model, solving the problem of strong coupling between the two parts in the traditional annotation process, as shown in Table 1. This allows users to freely write and use models to intelligently annotate data according to actual business scenarios, improving data annotation efficiency.

[0056] Table 1 List of technical problems to be solved in this application

[0057]

[0058]

[0059] The following description, with reference to the accompanying drawings, illustrates a flexible text data intelligent annotation system and method based on function-as-a-service, according to embodiments of this application.

[0060] Figure 1 This is a schematic diagram of the structure of a flexible text data intelligent annotation system based on function-as-a-service provided in Embodiment 1 of this application.

[0061] like Figure 1 As shown, this flexible text data intelligent annotation system based on function-as-a-service includes a data acquisition module, a template management module, a function creation module, an intelligent annotation module, and a proofreading module.

[0062] The data acquisition module is used to acquire the dataset to be labeled and the model information and model image information input by the user;

[0063] The template management module is used to generate function templates for annotation tasks based on model information, and to obtain and package the request construction function and parsing function written by the user based on the function template.

[0064] The function creation module is used to build function images based on the packaged data, store them in the function image database, and deploy the function images through OpenFaaS;

[0065] The intelligent annotation module is used to obtain the corresponding model image from the annotation model image database based on model information and model image information, construct an annotation model based on the model image, and perform intelligent annotation on the dataset to be annotated through OpenFaaS based on the annotation model.

[0066] The proofreading module is used to proofread the intelligent annotation results and obtain the proofread annotation results.

[0067] This application's embodiment of a flexible text data intelligent annotation system based on Function as a Service allows users to arbitrarily select the model to be called during data pre-annotation by writing request construction and parsing functions and specifying the location of the model mirror. This solves the problem of high coupling between the pre-annotation model and the annotation platform in current data pre-annotation processes, effectively improving the flexibility of the data pre-annotation process, increasing data annotation efficiency, and enhancing the system's universality across different business sub-sectors. Furthermore, by utilizing cloud-native technologies, it creates and releases function instances and model instances on demand, improving resource utilization.

[0068] Optionally, in one embodiment of this application, the model information includes model task type, model image name, model image version, model service request port, model service request path, model service request HTTP method type, and function language. The model image information is used to determine the acquisition method and location of the model image. The model image information includes the request protocol, IP address, port, access path, username, and password of the image repository. The model image name and model image version are used to uniquely identify the model image, and the model service request port, model service request path, and model service request HTTP method type are used to determine how to initiate a request to the model.

[0069] Optionally, in one embodiment of this application, generating a function template for the annotation task based on model information includes:

[0070] Based on the user's input of the function language and model task type, corresponding request construction function templates and parsing function templates are generated.

[0071] Optionally, in one embodiment of this application, function image deployment via OpenFaaS includes:

[0072] Generate a YAML object for function deployment and submit it to OpenFaaS. Then, retrieve the function image from the function image database through OpenFaaS and deploy the function.

[0073] During deployment, the time for function deployment to complete is determined by calling the function repeatedly.

[0074] Optionally, in one embodiment of this application, the system further includes a function processing module, a model request construction module, and a model response module.

[0075] Optionally, in one embodiment of this application, the intelligent annotation module is specifically used for:

[0076] The intelligent annotation module sends the data to be annotated in the dataset to the OpenFaaS gateway, and OpenFaaS forwards the request to the function processing module.

[0077] The received data is preprocessed and parsed by the function processing module, and then handed over to the model request construction module, which includes user-written request construction functions.

[0078] The model request building module constructs the data to be labeled into an abstract request format and then hands it over to the function processing module.

[0079] The PostConstruct function is executed by the function processing module to determine if there are any exceptions, and performs data format conversion and serialization. The result is then sent back to the OpenFaaS gateway, which in turn sends it back to the intelligent annotation module.

[0080] Optionally, in one embodiment of this application, the intelligent annotation module is further configured to:

[0081] The intelligent annotation module initiates an annotation request to the annotation model based on the request port, request path, request HTTP method type information in the request, and model request parameters constructed by the model request construction module. After obtaining the annotation results, the model results are sent to the model response module via the OpenFaaS gateway and function processing module in the same way as the model construction request. The model response module includes a result parsing function written by the user.

[0082] The model response module parses the results of the pre-annotated model into entity objects of the specified task type, and then sends the parsing results back to the intelligent annotation module after passing through the function processing module and the OpenFaaS gateway.

[0083] The following detailed description of the flexible text data intelligent annotation system based on function-as-a-service of this application is provided through specific embodiments.

[0084] Figure 2 This is a diagram of the architecture of the FaaS-based flexible text data intelligent annotation system in this embodiment.

[0085] like Figure 2As shown, the core components of this system are divided into three layers. The first layer is the logic layer, which directly interacts with the user and includes all the necessary management modules, including template management, function creation, intelligent annotation job execution, and manual proofreading. The second layer is the function layer. This layer stores all user-written function modules used to build model requests and function modules used to parse function results, as well as the function processing module responsible for connecting user functions with the logic layer. The third layer is the image repository layer, which mainly stores image repository modules for annotated model images and platform image repository modules for storing function images. The model image repository supports Docker Hub as well as other public and private repositories. This allows users to easily package and upload their required models to any image repository or Docker Hub that can interact with this system via the public or intranet.

[0086] Table 2 Main Modules in the System Structure

[0087]

[0088] The operation process of this system includes:

[0089] (1) The process of creating a labeling task

[0090] Figure 3 This demonstrates the core workflow of creating a labeling job. The first module handling a labeling task creation request is the template management module. This module packages the user-written request building module and result parsing module into a single package and validates the code for syntax errors. The code packaging process generates a complete project code package from the user's function. This package primarily includes the corresponding language's web framework and the pre- and post-processing functions for the user's function. The web framework code mainly provides a web service entry point and a service health check interface. The service health check interface is used to determine the current health status of the function during pre-labeling and to check the function's existence outside of the job. The pre- and post-processing functions for the user's function are used to convert between the user's function's input parameters and return results and the input parameters and return results of the web service entry point, and also include some error handling logic.

[0091] After the code is packaged, the request and the code package are pushed to the function creation module. In this module, Docker is used to build the generated code package into an image, which is then tagged with the platform's image repository and pushed there. After the image is pushed, the function is deployed. During deployment, a function deployment YAML object is generated. This YAML object is submitted to OpenFaaS, which then pulls the function image from the corresponding image repository and deploys the function. Throughout this process, the platform repeatedly calls the function's service health check interface to determine when the deployment is complete.

[0092] After the two functions are deployed, the request is pushed to the intelligent annotation job execution module. This module first pulls the model image from the model image repository module and builds it into a running model instance. Once the build is complete, the intelligent annotation job will begin execution, a process detailed in Section 3.

[0093] After the intelligent annotation job is completed, the annotation results are pushed to the manual proofreading module. Users then only need to proofread the results, which greatly improves the annotation speed of the training dataset.

[0094] (2) Mark the job request information

[0095] The request information for annotation tasks can be divided into five categories:

[0096] 1. Configure the location of the model image. When the image is located on Docker Hub, the user needs to set a Docker Hub username and password; when the image is located in an image repository, the user needs to set the image repository's request protocol, IP address, port, access path, username, and password. This information will be used to determine where and how to pull a model image.

[0097] 2. Configure relevant model information, including: model task type, model image name, model image version, model service request port, model service request path, model service request HTTP method type, and function language. The model image name and model image version uniquely identify a specific model image; the model service request port, model service request path, and model service request HTTP method type determine how to send requests to the model; and the model task type and function language are used to build the corresponding programming template.

[0098] 3. Dataset ID, used to specify the dataset to be labeled.

[0099] 4. Write the request constructor. The template management module will generate a corresponding request constructor template based on the user's selected language and task type. The user then needs to write the corresponding HTTP request parameter constructor based on the template. The function's return type is an abstract HTTP request entity object, and the function's input parameters are entity objects of specific task types. All attributes of the objects are explained in comments. Figure 4 The following are examples of constructor function templates for text classification, sentiment recognition, and named entity recognition tasks, respectively, using Java as the programming language.

[0100] In addition, users need to provide the third-party dependencies used during the function's execution. Figure 5 This is an example of a dependency that the user needs to fill in, using Maven as the dependency format.

[0101] 5. Write the parsing function. The template management module will generate corresponding parsing function templates based on the user's selected language and task type. The user then needs to write the corresponding parsing function based on the template. The function's return type is an entity object of the specific task type. The object's attributes are explained in comments, and the function's input parameters are the model's return result in string format. Figure 6 This is an example of a parsing function template for a text classification task.

[0102] (3) Execution logic of the intelligent annotation job execution module

[0103] like Figure 7 The diagram shows the core data link call sequence after the intelligent data pre-annotation process is initiated. After the model instance is built, the pre-annotation job officially begins. The intelligent annotation job execution module will initiate requests in a loop. First, the data to be annotated is sent to the OpenFaaS gateway, which forwards the request to the function processing module. The function processing module will first preprocess and parse the received data, and then hand the data over to the user-written model request construction module. The model request construction module is a user-written request construction function that will construct the data to be annotated into an abstract request format. The request format is as follows: Figure 4 The Request object in the code. After the request is constructed, it is handed over to the function processing module to execute PostConstruct to check for exceptions, perform data format conversion and serialization, and then return the result to the OpenFaaS gateway, which in turn returns it to the intelligent annotation job execution module. For example... Figure 8 This shows the processing logic of a function module when constructing request parameters. For example... Figure 9 , Figure 10 , Figure 11 The image shows an example of the core content of the function processing module for text classification, sentiment recognition, and named entity recognition tasks.

[0104] The annotation job execution module sends an annotation request to the model instance based on the request port, request path, request HTTP method type information, and model request parameters constructed by the model request construction module. After receiving the annotation results, it sends them to the user-written model response module via the OpenFaaS gateway and function processing module, similar to the process of constructing a model request. The model response module, a user-written result parsing function, parses the annotation results of the pre-annotated model into entity objects of the specified task type. After the model response module completes its execution, the results pass through the function processing module and the OpenFaaS gateway again before finally being submitted to the system disk. Figure 12 This shows the processing logic of the function processing module when a parsed model returns a result.

[0105] After all data annotations are completed, the intelligent annotation job execution module will destroy the model service instance and function instance in sequence.

[0106] To achieve the above embodiments, this application also proposes a flexible intelligent text data annotation method based on function-as-a-service.

[0107] Figure 13 This is a flowchart illustrating a flexible text data intelligent annotation method based on function-as-a-service provided in an embodiment of this application.

[0108] like Figure 13 As shown, this flexible text data intelligent annotation method based on function-as-a-service includes the following steps:

[0109] Step S1: Obtain the dataset to be labeled and the model information and model image information input by the user;

[0110] Step S2: Generate a function template for the annotation task based on the model information, and package the request construction function and parsing function written by the user based on the function template.

[0111] Step S3: Build a function image based on the packaged data, store it in the function image database, and deploy the function image through OpenFaaS;

[0112] Step S4: Obtain the corresponding model image from the labeled model image database based on the model information and model image information, construct the labeled model based on the model image, and perform intelligent labeling on the dataset to be labeled using OpenFaaS based on the labeled model;

[0113] Step S5: Proofread the intelligent annotation results to obtain the corrected annotation results.

[0114] Optionally, in one embodiment of this application, the model information includes model task type, model image name, model image version, model service request port, model service request path, model service request HTTP method type, and function language. The model image information is used to determine the acquisition method and location of the model image. The model image information includes the request protocol, IP address, port, access path, username, and password of the image repository. The model image name and model image version are used to uniquely identify the model image, and the model service request port, model service request path, and model service request HTTP method type are used to determine how to initiate a request to the model.

[0115] Optionally, in one embodiment of this application, function image deployment via OpenFaaS includes:

[0116] Generate a YAML object for function deployment and submit it to OpenFaaS. Then, retrieve the function image from the function image database through OpenFaaS and deploy the function.

[0117] During deployment, the time for function deployment to complete is determined by calling the function repeatedly.

[0118] It should be noted that the foregoing explanation of the embodiment of the flexible text data intelligent annotation system based on function as a service also applies to the flexible text data intelligent annotation method based on function as a service in this embodiment, and will not be repeated here.

[0119] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0120] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0121] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0122] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0123] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0124] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0125] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0126] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A flexible intelligent text data annotation system based on Function as a Service, characterized in that, It includes a data acquisition module, a template management module, a function creation module, an intelligent annotation module, and a proofreading module. The data acquisition module is used to acquire the dataset to be labeled and the model information and model image information input by the user; The template management module is used to generate function templates for annotation tasks based on the model information, and to obtain and package the request construction function and parsing function written by the user based on the function template. The function creation module is used to build function images based on the packaged data, store them in the function image database, and deploy the function images through OpenFaaS. The intelligent annotation module is used to obtain the corresponding model image from the annotation model image database based on the model information and the model image information, construct an annotation model based on the model image, and intelligently annotate the dataset to be annotated using OpenFaaS and based on the annotation model. The proofreading module is used to proofread the intelligent annotation results and obtain the proofread annotation results.

2. The system as described in claim 1, characterized in that, The model information includes model task type, model image name, model image version, model service request port, model service request path, model service request HTTP method type, and function language. The model image information is used to determine the acquisition method and location of the model image. The model image information includes the request protocol, IP address, port, access path, username, and password of the image repository. The model image name and model image version are used to uniquely identify the model image, and the model service request port, model service request path, and model service request HTTP method type are used to determine how to initiate a request to the model.

3. The system as described in claim 2, characterized in that, The function template for generating the annotation task based on the model information includes: Based on the user's input of the function language and model task type, corresponding request construction function templates and parsing function templates are generated.

4. The system as described in claim 1, characterized in that, The deployment of function images via OpenFaaS includes: Generate a YAML object for function deployment and submit it to OpenFaaS. Then, retrieve the function image from the function image database through OpenFaaS and deploy the function. During deployment, the time for function deployment to complete is determined by calling the function repeatedly.

5. The system as described in claim 1, characterized in that, The system also includes a function processing module, a model request construction module, and a model response module.

6. The system as described in claim 5, characterized in that, The intelligent annotation module is specifically used for: The intelligent annotation module sends the data to be annotated in the dataset to the OpenFaaS gateway, and OpenFaaS forwards the request to the function processing module. The received data is preprocessed and parsed by the function processing module, and then handed over to the model request construction module, wherein the model request construction module includes a user-written request construction function; The model request building module constructs the data to be labeled into an abstract request format and then hands it over to the function processing module. The PostConstruct function is executed by the function processing module to determine if there are any exceptions, and performs data format conversion and serialization. The result is then sent back to the OpenFaaS gateway, which in turn sends it back to the intelligent annotation module.

7. The system as described in claim 6, characterized in that, The intelligent annotation module is also used for: The intelligent annotation module initiates an annotation request to the annotation model based on the request port, request path, request HTTP method type information in the request, and model request parameters constructed by the model request construction module. After obtaining the annotation results, the model results are sent to the model response module via the OpenFaaS gateway and function processing module in the same way as the model construction request. The model response module includes a user-written result parsing function. The model response module parses the results of the pre-annotated model into entity objects of the specified task type, and then sends the parsing results back to the intelligent annotation module after passing through the function processing module and the OpenFaaS gateway.

8. A flexible intelligent text data annotation method based on Function as a Service, characterized in that, Includes the following steps: Obtain the dataset to be labeled and the model information and model image information input by the user; Based on the model information, a function template for the annotation task is generated, and the request construction function and parsing function written by the user based on the function template are obtained and packaged. The packaged data is used to build function images, which are then stored in the function image database and deployed via OpenFaaS. Based on the model information and the model image information, the corresponding model image is obtained from the labeled model image database. A labeled model is constructed based on the model image, and the dataset to be labeled is intelligently labeled using OpenFaaS and based on the labeled model. The intelligent annotation results are proofread to obtain the proofread annotation results.

9. The method as described in claim 8, characterized in that, The model information includes model task type, model image name, model image version, model service request port, model service request path, model service request HTTP method type, and function language. The model image information is used to determine the acquisition method and location of the model image. The model image information includes the request protocol, IP address, port, access path, username, and password of the image repository. The model image name and model image version are used to uniquely identify the model image, and the model service request port, model service request path, and model service request HTTP method type are used to determine how to initiate a request to the model.

10. The method as described in claim 8, characterized in that, The deployment of function images via OpenFaaS includes: Generate a YAML object for function deployment and submit it to OpenFaaS. Then, retrieve the function image from the function image database through OpenFaaS and deploy the function. During deployment, the time for function deployment to complete is determined by calling the function repeatedly.