Business data interface generation method and device, equipment and medium
By automating the business data interface generation process through a pre-defined language model, the problem of time-consuming and labor-intensive traditional interface development is solved, enabling efficient and accurate interface generation and release, and adapting to the rapid changes in enterprise business needs.
Patent Information
- Application Number
- CN202411051365.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-08-01
AI Technical Summary
Traditional business data interface development processes are cumbersome, relying on manual processing, which leads to long processing times, numerous errors, and high costs, making it difficult to adapt to the frequent changes in enterprise business needs.
It uses a pre-defined language model to parse business requirement descriptions, automatically identify interface parameter information and metadata, generate interface code, and perform automated testing and deployment, reducing manual intervention.
It improves the accuracy and flexibility of interface generation, shortens the development cycle, reduces the risk of human error, ensures data consistency and reliability, and improves development efficiency and code quality.
Smart Images

Figure CN118981304A_ABST
Abstract
Description
Technical Field
[0001] The present specification relates to the field of computer technology, and in particular to a method, device, equipment and medium for generating a business data interface. Background Art
[0002] A business data interface is a connection point used to transmit and exchange business data between different systems or applications. It defines the format, transmission method, and interaction rules of data, enabling different systems to communicate with each other and share data. With the continuous development of information technology, the data requirements of various platforms have become increasingly complex. Therefore, in order to better support data collection, analysis, and processing, it is necessary to establish different business data interfaces according to different business requirements to maintain the normal operation of the current business.
[0003] The current traditional interface development process is relatively cumbersome, and generally requires manual implementation of interface design, coding, testing, and document writing. However, this method, which relies on manual processing, places a heavy workload on developers, is not only time-consuming, but also causes many errors due to human factors. In addition, for systems with frequent business needs, there is a lot of repetitive work, which makes it difficult for technical personnel to free themselves from tedious and repetitive work, and they focus more on high-value-added innovation activities, resulting in high labor costs. Summary of the invention
[0004] In order to solve the above technical problems, one or more embodiments of this specification provide a method, device, equipment and medium for generating a business data interface.
[0005] One or more embodiments of this specification adopt the following technical solutions:
[0006] One or more embodiments of this specification provide a method for generating a business data interface, the method comprising:
[0007] Obtaining a current business requirement description, parsing the current business requirement description based on a preset language model, and determining a business description keyword corresponding to the business data interface to be generated;
[0008] Based on the business description keywords, the interface parameter information corresponding to the business data interface to be generated is identified, and the corresponding metadata set is determined by querying according to the interface parameter information; wherein the interface parameter information includes: parameter structure, parameter type, and parameter attribute;
[0009] The interface code corresponding to the association relationship between the to-be-generated business data interface and the metadata set is obtained, so as to instantiate and automatically test the interface code, and to publish the obtained business data interface.
[0010] Optionally, in one or more embodiments of the present specification, obtaining the current business requirement description specifically includes:
[0011] Acquire business requirement descriptions based on multi-dimensional channels, and determine the data format of each business requirement description;
[0012] Obtaining a specified data format corresponding to the current business requirement structured template, so as to convert the data format of each business requirement description into the specified data format;
[0013] The converted business requirement description is sorted based on the current business requirement structured template to obtain the current business requirement description.
[0014] Optionally, in one or more embodiments of the present specification, the current business requirement description is parsed based on a preset language model to determine the business description keywords corresponding to the business data interface to be generated, specifically including:
[0015] Preprocessing the current business requirement description to perform word segmentation processing on the processed current business requirement data to obtain the word segmentation of the business requirement description to be parsed;
[0016] Analyze the segmented words of the business requirement description to be parsed according to a preset language model to extract initial keywords of the segmented words of the business requirement description to be parsed;
[0017] The context information of each of the initial keywords in the current business requirement description is obtained, and based on the correlation between the context information and the initial keywords, the initial keywords are filtered to determine the business description keywords corresponding to the business data interface to be generated.
[0018] Optionally, in one or more embodiments of the present specification, identifying the interface parameter information corresponding to the service data interface to be generated based on the service description keyword, and querying and determining the corresponding metadata set according to the interface parameter information specifically includes:
[0019] Determine the business logic corresponding to the business description keyword according to the preset language model to obtain basic associated parameters corresponding to each business logic; wherein the basic associated parameters are fixed parameters corresponding to each business logic processing flow;
[0020] Acquire the dynamic associated parameters corresponding to each of the business logics, so as to determine the parameter change mode corresponding to each of the dynamic associated parameters according to the context information of each of the dynamic associated parameters;
[0021] Determine a corresponding parameter change mode according to the context information of the business description keyword, and determine a current dynamic association parameter based on the parameter change mode;
[0022] Determining interface parameter information corresponding to the service data interface to be generated according to the basic association parameters and the current dynamic association parameters;
[0023] Based on the interface parameter information, data query is performed in the preset service layer to obtain a corresponding metadata set.
[0024] Optionally, in one or more embodiments of the present specification, performing data query in the preset service layer based on the interface parameter information to obtain a corresponding metadata set specifically includes:
[0025] Acquire a storage unit corresponding to the preset service layer, so as to acquire a first metadata set corresponding to the interface parameter information in the storage unit;
[0026] Determine whether the corresponding first metadata set is found in each of the parameter interface information, and if so, use the first metadata set as the metadata set;
[0027] If not, the interface parameter information is uploaded to the user terminal to receive the second metadata set uploaded by the user terminal, and the first metadata set and the second metadata set are used as corresponding metadata sets.
[0028] Optionally, in one or more embodiments of the present specification, obtaining an interface code corresponding to an association relationship between the to-be-generated service data interface and the metadata set specifically includes:
[0029] Acquire standard rule information corresponding to the current business requirement description based on a preset language model; wherein the standard rule information includes: interface naming rules, version control rules, and security policies;
[0030] The standard rule information and the association relationship between the business data interface to be generated and the metadata set are input into the preset language model to output an interface code corresponding to the association relationship between the business data interface to be generated and the metadata set; wherein the interface code includes: function code and configuration code corresponding to environment variables, dependencies and error handling logic.
[0031] Optionally, in one or more embodiments of the present specification, the interface code is instantiated and automatically tested to publish the obtained business data interface, specifically including:
[0032] Automatically deploy the test environment of the business interface to be generated based on the configuration code, and generate corresponding test cases;
[0033] Performing instance testing on the functional code based on the test case under the test environment;
[0034] If the test passes, the automatic release process of the interface is triggered to deploy and release the function code.
[0035] One or more embodiments of this specification provide a device for generating a service data interface, the device comprising:
[0036] A parsing unit, used to obtain a current business requirement description, parse the current business requirement description based on a preset language model, and determine a business description keyword corresponding to the business data interface to be generated;
[0037] A query unit, used to identify the interface parameter information corresponding to the service data interface to be generated based on the service description keyword, and query and determine the corresponding metadata set according to the interface parameter information; wherein the interface parameter information includes: parameter structure, parameter type, parameter attribute;
[0038] The publishing unit is used to obtain the interface code corresponding to the association relationship between the business data interface to be generated and the metadata set, so as to instantiate and automatically test the interface code, and publish the obtained business data interface.
[0039] One or more embodiments of this specification provide a device for generating a service data interface, the device comprising:
[0040] at least one processor; and,
[0041] a memory communicatively connected to the at least one processor; wherein,
[0042] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0043] Obtaining a current business requirement description, parsing the current business requirement description based on a preset language model, and determining a business description keyword corresponding to the business data interface to be generated;
[0044] Based on the business description keywords, the interface parameter information corresponding to the business data interface to be generated is identified, and the corresponding metadata set is determined by querying according to the interface parameter information; wherein the interface parameter information includes: parameter structure, parameter type, and parameter attribute;
[0045] The interface code corresponding to the association relationship between the to-be-generated business data interface and the metadata set is obtained, so as to instantiate and automatically test the interface code, and to publish the obtained business data interface.
[0046] One or more embodiments of this specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to:
[0047] Obtaining a current business requirement description, parsing the current business requirement description based on a preset language model, and determining a business description keyword corresponding to the business data interface to be generated;
[0048] Based on the business description keywords, the interface parameter information corresponding to the business data interface to be generated is identified, and the corresponding metadata set is determined by querying according to the interface parameter information; wherein the interface parameter information includes: parameter structure, parameter type, and parameter attribute;
[0049] The interface code corresponding to the association relationship between the to-be-generated business data interface and the metadata set is obtained, so as to instantiate and automatically test the interface code, and to publish the obtained business data interface.
[0050] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0051] By obtaining the current business requirement description and parsing it using the preset language model, the business description keywords of the business data interface to be generated can be accurately identified. This method not only improves the accuracy of the interface, but also makes the entire generation process more flexible and can quickly adapt to different business requirements. The entire generation process, from business requirement description to interface code generation, instantiation, automated testing, and final interface release, is highly automated. This greatly reduces manual intervention, improves development efficiency, and reduces the risk caused by human errors. By querying the metadata set corresponding to the interface parameter information, the interface generation process is made more data-driven. This helps ensure the data consistency and reliability of the interface, and also facilitates subsequent maintenance and upgrades. Through automated testing and instantiation, potential problems in the interface code can be discovered and resolved in a timely manner, improving the quality and stability of the code. At the same time, the automated interface release process also shortens the cycle from development to launch, improving overall development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:
[0053] Figure 1A flow chart of a method for generating a business data interface provided in an embodiment of this specification;
[0054] Figure 2 A schematic diagram of a system for developing a business data interface provided in an embodiment of this specification;
[0055] Figure 3 A schematic diagram of a development process of a business data interface provided in an embodiment of this specification;
[0056] Figure 4 A schematic diagram of the structure of a device for generating a business data interface provided in an embodiment of this specification;
[0057] Figure 5 A schematic diagram of a device structure for generating a business data interface provided in an embodiment of this specification;
[0058] Figure 6 A schematic diagram of the structure of a non-volatile storage medium provided in an embodiment of this specification. DETAILED DESCRIPTION
[0059] The embodiments of this specification provide a method, apparatus, device and medium for generating a business data interface.
[0060] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0061] like Figure 1 As shown, the present specification embodiment provides a flow chart of a method for generating a business data interface. Figure 1 It can be seen that in one or more embodiments of this specification, a method for generating a business data interface includes the following steps:
[0062] S101: Obtain a current business requirement description, parse the current business requirement description based on a preset language model, and determine a business description keyword corresponding to a business data interface to be generated.
[0063] In order to enable the back-end service to flexibly adapt to the variability of the front-end business scenarios, and effectively reduce the problems of inconsistent specifications and security vulnerabilities caused by human factors. In the embodiment of this specification, the description of the current business demand is first obtained, so that the current business hydrangea description is parsed according to the preset language model, and the business description keywords corresponding to the business data interface to be generated are determined. Among them, the business demand description can come from a variety of channels, such as documents, meeting records, user interviews, etc. These descriptions usually contain specific requirements for the improvement of new systems or existing systems. Before the current business demand description is mediated based on the preset language model, a suitable natural language processing (NLP) model can be selected according to the characteristics of the business demand. Common models include BERT, GPT series, etc., which perform well in understanding and generating natural language text. Use historical business demand data, existing business data interface descriptions, etc. as training data to train the model. The purpose of training is to enable the model to accurately understand the business demand description and identify the key information therein. The business demand description is parsed using the trained language model to identify the entities (such as users, products, services, etc.), actions (such as adding, deleting, querying, etc.) and attributes (such as type, status, etc.) therein. Then, based on the parsing results, business description keywords closely related to the business data interface to be generated can be extracted.
[0064] Specifically, in one or more embodiments of this specification, obtaining the current business requirement description specifically includes:
[0065] First, obtain the business requirement description through multi-dimensional channels and determine the data format of each business requirement description. Then, obtain the specified data format corresponding to the current business requirement structured template to convert the data format of each business requirement description into the specified data format. Then, organize the converted business requirement description according to the current business requirement structured template to obtain the current business requirement description. Obtaining business requirement descriptions through multi-dimensional channels can ensure that comprehensive and detailed information is collected. Different channels may provide business requirements from different angles and levels, thereby helping the project team to understand business goals more comprehensively. Determining and converting the data format of each business requirement description to the specified data format solves the problem of inconsistent data formats. The unified data format facilitates subsequent automated processing and analysis, reducing data errors and duplication of work caused by format differences. Use the current business requirement structured template to organize the converted business requirement description, making the business requirements more standardized, easy to understand and execute. At the same time, through automated data format conversion and template organization, the need for manual intervention is greatly reduced, and work efficiency is improved. At the same time, the automated process reduces the possibility of human errors and improves the accuracy of business requirement descriptions.
[0066] Specifically, in one or more embodiments of the present specification, the current business requirement description is parsed based on a preset language model to determine the business description keywords corresponding to the business data interface to be generated, which specifically includes the following process:
[0067] The current business requirement description is preprocessed to perform word segmentation on the processed current business requirement data to obtain the word segmentation of the business requirement description to be parsed. Through preprocessing and word segmentation, the business requirement description is converted into a format that is easier to analyze. This helps the language model to understand the text content more accurately, thereby extracting more accurate initial keywords. Then, the word segmentation of the business requirement description to be parsed is analyzed according to the preset language model to extract the initial keywords for parsing the business requirement description word segmentation, and then the context information of each initial keyword in the current business requirement description is obtained, so as to filter the initial keywords based on the correlation between the context information and the initial keywords, and determine the business description keywords corresponding to the business data interface to be generated. By further filtering the initial keywords in combination with the context information, words that are not related to the generation of the business data interface can be removed, and those keywords that truly reflect the core of the business requirements can be retained. This greatly improves the accuracy and relevance of the keywords. For complex business requirement descriptions, traditional manual parsing methods may be difficult to fully and accurately capture all key information. The parsing method based on the preset language model can process a large amount of text data and extract key information from it, providing strong support for the generation of data interfaces in complex business scenarios. And by accurately extracting business description keywords, we can ensure that the generated business data interface is closely related to business needs. This helps to improve the functionality and usability of the interface and reduce the cost and risk of subsequent development and maintenance. Figure 3 As shown, in one or more embodiments of the present specification, after the current business requirement description is parsed based on a preset language model to obtain business description keywords, the business description keywords can also be confirmed based on a preset review unit, and the subsequent process will be started if the confirmation is passed.
[0068] S102: Identify interface parameter information corresponding to the to-be-generated business data interface based on the business description keywords, and query and determine a corresponding metadata set based on the interface parameter information; wherein the interface parameter information includes: parameter structure, parameter type, and parameter attribute.
[0069] In order to predict and suggest possible parameter combinations, increase the flexibility of the interface and the display of passengers and goods, and reduce the cost of later modifications caused by unreasonable parameter design, the preset language model in the embodiment of this specification will deeply understand the business logic description and intelligently identify all the input parameters and expected return parameter structures required by the interface. That is, in the embodiment of this specification, the interface parameter information corresponding to the business data interface to be generated is identified according to the business description keywords, and the interface parameter information is used to generate the business data interface. Figure 2 The system shown performs a query to determine the corresponding metadata set; wherein, it should be noted that the interface parameter information includes: parameter structure, parameter type, and parameter attribute.
[0070] Specifically, in one or more embodiments of the present specification, the interface parameter information corresponding to the service data interface to be generated is identified based on the service description keywords, and the corresponding metadata set is determined by querying according to the interface parameter information, which specifically includes the following process:
[0071] First, the business logic corresponding to the business description keywords is determined according to the preset language model, so as to obtain the basic associated parameters corresponding to each business logic. It should be noted that the basic associated parameters are fixed parameters corresponding to each business logic processing flow. This process automatically parses the keywords in the business description through the preset language model, extracts the business logic and corresponding parameter information, greatly reduces manual intervention, and improves work efficiency and accuracy. At the same time, the parameter change mode is dynamically determined according to the context information, making the system more intelligent. At the same time, the dynamic associated parameters corresponding to each business logic are obtained to determine the parameter change mode corresponding to each dynamic associated parameter according to the context information of each dynamic associated parameter. The corresponding parameter change mode is determined according to the context information of the business description keywords, and the current dynamic associated parameters are determined based on the parameter change mode. By identifying the dynamic associated parameters and their change modes, the system can flexibly respond to parameter changes in different business scenarios, enhancing the flexibility and scalability of the system. When there are new business requirements or parameter changes, the system can adapt and adjust quickly. Then, according to the basic associated parameters and the current dynamic associated parameters, the interface parameter information corresponding to the business data interface to be generated is determined. Based on the interface parameter information in the following example Figure 2 The preset service layer shown in the figure performs data query to obtain the corresponding metadata set. Through the preset service layer, data query can quickly locate and obtain the required metadata set, which improves the efficiency of data retrieval and processing. At the same time, due to the accuracy of the interface parameter information, unnecessary trials and errors in the data query process are reduced, further improving the overall efficiency.
[0072] Further, in one or more embodiments of the present specification, performing data query in the preset service layer based on the interface parameter information to obtain the corresponding metadata set specifically includes the following process:
[0073] First, the storage unit corresponding to the preset service layer is obtained, so that the first metadata set corresponding to the interface parameter information is obtained in the storage unit. At the same time, it is determined whether the corresponding first metadata set is queried for each parameter interface information. If so, the first data is used as the metadata set. If not, the interface parameter information is uploaded to the user terminal, so as to receive the second metadata set uploaded by the user terminal, and the first metadata set and the second metadata set are used as corresponding metadata sets. In this process, by querying the storage unit in the preset service layer, the system can automatically obtain the first metadata set that matches the interface parameter information. When the data in the preset service layer is insufficient to meet the demand, it is supplemented by the second metadata set uploaded by the user terminal, ensuring the integrity of the final metadata set. This mechanism effectively avoids the problem of missing or incomplete data. The system not only relies on the data of the preset service layer, but also can obtain additional data through the user terminal. This flexibility enables the system to adapt to more diverse business scenarios and data requirements, especially when facing emerging businesses or special needs, it can respond and adjust quickly.
[0074] S103: Acquire the interface code corresponding to the association relationship between the business data interface to be generated and the metadata set, instantiate and automatically test the interface code, and publish the obtained business data interface.
[0075] After obtaining the metadata set corresponding to the interface parameter information based on the above step S102, the interface code corresponding to the association relationship between the business data interface to be generated and the metadata set is obtained to instantiate and automate the test of the interface code, so as to publish the obtained business data interface. This process automatically generates interface code and configuration, performs multi-dimensional automated testing, and ensures interface stability and performance. Through automated testing and standardized processes, errors and vulnerabilities are reduced, the security line of the data interface is strengthened, and business continuity is guaranteed.
[0076] Specifically, in one or more embodiments of the present specification, obtaining the interface code corresponding to the association relationship between the service data interface to be generated and the metadata set specifically includes the following process:
[0077] First, based on the preset language model, standard rule information corresponding to the current business requirement description is obtained; it should be noted that the standard rule information includes: interface naming rules, version control rules, and security policies. Then, the standard rule information and the association relationship between the business data interface to be generated and the metadata set are input into the preset language model, so as to output the interface code corresponding to the association relationship between the business data interface to be generated and the metadata set. It should be noted that the interface code includes: function code and configuration code corresponding to environment variables, dependencies and error handling logic. In this process, the preset language model is used to apply standard rule information such as interface naming rules, version control rules, security policies, etc., to ensure that the generated interface code meets the established standards and specifications. This not only improves the readability and maintainability of the code, but also reduces the risks caused by inconsistent code style or violation of security specifications. The entire process is automatically completed by the preset language model without manually writing or modifying a large amount of code. This greatly improves the efficiency of interface code generation and reduces development time and cost. At the same time, the automation process also reduces the possibility of human errors and improves the quality and stability of the code. In addition, the preset language model can dynamically generate interface code that meets the requirements according to different business requirement descriptions and standard rule information. When business requirements or standard rules change, new interface codes can be quickly generated by simply updating the preset language model or standard rule information, without the need to make large-scale modifications to the original code. This flexibility and scalability enables the system to better adapt to changing business requirements and technical environments.
[0078] In addition, in one or more embodiments of this specification, query logic is optimized through advanced algorithms to avoid redundant queries and table connections, generate highly optimized SQL statements, and effectively improve data retrieval speed and system performance. This step also takes into account factors such as database indexes and partitioning strategies to further improve the efficiency of data access. In the process of interface instantiation driven by large models, not only interface code is generated, but also necessary environment variables, dependencies and error handling logic are automatically configured to achieve fast and accurate code implementation. The deployment of the automated test environment and the execution of test cases cover multiple dimensions such as unit testing, integration testing and stress testing to ensure the stability and performance of the interface in various scenarios. By providing real-time feedback on test results, potential problems can be quickly located and fixed, greatly shortening the test cycle.
[0079] Furthermore, in one or more embodiments of the present specification, the interface code is instantiated and automatically tested to publish the obtained business data interface, specifically including:
[0080] First, the test environment of the business interface to be generated is automatically deployed according to the configuration code, and the corresponding test cases are generated. Then, the functional code is tested based on the test cases in the test environment. Figure 3 As shown, if the test passes, the automatic release process of the interface is triggered to deploy and release the functional code. If it fails, the error needs to be corrected before deployment and release. Automated testing and deployment in this process significantly reduce manual intervention and improve the efficiency and accuracy of the entire process. Through preset test cases and test environments, the functionality and stability of the interface code can be quickly verified, reducing errors and omissions caused by human factors. Strict automated testing before the interface is released can promptly discover and fix potential problems and errors, thereby reducing the risk of problems with the interface in the production environment. This helps to ensure the stable operation of the business system and user experience
[0081] That is, in a certain application scenario, after all tests have passed, the preset language model, that is, the big model, will trigger the automatic release process of the interface and deploy it seamlessly to the production environment without manual intervention, ensuring the consistency and low risk of deployment. At the same time, based on the test results and interface design details, the big model automatically generates detailed interface documentation, which includes but is not limited to interface call examples, error code descriptions, performance indicators, safety precautions, etc., providing developers and users with comprehensive and easy-to-understand reference materials, greatly improving team collaboration efficiency and the convenience of third-party integration.
[0082] like Figure 4 As shown, the present specification embodiment provides a schematic diagram of the structure of a device for generating a business data interface. Figure 4 It can be seen that in one or more embodiments of this specification, a device for generating a service data interface includes:
[0083] The parsing unit 401 is used to obtain the current business requirement description, parse the current business requirement description based on a preset language model, and determine the business description keywords corresponding to the business data interface to be generated;
[0084] A query unit 402 is used to identify the interface parameter information corresponding to the service data interface to be generated based on the service description keyword, and query and determine the corresponding metadata set according to the interface parameter information; wherein the interface parameter information includes: parameter structure, parameter type, and parameter attribute;
[0085] The publishing unit 403 is used to obtain the interface code corresponding to the association relationship between the business data interface to be generated and the metadata set, so as to instantiate and automatically test the interface code, and publish the obtained business data interface.
[0086] like Figure 5 As shown, the embodiment of this specification provides a schematic diagram of the generation device result of a business data interface. Figure 5It can be seen that in one or more embodiments of this specification, a device for generating a service data interface includes:
[0087] at least one processor; and,
[0088] a memory communicatively connected to the at least one processor; wherein,
[0089] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0090] Obtaining a current business requirement description, parsing the current business requirement description based on a preset language model, and determining a business description keyword corresponding to the business data interface to be generated;
[0091] Based on the business description keywords, the interface parameter information corresponding to the business data interface to be generated is identified, and the corresponding metadata set is determined by querying according to the interface parameter information; wherein the interface parameter information includes: parameter structure, parameter type, and parameter attribute;
[0092] The interface code corresponding to the association relationship between the to-be-generated business data interface and the metadata set is obtained, so as to instantiate and automatically test the interface code, and to publish the obtained business data interface.
[0093] like Figure 6 As shown, the present specification provides a schematic diagram of the structure of a non-volatile storage medium. Figure 6 It can be seen that in one or more embodiments of this specification, a non-volatile storage medium stores computer executable instructions 601, and the computer executable instructions 601 can:
[0094] Obtaining a current business requirement description, parsing the current business requirement description based on a preset language model, and determining a business description keyword corresponding to the business data interface to be generated;
[0095] Based on the business description keywords, the interface parameter information corresponding to the business data interface to be generated is identified, and the corresponding metadata set is determined by querying according to the interface parameter information; wherein the interface parameter information includes: parameter structure, parameter type, and parameter attribute;
[0096] The interface code corresponding to the association relationship between the to-be-generated business data interface and the metadata set is obtained, so as to instantiate and automatically test the interface code, and to publish the obtained business data interface.
[0097] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0098] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0099] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.
Claims
1. A method for generating a business data interface, characterized in that: The method comprises: Obtaining a current business requirement description, parsing the current business requirement description based on a preset language model, and determining a business description keyword corresponding to the business data interface to be generated; Based on the business description keywords, the interface parameter information corresponding to the business data interface to be generated is identified, and the corresponding metadata set is determined by querying according to the interface parameter information; wherein the interface parameter information includes: parameter structure, parameter type, and parameter attribute; The interface code corresponding to the association relationship between the to-be-generated business data interface and the metadata set is obtained, so as to instantiate and automatically test the interface code, and to publish the obtained business data interface.
2. A method for generating a business data interface according to claim 1, characterized in that: Get the current business requirements description, including: Acquire business requirement descriptions based on multi-dimensional channels, and determine the data format of each business requirement description; Obtaining a specified data format corresponding to the current business requirement structured template, so as to convert the data format of each business requirement description into the specified data format; The converted business requirement description is sorted based on the current business requirement structured template to obtain the current business requirement description.
3. A method for generating a business data interface according to claim 1, characterized in that: The current business requirement description is parsed based on a preset language model to determine the business description keywords corresponding to the business data interface to be generated, specifically including: Preprocessing the current business requirement description to perform word segmentation processing on the processed current business requirement data to obtain the word segmentation of the business requirement description to be parsed; Analyze the segmented words of the business requirement description to be parsed according to a preset language model to extract initial keywords of the segmented words of the business requirement description to be parsed; The context information of each of the initial keywords in the current business requirement description is obtained, and based on the correlation between the context information and the initial keywords, the initial keywords are filtered to determine the business description keywords corresponding to the business data interface to be generated.
4. A method for generating a business data interface according to claim 1, characterized in that: Identifying interface parameter information corresponding to the to-be-generated service data interface based on the service description keyword, and querying and determining a corresponding metadata set according to the interface parameter information, specifically includes: Determine the business logic corresponding to the business description keyword according to the preset language model to obtain basic associated parameters corresponding to each business logic; wherein the basic associated parameters are fixed parameters corresponding to each business logic processing flow; Acquire the dynamic associated parameters corresponding to each of the business logics, so as to determine the parameter change mode corresponding to each of the dynamic associated parameters according to the context information of each of the dynamic associated parameters; Determine a corresponding parameter change mode according to the context information of the business description keyword, and determine a current dynamic association parameter based on the parameter change mode; Determining interface parameter information corresponding to the service data interface to be generated according to the basic association parameters and the current dynamic association parameters; Based on the interface parameter information, data query is performed in the preset service layer to obtain a corresponding metadata set.
5. A method for generating a business data interface according to claim 4, characterized in that: Based on the interface parameter information, data query is performed in the preset service layer to obtain a corresponding metadata set, specifically including: Acquire a storage unit corresponding to the preset service layer, so as to acquire a first metadata set corresponding to the interface parameter information in the storage unit; Determine whether the corresponding first metadata set is found in each of the parameter interface information, and if so, use the first metadata set as the metadata set; If not, the interface parameter information is uploaded to the user terminal to receive the second metadata set uploaded by the user terminal, and the first metadata set and the second metadata set are used as corresponding metadata sets.
6. A method for generating a business data interface according to claim 1, characterized in that: Acquiring an interface code corresponding to the association relationship between the service data interface to be generated and the metadata set specifically includes: Acquire standard rule information corresponding to the current business requirement description based on a preset language model; wherein the standard rule information includes: interface naming rules, version control rules, and security policies; The standard rule information and the association relationship between the business data interface to be generated and the metadata set are input into the preset language model to output an interface code corresponding to the association relationship between the business data interface to be generated and the metadata set; wherein the interface code includes: function code and configuration code corresponding to environment variables, dependencies and error handling logic.
7. A method for generating a business data interface according to claim 6, characterized in that: Instantiate and automate the interface code to publish the obtained business data interface, specifically including: Automatically deploy the test environment of the business interface to be generated based on the configuration code, and generate corresponding test cases; Performing instance testing on the functional code based on the test case under the test environment; If the test passes, the automatic release process of the interface is triggered to deploy and release the function code.
8. A device for generating a business data interface, characterized in that: The device comprises: A parsing unit, used to obtain a current business requirement description, parse the current business requirement description based on a preset language model, and determine a business description keyword corresponding to the business data interface to be generated; A query unit, used to identify the interface parameter information corresponding to the service data interface to be generated based on the service description keyword, and query and determine the corresponding metadata set according to the interface parameter information; wherein the interface parameter information includes: parameter structure, parameter type, parameter attribute; The publishing unit is used to obtain the interface code corresponding to the association relationship between the business data interface to be generated and the metadata set, so as to instantiate and automatically test the interface code, and publish the obtained business data interface.
9. A device for generating a business data interface, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Obtaining a current business requirement description, parsing the current business requirement description based on a preset language model, and determining a business description keyword corresponding to the business data interface to be generated; Based on the business description keywords, the interface parameter information corresponding to the business data interface to be generated is identified, and the corresponding metadata set is determined by querying according to the interface parameter information; wherein the interface parameter information includes: parameter structure, parameter type, and parameter attribute; The interface code corresponding to the association relationship between the to-be-generated business data interface and the metadata set is obtained, so as to instantiate and automatically test the interface code, and to publish the obtained business data interface.
10. A non-volatile storage medium storing computer executable instructions, characterized in that: The computer executable instructions are capable of: Obtaining a current business requirement description, parsing the current business requirement description based on a preset language model, and determining a business description keyword corresponding to the business data interface to be generated; Based on the business description keywords, the interface parameter information corresponding to the business data interface to be generated is identified, and the corresponding metadata set is determined by querying according to the interface parameter information; wherein the interface parameter information includes: parameter structure, parameter type, and parameter attribute; The interface code corresponding to the association relationship between the to-be-generated business data interface and the metadata set is obtained, so as to instantiate and automatically test the interface code, and to publish the obtained business data interface.
Citation Information
Patent Citations
Business code generation method and apparatus
CN107122183A
Data processing method and device
CN110837356A
Business processing model generation method and device, electronic equipment and storage medium
CN114064026A
Code generation method and device, electronic equipment and storage medium
CN116560642A
Data service interface generation method and device, server and storage medium
CN117473001A
Cited By
Flight simulator interface code automatic generation method, system and equipment based on large language model and storage medium
CN120872322A
