A configurable credit data interface publishing system based on information directory
Through a configurable credit data interface publishing system based on the information directory, the problems of high development costs, long construction periods and poor flexibility of credit data interfaces in the existing technology are solved, efficient interface development and docking are realized, and the implementation efficiency of credit data API interfaces is improved.
Patent Information
- Application Number
- CN202411153286.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-08-21
AI Technical Summary
The existing credit data interface output method is developed based on API interface, which leads to the need to arrange technicians to develop, debug, test and release when encountering new data output interface requirements. The cost is high, the construction period is long, and the flexibility is poor.
The configurable credit data interface publishing system based on the information directory is adopted, and the credit data is fully described by defining the information directory, the credit data API interface information is defined, and the production interface document is described through the information directory to debug and dock to avoid hard code development.
It effectively improves the implementation efficiency of the credit data API interface, reduces the implementation cycle, reduces the workload of interface development, and improves the efficiency of interface docking.
Smart Images

Figure CN119045865B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data application, and in particular to a configurable credit data interface publishing system based on information directory. Background Art
[0002] Credit data application is a business model that combines credit business with big data technology. It obtains the current credit status of the credit subject by collecting, sorting and analyzing a large amount of credit data, so as to adopt different strategies in business processing to achieve risk identification, partnership judgment, credit limit assessment and other functions. There are many forms of credit data output, including: database table exchange, data file exchange, data interface output, etc. In order to achieve security and controllability, data interface output is a more commonly used credit data output method.
[0003] At present, the commonly used credit data interface output method is based on the API interface development method. When encountering new data output interface requirements, technical personnel need to be arranged to develop new API interfaces according to the new data requirements, and perform a series of work such as data debugging, test verification, and online release. There are problems such as high cost, long construction period, and poor flexibility. Therefore, the present invention proposes a configurable credit data interface publishing system based on an information directory to solve the problems existing in the prior art. Summary of the invention
[0004] In response to the above problems, the present invention proposes a configurable credit data interface publishing system based on an information directory. The configurable credit data interface publishing method and system based on the information directory can avoid implementing the credit data API interface through hard code, effectively improve the implementation efficiency of the credit data API interface, and reduce the implementation cycle.
[0005] To achieve the purpose of the present invention, the present invention is implemented by the following technical solution: a method for publishing a configurable credit data interface based on an information directory, comprising the following steps:
[0006] S1: Define the information catalog and provide a complete description of the credit data;
[0007] S2: Define the credit data API interface information, and define the format and content of the interface message body through the above data description;
[0008] S3: Release the defined credit data API interface to the caller for debugging;
[0009] S4: The caller obtains the interface document produced based on the information catalog description and debugs the API interface.
[0010] A configurable credit data interface publishing system based on information directory, comprising an information directory configuration management module, a data source configuration management module, a credit data interface service configuration management module and an interface service calling module, wherein the information directory configuration management module is used to configure the information directory to describe the data classification and structure of credit information; the data source configuration management module is used to configure and manage the source of system available data and convert it into an input database; the credit data interface service configuration management module uses HTTPS+JSON to provide an interface service for providing data to the outside world; the interface service calling module is used for external customers to call data by initiating an HTTPS request by calling a client after the external customer has subscribed to the data interface service.
[0011] Further improvements are as follows: the information directory is used to describe the data classification and structure of credit information, including a collection of information-type data, which is analogous to a table in a relational database, and also includes a description of a single data item, which is analogous to a field in a relational database. The information directory classifies and manages information types; information directory configuration includes: directory structure configuration, information type configuration, data item configuration, information type data validity period, and information type associated data source configuration.
[0012] A further improvement is that the data source collection method of the data source configuration management module includes: library table exchange, API interface, and data file, and the data source configuration management module converts the above data source collection method into an input database according to the data source configuration.
[0013] A further improvement is that the specific steps of the data source configuration are as follows:
[0014] Create a data source basic information configuration record, including: data source service provider information, data source type, field set, field type and field name;
[0015] Configure the data source access account information, add the access account information under the created configuration record, including: account, key, encryption and decryption processing module;
[0016] Configure data entry conversion rules and add data entry conversion rules under the created configuration record.
[0017] A further improvement is that the data storage conversion rules include:
[0018] If the data source acquisition method is library-table exchange, configure the mapping relationship between the target table and the data source table, including: library-table mapping, field mapping, and field conversion rules;
[0019] If the data source collection method is API interface, configure the rules for converting API data content into target table data, including: mapping relationship between target table name, target field and source data JSON Path and conversion rules;
[0020] If the data source collection method is data file, configure the data source file parsing rules, including: file type, file parsing script, mapping relationship between source field and target field, and conversion relationship.
[0021] A further improvement is that the specific configuration steps of the credit data interface service configuration management module are as follows:
[0022] Added data interface service configuration information, including: service code, service name, service charging mode, service unit price, service status, publishing status, and service type;
[0023] The interface service provides data configuration, and provides data configuration according to the configured service type, where the service types include: data service - a service that directly provides data from the current system library, and proxy service - a service that acts as a proxy for the data source interface;
[0024] Configure interface call parameters: add interface parameter configuration items in the configured interface service, including: parameter name, parameter code, data type, parameter description;
[0025] Interface call document generation: directly generate the interface call document based on the above configuration information. The document formatting describes the basic information of the interface, interface input parameters, and interface output message format.
[0026] Publish the interface service. After completing the interface service configuration, publish the interface service in the list. The published interface service is provided to external clients for calling.
[0027] Further improvement is that: in the data configuration provided by the interface service, the data service configuration is specifically as follows: adding information class records in the data service information class list, selecting the source as the information class configured in the information directory configuration management module, and after determining the information class, checking the data items under the information class that need to be published to the JSON message of the interface service;
[0028] The proxy service configuration is specifically as follows: when the data interface provided to the outside is implemented through the API of the proxy data source, the proxy service type is selected, and the proxy service selects the data source record configured in the data source configuration management module.
[0029] Further improvement is that: the specific implementation steps of the interface service call module are as follows:
[0030] Initiate interface call: initiate interface call through HTTPS client, where URL address is unified service path + service code, and call parameters are parameters configured by the credit data interface service configuration management module;
[0031] Processing interface calls: After receiving the request, the system determines the interface service to be called based on the URL address, reads the configuration information, and executes different data acquisition logic according to the type of interface service;
[0032] Interface call log and billing: During the interface call process, billing is performed according to the unit price configured by the credit data interface service configuration management module. When the customer's funds are insufficient, a reminder message is returned. After the interface call is completed, detailed information of the call process is recorded in the log.
[0033] Further improvement is to execute different data acquisition logic according to the type of interface service. The specific steps are as follows:
[0034] Data service data acquisition logic: assemble data query statements according to the data description information configured by the credit data interface service configuration management module, including: data query table, query field, query condition, query data with the assembled data query statement, and encapsulate it into a JSON object for return;
[0035] Data proxy interface processing logic: according to the proxy data source interface information configured by the credit data interface service configuration management module, call the data source API interface to obtain the message data and return it.
[0036] The beneficial effects of the present invention are:
[0037] 1. According to the strong correlation between the JSON message body structure and the business, the present invention uses the description capability of the information directory to describe the format of the JSON of the API interface message package body, thereby defining the API interface in a configured manner, avoiding hard code development of the API interface, greatly reducing the workload of interface development for credit data release, and having a great regulatory effect on the descriptiveness of the interface.
[0038] 2. The present invention provides a configurable credit data interface publishing method based on the information directory, which combines the metadata description capability of the "information directory" and the JSON data format characteristics of the API interface to realize a configurable credit data interface publishing and output system. This can avoid the implementation of the credit data API interface in a hard-coded manner, effectively improve the implementation efficiency of the credit data API interface, and reduce the implementation cycle. It can automatically generate API interface docking documents through the description capability of the "information directory" to improve the interface docking efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a configuration flow chart of the present invention. DETAILED DESCRIPTION
[0040] In order to deepen the understanding of the present invention, the present invention will be further described in detail below in conjunction with examples. The examples are only used to explain the present invention and do not constitute a limitation on the protection scope of the present invention. Example
[0041] according to Figure 1 As shown, this embodiment proposes a configurable credit data interface publishing method based on an information directory, comprising the following steps:
[0042] Define the information catalog to fully describe the credit data;
[0043] Define the credit data API interface information, and define the format and content of the interface message body through the above data description;
[0044] Release the defined credit data API interface to the caller for debugging;
[0045] The caller debugs and connects the API interface by obtaining the interface document produced based on the information catalog description.
[0046] A configurable credit data interface publishing system based on information directory, comprising an information directory configuration management module, a data source configuration management module, a credit data interface service configuration management module and an interface service calling module, wherein the information directory configuration management module is used to configure the information directory to describe the data classification and structure of credit information; the data source configuration management module is used to configure and manage the source of system available data and convert it into an input database; the credit data interface service configuration management module uses HTTPS+JSON to provide an interface service for providing data to the outside world; the interface service calling module is used for external customers to call data by initiating an HTTPS request by calling a client after the external customer has subscribed to the data interface service.
[0047] The information directory is used to describe the data classification and structure of credit information, including a collection of information-type data, which is analogous to a table in a relational database, and a description of a single data item, which is analogous to a field in a relational database. The information directory classifies and manages information types. Information directory configuration includes: directory structure configuration, information type configuration, data item configuration, information type data validity period, and information type associated data source configuration.
[0048] The data source collection method of the data source configuration management module includes: library table exchange, API interface, and data file, and the data source configuration management module converts the above data source collection method into an input database according to the data source configuration.
[0049] The specific steps of the data source configuration are as follows: create a data source basic information configuration record, including: data source service provider information, data source type, field set, field type and field name; configure data source access account information, and add access account information under the created configuration record, including: account, key, encryption and decryption processing module; configure data entry conversion rules, and add data entry conversion rules under the created configuration record.
[0050] The data entry conversion rules include: if the data source acquisition method is library-table exchange, configure the mapping relationship between the target table and the data source table, including: library-table mapping, field mapping, and field conversion rules; if the data source acquisition method is API interface, configure the rules for converting API data content into target table data, including: mapping relationship between target table name, target field and source data JSON Path and conversion rules; if the data source acquisition method is data file, configure the data source file parsing rules, including: file type, file parsing script, mapping relationship between source field and target field, and conversion relationship.
[0051] The specific configuration steps of the credit data interface service configuration management module are as follows: add data interface service configuration information, the configuration content includes: service code, service name, service charging mode, service unit price, service status, publishing status, service type; interface service provides data configuration, and provides data configuration according to the configured service type, where the service types include: data service-service that directly provides data from the current system library, proxy service-service of the proxy data source interface; configure interface call parameters: add interface parameter configuration items in the configured interface service, including: parameter name, parameter code, data type, parameter description; interface call document generation, directly generate an interface call document based on the above configuration information, and the document formatting describes the basic information of the interface, interface input parameters, and interface output message format; publish the interface service, and after completing the interface service configuration, publish the interface service in the list, and the published interface service is provided to external customers for calling.
[0052] In the data configuration provided by the interface service, the data service configuration is specifically as follows: add information class records in the data service information class list, select the source as the information class configured in the information directory configuration management module, and after determining the information class, check the data items under the information class that need to be published in the JSON message of the interface service; the proxy service configuration is specifically as follows: when the data interface provided to the outside is implemented through the API of the proxy data source, select the proxy service type, and the proxy service selects the data source record configured in the data source configuration management module.
[0053] The specific implementation steps of the interface service call module are as follows: interface call initiation: an interface call is initiated through the HTTPS client, where the URL address is a unified service path + service code, and the call parameters are the parameters configured by the credit data interface service configuration management module; interface call processing: after receiving the request, the system determines the interface service to be called according to the URL address, reads the configuration information, and executes different data acquisition logic according to the type of interface service; interface call log and billing: during the interface call process, billing is performed according to the unit price configured by the credit data interface service configuration management module. When the customer's fees are insufficient, a reminder message is returned. When the interface call is completed, the detailed information of the call process is recorded in the log.
[0054] Different data acquisition logics are executed according to the type of interface service. The specific steps are as follows: Data service data acquisition logic: assemble data query statements according to the data description information configured by the credit data interface service configuration management module, including: data query table, query field, query conditions, use the assembled data query statements to query data, and encapsulate it into a JSON object and return it; Data proxy interface processing logic: according to the proxy data source interface information configured by the credit data interface service configuration management module, call the data source API interface to obtain the message data and return it. Example
[0055] according to Figure 1 As shown, this embodiment proposes a configurable credit data interface publishing system based on an information directory, including the following:
[0056] "Information catalogue" refers to the description of credit information metadata maintained and managed in the form of a catalogue. It includes: description of information categories and data items, as well as the grouping and relationship of information categories. Information categories can be equivalent to data tables in relational databases, and data items can be equivalent to data fields in relational database tables. Therefore, the information catalogue has the ability to describe data types, data formats, and data relationships.
[0057] API interface is a way to provide external data output in an information system, usually an application layer protocol encapsulated on top of HTTP / HTTPS protocol. When outputting data, API interface often uses JSON format to transmit data. In order to describe the content of API interface data, it is necessary to describe the interface protocol type, interface URL address, message body (JSON) structure, etc.
[0058] The JSON message body structure is strongly correlated with the business and can be described by a tree structure. Based on this feature, the present invention uses the description capability of the "information directory" to format the JSON of the API interface message package body, thereby defining the API interface in a configurable manner and avoiding hard code development of the API interface.
[0059] The configurable credit data interface publishing method based on the information directory combines the metadata description capability of the "information directory" and the JSON data format characteristics of the API interface to implement a configurable credit data interface publishing output system. The details are as follows:
[0060] 1. Information directory configuration management: The main function of the information directory is to describe the data classification and structure of credit information. It includes a collection of "information category" data, which can be compared to a table in a relational database, and a description of a single data "data item", which can be compared to a field in a relational database. At the same time, the information directory also classifies and manages information categories. Information directory configuration includes: directory structure configuration, information category configuration, data item configuration, information category data validity period, information category associated data source configuration, etc.
[0061] 2. Data source configuration management module: The data source configuration management module configures and manages the sources of data available to the system. Data source collection methods include: library table exchange, API interface, data file and other types. The system can convert the above data source collection methods into input databases according to data source configuration. The specific steps and implementation technologies of data source configuration are as follows:
[0062] 2.1. Create a data source basic information configuration record, including: data source service provider information, data source type, field set, field type and field name, etc.;
[0063] 2.2. Configure the data source access account information. Add the access account information under the configuration record created in step 2.1, including: account, key, encryption and decryption processing module, etc.
[0064] 2.3. Configure data entry conversion rules. Add data entry conversion rules under the configuration record created in step 2.1. Including:
[0065] 2.3.1. If the data source acquisition method is library-table exchange, configure the mapping relationship between the target table and the source table, including: library-table mapping, field mapping, field conversion rules, etc.
[0066] 2.3.2. If the data source collection method is API interface, configure the rules for converting API data content into target table data, including: mapping relationship between target table name, target field and source data JSON Path and conversion rules (such as time format conversion, data type conversion, etc.).
[0067] 2.3.3. If the data source collection method is data file, configure the data source file parsing rules, including: file type, file parsing script, mapping relationship between source field and target field, conversion relationship, etc.
[0068] 3. Credit data interface service configuration management: The interface service is a technical way to provide data to the outside world. The interface services provided by this method and system are provided in HTTPS+JSON. The specific configuration steps are as follows:
[0069] 3.1. Added data interface service configuration information, including: service code, service name, service charging mode, service unit price, service status, publishing status, service type, etc.
[0070] 3.2. Interface service provides data configuration, and provides data configuration according to the service type configured in step 3.1. The service types include: data service (a service that directly provides data from the current system library) and proxy service (a service that acts as a proxy for the data source interface).
[0071] 3.2.1. Data service configuration, add information class records in the data service information class list, and select the source as the information class configured in step 1. You can select multiple information classes. After confirming the information class, you can further check which data items under the information class need to be published to the JSON message of the interface service.
[0072] 3.2.2. Proxy service configuration: If the data interface provided to the outside is implemented through the API of the proxy data source, you can select the proxy service type. The proxy service needs to select the data source record configured in step 2.3.2.
[0073] 3.3. Configure interface call parameters: Add interface parameter configuration items to the interface service configured in step 3.1, including: parameter name, parameter code, data type, parameter description, etc.
[0074] 3.4. Interface call document generation: The system can directly generate an interface call document based on the information configured in the above three steps. The document can be formatted to describe basic interface information, interface input parameters, interface output message format and other information.
[0075] 3.5. Publish interface service: After completing the interface service configuration, you can publish the interface service in the list. The published interface service can be provided to external customers for calling.
[0076] 4. Interface service call: After the external customer has subscribed to the data interface service, he can call the data by initiating an HTTPS request by calling the client. The specific implementation plan is as follows:
[0077] 4.1. Interface call initiation: Initiate interface call through HTTPS client, where the URL address is a unified service path + service code. For example, if the interface service code of enterprise basic information is "comp_base_info", then the interface service URL is "https: / / ip:port / rtm / services / comp_base_info", and the call parameters are the parameter list configured in step 3.3.
[0078] 4.2. Processing interface calls: After receiving the request, the system determines the interface service to be called based on the URL address and reads the configuration information. Different data acquisition logic is executed according to the type of interface service. The specific operations are as follows:
[0079] 4.2.1. Data service data acquisition logic: Assemble data query statements according to the data description information configured in step 3.2.1, including: data query table, query field, query condition. Use the assembled data query statement to query data. And encapsulate it into a JSON object and return it.
[0080] 4.2.2. Data proxy interface processing logic: According to the proxy data source interface information configured in step 3.2.2, call the data source API interface to obtain the message data and return it.
[0081] 4.3. Interface call log and billing: During the interface call process, the system will charge according to the unit price configured in step 3.1. If the customer's fee is insufficient, a reminder message will be returned. After the interface call is completed, the system will record the detailed information of the call process in the log for reconciliation and auditing.
[0082] The configurable credit data interface publishing method and system based on the information directory. According to the strong correlation between the JSON message body structure and the business, the description capability of the information directory is used to format the JSON of the API interface message package body, so as to define the API interface in a configurable manner, avoid hard code development of the API interface, greatly reduce the interface development workload for credit data release, and have a great regulatory effect on the descriptiveness of the interface. The present invention is based on the configurable credit data interface publishing method of the information directory, which combines the metadata description capability of the "information directory" and the characteristics of the API interface based on the JSON data format to realize a configurable credit data interface publishing and output system, which can avoid the implementation of the credit data API interface in a hard code manner, effectively improve the implementation efficiency of the credit data API interface, reduce the implementation cycle, and automatically generate API interface docking documents through the description capability of the "information directory", thereby improving the efficiency of interface docking.
[0083] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A configurable credit data interface publishing system based on information directory, characterized in that: It includes an information directory configuration management module, a data source configuration management module, a credit data interface service configuration management module and an interface service calling module. The information directory configuration management module is used to configure the information directory to describe the data classification and structure of the credit information; the data source configuration management module is used to configure and manage the source of the system's available data and convert it into an input database; the credit data interface service configuration management module uses HTTPS+JSON to provide data interface services to the outside world; the interface service calling module is used for external customers to call data by initiating HTTPS requests by calling the client after the external customer orders the data interface service; The information directory is used to describe the data classification and structure of credit information, including the collection of information data, which is analogous to the table in a relational database, and the description of individual data items, which is analogous to the fields in a relational database. The information directory classifies and manages information categories; the information directory configuration includes: directory structure configuration, information category configuration, data item configuration, information category data validity period, and information category associated data source configuration; The data source collection method of the data source configuration management module includes: library table exchange, API interface, and data file, and the data source configuration management module converts the above data source collection method into an input database according to the data source configuration.
2. A configurable credit data interface publishing system based on information directory according to claim 1, characterized in that: The specific steps of the data source configuration are as follows: Create a data source basic information configuration record, including: data source service provider information, data source type, field set, field type and field name; Configure the data source access account information, add the access account information under the created configuration record, including: account, key, encryption and decryption processing module; Configure data entry conversion rules and add data entry conversion rules under the created configuration record.
3. A configurable credit data interface publishing system based on information directory according to claim 2, characterized in that: The data storage conversion rules include: If the data source acquisition method is library-table exchange, configure the mapping relationship between the target table and the data source table, including: library-table mapping, field mapping, and field conversion rules; If the data source collection method is API interface, configure the rules for converting API data content into target table data, including: mapping relationship between target table name, target field and source data JSON Path and conversion rules; If the data source collection method is data file, configure the data source file parsing rules, including: file type, file parsing script, mapping relationship between source field and target field, and conversion relationship.
4. A configurable credit data interface publishing system based on information directory according to claim 3, characterized in that: The specific configuration steps of the credit data interface service configuration management module are as follows: Added data interface service configuration information, including: service code, service name, service charging mode, service unit price, service status, publishing status, and service type; The interface service provides data configuration, and provides data configuration according to the configured service type, where the service types include: data service - a service that directly provides data from the current system library, and proxy service - a service that acts as a proxy for the data source interface; Configure interface call parameters: add interface parameter configuration items in the configured interface service, including: parameter name, parameter code, data type, parameter description; Interface call document generation: directly generate the interface call document based on the above configuration information. The document formatting describes the basic information of the interface, interface input parameters, and interface output message format. Publish the interface service. After completing the interface service configuration, publish the interface service in the list. The published interface service is provided to external clients for calling.
5. A configurable credit data interface publishing system based on information directory according to claim 4, characterized in that: In the data configuration provided by the interface service, the data service configuration is specifically as follows: add information class records in the data service information class list, select the source as the information class configured in the information directory configuration management module, and after determining the information class, check the data items under the information class that need to be published to the JSON message of the interface service; The proxy service configuration is specifically as follows: when the data interface provided to the outside is implemented through the API of the proxy data source, the proxy service type is selected, and the proxy service selects the data source record configured in the data source configuration management module.
6. A configurable credit data interface publishing system based on information directory according to claim 5, characterized in that: The specific implementation steps of the interface service calling module are as follows: Initiate interface call: initiate interface call through HTTPS client, where URL address is unified service path + service code, and call parameters are parameters configured by the credit data interface service configuration management module; Processing interface calls: After receiving the request, the system determines the interface service to be called based on the URL address, reads the configuration information, and executes different data acquisition logic according to the type of interface service; Interface call log and billing: During the interface call process, billing is performed according to the unit price configured by the credit data interface service configuration management module. When the customer's funds are insufficient, a reminder message is returned. After the interface call is completed, detailed information of the call process is recorded in the log.
7. A configurable credit data interface publishing system based on information directory according to claim 6, characterized in that: Different data acquisition logic is executed according to the type of interface service. The specific steps are as follows: Data service data acquisition logic: assemble data query statements according to the data description information configured by the credit data interface service configuration management module, including: data query table, query field, query condition, query data with the assembled data query statement, and encapsulate it into a JSON object for return; Data proxy interface processing logic: according to the proxy data source interface information configured by the credit data interface service configuration management module, call the data source API interface to obtain the message data and return it.
Citation Information
Patent Citations
Adaptive front-end interface configuration method based on OpenAPI specification
CN117215637A