Service registration method and device, equipment and medium
By utilizing pre-trained language models to process and validate service documents, and generating standard-compliant structured metadata text, the problems of low efficiency and poor accuracy in service registration are solved, achieving efficient and accurate service registration.
Patent Information
- Application Number
- CN202511170258.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-11-28
AI Technical Summary
In microservice architectures and cloud-native applications, the generation of metadata during service registration is inefficient, error-prone, inconsistent, and costly to maintain, lacking end-to-end intelligent automation solutions.
By using a pre-trained language model to process various types of service documents, structured metadata text is generated and verified and corrected according to the service metadata registration standard, ultimately achieving service registration.
It improves the accuracy and efficiency of metadata extraction, ensures that the generated structured metadata text conforms to registration standards, and enhances the accuracy and automation of service registration.
Smart Images

Figure CN121031561A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of software engineering and artificial intelligence, and more particularly, to a service registration method, device, equipment and medium. BACKGROUND
[0002] In modern software development practices, especially with the popularity of microservice architecture and cloud-native applications, the number of services is growing explosively. In order to achieve effective management, discovery and interaction of services, service registry center emerges as the times require and becomes a key component of infrastructure. The service registry center maintains a dynamic list of service instances and their metadata, enabling consumers to find and call the required services.
[0003] In order to enable a service to be managed by the registry center and discovered by other services, the developer needs to provide the metadata of the service. However, the metadata is usually manually written by the developer after manually analyzing different types of documents of the service to be registered and the service metadata registration standard of the service registry center, which is not only low in efficiency but also low in accuracy. SUMMARY
[0004] In view of the above problems, the present disclosure provides a service registration method, device, equipment and medium.
[0005] According to a first aspect of the present disclosure, a service registration method is provided, comprising: in response to receiving a plurality of documents of different types of a target service to be registered to a service registry center, processing the plurality of documents by using a first pre-trained language model to obtain a plurality of metadata of the target service; adding the plurality of metadata to a metadata template to obtain a structured metadata text, wherein the metadata template is determined according to a service metadata registration standard of the service registry center; verifying the structured metadata text by using the service metadata registration standard and the plurality of documents to obtain a first verification result; in the case that the first verification result represents that the structured metadata text conforms to the service metadata registration standard, sending the target service to the service registry center by using the structured metadata text, so that the service registry center registers the target service.
[0006] According to an embodiment of the present disclosure, the metadata template includes a plurality of fields to be filled; and the adding the plurality of metadata to the metadata template to obtain the structured metadata text comprises: performing semantic matching of a metadata type of each of the metadata and a field type of each of the fields to be filled, to determine target metadata matched with each of the fields to be filled; and for each of the fields to be filled in the metadata template, filling the target metadata matched with the field to be filled into the field to be filled to obtain the structured metadata text.
[0007] According to an embodiment of the present disclosure, in response to receiving a plurality of documents of different types of a target service to be registered to a service registry center, the plurality of documents are processed by using a first pre-trained language model to obtain a plurality of metadata of the target service, including: obtaining a service metadata registration standard of the service registry center; adding the service metadata registration standard and the plurality of documents to a first prompt template to obtain first prompt information, the first prompt information being used to guide the first pre-trained language model to extract metadata included in the plurality of documents according to the service metadata registration standard; and inputting the first prompt information into the first pre-trained language model to obtain the plurality of metadata.
[0008] According to an embodiment of the present disclosure, the structured metadata text is verified by using the service metadata registration standard and the service information to obtain a first verification result, including: performing format verification on the structured metadata text to obtain a format verification result; performing integrity verification on the structured metadata text by using mandatory field information in the service metadata registration standard to obtain an integrity verification result; performing consistency verification on the structured metadata text by using the plurality of documents to obtain a consistency verification result; and determining the first verification result according to the format verification result, the integrity verification result, and the consistency verification result.
[0009] According to an embodiment of the present disclosure, the service registration method further includes: performing consistency verification on the plurality of metadata by using the plurality of documents to obtain a second verification result; in a case where the second verification result indicates that the plurality of metadata is inconsistent with the plurality of documents, modifying the plurality of metadata by using the second verification result, the plurality of metadata, and the plurality of documents to obtain a plurality of modified metadata, and displaying the plurality of modified metadata; and in response to receiving confirmation information for the plurality of modified metadata, adding the plurality of modified metadata to the metadata template to obtain structured metadata text.
[0010] According to an embodiment of the present disclosure, the service registry center registers the target service by: obtaining a target language type of the target service and registration tool information of a registration tool used for registration; adding the structured metadata text, the target language type, and the registration tool information to a second prompt template to generate second prompt information; inputting the second prompt information into the second pre-trained language model to generate registration code of the target language type, wherein the registration code can call the registration tool to register the target service to the service registry center; and running the registration code to register the target service to the service registry center.
[0011] According to an embodiment of this disclosure, the service registration method further includes: when the first verification result indicates that the structured metadata text does not conform to the service metadata registration standard, modifying the structured metadata text using the first verification result, the service metadata registration standard, and the structured metadata text to obtain modified structured metadata text; and registering the target service to the service registration center using the modified structured metadata text.
[0012] A second aspect of this disclosure provides a service registration apparatus, comprising: a processing module, configured to, in response to receiving multiple documents of different types of a target service to be registered with a service registry, process the multiple documents using a first pre-trained language model to obtain multiple metadata of the target service; an adding module, configured to add the multiple metadata to a metadata template to obtain structured metadata text, wherein the metadata template is determined according to the service metadata registration standard of the service registry; a verification module, configured to verify the structured metadata text using the service metadata registration standard and the multiple documents to obtain a first verification result; and a registration module, configured to, if the first verification result indicates that the structured metadata text conforms to the service metadata registration standard, send the target service to the service registry using the structured metadata text, so that the service registry registers the target service.
[0013] A third aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0014] A fourth aspect of this disclosure also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0015] The fifth aspect of this disclosure also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.
[0016] According to embodiments of this disclosure, by utilizing a first pre-trained language model to process multiple documents of different types from the target service, metadata contained in the multiple documents can be extracted quickly and accurately, improving the accuracy and efficiency of metadata extraction. Furthermore, by using a metadata template determined according to the service metadata registration standard, the generated structured metadata text conforms to the requirements of the service metadata registration standard, thereby improving the accuracy based on the structured metadata text. In addition, by validating the generated structured metadata text using the service metadata registration standard, the accuracy of the structured metadata text is further improved. Attached Figure Description
[0017] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0018] Figure 1 This illustration schematically depicts an application scenario of a service registration method, apparatus, device, and medium according to embodiments of the present disclosure.
[0019] Figure 2 A flowchart illustrating a service registration method according to an embodiment of this disclosure is shown schematically;
[0020] Figure 3 The illustration shows a schematic diagram of generating structured metadata text according to an embodiment of the present disclosure;
[0021] Figure 4 A flowchart illustrating a registration target service according to an embodiment of this disclosure is shown schematically;
[0022] Figure 5 A schematic block diagram of a service registration apparatus according to an embodiment of the present disclosure is shown; and
[0023] Figure 6 A block diagram schematically illustrates an electronic device suitable for implementing a service registration method according to an embodiment of the present disclosure. Detailed Implementation
[0024] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0025] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0027] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0028] In the technical solution disclosed herein, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse.
[0029] In scenarios involving automated decision-making using personal information, the methods, devices, and systems provided in this disclosure all offer users corresponding entry points for choosing to agree to or reject the automated decision-making results. If the user chooses to reject, the process proceeds to the expert decision-making stage. Here, "automated decision-making" refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests, or economic, health, and credit status through computer programs, and then making a decision. Here, "expert decision-making" refers to the activity of making decisions by personnel who specialize in a particular field, possess specialized experience, knowledge, and skills, and have reached a certain level of professional expertise.
[0030] With the surge in the number of services and the increasing complexity of interaction patterns, service integration has become a critical aspect of system construction. Currently, related technologies primarily rely on manual processing. Developers need to: manually write metadata: read service documentation and design documents, understand the code logic, and then manually fill in metadata fields such as service name, version, interface definition, dependencies, and deployment information according to predefined "service metadata registration standards." Technical shortcomings: This process is time-consuming and labor-intensive, especially for complex or large-scale services, where efficiency is extremely low; different developers may have differing understandings of the standards, leading to inconsistent and non-standard metadata entries, or even the omission of key fields; when services change, manual synchronization and updates of metadata are prone to delays or errors, affecting service governance and discoverability. Service Registries provide registration tools for mainstream programming languages and basic registration code examples. Developers need to manually integrate these registration tool calls and example code into their applications, taking into account the specific business logic and project structure of their services.
[0031] Therefore, related technologies suffer from core problems in generating service metadata and registration code, including low efficiency, error susceptibility, poor consistency, high maintenance costs, complex cross-language support, and a disconnect between metadata generation and code generation processes. There is a lack of an end-to-end intelligent automation solution capable of understanding unstructured service descriptions, automatically generating high-quality metadata, and seamlessly generating reliable registration code in multiple languages that conforms to specific registration tool calling specifications.
[0032] Embodiments of this disclosure provide a service registration method, comprising: in response to receiving multiple documents of different types of a target service to be registered to a service registry, processing the multiple documents using a first pre-trained language model to obtain multiple metadata of the target service; adding the multiple metadata to a metadata template to obtain structured metadata text, wherein the metadata template is determined according to the service metadata registration standard of the service registry; verifying the structured metadata text using the service metadata registration standard and the multiple documents to obtain a first verification result; and, if the first verification result indicates that the structured metadata text conforms to the service metadata registration standard, sending the target service to the service registry using the structured metadata text so that the service registry can register the target service.
[0033] The embodiments of this disclosure leverage the powerful natural language understanding, information extraction, reasoning, and code generation capabilities of pre-trained language models to achieve end-to-end generation from various types of input documents of services to be registered to the final compliant structured metadata text, thereby improving the efficiency of structured metadata text generation. Furthermore, by validating the generated structured metadata text, and using it to register the target service when the validation is successful, the accuracy of the structured metadata text is improved, thus enhancing the precision of the service registration process.
[0034] Figure 1 The illustration shows an application scenario diagram of the service registration method, apparatus, device, and medium according to embodiments of the present disclosure.
[0035] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0036] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0037] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0038] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0039] It should be noted that the service registration method provided in this embodiment can generally be executed by server 105. Correspondingly, the service registration device provided in this embodiment can generally be located in server 105. The service registration method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the service registration device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0040] For example, a user can use a first terminal device 101, a second terminal device 102, and a third terminal device 103 to send multiple documents of different types of a target service to be registered with the service registry to a server 105 via a network 104. Upon receiving the multiple documents of different types of the target service to be registered with the service registry, the server 105 processes the multiple documents using a first pre-trained language model to obtain multiple metadata of the target service. The server adds the multiple metadata to a metadata template to obtain structured metadata text, where the metadata template is determined according to the service metadata registration standard of the service registry. The server then verifies the structured metadata text using the service metadata registration standard and the multiple documents to obtain a first verification result. If the first verification result indicates that the structured metadata text conforms to the service metadata registration standard, the server uses the structured metadata text to send the target service to the service registry so that the service registry can register the target service.
[0041] It should be understood that Figure 1 The number of first terminal devices, second terminal devices, third terminal devices, networks, and servers shown in the diagram is merely illustrative. Depending on implementation needs, any number of first terminal devices, second terminal devices, third terminal devices, networks, and servers can be included.
[0042] The following will be based on Figure 1 The described scene, through Figures 2-6 The service registration method of the disclosed embodiments will be described in detail.
[0043] Figure 2 A flowchart illustrating a service registration method according to an embodiment of this disclosure is shown schematically.
[0044] like Figure 2 As shown, the service registration in this embodiment includes operations S210 to S240.
[0045] In operation S210, in response to receiving multiple documents of different types of the target service to be registered with the service registry, the first pre-trained language model is used to process the multiple documents to obtain multiple metadata of the target service.
[0046] In operation S220, multiple metadata are added to the metadata template to obtain structured metadata text. The metadata template is determined according to the service metadata registration standard of the service registry.
[0047] In operation S230, the structured metadata text is validated using the service metadata registration standard and multiple documents to obtain the first validation result.
[0048] In operation S240, if the first verification result indicates that the structured metadata text conforms to the service metadata registration standard, the target service is sent to the service registry center using the structured metadata text so that the service registry center can register the target service.
[0049] In embodiments of this disclosure, users can upload multiple documents of different types for a target service to the input interface through an interactive interface. These multiple documents of different types for the target service may include unstructured natural language text such as product requirement documents, functional specifications, and design document fragments; semi-structured text such as code comments and lightweight markup language (Markdown) documents; and structured files such as existing partial configuration files and interface definition file fragments.
[0050] According to embodiments of this disclosure, metadata may include the target service's service name, service version, main function description, interface definition, dependencies, protocol type used, data format, deployment requirements, and responsible person information. Interface definitions may include, for example, interface path / method name, request / response parameters and types, and request methods; deployment requirements may include, for example, resource requirements.
[0051] According to embodiments of this disclosure, since the target service has multiple documents of different types, it is difficult to analyze multiple documents manually. Therefore, the natural language processing and information extraction capabilities of a pre-trained language model can be used to extract metadata contained in multiple documents.
[0052] According to embodiments of this disclosure, the first pre-trained language model can be obtained by pre-training a large language model. Specifically, since the first pre-trained language model needs to perform metadata extraction tasks, a first target large language model with strong information extraction capabilities can be selected from different types of large language models, and the first target large language model can be trained using multiple sample documents of different types from the sample service to obtain the first pre-trained language model.
[0053] In some embodiments, multiple documents can be input into the first pre-trained language model for metadata extraction, or knowledge related to metadata extraction can be input into the first pre-trained language model along with multiple documents simultaneously to improve the accuracy of metadata extraction by the first pre-trained language model.
[0054] According to embodiments of this disclosure, the service metadata registration standard can be a standard that the metadata must meet when registering a service. Only if the metadata of a target service meets the service metadata registration standard can it be successfully registered with the service registry. For example, the service metadata registration standard can specify the format of the metadata text and required fields.
[0055] According to embodiments of this disclosure, after obtaining multiple metadata entries for a target service, the metadata can be filled into a metadata template designed according to a service metadata registration standard. For example, the metadata template may include placeholder fields to be filled, and metadata can be filled into these placeholder fields to complete the metadata template filling process.
[0056] In some embodiments, multiple metadata and metadata templates can be input into a pre-trained language model, and the metadata can be filled into the metadata template using the pre-trained language model. Alternatively, the metadata can be directly filled into the placeholder field according to the mapping relationship between the metadata and the placeholder field.
[0057] According to embodiments of this disclosure, since the metadata template is a pre-defined, structured template to be filled based on the service metadata standard, the structured metadata text that meets the service metadata standard can be obtained by filling the metadata template with metadata.
[0058] According to embodiments of this disclosure, to ensure the accuracy of the structured metadata text, after generating the structured metadata text, it can be validated according to the service metadata registration standard. Specifically, it can be verified whether the structured metadata text conforms to the requirements of the service metadata registration standard.
[0059] According to embodiments of this disclosure, if the first verification result of the structured metadata text indicates that the structured metadata text conforms to the service metadata registration standard, the registration of the target service can be directly achieved using the structured metadata text.
[0060] According to embodiments of this disclosure, by utilizing a first pre-trained language model to process multiple documents of different types from the target service, metadata contained in the multiple documents can be extracted quickly and accurately, improving the accuracy and efficiency of metadata extraction. Furthermore, by using a metadata template determined according to the service metadata registration standard, the generated structured metadata text conforms to the requirements of the service metadata registration standard, thereby improving the accuracy based on the structured metadata text. In addition, by validating the generated structured metadata text using the service metadata registration standard, the accuracy of the structured metadata text is further improved.
[0061] According to embodiments of this disclosure, the service registration method further includes: if the first verification result indicates that the structured metadata text does not conform to the service metadata registration standard, modifying the structured metadata text using the first verification result, the service metadata registration standard, and the structured metadata text to obtain modified structured metadata text; and registering the target service to the service registry using the modified structured metadata text.
[0062] According to embodiments of this disclosure, if the structured metadata text does not conform to the service metadata registration standard, directly registering the target service using the structured metadata text may result in registration failure. Therefore, the structured metadata text can be corrected based on the first verification result to obtain a corrected structured metadata text that conforms to the service metadata registration standard, and the corrected structured metadata text can be used to register the target service.
[0063] According to embodiments of this disclosure, the first verification result may include the reason why the structured metadata text failed the verification. When correcting the structured metadata text, the first verification result, the service metadata registration standard, and the structured metadata text that does not conform to the service metadata registration standard can be input into a pre-trained language model. The pre-trained language model is then used to correct the structured metadata text to obtain the corrected structured metadata text.
[0064] According to another embodiment of this disclosure, the first verification result, the service metadata registration standard, and the structured metadata text can also be displayed on the user interface. The user can then modify the structured metadata text based on the first verification result and the service metadata registration standard to obtain the modified structured metadata text.
[0065] According to embodiments of this disclosure, when the structured metadata text does not meet the service metadata registration standard, the structured metadata text is corrected by utilizing the first verification result and the service metadata registration standard, so that the corrected structured metadata text can meet the requirements of the service metadata registration standard, thereby improving the accuracy of the structured metadata text.
[0066] According to embodiments of this disclosure, in response to receiving multiple documents of different types of a target service to be registered with a service registry, a first pre-trained language model is used to process the multiple documents to obtain multiple metadata of the target service, including: obtaining the service metadata registration standard of the service registry; adding the service metadata registration standard and the multiple documents to a first prompt template to obtain a first prompt message, the first prompt message being used to guide the first pre-trained language model to extract the metadata included in the multiple documents according to the service metadata registration standard; and inputting the first prompt message into the first pre-trained language model to obtain multiple metadata.
[0067] According to embodiments of this disclosure, in order to improve the accuracy of extracting metadata from multiple documents using a first pre-trained language model, a service metadata registration standard can be obtained and used as input to the first pre-trained model, so that the first pre-trained language model can extract metadata from multiple documents more accurately according to the requirements of the service metadata registration standard.
[0068] According to embodiments of this disclosure, when extracting metadata from multiple documents using a first pre-trained model, prompt word engineering can be used to guide the first pre-trained model. Specifically, a service metadata registration standard and multiple documents can be added to a first prompt template to obtain first prompt information. The first prompt information is then used to guide the first pre-trained language model to extract the metadata included in the multiple documents according to the service metadata registration standard.
[0069] In some embodiments, the first prompt information can guide the first pre-trained language model to recognize implicit metadata elements in code comments and document fragments, such as version compatibility constraints of dependent services and non-standard protocol interfaces, and introduce a cross-document reference resolution mechanism to solve problems such as parameter alias conflicts.
[0070] According to embodiments of this disclosure, when using a first pre-trained language model to extract metadata, a confidence threshold feedback mechanism can also be used to trigger manual review when the confidence of the first pre-trained model is less than the confidence threshold. Multiple metadata extracted using the first pre-trained model will be displayed on the user interface, and the user can confirm the multiple metadata.
[0071] According to embodiments of this disclosure, by obtaining first prompt information based on the service metadata registration standard and multiple documents to guide the first pre-trained language model to extract metadata included in the multiple documents according to the service metadata registration standard, the accuracy of using the first prompt information to guide the first pre-trained model to extract metadata can be improved, thereby improving the accuracy of the obtained structured metadata text.
[0072] According to embodiments of this disclosure, the service registration method further includes: using multiple documents to perform consistency verification on multiple metadata to obtain a second verification result; if the second verification result indicates that the multiple metadata is inconsistent with the multiple documents, using the second verification result, the multiple metadata, and the multiple documents to correct the multiple metadata to obtain multiple corrected metadata, and displaying the multiple corrected metadata; in response to receiving confirmation information for the multiple corrected metadata, adding the multiple corrected metadata to the metadata template to obtain structured metadata text.
[0073] According to embodiments of this disclosure, since the pre-trained language model may have the problem of illusory output, resulting in inconsistencies between the extracted metadata and the original records in multiple documents, consistency verification of multiple metadata can be performed using multiple documents after the metadata is generated.
[0074] According to embodiments of this disclosure, when performing consistency verification, document fragments related to each metadata can be determined from multiple documents first, and then a second verification result can be determined based on the degree of matching between the document fragments and the metadata.
[0075] According to embodiments of this disclosure, if the second verification result indicates that multiple metadata are consistent with multiple documents, the metadata can be added to the metadata template; otherwise, the metadata needs to be corrected to obtain corrected metadata consistent with the original records of the multiple documents.
[0076] According to embodiments of this disclosure, a second verification result, multiple metadata and multiple documents can be input into a pre-trained language model, and the pre-trained language model can be used to correct the multiple metadata to obtain corrected metadata.
[0077] According to another embodiment of this disclosure, a second verification result, multiple metadata, and multiple documents can be displayed on a user interface, enabling the user to correct the multiple metadata based on the second verification result and the original records of the multiple documents, thereby obtaining corrected metadata. Specifically, erroneous metadata that is inconsistent with the multiple documents can be displayed, along with document fragments corresponding to the erroneous metadata.
[0078] According to embodiments of this disclosure, after generating metadata, multiple documents are used to verify multiple metadata. If the second verification result indicates that the multiple metadata is inconsistent with the multiple documents, the multiple metadata is corrected, and the corrected metadata is used to generate structured metadata text, thereby improving the accuracy of structured metadata text.
[0079] Figure 3 A schematic diagram illustrating the generation of structured metadata text according to an embodiment of the present disclosure is shown.
[0080] likeFigure 3 As shown, the service metadata registration standard 301 and multiple documents 302 are added to the first prompt template 303 to obtain the first prompt information 304. The first prompt information 304 is input into the first pre-trained language model M1 to obtain multiple metadata 305. The multiple metadata 305 are added to the metadata template 306 to obtain the structured metadata text 307.
[0081] According to embodiments of this disclosure, a metadata template includes multiple fields to be filled; adding multiple metadata to the metadata template to obtain structured metadata text includes: semantically matching the metadata type of each metadata with the field type of each field to be filled to determine the target metadata that matches each field to be filled; for each field to be filled in the metadata template, filling the field to be filled with the target metadata that matches the field to be filled to obtain structured metadata text.
[0082] According to embodiments of this disclosure, when extracting metadata from multiple documents, the metadata type of each metadata element can be extracted simultaneously based on contextual information from the multiple documents. However, the process of extracting metadata types can be affected by the descriptions of the multiple documents, resulting in a difference between the metadata type of the extracted metadata and the field type of the field to be populated.
[0083] For example, if the field type is "deployment requirement" and the document describes it as "deployment need", the extracted metadata type will be "deployment need". Since the metadata type and the field type are different, the metadata cannot be directly added to the corresponding field to be filled based on the metadata type. Therefore, it is necessary to perform semantic matching between the metadata type and the field type to determine the metadata type that matches the field type among multiple metadata, and then determine the metadata corresponding to the field to be filled.
[0084] According to embodiments of this disclosure, when performing semantic matching on metadata types and field types, for each field type, the metadata type with the highest semantic matching degree with that field type can be determined as the target metadata type, and the metadata corresponding to the target metadata type can be determined as the target metadata.
[0085] According to embodiments of this disclosure, a pre-trained language model can be used for semantic matching of metadata types and field types. Specifically, multiple metadata types and multiple field types can be added to a prompt template to obtain prompt information. The prompt information prompts the pre-trained language model to determine the metadata type with the highest semantic matching degree for each field type.
[0086] According to embodiments of this disclosure, after determining the target metadata that matches the field to be filled, the metadata can be filled into the field to be filled until each field to be filled in the metadata template is filled, resulting in structured metadata text.
[0087] According to embodiments of this disclosure, by matching metadata types and field types, it is possible to determine target metadata that matches each field to be filled from multiple metadata sources, thereby improving the accuracy of the generated structured metadata text.
[0088] According to embodiments of this disclosure, the structured metadata text is validated using service metadata registration standards and service information to obtain a first validation result, including: performing format validation on the structured metadata text to obtain a format validation result; performing integrity validation on the structured metadata text using required field information in the service metadata registration standards to obtain an integrity validation result; performing consistency validation on the structured metadata text using multiple documents to obtain a consistency validation result; and determining the first validation result based on the format validation result, the integrity validation result, and the consistency validation result.
[0089] According to embodiments of this disclosure, the process of validating structured text may include format validation, integrity validation, and consistency validation. Through multi-faceted validation, the accuracy of structured metadata text can be further improved.
[0090] According to embodiments of this disclosure, format validation can be used to verify whether structured metadata text conforms to a predefined structured specification. Specifically, the structured specification can be determined based on the service metadata registration standard.
[0091] According to embodiments of this disclosure, integrity verification can be used to verify whether the structured metadata text includes required fields specified in the service metadata registration standard, such as service name and service version.
[0092] According to embodiments of this disclosure, consistency verification may include field logical consistency verification and text description consistency verification. Specifically, field logical consistency verification can be used to verify whether the parameter types of the interface match the description declaration, and text description consistency verification can be used to verify whether the semantics between the structured metadata text and multiple documents are consistent, such as the document description indicating that the target service supports asynchronous calls, while the structured metadata text indicates synchronous calls.
[0093] According to embodiments of this disclosure, when performing text description consistency verification, natural language processing can be used to compare whether there are semantic conflicts between structured metadata text and multiple documents.
[0094] According to embodiments of this disclosure, if the format verification result, integrity verification result, and consistency verification result all indicate that the structured metadata text has passed verification, it can be determined that the first verification result indicates that the structured metadata text has passed verification; otherwise, it can be determined that the first verification result indicates that the structured metadata text has failed verification.
[0095] According to embodiments of this disclosure, by verifying the structured metadata text from multiple aspects such as format verification, integrity verification, and consistency verification, it is ensured that the structured metadata text can meet the requirements of the service metadata registration standard, and that the structured metadata text can be consistent with the document, thereby improving the accuracy of the structured metadata text.
[0096] Figure 4 A flowchart illustrating a registration target service according to an embodiment of this disclosure is shown.
[0097] like Figure 4 As shown, the registered target service includes operations S401 to S409.
[0098] In operation S401, multiple documents are processed to obtain multiple metadata.
[0099] In operation S402, a consistency check is performed on multiple metadata, and a second check result is obtained.
[0100] In operation S403, determine whether the second verification result indicates that multiple metadata entries are consistent with multiple documents. If the second verification result indicates that multiple metadata entries are inconsistent with multiple documents, execute operation S404; otherwise, execute operation S405.
[0101] In operation S404, multiple metadata items are corrected.
[0102] In operation S405, structured metadata text is generated.
[0103] In operation S406, the structured metadata text is validated, and the first validation result is obtained.
[0104] In operation S407, determine whether the first verification result indicates that the structured data text conforms to the service metadata registration standard. If the first verification result indicates that the structured data text does not conform to the service metadata registration standard, execute operation S408; otherwise, execute operation S409.
[0105] In operation S408, the structured metadata text is corrected.
[0106] In operation S409, register the target service.
[0107] According to embodiments of this disclosure, the service registry registers a target service by: obtaining the target language type of the target service and registration tool information for the registration tool used for registration; adding structured metadata text, the target language type, and the registration tool information to a second prompt template to generate second prompt information; inputting the second prompt information into a second pre-trained language model to generate registration code for the target language type, wherein the registration code can call the registration tool to register the target service to the service registry; and running the registration code to register the target service to the service registry.
[0108] According to embodiments of this disclosure, registration code typically requires developers to manually write it by combining the service's business logic and project structure, and then calling a registration tool, resulting in low efficiency and accuracy. Therefore, a second pre-trained language model can be used to generate registration code.
[0109] According to embodiments of this disclosure, the target language type and registration tool information of the target service can be obtained first, and the structured metadata text, target language type and registration tool information can be added to the second prompt template to generate second prompt information. The second prompt information can prompt the second pre-trained language model to call the registration tool according to the registration tool information and generate registration code for the target language type.
[0110] According to embodiments of this disclosure, after generating the registration code, the registration code can be run to register the target service to the registration service center, thereby automating the service registration process.
[0111] According to embodiments of this disclosure, by utilizing a second pre-trained language model to generate registration codes for registering target services, the efficiency and accuracy of registration code generation are improved.
[0112] Based on the above service registration method, this disclosure also provides a service registration apparatus. The following will be combined with... Figure 5 The device is described in detail.
[0113] Figure 5 A schematic block diagram of a service registration apparatus according to an embodiment of the present disclosure is shown.
[0114] like Figure 5 As shown, the service registration device 500 of this embodiment includes a processing module 510, an adding module 520, a verification module 530, and a registration module 540.
[0115] The processing module 510 is used to process multiple documents of different types of a target service to be registered with the service registry in response to receiving such documents, using a first pre-trained language model to obtain multiple metadata of the target service. In one embodiment, the processing module 510 can be used to perform the operation S210 described above, which will not be repeated here.
[0116] The adding module 520 is used to add multiple metadata to a metadata template to obtain structured metadata text. The metadata template is determined according to the service metadata registration standard of the service registry. In one embodiment, the adding module 520 can be used to perform the operation S220 described above, which will not be repeated here.
[0117] The verification module 530 is used to verify the structured metadata text using the service metadata registration standard and multiple documents to obtain a first verification result. In one embodiment, the verification module 530 can be used to perform the operation S230 described above, which will not be repeated here.
[0118] The registration module 540, when the first verification result indicates that the structured metadata text conforms to the service metadata registration standard, uses the structured metadata text to send the target service to the service registry center so that the service registry center can register the target service. In one embodiment, the registration module 530 can be used to perform the operation S240 described above, which will not be repeated here.
[0119] According to embodiments of this disclosure, the metadata template includes multiple fields to be populated. The adding module 520 includes a matching submodule and a field adding submodule.
[0120] The matching submodule is used to semantically match the metadata type of each metadata with the field type of each field to be populated, and to determine the target metadata that matches each field to be populated.
[0121] The field addition submodule is used to populate each field to be populated in the metadata template with the target metadata that matches the field to be populated, thus obtaining structured metadata text.
[0122] According to embodiments of this disclosure, the processing module 510 includes an acquisition submodule, a first addition submodule, and a first prompt submodule.
[0123] The `get` submodule is used to obtain the service metadata registration standards from the service registry.
[0124] The first addition submodule is used to add the service metadata registration standard and multiple documents to the first prompt template to obtain the first prompt information. The first prompt information is used to guide the first pre-trained language model to extract the metadata included in the multiple documents according to the service metadata registration standard.
[0125] The first prompt submodule is used to input the first prompt information into the first pre-trained language model to obtain multiple metadata.
[0126] According to embodiments of this disclosure, the verification module 530 includes a format verification submodule, a completeness verification submodule, a consistency verification submodule, and a result determination submodule.
[0127] The format validation submodule is used to perform format validation on structured metadata text and obtain the format validation results.
[0128] The complete verification submodule is used to perform integrity verification on structured metadata text using the required fields in the service metadata registration standard, and obtain the integrity verification result.
[0129] The consistency verification submodule is used to perform consistency verification on structured metadata text using multiple documents and obtain the consistency verification result.
[0130] The result determination submodule is used to determine the first verification result based on the format verification result, integrity verification result, and consistency verification result.
[0131] According to embodiments of this disclosure, the service registration device 500 further includes a data verification module, a data correction module, and a text generation module.
[0132] The data verification module is used to perform consistency verification on multiple metadata documents to obtain a second verification result.
[0133] The data correction module is used to correct multiple metadata when the second verification result indicates that multiple metadata are inconsistent with multiple documents, using the second verification result, multiple metadata, and multiple documents to obtain multiple corrected metadata and display the multiple corrected metadata.
[0134] The text generation module is used to add multiple corrected metadata to the metadata template in response to receiving confirmation information for multiple corrected metadata, thereby obtaining structured metadata text.
[0135] According to embodiments of this disclosure, the service registry registers a target service by: obtaining the target language type of the target service and registration tool information for the registration tool used for registration; adding structured metadata text, the target language type, and the registration tool information to a second prompt template to generate second prompt information; inputting the second prompt information into a second pre-trained language model to generate registration code for the target language type, wherein the registration code can call the registration tool to register the target service to the service registry; and running the registration code to register the target service to the service registry.
[0136] According to embodiments of this disclosure, the service registration device 500 further includes a text correction module and a correction registration module.
[0137] The text correction module is used to correct the structured metadata text by using the first verification result, the service metadata registration standard, and the structured metadata text when the first verification result indicates that the structured metadata text does not conform to the service metadata registration standard, so as to obtain the corrected structured metadata text.
[0138] The revised registration module is used to register the target service with the service registry using the revised structured metadata text.
[0139] According to embodiments of this disclosure, any plurality of modules among processing module 510, adding module 520, verification module 530, and registration module 540 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of processing module 510, adding module 520, verification module 530, and registration module 540 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), programmable logic array (PLA), system-on-a-chip, system-on-a-substrate, system-on-package, application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of processing module 510, adding module 520, verification module 530, and registration module 540 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0140] Figure 6 A block diagram schematically illustrates an electronic device suitable for implementing a service registration method according to an embodiment of the present disclosure.
[0141] like Figure 6As shown, an electronic device 600 according to an embodiment of this disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.
[0142] RAM 603 stores various programs and data required for the operation of electronic device 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 602 and / or RAM 603. It should be noted that programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in one or more memories.
[0143] According to embodiments of this disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to a bus 604. The electronic device 600 may also include one or more of the following components connected to the input / output (I / O) interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.
[0144] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0145] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 602 and / or RAM 603 and / or one or more memories other than ROM 602 and RAM 603 described above.
[0146] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the service registration method provided in the embodiments of this disclosure.
[0147] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0148] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0149] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0150] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0151] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0152] Those skilled in the art will understand that the features described in the various embodiments of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments of this disclosure can be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.
[0153] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A service registration method, characterized in that, The method includes: In response to receiving multiple documents of different types of a target service to be registered with the service registry, the multiple documents are processed using a first pre-trained language model to obtain multiple metadata of the target service; The multiple metadata items are added to the metadata template to obtain structured metadata text, wherein the metadata template is determined according to the service metadata registration standard of the service registry. Using the service metadata registration standard and the multiple documents, the structured metadata text is validated to obtain a first validation result; If the first verification result indicates that the structured metadata text conforms to the service metadata registration standard, the target service is sent to the service registry center using the structured metadata text so that the service registry center can register the target service.
2. The method according to claim 1, characterized in that, The metadata template includes multiple fields to be filled; The step of adding the multiple metadata to the metadata template to obtain structured metadata text includes: Semantically match the metadata type of each of the metadata with the field type of each of the fields to be populated to determine the target metadata that matches each of the fields to be populated. For each field to be populated in the metadata template, the target metadata that matches the field to be populated is populated into the field to be populated, thus obtaining the structured metadata text.
3. The method according to claim 1, characterized in that, In response to receiving multiple documents of different types for a target service to be registered with the service registry, the system processes the multiple documents using a first pre-trained language model to obtain multiple metadata of the target service, including: Obtain the service metadata registration standard from the service registry; The service metadata registration standard and the plurality of documents are added to the first prompt template to obtain the first prompt information. The first prompt information is used to guide the first pre-trained language model to extract the metadata included in the plurality of documents according to the service metadata registration standard. The first prompt information is input into the first pre-trained language model to obtain the multiple metadata.
4. The method according to claim 1, characterized in that, The step of verifying the structured metadata text using the service metadata registration standard and the service information to obtain a first verification result includes: The structured metadata text is format-validated to obtain the format validation result; The structured metadata text is validated for integrity using the required fields in the service metadata registration standard to obtain the integrity validation result. Using the multiple documents, a consistency check is performed on the structured metadata text to obtain the consistency check result; The first verification result is determined based on the format verification result, the integrity verification result, and the consistency verification result.
5. The method according to claim 1, characterized in that, Also includes: Using the multiple documents, a consistency check is performed on the multiple metadata to obtain a second check result; If the second verification result indicates that the multiple metadata are inconsistent with the multiple documents, the multiple metadata are corrected using the second verification result, the multiple metadata, and the multiple documents to obtain multiple corrected metadata, and the multiple corrected metadata are displayed. In response to receiving confirmation information for the plurality of corrected metadata, the plurality of corrected metadata is added to the metadata template to obtain structured metadata text.
6. The method according to claim 1, characterized in that, The service registry registers the target service in the following manner: Obtain the target language type of the target service and the registration tool information for the registration tool used for registration; The structured metadata text, the target language type, and the registration tool information are added to the second prompt template to generate the second prompt information; The second prompt information is input into the second pre-trained language model to generate a registration code for the target language type, wherein the registration code can call the registration tool to register the target service to the service registry center; as well as Run the registration code to register the target service to the service registry.
7. The method according to claim 1, characterized in that, The method further includes: If the first verification result indicates that the structured metadata text does not conform to the service metadata registration standard, the structured metadata text is corrected using the first verification result, the service metadata registration standard, and the structured metadata text to obtain the corrected structured metadata text. The target service is registered to the service registry using the revised structured metadata text.
8. A service registration device, characterized in that, The device includes: The processing module is configured to, in response to receiving multiple documents of different types of a target service to be registered to the service registry, process the multiple documents using a first pre-trained language model to obtain multiple metadata of the target service; An add module is used to add the multiple metadata to a metadata template to obtain structured metadata text, wherein the metadata template is determined according to the service metadata registration standard of the service registry; The verification module is used to verify the structured metadata text using the service metadata registration standard and the multiple documents to obtain a first verification result; The registration module is used to send the target service to the service registry center using the structured metadata text when the first verification result indicates that the structured metadata text conforms to the service metadata registration standard, so that the service registry center can register the target service.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.