Open interface query method and device, equipment and storage medium

By importing government data into month data tables in the government affairs platform and merging the access interface, the problem of cumbersome query of open interfaces on the government affairs platform is solved, and more efficient cross-month query is achieved.

CN119884510APending Publication Date: 2025-04-25SHENZHEN TAIJI SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411960162.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The open interface query process of the existing government platform is cumbersome, resulting in inefficient query, especially when querying across months, which increases time consumption.

Method used

The database management system selects the storage engine of the government database corresponding to year information, imports the government data into the government data table corresponding to month information, creates the access interface of the data table corresponding to each month information, merges it into an open interface, receives the client's cross-month query request, integrates the query results of each month data table and returns.

Benefits of technology

It reduces the storage of government data in a single data table, reduces the query time of open interfaces, improves the efficiency of cross-month queries, and avoids the need for repeated queries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884510A_ABST
    Figure CN119884510A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information and the technical field of open platforms, and discloses an open interface query method and device, equipment and a storage medium, and the method comprises the steps: obtaining year information and month information of government affair data; creating an access interface of the government affair data table corresponding to each piece of month information, and combining the access interfaces of the government affair data table corresponding to each piece of month information into an open interface of the government affair platform; receiving a cross-month query request sent by a client through the open interface; reading a time span and a query statement in the cross-month query request, executing the query statement on the government affair data table corresponding to each piece of month information to obtain query content of the government affair data table corresponding to each piece of month information, and integrating the query content of the government affair data table corresponding to each piece of month information to obtain a query result; and obtaining a query result of the cross-month query request, and returning the query result to the client through an open interface. The query efficiency of the open interface can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of information technology and open platform technology, and in particular to an open interface query method, device, equipment and storage medium. Background Art

[0002] The open interface of the government platform refers to the interface provided by government agencies to the public, enterprises and other institutions through the government platform for accessing and using government data. The open interface provides a convenient access path for the public and enterprises. Through the interface, users can directly obtain the required government data without cumbersome application procedures, thereby reducing the difficulty and cost of obtaining government data.

[0003] However, the query process of the open interface of the existing government platform is cumbersome, which is not conducive to improving the query efficiency of the open interface. The reason is that the government data in the government platform are all stored in a data table. When the amount of data in the data table increases, the time required for users to call the open interface will also increase. In addition, the existing open interface can only return the query results of one month. In this way, if users want to view the query results of multiple months, they can only query repeatedly, which increases the query time of the open interface of the government platform, which is not conducive to improving the query efficiency of the open interface. Summary of the invention

[0004] The present invention provides an open interface query method, device, computer equipment and storage medium to solve the technical problem that the query process of the open interface of the existing government platform is cumbersome and is not conducive to improving the query efficiency of the open interface.

[0005] In a first aspect, an open interface query method is provided, comprising: Obtain government data from the government platform, and obtain year information and month information of the government data; Selecting, through a database management system, a storage engine of a government affairs database corresponding to the year information as a target storage engine; Importing the government data into the government data table corresponding to the month information through the target storage engine; Creating an access interface for the government data table corresponding to each of the monthly information, and merging the access interfaces for the government data table corresponding to each of the monthly information into an open interface for the government platform; Receiving, through the open interface, a cross-month query request sent by a client, wherein the cross-month query request is a query request that requires multiple government data tables corresponding to the month information to be completed together; Read the time span and query statement in the cross-month query request, and when the time span includes the year information, execute the query statement on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, integrate the query content of the government data table corresponding to each of the month information to obtain the query result of the cross-month query request, and return the query result to the client through the open interface.

[0006] Furthermore, the step of selecting, through the database management system, a storage engine of the government affairs database corresponding to the year information as a target storage engine includes: Accessing the government affairs database corresponding to the year information through the database management system; The storage engine of the government database corresponding to the year information is selected as the target storage engine.

[0007] Further, the importing of the government data into the government data table corresponding to the month information through the target storage engine includes: In the government affairs database, creating a government affairs data table corresponding to the month information; The government data is imported into the government data table corresponding to the month information through the target storage engine.

[0008] Furthermore, the step of creating an access interface for the government data table corresponding to each of the monthly information and merging the access interface for the government data table corresponding to each of the monthly information into an open interface of the government platform includes: Create an access interface for the government data table corresponding to each of the monthly information; Obtain a merge instruction, execute the merge instruction, and merge the access interface of the government data table corresponding to each of the monthly information into an open interface of the government platform.

[0009] Furthermore, the open interface receives a cross-month query request sent by a client, wherein the cross-month query request is a query request that requires multiple government data tables corresponding to the month information to complete together, including: Obtaining the current state of the open interface; When the current state is the working state, a cross-month query request sent by the client is received through the open interface, and the cross-month query request is a query request that needs to be completed by multiple government data tables corresponding to the month information.

[0010] Further, the reading of the time span and query statement in the cross-month query request, when the time span includes the year information, executing the query statement on the government data table corresponding to each of the month information, obtaining the query content of the government data table corresponding to each of the month information, integrating the query content of the government data table corresponding to each of the month information, obtaining the query result of the cross-month query request, and returning the query result to the client through the open interface, includes: Reading the time span and query statement in the cross-month query request, when the time span includes the year information, selecting the query engine of the government affairs database corresponding to the year information as the target query engine; Through the target query engine, the query statement is executed on the government data table corresponding to each of the month's information to obtain the query content of the government data table corresponding to each of the month's information, the query content of the government data table corresponding to each of the month's information is integrated to obtain the query result of the cross-month query request, and the query result is returned to the client through the open interface.

[0011] Further, in the reading of the time span and query statement in the cross-month query request, when the time span includes the year information, the query statement is executed on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, the query content of the government data table corresponding to each of the month information is integrated to obtain the query result of the cross-month query request, and after returning the query result to the client through the open interface, the open interface query method includes: Obtain a storage instruction, execute the storage instruction, and store the query result in a preset storage area.

[0012] In a second aspect, an open interface query device is provided, comprising: An acquisition module is used to acquire government data in the government platform, and acquire year information and month information of the government data; A selection module, used to select the storage engine of the government affairs database corresponding to the year information as the target storage engine through the database management system; An import module, used to import the government data into the government data table corresponding to the month information through the target storage engine; A merging module, used to create an access interface for the government data table corresponding to each of the monthly information, and merge the access interfaces of the government data table corresponding to each of the monthly information into an open interface of the government platform; A receiving module, used to receive a cross-month query request sent by a client through the open interface, wherein the cross-month query request is a query request that requires multiple government data tables corresponding to the month information to complete together; A query module is used to read the time span and query statement in a cross-month query request. When the time span includes the year information, the query statement is executed on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, the query content of the government data table corresponding to each of the month information is integrated to obtain the query result of the cross-month query request, and the query result is returned to the client through the open interface.

[0013] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned open interface query method when executing the computer program.

[0014] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned open interface query method are implemented.

[0015] The present application provides an open interface query method, device, computer equipment and storage medium, which obtain government data in a government platform, obtain the year information and month information of the government data; select the storage engine of the government database corresponding to the year information as the target storage engine through a database management system; import the government data into the government data table corresponding to the month information through the target storage engine; create an access interface for each government data table corresponding to the month information, and merge the access interface of each government data table corresponding to the month information into an open interface of the government platform; receive a cross-month query request sent by a client through the open interface, the cross-month query request is a query request that requires multiple government data tables corresponding to the month information to complete together; read the time span and query statement in the cross-month query request, and when the time span includes the year information, execute the query statement on each government data table corresponding to the month information to obtain the query content of each government data table corresponding to the month information, and perform the query on the query content of each government data table corresponding to the month information. The query results of the cross-month query request are obtained by integrating the rows, and the query results are returned to the client through the open interface. The beneficial effects are in two aspects. On the one hand, the government data is imported into the government data table corresponding to the month information through the target storage engine. The government data in the government platform will not all exist in one data table. Therefore, the time required for calling the open interface is reduced; on the other hand, the time span and query statement in the cross-month query request are read. When the time span includes the year information, the query statement is executed on the government data table corresponding to each month information to obtain the query content of the government data table corresponding to each month information. The query content of the government data table corresponding to each month information is integrated to obtain the query result of the cross-month query request, and the query result is returned to the client through the open interface. Since the open interface can query automatically and return the query result of the cross-month query request, there is no need for repeated queries, thereby reducing the query time of the open interface and helping to improve the query efficiency of the open interface. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0017] Figure 1 is a schematic diagram of an application environment of an open interface query method in one embodiment of the present invention; Figure 2 A schematic diagram of a flow chart of an open interface query method provided by an embodiment of the present invention; Figure 3 yes Figure 2 A schematic flow chart of a specific implementation of step S23; Figure 4 yes Figure 2 A schematic flow chart of a specific implementation of step S25; Figure 5 yes Figure 2 A schematic flow chart of a specific implementation of step S26; Figure 6 is a structural diagram of an open interface query device in one embodiment of the present invention; Figure 7 It is a structural diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] See also Figure 1 , Figure 1 is a schematic diagram of an application environment of an open interface query method in an embodiment of the present invention. The open interface query method provided by the embodiment of the present invention can be applied in the following situations: Figure 1 In an application environment, a client communicates with a server through a network.

[0020] The server obtains government data from the government platform, and obtains year information and month information of the government data; Selecting, through a database management system, a storage engine of a government affairs database corresponding to the year information as a target storage engine; Importing the government data into the government data table corresponding to the month information through the target storage engine; Creating an access interface for the government data table corresponding to each of the monthly information, and merging the access interfaces for the government data table corresponding to each of the monthly information into an open interface for the government platform; Receiving, through the open interface, a cross-month query request sent by a client, wherein the cross-month query request is a query request that requires multiple government data tables corresponding to the month information to be completed together; Read the time span and query statement in the cross-month query request, and when the time span includes the year information, execute the query statement on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, integrate the query content of the government data table corresponding to each of the month information to obtain the query result of the cross-month query request, and return the query result to the client through the open interface.

[0021] In the scheme implemented by the above-mentioned open interface query method, device, equipment and medium, the beneficial effects are in two aspects. On the one hand, through the target storage engine, the government data is imported into the government data table corresponding to the monthly information, and the government data in the government platform will not all exist in one data table, thereby reducing the time required for calling the open interface; on the other hand, the time span and query statement in the cross-month query request are read. When the time span includes the year information, the query statement is executed on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, and the query content of the government data table corresponding to each of the month information is integrated to obtain the query result of the cross-month query request, and the query result is returned to the client through the open interface. Since the open interface can query automatically and return the query result of the cross-month query request, there is no need for repeated queries, thereby reducing the query time of the open interface, which is beneficial to improving the query efficiency of the open interface.

[0022] The device running the client is referred to as a client device.

[0023] The device running the server is referred to as the server device.

[0024] Among them, client devices include but are not limited to smartphones, personal computers, Internet of Vehicles terminals, tablets and portable wearable devices.

[0025] The server device may be implemented as an independent server or a server cluster consisting of multiple servers.

[0026] The present invention is described in detail below through specific embodiments. Figure 2 , Figure 2 A flowchart of an open interface query method provided by an embodiment of the present invention includes the following steps: S21, obtaining government data in the government platform, and obtaining year information and month information of the government data; Among them, the government affairs platform provides government affairs data, including ground observation data, weather forecasts, administrative licensing information, demographic information, economic activity indicators, distribution of public education resources, medical and health service records, and environmental protection monitoring results.

[0027] Among them, government data all originate from the daily management and service processes of government departments, and aim to promote the optimal allocation of social resources and continuous improvement of public services through an efficient data sharing mechanism.

[0028] The year information of government data refers to the year in which the government data was collected or recorded. For example, the population census data and economic census data will clearly indicate the year in which the population census data and economic census data were collected, so that users can understand the year in which the population census data and economic census data were collected.

[0029] S22, selecting, through a database management system, a storage engine of a government affairs database corresponding to the year information as a target storage engine; The step of selecting the storage engine of the government affairs database corresponding to the year information as the target storage engine through the database management system includes: Accessing the government affairs database corresponding to the year information through the database management system; The storage engine of the government database corresponding to the year information is selected as the target storage engine.

[0030] Exemplarily, the government affairs database is a relational database that stores government affairs data.

[0031] A relational database is a database system based on a relational model. It stores data in the form of tables and organizes the data in rows and columns.

[0032] Among them, relational databases include but are not limited to Yashan database and Oracle database.

[0033] S23, importing the government data into the government data table corresponding to the month information through the target storage engine; Exemplarily, the government data table is a data table that stores government data.

[0034] S24, creating an access interface for the government data table corresponding to each of the monthly information, and merging the access interface for the government data table corresponding to each of the monthly information into an open interface for the government platform; The step of creating an access interface for the government data table corresponding to each of the monthly information and merging the access interfaces for the government data table corresponding to each of the monthly information into an open interface for the government platform includes: Create an access interface for the government data table corresponding to each of the monthly information; Obtain a merge instruction, execute the merge instruction, and merge the access interface of the government data table corresponding to each of the monthly information into an open interface of the government platform.

[0035] Among them, a merge instruction is obtained, the merge instruction is executed, the call information of the access interface of the government data table corresponding to each month's information is merged in the configuration information, a target interface is created, and the target interface using the configuration information is selected as the open interface of the government platform.

[0036] Among them, the access interface of the government data table corresponding to each of the monthly information is merged into the open interface of the government platform, which reduces the redundancy and complexity of the access interface of the government data table corresponding to each of the monthly information. In addition, for the client, calling a unified open interface is more efficient and convenient than calling multiple scattered access interfaces, which reduces the difficulty and cost of integration.

[0037] S25, receiving a cross-month query request sent by a client through the open interface, wherein the cross-month query request is a query request that requires multiple government data tables corresponding to the month information to be completed together; S26, read the time span and query statement in the cross-month query request, when the time span includes the year information, execute the query statement on the government data table corresponding to each of the month information, obtain the query content of the government data table corresponding to each of the month information, integrate the query content of the government data table corresponding to each of the month information, obtain the query result of the cross-month query request, and return the query result to the client through the open interface.

[0038] Among them, the query content of the government data table corresponding to each of the monthly information is integrated to obtain the query result of the cross-month query request, and the query result is returned to the client through the open interface. This process not only greatly shortens the government data table, making the query result acquisition instant and efficient, but also greatly improves the user experience. In addition, since users can see the query results of cross-month query requests, when users want to view the query results of multiple months, they do not need to query repeatedly, thereby reducing the query time of the open interface and helping to improve the query efficiency of the open interface.

[0039] Among them, in the reading of the time span and query statement in the cross-month query request, when the time span includes the year information, the query statement is executed on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, the query content of the government data table corresponding to each of the month information is integrated to obtain the query result of the cross-month query request, and after returning the query result to the client through the open interface, the open interface query method includes: Obtain a storage instruction, execute the storage instruction, and store the query result in a preset storage area.

[0040] In the embodiment of the present invention, the beneficial effects lie in two aspects. On the one hand, through the target storage engine, the government data is imported into the government data table corresponding to the month information, and the government data in the government platform will not all exist in one data table, thereby reducing the time required for calling the open interface; on the other hand, the time span and query statement in the cross-month query request are read. When the time span includes the year information, the query statement is executed on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, and the query content of the government data table corresponding to each of the month information is integrated to obtain the query result of the cross-month query request, and the query result is returned to the client through the open interface. Since the open interface can query automatically and return the query result of the cross-month query request, there is no need for repeated queries, thereby reducing the query time of the open interface, which is beneficial to improving the query efficiency of the open interface.

[0041] See also Figure 3 , Figure 3 yes Figure 2 A specific implementation flow diagram of step S23 is described in detail as follows: S31, creating a government affairs data table corresponding to the month information in the government affairs database; S32, importing the government data into the government data table corresponding to the month information through the target storage engine.

[0042] In an embodiment of the present invention, the government data is imported into the government data table corresponding to the monthly information, so that the data volume of each government data table can be reasonably optimized, thereby ensuring the stable operation and efficient response of the government database.

[0043] See also Figure 4 , Figure 4 yes Figure 2 A specific implementation flow diagram of step S25 is described in detail as follows: S41, obtaining the current state of the open interface; S42, when the current state is the working state, receiving a cross-month query request sent by the client through the open interface, wherein the cross-month query request is a query request that needs to be completed by multiple government data tables corresponding to the month information.

[0044] In the embodiment of the present invention, when the current state is the working state, the cross-month query request sent by the client is received through the open interface. This mechanism ensures that the cross-month query request will be accepted and processed only when the open interface is in the working state, thereby effectively avoiding service interruption or data error caused by open interface failure or overload. Through this intelligent state management, the open interface of the government affairs platform not only improves the efficiency and reliability of data interaction, but also provides users with a more stable and reliable data service experience.

[0045] See also Figure 5 , Figure 5 yes Figure 2 A specific implementation flow diagram of step S26 is described in detail as follows: S51, reading the time span and query statement in the cross-month query request, and when the time span includes the year information, selecting the query engine of the government affairs database corresponding to the year information as the target query engine; S52, through the target query engine, execute the query statement on the government data table corresponding to each of the month's information, obtain the query content of the government data table corresponding to each of the month's information, integrate the query content of the government data table corresponding to each of the month's information, obtain the query result of the cross-month query request, and return the query result to the client through the open interface.

[0046] Exemplarily, executing the query statement on the government data table corresponding to each of the month information through the target query engine to obtain the query content of the government data table corresponding to each of the month information, integrating the query content of the government data table corresponding to each of the month information to obtain the query result of the cross-month query request, and returning the query result to the client through the open interface, including: By using the target query engine, the query statement is executed on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, and the query content of the government data table corresponding to each of the month information is integrated to obtain the query result of the cross-month query request; The query result is encapsulated in a target format to obtain the encapsulated query result, and the encapsulated query result is returned to the client through the open interface.

[0047] The target format includes but is not limited to JSON format and Extensible Markup Language format.

[0048] Among them, JSON format (JavaScript Object Notation) is a lightweight data exchange format. In an embodiment of the present invention, the query statement is executed on the government data table corresponding to each of the month's information through the target query engine to obtain the query content of the government data table corresponding to each of the month's information, and the query content of the government data table corresponding to each of the month's information is integrated to obtain the query result of the cross-month query request, and the query result is returned to the client through the open interface. Since the open interface can return the query result of the cross-month query request, there is no need for repeated queries, thereby reducing the query time of the open interface, which is beneficial to improving the query efficiency of the open interface.

[0049] See also Figure 6 , Figure 6 is a schematic diagram of a structure of an open interface query device in one embodiment of the present invention. Figure 6 As shown, the open interface query device includes an acquisition module 101, a selection module 102, an import module 103, a merging module 104, a receiving module 105, and a query module 106. The detailed description of each functional module is as follows: The acquisition module 101 is used to acquire government data in the government platform, and acquire year information and month information of the government data; A selection module 102 is used to select a storage engine of the government affairs database corresponding to the year information as a target storage engine through a database management system; An import module 103, used to import the government data into the government data table corresponding to the month information through the target storage engine; The merging module 104 is used to create an access interface of the government data table corresponding to each of the monthly information, and merge the access interfaces of the government data table corresponding to each of the monthly information into an open interface of the government platform; The receiving module 105 is used to receive a cross-month query request sent by a client through the open interface, wherein the cross-month query request is a query request that needs to be completed by multiple government data tables corresponding to the month information; The query module 106 is used to read the time span and query statement in the cross-month query request. When the time span includes the year information, the query statement is executed on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, and the query content of the government data table corresponding to each of the month information is integrated to obtain the query result of the cross-month query request, and the query result is returned to the client through the open interface.

[0050] In the embodiment of the present invention, the beneficial effects lie in two aspects. On the one hand, through the target storage engine, the government data is imported into the government data table corresponding to the month information, and the government data in the government platform will not all exist in one data table, thereby reducing the time required for calling the open interface; on the other hand, the time span and query statement in the cross-month query request are read. When the time span includes the year information, the query statement is executed on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, and the query content of the government data table corresponding to each of the month information is integrated to obtain the query result of the cross-month query request, and the query result is returned to the client through the open interface. Since the open interface can query automatically and return the query result of the cross-month query request, there is no need for repeated queries, thereby reducing the query time of the open interface, which is beneficial to improving the query efficiency of the open interface.

[0051] For the specific definition of the open interface query device, please refer to the definition of the open interface query method above, which will not be repeated here.

[0052] Each module in the above-mentioned open interface query device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0053] See also Figure 7 , Figure 7 is another structural diagram of a computer device in one embodiment of the present invention. In one embodiment, a computer device is provided. The computer device is a server device, and its internal structure diagram can be as shown in FIG. Figure 7As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with a client device. When the computer program is executed by the processor, the functions or steps of an open interface query method can be implemented.

[0054] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor.

[0055] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant description of the aforementioned method embodiment. In order to avoid repetition, they will not be described one by one here.

[0056] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), and a network processor (NP); it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.

[0057] The above description and the accompanying drawings sufficiently illustrate the embodiments of the present disclosure to enable those skilled in the art to practice them. In this article, each embodiment may focus on the differences from other embodiments, and the same or similar parts between the embodiments may refer to each other. For the methods and products disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0058] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0059] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices and equipment) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.

[0060] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. An open interface query method, characterized in that: include: Obtain government data from the government platform, and obtain year information and month information of the government data; Selecting, through a database management system, a storage engine of a government affairs database corresponding to the year information as a target storage engine; Importing the government data into the government data table corresponding to the month information through the target storage engine; Creating an access interface for the government data table corresponding to each of the monthly information, and merging the access interfaces for the government data table corresponding to each of the monthly information into an open interface for the government platform; Receiving, through the open interface, a cross-month query request sent by a client, wherein the cross-month query request is a query request that requires multiple government data tables corresponding to the month information to be completed together; Read the time span and query statement in the cross-month query request, and when the time span includes the year information, execute the query statement on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, integrate the query content of the government data table corresponding to each of the month information to obtain the query result of the cross-month query request, and return the query result to the client through the open interface.

2. The open interface query method according to claim 1, characterized in that: The step of selecting, through the database management system, a storage engine of the government affairs database corresponding to the year information as a target storage engine includes: Accessing the government affairs database corresponding to the year information through the database management system; The storage engine of the government affairs database corresponding to the year information is selected as the target storage engine.

3. The open interface query method according to claim 1, characterized in that: The step of importing the government data into a government data table corresponding to the month information through the target storage engine includes: In the government affairs database, creating a government affairs data table corresponding to the month information; The government data is imported into the government data table corresponding to the month information through the target storage engine.

4. The open interface query method according to claim 1, characterized in that: The step of creating an access interface for the government affairs data table corresponding to each of the monthly information, and merging the access interface for the government affairs data table corresponding to each of the monthly information into an open interface for the government affairs platform includes: Create an access interface for the government data table corresponding to each of the monthly information; Obtain a merge instruction, execute the merge instruction, and merge the access interface of the government data table corresponding to each of the monthly information into an open interface of the government platform.

5. The open interface query method according to claim 1, characterized in that: The method of receiving a cross-month query request sent by a client through the open interface, wherein the cross-month query request is a query request that requires multiple government data tables corresponding to the month information to complete together, including: Obtaining the current state of the open interface; When the current state is the working state, a cross-month query request sent by the client is received through the open interface, and the cross-month query request is a query request that needs to be completed by multiple government data tables corresponding to the month information.

6. The open interface query method according to claim 1, characterized in that: The reading of the time span and query statement in the cross-month query request, when the time span includes the year information, executing the query statement on the government data table corresponding to each of the month information, obtaining the query content of the government data table corresponding to each of the month information, integrating the query content of the government data table corresponding to each of the month information, obtaining the query result of the cross-month query request, and returning the query result to the client through the open interface, includes: Reading the time span and query statement in the cross-month query request, when the time span includes the year information, selecting the query engine of the government affairs database corresponding to the year information as the target query engine; Through the target query engine, the query statement is executed on the government data table corresponding to each of the month's information to obtain the query content of the government data table corresponding to each of the month's information, the query content of the government data table corresponding to each of the month's information is integrated to obtain the query result of the cross-month query request, and the query result is returned to the client through the open interface.

7. The open interface query method according to claim 1, characterized in that: In the reading of the time span and query statement in the cross-month query request, when the time span includes the year information, executing the query statement on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, integrating the query content of the government data table corresponding to each of the month information to obtain the query result of the cross-month query request, and returning the query result to the client through the open interface, the open interface query method includes: Obtain a storage instruction, execute the storage instruction, and store the query result in a preset storage area.

8. An open interface query device, characterized in that: include: An acquisition module is used to acquire government data in the government platform, and acquire year information and month information of the government data; A selection module, used to select the storage engine of the government affairs database corresponding to the year information as the target storage engine through the database management system; An import module, used to import the government data into the government data table corresponding to the month information through the target storage engine; A merging module, used to create an access interface for the government data table corresponding to each of the monthly information, and merge the access interfaces of the government data table corresponding to each of the monthly information into an open interface of the government platform; A receiving module, used to receive a cross-month query request sent by a client through the open interface, wherein the cross-month query request is a query request that requires multiple government data tables corresponding to the month information to complete together; A query module is used to read the time span and query statement in a cross-month query request. When the time span includes the year information, the query statement is executed on the government data table corresponding to each of the month information to obtain the query content of the government data table corresponding to each of the month information, the query content of the government data table corresponding to each of the month information is integrated to obtain the query result of the cross-month query request, and the query result is returned to the client through the open interface.

9. 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, the steps of the open interface query method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the open interface query method according to any one of claims 1 to 7 are implemented.