Interface generation method and apparatus, computer device, and storage medium
By generating the receive and return field data of the target interface and generating SpEL expressions, the complexity of the traditional insurance product development process is solved, and the effect of quickly generating insurance product interfaces is achieved.
Patent Information
- Application Number
- CN202211017369.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-23
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-08-23
AI Technical Summary
Traditional insurance product development processes are complex, lengthy, and cumbersome, making them unsuitable for the rapid generation of insurance product interfaces required by internet insurance platforms.
By acquiring field data from the target system and generating graphical results using a preset graphical tool library, the system generates the receive and return field data of the target interface. Based on the data type and business logic, it generates data validation rules and finally generates the target SpEL expression to realize the interface function.
It simplifies the insurance product development process, enabling the rapid generation of insurance product interfaces to meet the fast policy issuance needs of internet insurance platforms.
Smart Images

Figure CN115328484B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software development technology, and in particular to interface generation methods, apparatus, computer equipment, and storage media. Background Technology
[0002] In the online insurance sector, the demand for online insurance policies is rapid integration and issuance. Online insurance platforms need to quickly generate product interfaces for various online insurance products accessible to partners. However, due to the numerous categories of insurance products in the current industry, the complexity of different insurance types, and the more intricate logical verification of premiums and coverage amounts for different types of insurance, traditional insurance policy integration requires first compiling product documentation based on business needs, then developing products tailored to different requirements (i.e., rewriting or modifying existing code), and finally undergoing rigorous testing before product launch and issuance.
[0003] The aforementioned traditional insurance product development process is too complex, lengthy, and cumbersome to meet the needs of internet insurance platforms that require rapid generation of insurance product interfaces. Summary of the Invention
[0004] This application provides an interface generation method, apparatus, computer device, and storage medium to address the problem that the traditional insurance product development process is too complex, lengthy, and cumbersome to meet the needs of internet insurance platforms for rapidly generating insurance product interfaces.
[0005] A first aspect of this application provides an interface generation method, comprising:
[0006] Obtain target system field data, wherein the target system field data is obtained from the database of the target system;
[0007] Obtain a first graphical result of the target system field data, wherein the graphical result is obtained by displaying the target system field data using a preset graphical tool library;
[0008] A second graphical result of receiving target interface input parameter data, wherein the second graphical result contains target interface received field data, which is obtained from the first graphical result;
[0009] A third graphical result of receiving the output parameter data of the target interface, wherein the third graphical result contains the target interface return field data, which is obtained from the first graphical result;
[0010] Data validation rules are generated based on the data types and business logic corresponding to the field data received and returned by the target interface.
[0011] The target SpEL expression for the target interface is generated based on the second graphical result, the third graphical result, and the data verification rules. When the target SpEL expression is executed, the returned field data is returned according to the received field data.
[0012] A second aspect of this application provides an interface generation apparatus, comprising:
[0013] A field data acquisition module is used to acquire field data of a target system, wherein the target system field data is acquired from the database of the target system;
[0014] The first graphical result module is used to obtain the first graphical result of the target system field data, wherein the graphical result is obtained by displaying the target system field data using a preset graphical tool library;
[0015] The second graphical result module is used to receive the second graphical result of the target interface input parameter data. The second graphical result includes the target interface received field data, which is obtained from the first graphical result.
[0016] The third graphical result module is used to receive the third graphical result of the target interface output parameter data. The third graphical result includes the target interface return field data, which is obtained from the first graphical result.
[0017] The data validation rule module is used to generate data validation rules based on the data types and business logic corresponding to the field data received and returned by the target interface.
[0018] The SpEL expression module is used to generate a target SpEL expression for the target interface based on the second graphical result, the third graphical result, and the data validation rules. When the target SpEL expression is executed, it returns the returned field data according to the received field data.
[0019] A third aspect of this application provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the interface generation method described above.
[0020] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the interface generation method described above.
[0021] The aforementioned interface generation method, apparatus, computer equipment, and storage medium acquire target system field data from the target system's database, then use a preset graphical tool library to display the target system field data to obtain a first graphical result. Based on the first graphical result, a second graphical result containing target interface received field data and a third graphical result containing target interface returned field data are generated. Furthermore, corresponding data validation rules are generated based on the received and returned field data. Finally, a target SpEL expression for the target interface is generated based on the received, returned, and validated field data. During execution, the SpEL expression implements the functionality of the target interface. This not only eliminates the complex, lengthy, and cumbersome development process of traditional insurance products but also allows for rapid and timely adjustments to the interface's relevant data, meeting the needs of internet insurance platforms for quickly generating insurance product interfaces. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a schematic diagram of an application environment for an interface generation method according to an embodiment of this application;
[0024] Figure 2 This is a flowchart of an interface generation method in one embodiment of this application;
[0025] Figure 3 This is a schematic diagram of the interface generation device in one embodiment of this application;
[0026] Figure 4 This is a schematic diagram of a computer device according to one embodiment of this application. Detailed Implementation
[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] The interface generation method provided in this application can be applied to, for example... Figure 1 In this application environment, the computer equipment can be, but is not limited to, various personal computers and laptops. The computer equipment can also be a server, which can be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. This is understandable. Figure 1 The number of computer devices shown is merely illustrative and can be expanded in any number according to actual needs.
[0029] In one embodiment, such as Figure 2 As shown, an interface generation method is provided, which is applied to... Figure 1 The following steps, S101 to S106, are used as an example of computer equipment in the example:
[0030] S101. Obtain target system field data, wherein the target system field data is obtained from the database of the target system.
[0031] The target system field data is generally system fields related to the business logic corresponding to the interface. For example, when the target system is an internet insurance platform system, some fields corresponding to the internet insurance product interface are system fields in the database of the internet insurance platform, such as insurance type, insurance amount, and policyholder name. However, system fields with weak correlation to the internet insurance product interface, such as historical accident time and accident location, will not be obtained as target system field data. That is, the target system field data and the interface to be generated have a business logic relationship.
[0032] Furthermore, a pre-defined graphical tool library is used to display all system fields in the target system's database, and graphical filtering operations on all system fields are received to obtain the target system field data. The graphical tool library not only displays all system fields in the target system's database but also shows the relationships between all system fields, such as foreign keys in data tables. During the graphical filtering process, the number of input parameters required by the target interface can be further reduced based on the relationships between system fields, because the target interface can find system field information not present in the target interface's database based on these relationships. For example, in the insurance application interface of the internet insurance platform system, only the input parameters related to the policyholder's basic information need to be set. The backend of the internet insurance platform system can then find system fields related to the policyholder's historical claims information in the database based on these input parameters for purposes such as calculating the policyholder's premium amount.
[0033] S102. Obtain the first graphical result of the target system field data, wherein the graphical result is obtained by displaying the target system field data using a preset graphical tool library.
[0034] Specifically, the target system field data is input into the preset graphics tool library to obtain the first graphical result returned by the preset graphics tool library. The preset graphics tool library can be changed according to corresponding business needs to obtain graphical representations with richer presentation formats. Furthermore, the first graphical result includes the internal relationships between the target system field data, including but not limited to: belonging to the same data table, or belonging to different data tables but connected by foreign keys. Furthermore, the first graphical result includes the table name of the data table in the database of the target system containing the target system field data. Furthermore, after obtaining the first graphical result, operations such as adding, deleting, and modifying are also received on the first graphical result, i.e., adding, deleting, and / or modifying the target system field data contained in the first graphical result, to address changes in product requirements or technical processing related to the target interface.
[0035] S103. Receive the second graphical result of the target interface input parameter data, wherein the second graphical result contains the target interface received field data, which is obtained from the first graphical result.
[0036] In software engineering, an interface inevitably has input and output parameters. For example, when querying all insurance products a user has purchased through an internet insurance platform system's user insurance product interface, the input parameters must include basic user information such as the user's name, while the output parameters must include insurance product information such as the purchase date and insurance type. Furthermore, the input parameters are those passed when accessing the interface, and the output parameters are those returned by the interface after successful access. Further, the input parameters of the target interface are determined from the first graphical result according to the business rule logic of the target interface; these are the parameters that must be passed when accessing the target interface. If the input parameters are not passed when accessing the target interface, it will be considered an illegal access and a failure result will be returned directly. Further, when the input parameters of the target interface cannot be obtained from the first graphical result according to the business rule logic, the target system field data corresponding to the input parameters of the target interface are obtained from the database of the target system and added to both the first and second graphical results. In this way, adding the corresponding target system field data to the first graphical result can further enrich the diversity of the target interface received field data.
[0037] Furthermore, after receiving the second graphical result of the target interface input parameter data, the process further includes: first, receiving the first execution result of the first custom SpEL expression, wherein the first custom SpEL expression is obtained based on the business logic corresponding to the target interface. Then, adding the first execution result to the second graphical result. SpEL (Spring Expression Language) is a powerful expression language that supports querying and manipulating runtime object navigation graphs. Although SpEL's syntax is similar to traditional expression languages, one difference is that SpEL provides more features, such as function calls and template functions for simple strings. In Spring, SpEL expressions are first scanned by Spring, and then the scanned SpEL expressions undergo expression analysis. The expression analysis process includes lexical analysis, syntax analysis, and the generation of expression objects. Lexical analysis uses a tokenizer to split the SpEL expression into a recognizable token stream. Syntax analysis constructs an abstract syntax tree from the obtained token streams, and finally, an expression object is generated. During the construction of the expression object, a context object also needs to be built, which includes custom variables, custom functions, type converters, etc. Finally, the SpEL expression is evaluated based on the context object, and the result is type-converted.
[0038] S104. Receive the third graphical result of the target interface output parameter data, wherein the third graphical result includes the target interface return field data, which is obtained from the first graphical result.
[0039] The target interface output parameter data refers to the result data returned by the target interface to the interface visitor after a successful access, i.e., the target interface returned field data. Further, when the target interface output parameter data cannot be obtained from the first graphical result according to the business rule logic, the target system field data corresponding to the target interface output parameter data is obtained from the target system's database and added to both the first and third graphical results. Adding the corresponding target system field data to the first graphical result further enriches the diversity of the target interface returned field data. Further, the source of the target interface returned field data is not limited to the first graphical result and the target system's database; the target interface returned field data also originates from the processing result of a preset second custom SpEL expression. Further, the third graphical result for receiving the target interface output parameter data includes: first, receiving the second execution result of the second custom SpEL expression, where the second custom SpEL expression is obtained according to the business logic corresponding to the target interface; and finally, adding the second execution result to the third graphical result. That is, the target interface returns field data by processing the target system field data in the database of the target system. For example, based on user information, product information of all insurance products purchased by the user in the Internet insurance platform system is obtained, and then the total consumption data and average annual consumption data of the user in the Internet insurance platform system are obtained based on the product information.
[0040] S105. Generate data verification rules based on the data types and business logic corresponding to the field data received from the target interface and the field data returned by the target interface.
[0041] The data validation rules include basic data validation rules and business logic validation rules. Basic data validation includes validation of basic data types; for example, floating-point numbers suffer from precision loss during calculations and need to be converted to large number types for computation. The business logic validation rules are data validation rules derived from product design rules. For example, the price of an insurance product on this internet insurance platform cannot be negative, or a certain insurance product on this internet insurance platform requires the policyholder to be older than 18 and younger than 60.
[0042] Further, before obtaining the target system field data, the process includes: First, determining whether the target interface has a corresponding target SpEL expression. If it does, then modifying and updating the second graphical result, the third graphical result, and the data validation rules corresponding to the target SpEL expression according to the business logic of the target interface to obtain the corresponding updated SpEL expression. Finally, replacing the target SpEL expression with the corresponding updated SpEL expression, and executing the step of sending the target SpEL expression to the interface testing module. For example, if the target interface is the agent login interface of an internet insurance platform, then first determining whether the internet insurance platform has a corresponding agent login SpEL expression. If it exists, the expression can be updated on the existing agent login SpEL expression; if it does not exist, the agent login SpEL expression needs to be constructed from scratch.
[0043] S106. Generate a target SpEL expression for the target interface based on the second graphical result, the third graphical result, and the data verification rules, wherein the target SpEL expression returns the returned field data according to the received field data when it is executed.
[0044] During the operation of the target system, the target SpEL expression receives the received field data corresponding to the second graphical result, then verifies the received field data according to the data verification rules, and finally obtains the returned field data corresponding to the third graphical result. The target system then returns the returned field data to the interface caller who initiated the call request to the target interface.
[0045] Furthermore, after generating the target SpEL expression for the target interface, the process further includes: first, sending the target SpEL expression to the interface testing module and receiving the test result returned by the interface testing module. Then, if the test result indicates a test failure, the steps between receiving the second graphical result of the target interface input parameter data and sending the target SpEL expression to the interface testing module are repeated until the test result indicates a test success. That is, after generating the target SpEL expression for the target interface, automated testing of the target SpEL expression is required. If the test fails, the received field data and / or the data validation rules corresponding to the second graphical result of the target interface need to be adjusted to ensure a successful test result for the target SpEL expression. For example, after obtaining the SpEL expression for the agent login interface in an internet insurance platform system, the agent login interface SpEL expression needs to be sent to the interface testing module for testing, and the agent login interface SpEL expression needs to be continuously adjusted based on the test results until the agent login interface SpEL expression successfully passes the test. Furthermore, if, during the testing of the target SpEL expression of the target interface, the returned field data of the target SpEL expression differs from the business requirements, then it is necessary to further adjust the returned field data corresponding to the third graphical result. The operation and steps for adjusting the third graphical result will not be elaborated here.
[0046] Furthermore, the process until the test result is successful also includes: First, generating a target SpEL expression set, wherein the target SpEL expression set is obtained by clustering the target SpEL expressions that have successfully passed the test. Then, obtaining the same interface receive field data, the same interface return field data, and the corresponding same data validation rules for the SpEL expressions in the target SpEL expression set. Finally, generating a target template SpEL expression, wherein the target template SpEL expression is generated based on the same interface receive field data, the same interface return field data, and the same data validation rules. When the target system needs to generate a new target interface, the target template SpEL expression can be used for rapid expansion. That is, first obtaining the target template SpEL expression, and then, based on the new target interface requirements, adding, deleting, and / or modifying the interface receive field data, the interface return field data, and the data validation rules according to the target template SpEL expression to obtain a new interface SpEL expression that meets the requirements of the new target interface. For example, based on the different SpEL expressions corresponding to different insurance products already generated in the internet insurance platform system, insurance product SpEL expression templates can be generated. When a new insurance product interface needs to be generated, corresponding additions, deletions, and / or modifications can be performed based on the insurance product SpEL expression template to obtain the new insurance product SpEL expression. Using template SpEL expressions for extension to meet new interface development needs will further reduce interface development time and improve development efficiency. Furthermore, based on historical interface development experience, different target template SpEL expressions can be generated to address different application scenarios. For example, in the internet insurance platform system, a general insurance product SpEL expression template can be generated based on the existing SPEL expressions corresponding to all insurance products. At the same time, a general life insurance product SpEL expression template can be generated by obtaining the SPEL expressions corresponding to life insurance products among all insurance products. This makes the selection of new interface SpEL expressions more abundant and improves the development efficiency of new interface SpEL expressions.
[0047] The interface generation method provided in this application obtains target system field data from the database of the target system, then uses a preset graphical tool library to display the target system field data to obtain a first graphical result. Based on the first graphical result, a second graphical result containing target interface received field data and a third graphical result containing target interface returned field data are generated. Then, corresponding data validation rules are generated based on the received field data and the returned field data. Finally, a target SpEL expression for the target interface is generated based on the received field data, the returned field data, and the data validation rules. The SpEL expression implements the functionality of the target interface during execution. This method not only eliminates the complex, lengthy, and cumbersome development process of traditional insurance products but also allows for rapid and timely adjustments to the relevant data of the interface, meeting the needs of internet insurance platforms for quickly generating insurance product interfaces.
[0048] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0049] In one embodiment, an interface generation apparatus 100 is provided, which corresponds one-to-one with the interface generation method in the above embodiments. For example... Figure 3 As shown, the interface generation device 100 includes a field data acquisition module 11, a first graphical result module 12, a second graphical result module 13, a third graphical result module 14, a data validation rule module 15, and a SpEL expression module 16. Detailed descriptions of each functional module are as follows:
[0050] The field data acquisition module 11 is used to acquire target system field data, wherein the target system field data is acquired from the database of the target system;
[0051] The first graphical result module 12 is used to obtain the first graphical result of the target system field data, wherein the graphical result is obtained by displaying the target system field data using a preset graphical tool library;
[0052] The second graphical result module 13 is used to receive the second graphical result of the target interface input parameter data, wherein the second graphical result includes the target interface received field data, which is obtained from the first graphical result;
[0053] The third graphical result module 14 is used to receive the third graphical result of the target interface output parameter data, wherein the third graphical result includes the target interface return field data, which is obtained from the first graphical result;
[0054] Data validation rule module 15 is used to generate data validation rules based on the data types and business logic corresponding to the field data received by the target interface and the field data returned by the target interface.
[0055] SpEL expression module 16 is used to generate a target SpEL expression for the target interface based on the second graphical result, the third graphical result, and the data validation rules, wherein the target SpEL expression returns the returned field data according to the received field data when it is executed.
[0056] Furthermore, the field data acquisition module 11 also includes:
[0057] The first expression judgment submodule is used to determine whether the target interface has a corresponding target SpEL expression;
[0058] The first expression update submodule is used to modify and update the second graphical result, the third graphical result, and the data validation rules corresponding to the target SpEL expression according to the business logic of the target interface, so as to obtain the corresponding updated SpEL expression;
[0059] The first expression replacement submodule is used to replace the target SpEL expression with the corresponding updated SpEL expression and execute the step of sending the target SpEL expression to the interface testing module.
[0060] Furthermore, the second graphical result module 13 also includes:
[0061] The first custom SpEL expression submodule is used to receive the first execution result of the first custom SpEL expression, wherein the first custom SpEL expression is obtained according to the business logic corresponding to the target interface;
[0062] The first execution result submodule is used to add the first execution result to the second graphical result.
[0063] Furthermore, the third graphical result module 14 also includes:
[0064] The second custom SpEL expression submodule is used to receive the second execution result of the second custom SpEL expression, wherein the second custom SpEL expression is obtained according to the business logic corresponding to the target interface;
[0065] The second execution result submodule is used to add the second execution result to the third graphical result.
[0066] Furthermore, the SpEL expression module 16 also includes:
[0067] The SpEL expression interface submodule is used to send the target SpEL expression to the interface testing module and receive the test results returned by the interface testing module.
[0068] The SpEL expression optimization submodule is used to repeat the steps from receiving the second graphical result of the target interface input parameter data to sending the target SpEL expression to the interface test module if the test result is a test failure, until the test result is a test success.
[0069] Furthermore, the SpEL expression optimization submodule also includes:
[0070] The target SpEL expression set subunit is used to generate the target SpEL expression set, wherein the target SpEL expression set is obtained by clustering the target SpEL expressions that have been successfully tested;
[0071] The target SpEL expression clustering subunit is used to obtain the same interface received field data, the same interface returned field data, and the same data verification rules corresponding to the SpEL expressions in the target SpEL expression set.
[0072] The target template SpEL expression subunit is used to generate the target template SpEL expression, wherein the target template SpEL expression is generated based on the same interface received field data, the same interface returned field data, and the same data validation rules.
[0073] The terms "first" and "second" in the above-mentioned modules / units are only used to distinguish different modules / units and are not intended to specify which module / unit has a higher priority or any other limiting meaning. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to these processes, methods, products, or devices. The module divisions appearing in this application are merely logical divisions; in actual applications, different division methods may be used.
[0074] For specific limitations regarding the interface generation device, please refer to the limitations on the interface generation method above, which will not be repeated here. Each module in the aforementioned interface generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0075] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The database stores data involved in the interface generation method. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements an interface generation method.
[0076] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the interface generation method described in the above embodiment, for example... Figure 2 The steps S101 to S106 shown, as well as other extensions and related steps of the method, are considered. Alternatively, when the processor executes a computer program, it implements the functions of each module / unit of the interface generation device in the above embodiments, for example... Figure 3 The functions of modules 11 to 16 are shown. To avoid repetition, they will not be described again here.
[0077] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device, connecting various parts of the computer device via various interfaces and lines.
[0078] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, video data, etc.).
[0079] The memory can be integrated into the processor or it can be set up separately from the processor.
[0080] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program implements the steps of the interface generation method described in the above embodiments, for example... Figure 2 The steps S101 to S106 shown, as well as other extensions and related steps of the method, are considered. Alternatively, when a computer program is executed by a processor, it implements the functions of each module / unit of the interface generation apparatus in the above embodiments, for example... Figure 3 The functions of modules 11 to 16 are shown. To avoid repetition, they will not be described again here.
[0081] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0082] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0083] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. An interface generation method, characterized in that, include: Obtain target system field data, wherein the target system field data is obtained from the database of the target system, display all system fields in the database of the target system using a preset graphical tool library, and receive graphical filtering operations on all system fields to obtain the target system field data; Obtain a first graphical result of the target system field data, wherein the graphical result is obtained by displaying the target system field data using a preset graphical tool library, the first graphical result contains the internal relationships between the target system field data, the internal relationships include at least those belonging to the same data table and those belonging to different data tables but having foreign key connections, and the first graphical result contains the table name of the data table where the target system field data is located; A second graphical result of receiving target interface input parameter data, wherein the second graphical result contains target interface received field data, which is obtained from the first graphical result; A third graphical result of receiving the output parameter data of the target interface, wherein the third graphical result contains the target interface return field data, which is obtained from the first graphical result; Data validation rules are generated based on the data types and business logic corresponding to the field data received and returned by the target interface. The target SpEL expression for the target interface is generated based on the second graphical result, the third graphical result, and the data verification rules. When the target SpEL expression is executed, the returned field data is returned according to the received field data. The process of generating the target SpEL expression for the target interface further includes: sending the target SpEL expression to the interface testing module and receiving the test result returned by the interface testing module; if the test result indicates a test failure, repeating the steps from receiving the second graphical result of the target interface input parameter data to sending the target SpEL expression to the interface testing module until the test result indicates a test success. The process of obtaining the target system field data includes: determining whether the target interface has a corresponding target SpEL expression; if it does, modifying and updating the second graphical result, the third graphical result, and the data verification rules corresponding to the target SpEL expression according to the business logic of the target interface to obtain the corresponding updated SpEL expression; replacing the target SpEL expression with the corresponding updated SpEL expression, and executing the step of sending the target SpEL expression to the interface testing module.
2. The interface generation method according to claim 1, characterized in that, The second graphical result of receiving the target interface input parameter data also includes: Receive the first execution result of the first custom SpEL expression, wherein the first custom SpEL expression is obtained based on the business logic corresponding to the target interface; Add the first running result to the second graphical result.
3. The interface generation method according to claim 1, characterized in that, The third graphical result of receiving the target interface output parameter data includes: Receive the second execution result of the second custom SpEL expression, wherein the second custom SpEL expression is obtained based on the business logic corresponding to the target interface; Add the second running result to the third graphical result.
4. The interface generation method according to claim 1, characterized in that, The process until the test result is successful also includes: Generate a target SpEL expression set, wherein the target SpEL expression set is obtained by clustering the target SpEL expressions that have been successfully tested; Obtain the same interface received field data, the same interface returned field data, and the same data validation rules corresponding to the SpEL expressions in the target SpEL expression set; Generate a target template SpEL expression, wherein the target template SpEL expression is generated based on the same interface received field data, the same interface returned field data, and the same data validation rules.
5. An interface generation device, characterized in that, include: The field data acquisition module is used to acquire target system field data, wherein the target system field data is acquired from the database of the target system, and a preset graphical tool library is used to display all system fields in the database of the target system, and to receive graphical filtering operations on all system fields to obtain the target system field data; The first graphical result module is used to obtain the first graphical result of the target system field data. The graphical result is obtained by displaying the target system field data using a preset graphical tool library. The first graphical result contains the internal relationship between the target system field data. The internal relationship includes at least those belonging to the same data table and those belonging to different data tables but with foreign key connections. The first graphical result contains the table name of the data table where the target system field data is located. The second graphical result module is used to receive the second graphical result of the target interface input parameter data. The second graphical result includes the target interface received field data, which is obtained from the first graphical result. The third graphical result module is used to receive the third graphical result of the target interface output parameter data. The third graphical result includes the target interface return field data, which is obtained from the first graphical result. The data validation rule module is used to generate data validation rules, wherein the data validation rules are generated based on the data types and business logic corresponding to the field data received by the target interface and the field data returned by the target interface; The SpEL expression module is used to generate a target SpEL expression for the target interface. The target SpEL expression is generated based on the second graphical result, the third graphical result, and the data validation rules. When the target SpEL expression is executed, it returns the returned field data according to the received field data. The SpEL expression module further includes: a SpEL expression interface submodule, used to send the target SpEL expression to the interface testing module and receive the test result returned by the interface testing module; and a SpEL expression optimization submodule, used to repeat the steps from receiving the second graphical result of the target interface input parameter data to sending the target SpEL expression to the interface testing module if the test result is a test failure, until the test result is a test success. The field data acquisition module further includes: a first expression judgment submodule, used to determine whether the target interface has a corresponding target SpEL expression; a first expression update submodule, used to modify and update the second graphical result, the third graphical result, and the data verification rules corresponding to the target SpEL expression according to the business logic of the target interface, to obtain the corresponding updated SpEL expression; and a first expression replacement submodule, used to replace the target SpEL expression with the corresponding updated SpEL expression and execute the step of sending the target SpEL expression to the interface testing module.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the interface generation method as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the interface generation method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Verification tool and method applied to interface access, medium and equipment
CN113760428A
Data exporting method and system, computer equipment and readable storage medium
CN114154474A