Data processing method and device, equipment, medium and product

CN121764944APending Publication Date: 2026-03-31成方金融科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

When a database cannot be directly connected, existing persistence layer frameworks such as Mybatis cannot dynamically generate SQL queries and pagination through data source configuration, resulting in difficulties in parameter mapping, large code volume and high coupling, which affects query efficiency and convenience.

Method used

Extract sample SQL parameters and sample query parameter list from the sample query XML file, encapsulate them according to the query parameter type, and generate object query, list query, or pagination query interfaces to enable data querying for databases that cannot be used as driving links.

Benefits of technology

It improves the convenience and efficiency of data querying for databases that cannot be used as driving links, reduces the amount of code and lowers coupling, and supports query operations in XML.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121764944A_ABST
    Figure CN121764944A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, device and equipment, a medium and a product, and relates to the technical field of data processing. The method comprises the following steps: extracting a sample transmission parameter SQL and a sample query parameter list from a sample query XML file; and according to a query parameter type corresponding to the sample query parameter list, packaging the sample transmission parameter SQL and the sample query parameter list to obtain an object query interface, a list query interface or a paging query interface. By means of the technical scheme, data query of the database which cannot serve as a drive link can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a data processing method, apparatus, device, medium and product. Background Technology

[0002] With the development of internet technology, persistence frameworks that support custom Structured Query Language (SQL), stored procedures, and advanced mappings have emerged, such as Mybatis. These frameworks can dynamically generate SQL from Extensible Markup Language (XML) files using relevant XML syntax, and then pass the SQL and parameters to the database for querying and pagination. However, when the database cannot be used as the driving connection, and configuration through the data source is not possible, it is not possible to directly use a persistence framework like Mybatis to dynamically generate statements for querying and pagination.

[0003] For example, when a database connection is not possible and an API call is required for querying, the parameters must be: 1. An SQL statement with question mark placeholders; 2. An ordered list of parameters corresponding to the placeholders. This leads to the following problems: 1) Mybatis' parameter mapping is based on a Map, which cannot map to the corresponding ordered list of parameters; 2) As a component integrated into Spring, Mybatis directly retrieves the driver configuration for querying, and cannot directly obtain the SQL statement with placeholders for API parameter passing; 3) Constructing the SQL using Java results in a large amount of code, which is time-consuming and laborious to write; furthermore, the coupling of a large amount of SQL code with business logic code makes it very difficult to read. Summary of the Invention

[0004] This invention provides a data processing method, apparatus, device, medium, and product to enable data querying from databases that cannot be used as driving links.

[0005] According to one aspect of the present invention, a data processing method is provided, the method comprising:

[0006] Extract the sample parameter SQL and sample query parameter list from the sample query XML file;

[0007] Based on the query parameter type corresponding to the sample query parameter list, the sample parameter SQL and the sample query parameter list are encapsulated to obtain an object query interface, a list query interface, or a pagination query interface.

[0008] According to another aspect of the present invention, a data processing apparatus is provided, the apparatus comprising:

[0009] The data extraction module is used to extract sample parameter SQL and sample query parameter list from the sample query XML file;

[0010] The query interface encapsulation module is used to encapsulate the sample parameter SQL and the sample query parameter list according to the query parameter type corresponding to the sample query parameter list, so as to obtain an object query interface, a list query interface, or a pagination query interface.

[0011] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0012] At least one processor; and

[0013] A memory communicatively connected to the at least one processor; wherein,

[0014] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the data processing method according to any embodiment of the present invention.

[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the data processing method described in any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the data processing method according to any embodiment of the present invention.

[0017] The technical solution of this invention extracts sample SQL parameters and a sample query parameter list from a sample query XML file; based on the query parameter type corresponding to the sample query parameter list, the sample SQL parameters and the sample query parameter list are encapsulated to obtain an object query interface, a list query interface, or a pagination query interface. This technical solution, by extracting the SQL parameters and query parameters from the query XML file and then encapsulating the interface, enables data querying from databases that cannot be used as driving links, thereby improving the convenience and efficiency of data querying.

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

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of a data processing method provided according to an embodiment of the present invention;

[0021] Figure 2 This is a flowchart of a data processing method provided according to an embodiment of the present invention;

[0022] Figure 3 This is a schematic diagram of the structure of a data processing device according to an embodiment of the present invention;

[0023] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the data processing method of the present invention. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. 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 apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0026] Furthermore, it should be noted that the collection, storage, use, processing, transmission, provision, and disclosure of data related to query XML files and query parameters involved in the technical solution of this invention all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0027] Figure 1 This is a flowchart illustrating a data processing method according to an embodiment of the present invention. This embodiment is applicable to database data querying, particularly when the database cannot be used as a driving link for data querying. The method can be executed by a data processing device, which can be implemented in hardware and / or software. This device can be configured in an electronic device that carries data processing functions, such as a server. Figure 1 As shown, the method includes:

[0028] S110. Extract the sample parameter SQL and sample query parameter list from the sample query XML file.

[0029] In this embodiment, the sample query XML file refers to the query XML file used for encapsulating the query interface. The sample parameter SQL refers to the SQL with question mark placeholders extracted from the sample query XML file during query interface encapsulation. The sample query parameter list refers to the list of query parameters corresponding to the question mark placeholders during query interface encapsulation.

[0030] An alternative approach involves extracting sample parameter SQL and a sample query parameter list from a sample query XML file, including: extracting sample parameter SQL from the sample query XML file based on the SQL statement identifier; determining the query condition object parameter mapping based on the sample query XML file; and generating a sample query parameter list based on the query condition object parameter mapping.

[0031] Here, the SQL statement identifier refers to the statement identifier used in the XML file to uniquely identify the SQL parameters passed to the sample, such as statementId. The query condition object parameter mapping refers to the object parameters corresponding to the SQL query conditions existing in a mapped form. The parameter array list refers to an array of parameters existing in list form. It should be noted that, in this invention, a list refers to a data structure.

[0032] Specifically, a persistence layer framework such as Mybatis, which uses custom SQL, stored procedures, and advanced mapping, can extract sample parameters from the sample SQL statement using relevant attributes. Then, the persistence layer framework determines the parameter mapping of the query condition object from the sample query XML file, parses the parameter mapping of the query condition object, and obtains the query condition object parameters, which are then converted into an ordered list of sample query parameters.

[0033] Understandably, extracting the sample query parameters SQL and sample query parameter list from the sample query XML file facilitates the encapsulation of subsequent query interfaces and improves database query efficiency.

[0034] S120. Based on the query parameter type corresponding to the sample query parameter list, encapsulate the sample parameter SQL and the sample query parameter list to obtain the object query interface, list query interface, or pagination query interface.

[0035] In this embodiment, the query parameter types include objects, lists, and pagination. The object query interface is used to query objects, allowing direct retrieval of objects from the database via API calls. The list query interface is used to query lists, allowing direct retrieval of lists from the database via API calls. The pagination query interface is used to query paginated results, allowing direct retrieval of paginated results from the database via API calls.

[0036] Specifically, based on the encapsulation method corresponding to the query parameter type of the sample query parameter list, the SQL for passing sample parameters and the sample query parameter list can be encapsulated to obtain object query interface, table extraction query interface from column, or pagination query interface.

[0037] The technical solution of this invention extracts sample SQL parameters and a sample query parameter list from a sample query XML file; based on the query parameter type corresponding to the sample query parameter list, the sample SQL parameters and the sample query parameter list are encapsulated to obtain an object query interface, a list query interface, or a pagination query interface. This technical solution, by extracting the SQL parameters and query parameters from the query XML file and then encapsulating the interface, enables data querying from databases that cannot be used as driving links, thereby improving the convenience and efficiency of data querying.

[0038] Based on the above embodiments, as an optional approach of the present invention, after encapsulating the sample parameter SQL and sample query parameter list according to the query parameter type corresponding to the sample query parameter list to obtain an object query interface, a list query interface, or a pagination query interface, the method further includes: determining the parameter SQL to be passed and the parameter list to be queried from the target query XML file; determining the target query interface from the object query interface, list query interface, and pagination query interface according to the parameter type corresponding to the parameter list to be queried; calling the target query interface to determine the target query result from the third-party database according to the parameter SQL to be passed and the parameter list to be queried; wherein, the third-party database is a database that cannot be used as a driver link.

[0039] The target query XML file refers to the XML file from which data needs to be queried in the actual business scenario. The SQL to be passed parameters refers to the SQL extracted from the target query XML file. The list of query parameters refers to the list of query parameters extracted from the target query XML file.

[0040] Specifically, the process can be based on the persistent layer framework, which determines the SQL query and the list of parameters to be queried from the target query XML file. Based on the type of the parameters to be queried corresponding to the list of parameters, the target query interface is determined from among the object query interface, list query interface, and pagination query interface. For example, if the parameter type is an object, the target query interface is the object query interface; if the parameter type is a list, the target query interface is the list query interface; and if the parameter type is pagination, the target query interface is the pagination query interface. The target query interface is then called to determine the target query results from a third-party database based on the SQL query and the list of parameters to be queried. The third-party database is a database that cannot be used as a driver link.

[0041] Understandably, querying data directly from a database that cannot be used as a driver by calling an API can improve data query efficiency.

[0042] Figure 2 This is a flowchart of a data processing method provided by an embodiment of the present invention. Based on the above embodiments, this embodiment further optimizes the step of "encapsulating the sample parameter SQL and the sample query parameter list according to the query parameter type corresponding to the sample query parameter list to obtain an object query interface, a list query interface, or a pagination query interface," providing an optional implementation scheme. For example... Figure 2 As shown, the method includes:

[0043] S210. Extract the sample parameter SQL and sample query parameter list from the sample query XML file.

[0044] S220. Based on the query parameter type corresponding to the sample query parameter list, encapsulate the sample parameter SQL and the sample query parameter list to obtain the object query interface, list query interface, or pagination query interface.

[0045] An optional approach is to encapsulate the sample SQL and sample query parameter list according to the query parameter type corresponding to the sample query parameter list to obtain an object query interface. This includes: if the query parameter type corresponding to the sample query parameter list is an object, then encapsulate the sample SQL and sample query parameter list into an object, and configure the query results to return the object data corresponding to the sample query parameter list to obtain the object query interface.

[0046] Specifically, if the query parameter type corresponding to the sample query parameter list is an object, then the sample SQL parameter and the sample query parameter list are used as the input query parameters for the interface. The interface parses the sample query parameter list into object parameters, calls the sample SQL parameter to query the object data, and configures the query results to return the object data corresponding to the sample query parameter list, ultimately obtaining the object query interface. The following is a code example of an interface encapsulation:

[0047] / **

[0048] *Object Query

[0049] *

[0050] *@param statementId SQL package ID in Mapper

[0051] *@param queryParams Query parameters

[0052] *@param clazz returns the object type

[0053] *return query results

[0054] /

[0055] public <t>T queryObject(String statementId, Object queryParams,Class <t>clazz){

[0056] / / Get the raw SQL

[0057] MyBatisParams myBatisParams = myBatisUtil.getMybatisParams(statementId, queryParams); / / Generate the parsed parameters

[0058] String sql = myBatisParams.getSql(); / / Generate parsed parameters

[0059] List <object>gbaseParam = myBatisParams.getParamList();

[0060] T data = executeQueryObject(sql, gbaseParam, clazz); / / API call

[0061] return data;

[0062] }

[0063] Another optional approach is to encapsulate the sample SQL and sample query parameter list according to the query parameter type corresponding to the sample query parameter list to obtain a list query interface. This includes: if the query parameter type corresponding to the sample query parameter list is a list, then encapsulate the sample SQL and sample query parameter list into a list, and configure the query results to return the list data corresponding to the sample query parameter list to obtain the list query interface.

[0064] Specifically, if the query parameter type corresponding to the sample query parameter list is a list, then the sample SQL parameter and the sample query parameter list are used as the input query parameters for the interface. The interface parses the sample query parameter list as object parameters, calls the sample SQL parameter to query the list data, and configures the query results to return the list data corresponding to the sample query parameter list, ultimately resulting in the list query interface. The following is a code example of an interface encapsulation:

[0065] / **

[0066] *Non-paginated search is equivalent to list search.

[0067] *

[0068] *@param statementId SQL package ID in Mapper

[0069] *@param queryParams Query parameters

[0070] *@param clazz returns the object type

[0071] *return query results

[0072] /

[0073] public <t>List <t>queryList(String statementId, Object queryParams,Class <t>clazz){

[0074] / / Get the raw SQL

[0075] MyBatisParams myBatisParams = myBatisUtil.getMybatisParams(statementId, queryParams); / / Generate the parsed parameters

[0076] String sql = myBatisParams.getSql(); / / Generate parsed parameters

[0077] List <object>gbaseParam = myBatisParams.getParamList();

[0078] List <t>data = executeQueryList(sql, gbaseParam, clazz); / / API call

[0079] return data;

[0080] }

[0081] Another optional approach is to encapsulate the sample parameter SQL and sample query parameter list according to the query parameter type corresponding to the sample query parameter list to obtain a paginated query interface. This includes: if the query parameter type corresponding to the sample query parameter list is pagination, then the sample parameter SQL and sample query parameter list are used as the input query parameters of the interface, and the original SQL corresponding to the sample parameter SQL is obtained within the interface; the quantity query SQL is determined based on the original SQL; the paginated query SQL is concatenated based on the original SQL; the quantity query SQL and the paginated query SQL are encapsulated, and the query results are configured to return paginated query results and total query volume to obtain the paginated query interface.

[0082] Among them, quantity query SQL refers to SQL that executes a quantity query. Pagination query SQL refers to SQL that performs a list query on each page.

[0083] Specifically, if the query parameter type corresponding to the sample query parameter list is pagination, obtain the original SQL corresponding to the sample parameter SQL; determine the quantity query SQL based on the original SQL; concatenate the pagination query SQL based on the original SQL; encapsulate the quantity query SQL and the pagination query SQL, and configure the query results to return pagination query results and total query volume, as well as the current page number and page size, to obtain the pagination query interface.

[0084] / **

[0085] *Pagination query

[0086] *@param statementId The SQL statement ID in the Mapper

[0087] *@param queryParams Query parameters

[0088] *@param pageInfo pagination parameters(pageNum: current page number, pageSize: page size)

[0089] * @param clazz Returns the object type

[0090] * @return pagination results

[0091] /

[0092] public <t>GbasePageResult <t>queryListWithPagination(StringstatementId, Object queryParams, PageInfo <t>pageInfo, Class <t>clazz){

[0093] / / Obtain the original SQL

[0094] MyBatisParams myBatisParams = myBatisUtil.getMybatisParams(statementId, queryParams);

[0095] String sql = myBatisParams.getSql();

[0096] List <object>gbaseParam = myBatisParams.getParamList();

[0097] / / Execute a count query

[0098] String countSql="SELECT COUNT(*) as num FROM("+ sql + ") AS total";

[0099] int total = executeCount(countSql, gbaseParam);

[0100] / / Concatenate pagination SQL, default 1, 10

[0101] int pageNum=pageInfo.getPageNum()>0 ? pageInfo.getPageNum() : 1;

[0102] int pageSize=pageInfo.getPageSize()>0 ? pageInfo.getPageSize() : 10;

[0103] String paginationSql = sql + " LIMIT "+(pageNum - 1)* pageSize +","+pageSize;

[0104] / / Perform pagination query

[0105] List <t>data = executeQueryList(paginationSql, gbaseParam, clazz);

[0106] / / Return pagination results

[0107] return new GbasePageResult<>(pageNum, pageSize, total, data);

[0108] }

[0109] It should be noted that pagination has been encapsulated for calling external interfaces. You only need to pass in the query SQL, and it will execute the query list and the total count once, and return the paginated results. There is no need to write two SQL queries to query the list and the total count separately.

[0110] It should also be noted that this invention solves the problem that persistence layer architectures such as Mybatis can only bind to the data source configuration and cannot retrieve data by calling external interfaces to pass parameters. It also solves the problem that persistence layer architectures such as Mybatis can only use map mapping and cannot obtain ordered parameter lists. It still supports XML select, insert, update, and delete functions, as well as the original if test and foreach functions in XML, maximizing code portability.

[0111] The technical solution of this invention extracts sample SQL parameters and a sample query parameter list from a sample query XML file; based on the query parameter type corresponding to the sample query parameter list, the sample SQL parameters and the sample query parameter list are encapsulated to obtain an object query interface, a list query interface, or a pagination query interface. This technical solution, by extracting the SQL parameters and query parameters from the query XML file and then encapsulating the interface, enables data querying from databases that cannot be used as driving links, thereby improving the convenience and efficiency of data querying.

[0112] Figure 3 This is a schematic diagram of a data processing apparatus according to an embodiment of the present invention; this embodiment is applicable to database data querying, especially when the database cannot be used as a driving link for data querying. The data processing apparatus can be implemented in hardware and / or software, and can be configured in an electronic device that carries data processing functions, such as a server. Figure 3 As shown, the device includes:

[0113] Data extraction module 310 is used to extract sample parameter SQL and sample query parameter list from sample query XML file;

[0114] The query interface encapsulation module 320 is used to encapsulate the sample parameter SQL and the sample query parameter list according to the query parameter type corresponding to the sample query parameter list, so as to obtain the object query interface, list query interface or pagination query interface.

[0115] The technical solution of this invention extracts sample SQL parameters and a sample query parameter list from a sample query XML file; based on the query parameter type corresponding to the sample query parameter list, the sample SQL parameters and the sample query parameter list are encapsulated to obtain an object query interface, a list query interface, or a pagination query interface. This technical solution, by extracting the SQL parameters and query parameters from the query XML file and then encapsulating the interface, enables data querying from databases that cannot be used as driving links, thereby improving the convenience and efficiency of data querying.

[0116] Optionally, the data extraction module 310 is used for:

[0117] Based on the SQL statement identifier, extract the sample parameter SQL from the sample query XML file;

[0118] Determine the parameter mapping of the query condition object based on the sample query XML file;

[0119] Generate a sample query parameter list based on the query condition object parameter mapping.

[0120] Optionally, the query interface encapsulation module 320 is used for:

[0121] If the query parameter type corresponding to the sample query parameter list is an object, then the sample parameter SQL and the sample query parameter list are encapsulated into objects, and the query results are configured to return the object data corresponding to the sample query parameter list, thus obtaining the object query interface.

[0122] Optionally, the query interface encapsulation module 320 is used for:

[0123] If the query parameter type corresponding to the sample query parameter list is a list, then the sample parameter SQL and the sample query parameter list are encapsulated into a list, and the query result is configured to return the list data corresponding to the sample query parameter list, thus obtaining the list query interface.

[0124] Optionally, the query interface encapsulation module 320 is used for:

[0125] If the query parameter type corresponding to the sample query parameter list is pagination, then obtain the original SQL corresponding to the sample parameter passing SQL;

[0126] Determine the quantity query SQL based on the original SQL;

[0127] Construct pagination query SQL from the original SQL;

[0128] The quantity query SQL and pagination query SQL are encapsulated, and the query results are configured to return paginated query results and total query volume, thus obtaining the pagination query interface.

[0129] Optionally, the device also includes a data query module for:

[0130] Based on the query parameter type corresponding to the sample query parameter list, the sample parameter SQL and sample query parameter list are encapsulated to obtain the object query interface, list query interface or pagination query interface. Then, the SQL to be passed and the list of parameters to be queried are determined from the target query XML file.

[0131] Based on the type of the parameters to be queried corresponding to the list of parameters to be queried, determine the target query interface from the object query interface, list query interface, and pagination query interface.

[0132] The target query interface is invoked, and the target query result is determined from the third-party database based on the SQL to be passed and the list of parameters to be queried; the third-party database is a database that cannot be used as a driver link.

[0133] The data processing apparatus provided in the embodiments of the present invention can execute the data processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.

[0134] According to embodiments of the present invention, the present invention also provides an electronic device, a readable storage medium, and a computer program product.

[0135] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the data processing method of the present invention. Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. 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 can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), 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 invention described and / or claimed herein.

[0136] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

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

[0138] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 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 processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as data processing methods.

[0139] In some embodiments, the data processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the data processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the data processing method by any other suitable means (e.g., by means of firmware).

[0140] Various implementations 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 implementations 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.

[0141] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0142] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. 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 fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0143] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. 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).

[0144] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations 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., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0145] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0146] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0147] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. 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 invention should be included within the scope of protection of this invention.< / t> < / object> < / t> < / t> < / t> < / t> < / t> < / object> < / t> < / t> < / t> < / object> < / t> < / t>

Claims

1. A data processing method, characterized in that, include: Extract the sample parameter SQL and sample query parameter list from the sample query XML file; Based on the query parameter type corresponding to the sample query parameter list, the sample parameter SQL and the sample query parameter list are encapsulated to obtain an object query interface, a list query interface, or a pagination query interface.

2. The method according to claim 1, characterized in that, Extract the sample query parameter SQL and sample query parameter list from the sample query XML file, including: Based on the SQL statement identifier, extract the sample parameter SQL from the sample query XML file; The query condition object parameter mapping is determined based on the sample query XML file; Based on the parameter mapping of the query condition object, a sample query parameter list is generated.

3. The method according to claim 1, characterized in that, Based on the query parameter types corresponding to the sample query parameter list, the sample parameter SQL and the sample query parameter list are encapsulated to obtain an object query interface, including: If the query parameter type corresponding to the sample query parameter list is an object, then the sample parameter SQL and the sample query parameter list are encapsulated into objects, and the query result is configured to return the object data corresponding to the sample query parameter list, thus obtaining the object query interface.

4. The method according to claim 1, characterized in that, Based on the query parameter types corresponding to the sample query parameter list, the sample parameter SQL and the sample query parameter list are encapsulated to obtain a list query interface, including: If the query parameter type corresponding to the sample query parameter list is a list, then the sample parameter SQL and the sample query parameter list are encapsulated into a list, and the query result is configured to return the list data corresponding to the sample query parameter list, thus obtaining the list query interface.

5. The method according to claim 1, characterized in that, Based on the query parameter types corresponding to the sample query parameter list, the sample SQL parameters and the sample query parameter list are encapsulated to obtain a paginated query interface, including: If the query parameter type corresponding to the sample query parameter list is pagination, then obtain the original SQL corresponding to the sample parameter passing SQL; Determine the quantity query SQL based on the original SQL; Construct a pagination query SQL based on the original SQL; The quantity query SQL and the pagination query SQL are encapsulated, and the query results are configured to return pagination query results and total query volume, thus obtaining the pagination query interface.

6. The method according to claim 1, characterized in that, Based on the query parameter types corresponding to the sample query parameter list, after encapsulating the sample parameter SQL and the sample query parameter list to obtain an object query interface, a list query interface, or a pagination query interface, it also includes: The SQL query and the list of parameters to be queried are determined from the target query XML file; Based on the type of the parameters to be queried corresponding to the list of parameters to be queried, determine the target query interface from the object query interface, list query interface, and pagination query interface. The target query interface is invoked to determine the target query result from a third-party database based on the SQL to be passed and the list of parameters to be queried; wherein, the third-party database is a database that cannot be used as a driver link.

7. A data processing apparatus, characterized in that, include: The data extraction module is used to extract sample parameter SQL and sample query parameter list from the sample query XML file; The query interface encapsulation module is used to encapsulate the sample parameter SQL and the sample query parameter list according to the query parameter type corresponding to the sample query parameter list, so as to obtain an object query interface, a list query interface, or a pagination query interface.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the data processing method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the data processing method according to any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the data processing method according to any one of claims 1-6.