Data interface generation, data access method, apparatus, electronic device, and medium

By generating target data interfaces through data source configuration information, the problem of increased team configuration and low generation efficiency caused by backend development language requirements in existing technologies is solved, and efficient data interface generation without the need for backend developers is achieved.

CN114911860BActive Publication Date: 2025-11-11BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210628466.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2025-11-11
Estimated Expiration
2042-06-02

AI Technical Summary

Technical Problem

Due to the diverse business scenarios and large demand for data interfaces, the existing technology requires backend developers to master backend development languages, resulting in increased team staffing and low efficiency in generating data interfaces, making it difficult to achieve rapid output of functions.

Method used

By responding to the data interface generation command, determining the data source configuration information, creating an access template, and using the data source driver plugin to generate the target data interface, data producers can directly generate the target data interface without the involvement of backend developers.

Benefits of technology

It reduces development steps, lowers costs, improves the efficiency of data interface generation, and shortens the time required to obtain access results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114911860B_ABST
    Figure CN114911860B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data interface generation method and device, a data access method and device, an electronic device and a medium, relates to the technical field of computers, and in particular to the technical field of data processing and cloud computing. The specific implementation scheme is as follows: in response to detecting a data interface generation instruction, data source configuration information is determined, wherein the data source configuration information includes a data source identifier and a data source driver plug-in, and the data source driver plug-in is used to access a data source corresponding to the data source identifier; an access template is created according to the data source configuration information; and a target data interface is generated according to the access template and the data source driver plug-in, wherein the target data interface is used to process an access request for the data source.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more particularly to the fields of data processing and cloud computing technology. Specifically, it relates to a data interface generation, data access method, apparatus, electronic device, and medium. Background Technology

[0002] As data volumes increase daily, business systems can access data sources using data interfaces. Data interfaces can be used to connect business systems and data sources.

[0003] Due to the variety of business scenarios, the demand for data interfaces is relatively large. Summary of the Invention

[0004] This disclosure provides a data interface generation method, a data access method, an apparatus, an electronic device, and a medium.

[0005] According to one aspect of this disclosure, a data interface generation method is provided, comprising: in response to detecting a data interface generation instruction, determining data source configuration information, wherein the data source configuration information includes a data source identifier and data source driver plugin information, and a data source driver plugin corresponding to the data source driver plugin information is used to access the data source corresponding to the data source identifier; creating an access template according to the data source configuration information; and generating a target data interface according to the access template and the data source driver plugin information, wherein the target data interface is used to process access requests for the data source.

[0006] According to another aspect of this disclosure, a data access method is provided, comprising: in response to receiving an access request, obtaining access path information, wherein the access path information includes information to be accessed and a target data interface identifier; invoking a target data interface corresponding to the target data interface identifier, wherein the target data interface is generated according to the method described above in this disclosure; and processing the information to be accessed using the target data interface to obtain an access result.

[0007] According to another aspect of this disclosure, a data interface generation method is provided, comprising: a first determining module, configured to determine data source configuration information in response to detecting a data interface generation instruction, wherein the data source configuration information includes a data source identifier and data source driver plugin information, and a data source driver plugin corresponding to the data source driver plugin information is used to access the data source corresponding to the data source identifier; a first creating module, configured to create an access template according to the data source configuration information; and a first generating module, configured to generate a target data interface according to the access template and the data source driver plugin information, wherein the target data interface is used to process access requests for the data source.

[0008] According to another aspect of this disclosure, a data access apparatus is provided, comprising: an acquisition module, configured to acquire access path information in response to receiving an access request, wherein the access path information includes information to be accessed and a target data interface identifier; a first invocation module, configured to invoke a target data interface corresponding to the target data interface identifier, wherein the target data interface is generated according to the method described above in this disclosure; and a first obtaining module, configured to process the information to be accessed using the target data interface to obtain an access result.

[0009] According to another aspect of this disclosure, an electronic device is provided, comprising: 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 perform the methods described above.

[0010] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the methods described above.

[0011] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described above.

[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0013] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0014] Figure 1 This illustration schematically shows an exemplary system architecture for which data interface generation, data access methods and apparatus can be applied according to embodiments of the present disclosure;

[0015] Figure 2 A flowchart illustrating a data interface generation method according to an embodiment of the present disclosure is shown schematically.

[0016] Figure 3A This illustration schematically shows an example diagram of a data source information configuration interface according to an embodiment of the present disclosure;

[0017] Figure 3B An example schematic diagram of an access template management interface according to an embodiment of the present disclosure is shown;

[0018] Figure 3C This illustration schematically shows an example diagram of a template item information configuration interface according to an embodiment of the present disclosure;

[0019] Figure 3D An example schematic diagram of a template parameter item configuration interface according to an embodiment of the present disclosure is shown;

[0020] Figure 3E An example schematic diagram of a formatter configuration interface according to an embodiment of the present disclosure is shown;

[0021] Figure 3F An example schematic diagram of a data interface document according to an embodiment of the present disclosure is shown;

[0022] Figure 4 A flowchart illustrating a data access method according to an embodiment of the present disclosure is shown schematically;

[0023] Figure 5 The illustration shows a schematic diagram of the principle of a book data access method according to an embodiment of the present disclosure;

[0024] Figure 6 A block diagram of a data interface generation apparatus according to an embodiment of the present disclosure is shown schematically;

[0025] Figure 7 A block diagram illustrating a data access method according to an embodiment of the present disclosure is shown schematically; and

[0026] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing a data interface generation method and a data access method according to embodiments of the present disclosure. Detailed Implementation

[0027] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0028] Due to the variety of business scenarios, the demand for data interfaces is relatively large.

[0029] Data interfaces can be generated in the following way. Backend developers need to master at least one backend programming language. They then use this language to develop data interfaces for the control layer, model layer, and presentation layer involved in the MVC (Model-View-Controller) pattern. For example, in the model layer, access to the data source can retrieve the results. The MVC pattern is a specification-based service development pattern.

[0030] Because it must adhere to the MVC pattern, there is a significant amount of information unrelated to business logic. For example, this could include framework structure code. Furthermore, data producers often lack backend development language skills, preventing them from using this service development model to generate data interfaces. This necessitates backend developers with backend language expertise, increasing team staffing and costs. Additionally, when feature modifications are required, the development, compilation, packaging, and deployment stages are all time-consuming, hindering rapid feature output. This ultimately reduces the efficiency of data interface generation.

[0031] To address this, this disclosure proposes a data interface generation scheme. For example, in response to detecting a data interface generation instruction, data source configuration information is determined. The data source configuration information includes a data source identifier and data source driver plugin information. The data source driver plugin corresponding to the data source driver plugin information is used to access the data source corresponding to the data source identifier. An access template is created based on the data source configuration information. A target data interface is generated based on the access template and the data source driver plugin information. The target data interface is used to handle access requests to the data source.

[0032] According to embodiments of this disclosure, data producers can generate target data interfaces through data source configuration information without the involvement of backend developers, reducing development steps, lowering costs, and improving the efficiency of data interface generation.

[0033] Figure 1 The illustration schematically depicts an exemplary system architecture to which data interface generation methods, data access methods, and apparatus can be applied according to embodiments of the present disclosure.

[0034] It is important to note that Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.

[0035] like Figure 1As shown, the system architecture 100 according to this embodiment may include a business system 101, a data interface system 102, a data source system 103, and a network 104. The data source system 103 may include M data sources. The M data sources may include data source 103_1, data source 103_2, ..., data source 103_m, ..., data source 103_(M-1), and data source 103_M. M may be an integer greater than or equal to 1. m∈{1, 2, ..., (M-1), M}. The network 104 is used as a medium to provide communication links between the business system 101 and the data interface system 102, and between the data interface system 102 and the data source system 103. The network 104 may include various connection types, such as wired and / or wireless communication links.

[0036] The data interface system 102 can determine the data source configuration information in response to the detection of a data interface generation command. The data source configuration information includes a data source identifier and data source driver information. The data source driver plugin corresponding to the data source driver plugin information is used to access the data source corresponding to the data source identifier. An access template is created based on the data source configuration information. A target data interface is generated based on the access template and the data source driver plugin. The target data interface is used to handle access requests for the data source. For example, the data source could be data source 103_1.

[0037] The data interface system 102 can respond to a received access request by obtaining access path information. The access path information includes information to be accessed and a data interface identifier. It then calls the target data interface corresponding to the data interface identifier. The target data interface is generated according to the data interface generation method described in this embodiment. The accessed information is processed using the target data interface to obtain the access result. The access request may be generated by the business system 101.

[0038] Data interface system 101 can be one of a terminal device, a server, or a server cluster. Data source 103_m can be one of a server or a server cluster.

[0039] Terminal devices can be various electronic devices with a display screen and support web browsing. For example, terminal devices can include one of the following: smartphones, tablets, laptops, and desktop computers.

[0040] A server can be a provider of various services. For example, a server can be a database server. Furthermore, a server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system that addresses the shortcomings of traditional physical hosts and VPS (Virtual Private Server) services, such as high management difficulty and weak business scalability. A server can also be a server for a distributed system or a server integrated with blockchain technology.

[0041] It should be understood that Figure 1 The number of business systems, data interface systems, data source systems, and networks shown is merely illustrative. Depending on implementation needs, any number of business systems, data interface systems, data source systems, and networks can be included.

[0042] It should be noted that the sequence numbers of the operations in the following methods are for descriptive purposes only and should not be considered as indicating the execution order of the operations. Unless explicitly stated otherwise, the method does not need to be executed in the exact order shown.

[0043] Figure 2 A flowchart illustrating a data interface generation method according to an embodiment of the present disclosure is shown schematically.

[0044] like Figure 2 As shown, the method 200 includes operations S210 to S230.

[0045] In operation S210, in response to the detection of a data interface generation command, the data source configuration information is determined. The data source configuration information includes the data source identifier and data source driver plugin information. The data source driver plugin corresponding to the data source driver plugin information is used to access the data source corresponding to the data source identifier.

[0046] When operating S220, an access template is created based on the data source configuration information.

[0047] When operating S230, a target data interface is generated based on the access template and the data source driver plugin. The target data interface is used to handle access requests to the data source.

[0048] According to embodiments of this disclosure, a data interface can be used to connect a business system and a data source. The data interface can be used to process access requests from the business system to the data source. Data interface generation instructions can include instructions for generating the data interface. A data source identifier can be used to characterize the data source. The type of data source can include various types. For example, the data source type can include one of the following: relational data source and non-relational data source. It can include one of the following: MySQL, Elasticsearch (Embedded Storage), and Redis. SQL can refer to Structured Query Language.

[0049] According to embodiments of this disclosure, data source driver plugin information can be used to describe a data source driver plugin. For example, the data source driver plugin information may include at least one of the following: a data source driver plugin identifier and data source driver plugin association information. The data source driver plugin association information may include at least one of the following: association information between the data source driver plugin and the data source, and association information between the data source driver plugin and the access template. The data source driver plugin can be used to access the data source corresponding to the data source driver plugin. The data source driver plugin may be generated according to a data source driver plugin configuration strategy. The data source driver plugin information of the data source driver plugin may be stored in a data source driver plugin table.

[0050] According to embodiments of this disclosure, accessing a template may include template parameter item information. The template parameter item information may include fixed template parameter item information and template parameter item information to be replaced. The template parameter item information to be replaced may refer to the template parameter item information that needs to be replaced based on input information.

[0051] According to embodiments of this disclosure, upon detecting a data interface generation instruction, data source configuration information can be determined. The data source configuration information may include a data source identifier and data source driver plugin information. For example, upon detecting a data interface generation instruction, data source information input by the user can be obtained. Data source driver plugin information can be determined based on the data source information. Data source configuration information is obtained based on the data source information and the data source driver plugin information. Obtaining the data source information input by the user may include displaying a data source information configuration interface. In response to detecting data source information input by the user via the data source information configuration interface, the data source information is obtained. The data source information may include at least one of the following: a data source identifier, a data source type, a data source address, and user authentication information. The user authentication information may include a username and password.

[0052] According to embodiments of this disclosure, after obtaining data source configuration information, an access template corresponding to the data source and the data source driver plugin can be created based on the data source configuration information. Based on the access template and the data source driver plugin, a target data interface is generated that can be used to process access requests for the data source corresponding to the data source identifier. Therefore, the target data interface may include a first invocation strategy for invoking the access template, a second invocation strategy for invoking the data source driver plugin, a first processing strategy for the access template, and a second processing strategy for the data source driver plugin.

[0053] According to embodiments of this disclosure, in response to detecting a data interface generation instruction, data source configuration information including a data source identifier and a data source driver plugin is determined. The data source driver plugin is used to access the data source corresponding to the data source identifier. Based on the data source configuration information, an access template is created. Then, based on the access template and the data source driver plugin, a target data interface for processing access requests to the data source is generated. Data producers can generate the target data interface through the data source configuration information without the involvement of backend developers, reducing development steps and improving the efficiency of data interface generation.

[0054] According to embodiments of this disclosure, the above-described data interface generation method may further include the following operations.

[0055] Create a data source driver plugin based on the source driver plugin configuration strategy.

[0056] According to embodiments of this disclosure, a source-driven plugin configuration strategy can refer to a strategy used to create a data source-driven plugin. The source-driven plugin configuration strategy can be a strategy that conforms to the interface specification for accessing the data source. The source-driven plugin configuration strategy can include content on how to associate the data source-driven plugin to be created with the access template that needs to be associated, how to associate it with the data source that needs to be associated, and how to access the content of the data source that needs to be associated.

[0057] According to embodiments of this disclosure, a data source driver plugin is created based on a source driver plugin configuration strategy, so that the data source corresponding to the data source driver plugin can be accessed subsequently. The source driver plugin configuration strategy can be a strategy that follows the interface specification for accessing the data source. Once the data source driver plugin generated according to the interface specification is implemented, it can be called by the service to access the data source. Through this plugin mechanism, the accessible data sources are extended, enriching the application scenarios of the service.

[0058] According to embodiments of this disclosure, operation S220 may include the following operations.

[0059] Based on the data source driver plugin information, determine the template information to be configured. Based on the template information to be configured, create the access template.

[0060] According to embodiments of this disclosure, the data source driver plugin information may include information about the access template that the data source driver plugin needs to associate with. The template information to be configured may include information required to create the access template. For example, the template information to be configured may include at least one of the following: template items to be configured and template parameter items to be configured.

[0061] According to embodiments of this disclosure, the template information to be configured for creating an access template can be determined based on data source driver plugin information. For example, a template configuration interface can be displayed in response to detecting a template creation instruction. An access template is created in response to receiving the template information to be configured input by the user via the template configuration interface. The template information to be configured can be determined based on the data source driver plugin information.

[0062] According to embodiments of this disclosure, the template information to be configured may include template items to be configured and template parameter items to be configured.

[0063] According to embodiments of this disclosure, creating an access template based on the template information to be configured may include the following operations.

[0064] Create template item information based on the template items to be configured. Create template parameter item information based on the template parameter items to be configured. Create an access template based on the template item information and the template parameter item information.

[0065] According to embodiments of this disclosure, the type of the template item to be configured may include one or more. The type of the template item to be configured may include at least one of the following: SQL template item, JSON (JavaScript Object Notation) template item, and template item corresponding to Redis. The template item to be configured may include input parameter fields, output parameter fields, and input parameter conditions, etc.

[0066] According to embodiments of this disclosure, the template parameter item to be configured may include one or more. The template parameter item to be configured may include at least one of the following: a template parameter identifier, a template parameter type, a template parameter validation rule, and template parameter operation information. The template parameter validation rule may refer to rules used to validate the template parameter item. The template parameter validation rule may include at least one of the following: a template parameter form validation rule and a template parameter content validation rule. Therefore, the template parameter item information may include at least one of the following: a template parameter item identifier, a template parameter item type, a template parameter item validation rule, and template parameter item operation information. For example, the template parameter item to be configured is "cityName". The template parameter information may include the template parameter identifier "cityName", the template parameter item type "String", the template parameter item description information "city name", and the template parameter item operation information "formatter configuration information".

[0067] According to embodiments of this disclosure, template item information corresponding to a template item to be configured can be created. Template parameter item information corresponding to a template parameter item to be configured can also be created. For example, a template item configuration interface can be displayed, and template item information can be obtained in response to detecting that a user has entered template item information through the template item configuration interface based on the template item to be configured. A template parameter item configuration interface can also be displayed. Template parameter item information can be obtained in response to detecting that a user has entered template parameter item information through the template parameter item configuration interface based on the template parameter item to be configured.

[0068] According to embodiments of this disclosure, the above-described data interface generation method may further include the following operations.

[0069] A formatter is created based on the formatting configuration strategy. The formatter may include at least one of the following: a first formatter and a second formatter. The first formatter is used to convert first input information into first output information. The second formatter is used to convert second input information into second output information. The first output information is information used to input access templates. The data format of the first output information conforms to a first expected data format. The second input information is information obtained using a data source driver plugin. The data format of the second output information conforms to a second expected data format.

[0070] According to embodiments of this disclosure, a formatter configuration strategy can refer to a strategy used to convert the data format of input information into the output information of a desired data format. A formatter can be used to convert the data format of input information into the output information of a desired data format. The desired data format can be configured according to actual business needs and is not limited thereto.

[0071] According to embodiments of this disclosure, the formatter may include a first formatter and a second formatter. The first formatter may be used to convert first input information into first output information whose data format meets a first expected data format. The first output information may be information used to input an access template. The second formatter is used to convert second input information obtained using a data source driver plugin into second output information whose data format meets a second expected data format. The first output information used to input an access template may include one of information to be accessed and intermediate access information. The second input information obtained using the data source driver plugin may include target information to be accessed. The second output information may include an access result.

[0072] According to embodiments of this disclosure, a formatter can be created based on a formatting strategy. The programming language of the formatter can be a scripting language. For example, scripting languages ​​can include JavaScript and Groovy. Groovy can refer to the dynamic language of the JVM (Java Virtual Machine).

[0073] According to embodiments of this disclosure, operation S230 may include the following operations.

[0074] Generate the target data interface based on the access template, data source driver plugin, and formatter.

[0075] According to embodiments of this disclosure, the target data interface may include a first invocation strategy for invoking an access template, a second invocation strategy for invoking a data source driver plugin, a third invocation strategy for invoking a formatter, a first processing strategy for accessing the template, and a second processing strategy for the data source driver plugin.

[0076] According to embodiments of this disclosure, call information between the access template and the data source plugin can be determined. Call information for invoking the formatter can also be determined. A target data interface can be generated based on the access template, the data source driver plugin, the call information between the access template and the data source driver plugin, and the call information for invoking the formatter.

[0077] According to embodiments of this disclosure, operation S230 may include the following operations.

[0078] Determine the call information between the access template and the data source plugin. Based on the access template, the data source driver plugin, and the call information, generate the target data interface.

[0079] According to embodiments of this disclosure, the above-described data interface generation method may further include the following operations.

[0080] In response to receiving a document generation request, generate a data interface document based on the data interface information of the target data interface.

[0081] According to embodiments of this disclosure, a document generation request may refer to a request for generating a data interface document for a target data interface. The data interface information may include at least one of the following: a target data interface identifier, a target data interface type, a target data interface address, and target data interface description information.

[0082] According to embodiments of this disclosure, upon receiving a document generation request, a data interface document for the target data interface can be generated based on the data interface information of the target data interface, so that relevant information about the target data interface can be obtained based on the data interface document.

[0083] According to embodiments of this disclosure, data interface documentation can be automatically generated, which facilitates business integration.

[0084] According to embodiments of this disclosure, the above-described data interface generation method may further include at least one of the following operations.

[0085] Store the data source driver information of the data source driver plugin in the data source driver plugin table. Store the access template information of the access template in the template table.

[0086] According to embodiments of this disclosure, data source driver plugin information can be used to describe a data source driver plugin. The data source driver plugin information may include at least one of the following: a data source driver plugin identifier, a data source driver plugin type, a data source driver plugin address, data source driver plugin description information, and data source driver plugin association information. The data source driver plugin association information may include at least one of the following: association information between the data source driver plugin and the data source, and association information between the data source driver plugin and the access template.

[0087] According to embodiments of this disclosure, access template information can be used to describe an access template. The access template information may include an access template identifier, an access template type, an access template address, access template description information, and association information between the access template and the data source driver plugin.

[0088] According to embodiments of this disclosure, the above-described data interface generation method may further include the following operations.

[0089] Store the template parameter information of the template parameter items in the template parameter item table.

[0090] According to embodiments of this disclosure, the above-described data interface generation method may further include the following operations.

[0091] Store the formatter information of the formatter in the formatter table.

[0092] According to embodiments of this disclosure, the formatter information may include at least one of the following: a formatter identifier, a formatter type, a formatter address, formatter description information, and association information between the formatter and the access template. Furthermore, the formatter information may also include the formatter's own code information.

[0093] According to embodiments of this disclosure, the above-described data interface generation method may further include the following operations.

[0094] Store the data source information in the data source table.

[0095] According to embodiments of this disclosure, the data source table, data source driver plugin table, template table, template parameter table, and formatter table can be related to each other. Because these tables are related, subsequent access operations to the data source can use these tables to determine the data source driver plugin, access template, and formatter used to handle the access operation. Furthermore, the structured storage and management of data interface information facilitates business integration.

[0096] The following is for reference. Figure 3A , Figure 3B , Figure 3C , Figure 3D , Figure 3E and Figure 3F The data interface generation method according to the embodiments of this disclosure will be further described in conjunction with specific examples.

[0097] Figure 3A An example schematic diagram of a data source information configuration interface according to an embodiment of the present disclosure is shown.

[0098] like Figure 3A As shown, in 300A, the data source information configuration interface 301 may include a data source identifier control 301_1, a data source type control 301_2, a data source address control 301_3, a username control 301_4, a password control 301_5, a confirm control 301_6, and a cancel control 301_7.

[0099] The data source identifier control 301_1 can be used to input a data source identifier. The data source type control 301_2 can be used to select the data source type. The data source address control 301_3 can be used to input a data source address. The username control 301_4 can be used to input a username. The password control 301_5 can be used to input a password. The OK control 301_6 can be used to submit data source information. The Cancel control 301_7 can be used to cancel data source information.

[0100] The system can display a data source information configuration interface 301. Upon receiving user input for the data source identifier control 301_1, it obtains the data source identifier "Sample Storage". Upon receiving user selection for the data source type control 301_2, it obtains the data source type "DriverMySQL". Upon receiving user input for the data source address control 301_3, it obtains the data source address "1.1.1.1". Upon receiving user input for the username control 301_4, it obtains the username "user". Upon receiving user input for the password control 301_5, it obtains the password "pass".

[0101] Figure 3B An example schematic diagram of an access template management interface according to an embodiment of the present disclosure is shown.

[0102] like Figure 3BAs shown in Figure 300B, the access template management interface 302 may include an access template identification control, a data source identification control, an online / offline selection control, and controls related to access template operation information. The controls related to access template operation information may include template item configuration controls, template parameter item configuration controls, formatter configuration controls, data source driver plugin information configuration controls, data interface documentation generation controls, testing controls, online controls, and deletion controls. Furthermore, the access template management interface may also include access template description information.

[0103] For example, the data source identifier can be "1". The access template identifier can be "demo_param_formatter". The access template description information can be "sample-parameter formatting". In response to detecting a user's trigger action on the test control, a test request is generated. The test interface is displayed, which can include request data, request response, request method, request timing, parameter formatting, and output formatting.

[0104] Figure 3C An example schematic diagram of a template item information configuration interface according to an embodiment of the present disclosure is shown.

[0105] like Figure 3C As shown, in 300C, the template item information configuration interface 303 may include a template item selection control 303_1, a template item information input area 303_2, a confirmation control 303_3, and a cancellation control 303_4.

[0106] The template item selection control 303_1 can be used to select a template item. The confirm control 303_3 can be used to submit the template item information. The cancel control 303_4 can be used to cancel the template item information.

[0107] The template item information configuration interface 303 can be displayed. In response to receiving a user's selection operation on the template item selection control 303_1, the template item "SQL" can be obtained. In response to receiving a user's input operation on the template item information input area 303_2, the template item information can be obtained.

[0108] Figure 3D An example schematic diagram of a template parameter item configuration interface according to an embodiment of the present disclosure is shown.

[0109] like Figure 3DAs shown, in 300D, the template parameter item information configuration interface 304 can include a new control, a template parameter item validation rule control, a sample control, a template parameter item description information control, and controls related to template parameter item operation information. Controls related to template parameter item operation information can include a formatter configuration control and a delete control. Furthermore, the template parameter item information configuration interface can also be used to display the template parameter item identifier "cityName" and the template parameter item type "String".

[0110] Figure 3E An example schematic diagram of a formatter configuration interface according to an embodiment of the present disclosure is shown.

[0111] like Figure 3E As shown, in 300E, the formatter configuration interface 305 may include a formatter type selection control 305_1, a formatter information input area 305_2, a confirmation control 305_3, and a cancellation control 305_4.

[0112] The formatter type selection control 305_1 can be used to select the formatter type. The confirm control 305_3 can be used to submit the formatter. The cancel control 305_4 can be used to cancel the formatter.

[0113] The formatter configuration interface 305 can be displayed, and the formatter can be obtained in response to the user's selection operation on the formatter type selection control 305_1 and the input operation on the formatter input area 305_2.

[0114] Figure 3F An example schematic diagram of a data interface document according to an embodiment of the present disclosure is shown.

[0115] like Figure 3F As shown, in 300F, the data interface document 306 may include at least the following five aspects: 1. Description; 2. Request method; 3. Template parameter information; 4. Request example; and 5. Response example.

[0116] Figure 4 A flowchart illustrating a data access method according to an embodiment of the present disclosure is shown schematically.

[0117] like Figure 4 As shown, the method 400 includes operations S410 to S430.

[0118] When operating S410, in response to receiving an access request, access path information is obtained. The access path information includes the information to be accessed and the identifier of the target data interface.

[0119] When operating S420, the target data interface corresponding to the target data interface identifier is called.

[0120] When operating S430, the target data interface is used to process the information to be accessed and the access result is obtained.

[0121] According to embodiments of this disclosure, the access request may be an access request from a business system. The access request may include access path information. The information to be accessed may include a query statement. The query statement may include an SQL statement.

[0122] According to embodiments of this disclosure, after obtaining the access path information, the target data interface corresponding to the target data interface identifier can be invoked based on the target data interface identifier. Then, based on the information to be accessed, the data source corresponding to the target data interface is accessed using the target data interface to obtain the access result.

[0123] According to embodiments of this disclosure, access results are obtained by processing the information to be accessed using a target data interface. The target data interface is generated according to the data interface generation method described in embodiments of this disclosure. Since the generation efficiency of the data interface is improved, the time required to obtain access results is shortened.

[0124] According to embodiments of this disclosure, operation S430 may include the following operations.

[0125] Invoke the access template corresponding to the target data interface identifier. Input the information to be accessed into the access template to obtain the target access information. Invoke the data source driver plugin associated with the access template. Based on the target access information, use the data source driver plugin to access the data source corresponding to the data source driver plugin to obtain the access result.

[0126] According to embodiments of this disclosure, after obtaining the target data interface, the access template associated with the target data interface identifier can be invoked based on the association between the target data interface and the access template. The access template is then rendered using the information to be accessed to obtain the target access information. For example, the information to be accessed can be input into the access template to obtain the target access information. The target access information may include a target query statement.

[0127] According to the disclosed embodiments, a data source driver plugin associated with the access template can be invoked. The data source driver plugin is used to access the data source corresponding to the plugin, and access results corresponding to the target access information are obtained from the data source.

[0128] For example, the access template can be a query template. The query template could be "Select a, b From tb Where name = :name And age = :age limit 10". The information to be accessed could be "name(String) = John, age(Int) = 20". Therefore, the target access information could be "Select a, b From tb Where name = "John" And age = 20".

[0129] According to embodiments of this disclosure, the above data access method may include the following operations.

[0130] If the data format of the information to be accessed does not match the first expected data format, the first formatter is invoked. The first formatter is used to convert the data format of the information to be accessed, obtaining intermediate access information. The data format of the intermediate access information satisfies the first expected data format.

[0131] According to embodiments of this disclosure, inputting the information to be accessed into an access template to obtain the target access information may include the following operations.

[0132] Input the intermediate access information into the access template to obtain the target access information.

[0133] According to embodiments of this disclosure, it can be determined whether the data format of the information to be accessed matches a first expected data format. If it is determined that the data format of the information to be accessed matches the first expected data format, the information to be accessed can be input into an access template to obtain target access information. If it is determined that the data format of the information to be accessed does not match the first expected data format, a first formatter corresponding to the target data interface can be invoked. The first formatter is used to convert the data format of the information to be accessed to obtain intermediate access information whose data format is the first expected data format.

[0134] According to embodiments of this disclosure, the above data access method may further include the following operations.

[0135] If the data format of the access result does not match the second expected data format, the second formatter is invoked. The second formatter is used to convert the data format of the access result, resulting in a formatted access result. The formatted access result then conforms to the second expected data format.

[0136] According to embodiments of this disclosure, it can be determined whether the data format of the access result matches the second expected data format. If it is determined that the data format of the access result matches the second expected data format, no further processing of the access result is required. If it is determined that the data format of the access result does not match the second expected data format, a second formatter corresponding to the target data interface can be invoked. The second formatter is used to convert the data format of the access result, resulting in an access result with the data format of the second expected data format.

[0137] Figure 5 The illustration shows a schematic diagram of the principle of a book data access method according to an embodiment of the present disclosure.

[0138] like Figure 5 As shown in step 500, in response to receiving an access request 501, access path information 502 is obtained. Access path information 502 may include information to be accessed 503 and a target data interface identifier. The target data interface corresponding to the target data interface identifier is then invoked.

[0139] Processing the information to be accessed using the target data interface 503 may include the following operations.

[0140] If the data format of the information to be accessed 503 does not match the first expected data format, the first formatter 506 is invoked. The first formatter 506 performs data format conversion on the information to be accessed 503, obtaining intermediate access information 507. The data format of the intermediate access information 507 meets the first expected data format. The access template 504 corresponding to the target interface identifier is invoked. The intermediate access information 507 is input into the access template 504 to obtain the target access information 508. The data source driver plugin 505 associated with the access template 504 is invoked. Based on the target access information 508, the data source 509 corresponding to the data source driver plugin 505 is accessed using the data source driver plugin 505, obtaining the access result 510.

[0141] If the data format of access result 510 does not match the second expected data format, the second formatter 511 is invoked. The second formatter 511 is used to convert the data format of access result 510, resulting in a formatted access result 512. The data format of the formatted access result 512 satisfies the second expected data format.

[0142] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0143] The above are merely exemplary embodiments, but are not limited thereto. Other data interface generation methods and data access methods known in the art may also be included, as long as they can improve the generation efficiency of the data interface.

[0144] Figure 6 A block diagram of a data interface generation apparatus according to an embodiment of the present disclosure is shown schematically.

[0145] like Figure 6 As shown, the data interface generation device 600 may include a first determining module 610, a first creating module 620, and a first generating module 630.

[0146] The first determining module 610 is used to determine data source configuration information in response to the detection of a data interface generation command. The data source configuration information includes a data source identifier and data source driver plugin information. The data source driver plugin corresponding to the data source driver plugin information is used to access the data source corresponding to the data source identifier.

[0147] The first creation module 620 is used to create an access template based on the data source configuration information.

[0148] The first generation module 630 is used to generate a target data interface based on the access template and the data source driver plugin information. The target data interface is used to process access requests for the data source.

[0149] According to embodiments of this disclosure, the first creation module 620 may include a first determining submodule and a creation submodule.

[0150] The first determining submodule is used to determine the template information to be configured based on the data source driver plugin information.

[0151] Create a submodule to create the access template based on the template information to be configured.

[0152] According to embodiments of this disclosure, the template information to be configured includes template items to be configured and template parameter items to be configured.

[0153] According to embodiments of this disclosure, the creation submodule may include a first creation unit, a second creation unit, and a third creation unit.

[0154] The first creation unit is used to create template item information based on the template item to be configured.

[0155] The second creation unit is used to create template parameter item information based on the template parameter items to be configured.

[0156] The third creation unit is used to create the access template based on the template item information and the template parameter item information.

[0157] According to embodiments of this disclosure, the data interface generation apparatus 600 may further include a second creation module.

[0158] The second creation module is used to create a formatter according to a formatting configuration strategy. The formatter includes at least one of the following: a first formatter and a second formatter. The first formatter is used to convert first input information into first output information. The second formatter is used to convert second input information into second output information. The first output information is information used to input the access template. The data format of the first output information satisfies a first expected data format. The second input information is information obtained using the data source driver plugin. The data format of the second output information satisfies a second expected data format.

[0159] According to embodiments of this disclosure, the first generation module 630 may include a first generation submodule.

[0160] The first generation submodule is used to generate the target data interface based on the access template, the data source driver plugin, and the formatter.

[0161] According to embodiments of this disclosure, the first generation module 630 may include a second determining submodule and a second generation submodule.

[0162] The second determining submodule is used to determine the call information between the access template and the data source plugin.

[0163] The second generation submodule is used to generate the target data interface based on the access template, the data source driver plugin, and the call information.

[0164] According to embodiments of this disclosure, the data interface generation apparatus 600 may further include a second generation...

[0165] The second generation module is used to generate a data interface document in response to receiving a document generation request, based on the data interface information of the target data interface.

[0166] According to embodiments of this disclosure, the data interface generation apparatus 600 may further include at least one of the following:

[0167] The first storage module is used to store the data source driver plugin information of the data source driver plugin in the data source driver plugin table.

[0168] The second storage module is used to store the access template information of the access template into the template table.

[0169] According to embodiments of this disclosure, the data interface generation apparatus 600 may further include a third creation module.

[0170] The third creation module is used to create the data source driver plugin according to the source driver plugin configuration strategy.

[0171] Figure 7 A block diagram of a data access apparatus according to an embodiment of the present disclosure is shown schematically.

[0172] like Figure 7 As shown, the data access device 700 may include an acquisition module 710, a first invocation module 720, and a first obtaining module 730.

[0173] The acquisition module 710 is used to acquire access path information in response to receiving an access request. The access path information includes information to be accessed and the identifier of the target data interface.

[0174] The first calling module 720 is used to call the target data interface corresponding to the target data interface identifier.

[0175] The first acquisition module 730 is used to process the information to be accessed using the target data interface to obtain the access result.

[0176] According to an embodiment of this disclosure, the target data interface is generated according to the data interface generation method described in an embodiment of this disclosure.

[0177] According to embodiments of this disclosure, the first obtaining module 730 may include a first calling submodule, a first obtaining submodule, a second calling submodule, and a second obtaining submodule.

[0178] The first calling submodule is used to call the access template associated with the target data interface identifier.

[0179] The first acquisition submodule is used to input the information to be accessed into the access template to obtain the target access information.

[0180] The second calling submodule is used to call the data source driver plugin associated with the access template.

[0181] The second acquisition submodule is used to access the data source corresponding to the data source driver plugin based on the target access information, and obtain the access result.

[0182] According to embodiments of this disclosure, the data access device 700 may further include a second invocation module and a second acquisition module.

[0183] The second calling module is used to call the first formatter when it is determined that the data format of the information to be accessed does not match the first expected data format.

[0184] The second obtaining module is used to convert the data format of the information to be accessed using the first formatter to obtain intermediate access information. The data format of the intermediate access information satisfies the first expected data format.

[0185] According to embodiments of this disclosure, the first obtaining submodule may include an obtaining unit.

[0186] The obtaining unit is used to input the intermediate access information into the access template to obtain the target access information.

[0187] According to embodiments of this disclosure, the data access device 700 may further include a third invocation module and a third acquisition module.

[0188] The third calling module is used to call the second formatter when it is determined that the data format of the access result does not match the second expected data format.

[0189] The third obtaining module is used to convert the data format of the access result using the second formatter to obtain a formatted access result. The data format of the formatted access result satisfies the second expected data format.

[0190] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0191] According to an embodiment of the present disclosure, an electronic device includes: 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 perform the method described above.

[0192] According to embodiments of the present disclosure, a non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to cause a computer to perform the method described above.

[0193] According to an embodiment of this disclosure, a computer program product includes a computer program that, when executed by a processor, implements the method described above.

[0194] Figure 8The diagram schematically illustrates an electronic device suitable for implementing a data interface generation method and a data access method according to embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0195] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may also store various programs and data required for the operation of the electronic device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0196] Multiple components in electronic device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of displays, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows electronic device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0197] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning template algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as data interface generation methods and data access methods. For example, in some embodiments, the data interface generation methods and data access methods can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the data interface generation methods and data access methods described above can be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the data interface generation method and the data access method by any other suitable means (e.g., by means of firmware).

[0198] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0199] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0200] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0201] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0202] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0203] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, distributed system servers, or servers incorporating blockchain technology.

[0204] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0205] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for generating a data interface, comprising: In response to the detection of a data interface generation command, data source configuration information is determined, wherein the data source configuration information includes a data source identifier and data source driver plugin information, and the data source driver plugin corresponding to the data source driver plugin information is used to access the data source corresponding to the data source identifier; Based on the data source configuration information, create an access template; and Based on the access template and the data source driver plugin information, a target data interface is generated, wherein the target data interface is used to process access requests for the data source; The data source driver plugin is created according to the source driver plugin configuration strategy; the source driver plugin configuration strategy includes a strategy that follows the interface specification for accessing the data source.

2. The method according to claim 1, wherein, The step of creating an access template based on the data source configuration information includes: Based on the data source driver plugin information, determine the template information to be configured; and Create the access template based on the template information to be configured.

3. The method according to claim 2, wherein, The template information to be configured includes template items to be configured and template parameter items to be configured. The step of creating the access template based on the template information to be configured includes: Based on the template items to be configured, create template item information; Based on the template parameter items to be configured, create template parameter item information; and The access template is created based on the template item information and the template parameter item information.

4. The method according to any one of claims 1 to 3, further comprising: A formatter is created according to a formatting configuration strategy, wherein the formatter includes at least one of the following: a first formatter and a second formatter, wherein the first formatter is used to convert first input information into first output information, the second formatter is used to convert second input information into second output information, the first output information is information used to input the access template, the data format of the first output information satisfies a first expected data format, the second input information is information obtained using the data source driver plugin, and the data format of the second output information satisfies a second expected data format; The step of generating the target data interface based on the access template and the data source driver plugin includes: The target data interface is generated based on the access template, the data source driver plugin, and the formatter.

5. The method according to any one of claims 1 to 3, wherein, The step of generating the target data interface based on the access template and the data source driver plugin includes: Determine the call information between the access template and the data source plugin; and The target data interface is generated based on the access template, the data source driver plugin, and the call information.

6. The method according to any one of claims 1 to 5, further comprising: In response to receiving a document generation request, a data interface document is generated based on the data interface information of the target data interface.

7. The method according to any one of claims 1 to 6, further comprising at least one of the following: Store the data source driver plugin information of the data source driver plugin in the data source driver plugin table; and The access template information of the access template is stored in the template table.

8. The method according to any one of claims 1 to 7, further comprising: Create the data source driver plugin according to the source driver plugin configuration strategy.

9. A data access method, comprising: In response to receiving an access request, access path information is obtained, wherein the access path information includes information to be accessed and a target data interface identifier; Invoke the target data interface corresponding to the target data interface identifier, wherein the target data interface is generated by the method according to any one of claims 1 to 8; and The target data interface is used to process the information to be accessed to obtain the access result.

10. The method according to claim 9, wherein, The process of using the target data interface to process the information to be accessed and obtain the access result includes: Invoke the access template associated with the target data interface identifier; Input the information to be accessed into the access template to obtain the target access information; Invoke the data source driver plugin associated with the access template; and Based on the target access information, the data source corresponding to the data source driver plugin is accessed using the data source driver plugin to obtain the access result.

11. The method of claim 10, further comprising: If it is determined that the data format of the information to be accessed does not match the first expected data format, the first formatter is invoked; as well as The first formatter is used to convert the data format of the information to be accessed to obtain intermediate access information, wherein the data format of the intermediate access information satisfies the first expected data format; The step of inputting the information to be accessed into the access template to obtain the target access information includes: The intermediate access information is input into the access template to obtain the target access information.

12. The method according to claim 10 or 11, further comprising: If the data format of the access result does not match the second expected data format, the second formatter is invoked. as well as The access result is converted into a formatted data format using the second formatter to obtain a formatted access result, wherein the data format of the formatted access result satisfies the second expected data format.

13. A data interface generation apparatus, comprising: The first determining module is used to determine data source configuration information in response to the detection of a data interface generation instruction. The data source configuration information includes a data source identifier and data source driver plugin information. The data source driver plugin corresponding to the data source driver plugin information is used to access the data source corresponding to the data source identifier. The first creation module is used to create an access template based on the data source configuration information; and The first generation module is used to generate a target data interface based on the access template and the data source driver plugin information, wherein the target data interface is used to process access requests for the data source; The data source driver plugin is created according to the source driver plugin configuration strategy; the source driver plugin configuration strategy includes a strategy that follows the interface specification for accessing the data source.

14. The apparatus according to claim 13, wherein, The first creation module includes: The first determining submodule is used to determine the template information to be configured based on the data source driver plugin information; and Create a submodule to create the access template based on the template information to be configured.

15. The apparatus according to claim 14, wherein, The template information to be configured includes template items to be configured and template parameter items to be configured. The creation submodule includes: The first creation unit is used to create template item information based on the template item to be configured; The second creation unit is used to create template parameter item information based on the template parameter items to be configured; and The third creation unit is used to create the access template based on the template item information and the template parameter item information.

16. The apparatus according to any one of claims 13 to 15, further comprising: The second creation module is used to create a formatter according to a formatting configuration strategy, wherein the formatter includes at least one of the following: a first formatter and a second formatter, wherein the first formatter is used to convert first input information into first output information, the second formatter is used to convert second input information into second output information, the first output information is information used to input the access template, the data format of the first output information satisfies a first expected data format, the second input information is information obtained using the data source driver plugin, and the data format of the second output information satisfies a second expected data format; The first generation module includes: The first generation submodule is used to generate the target data interface based on the access template, the data source driver plugin, and the formatter.

17. The apparatus according to any one of claims 13 to 15, wherein, The first generation module includes: The second determining submodule is used to determine the call information between the access template and the data source plugin; and The second generation submodule is used to generate the target data interface based on the access template, the data source driver plugin, and the call information.

18. The apparatus according to any one of claims 13 to 17, further comprising: The second generation module is used to generate a data interface document in response to receiving a document generation request, based on the data interface information of the target data interface.

19. The apparatus according to any one of claims 13 to 18, further comprising at least one of the following: The first storage module is used to store the data source driver plugin information of the data source driver plugin into the data source driver plugin table; and The second storage module is used to store the access template information of the access template into the template table.

20. The apparatus according to any one of claims 13 to 19, further comprising: The third creation module is used to create the data source driver plugin according to the source driver plugin configuration strategy.

21. A data access device, comprising: The acquisition module is used to acquire access path information in response to receiving an access request, wherein the access path information includes information to be accessed and a target data interface identifier; The first invocation module is configured to invoke the target data interface corresponding to the target data interface identifier, wherein the target data interface is generated by the method according to any one of claims 1 to 8; and The first acquisition module is used to process the information to be accessed using the target data interface to obtain the access result.

22. The apparatus according to claim 21, wherein, The first obtaining module includes: The first calling submodule is used to call the access template associated with the target data interface identifier; The first acquisition submodule is used to input the information to be accessed into the access template to obtain the target access information; The second invocation submodule is used to invoke the data source driver plugin associated with the access template; and The second acquisition submodule is used to access the data source corresponding to the data source driver plugin based on the target access information, and obtain the access result.

23. The apparatus of claim 22, further comprising: The second calling module is used to call the first formatter when it is determined that the data format of the information to be accessed does not match the first expected data format; as well as The second obtaining module is used to convert the data format of the information to be accessed using the first formatter to obtain intermediate access information, wherein the data format of the intermediate access information satisfies the first expected data format. The first obtaining submodule includes: The obtaining unit is used to input the intermediate access information into the access template to obtain the target access information.

24. The apparatus according to claim 22 or 23, further comprising: The third calling module is used to call the second formatter when it is determined that the data format of the access result does not match the second expected data format; as well as The third obtaining module is used to convert the data format of the access result using the second formatter to obtain a formatted access result, wherein the data format of the formatted access result satisfies the second expected data format.

25. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 12.

26. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 12.

27. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Configuration method, device and equipment for communication interface, and computer readable storage medium

    CN108334465A

  • Device management method and device

    CN113253691A