Data processing method and system, electronic equipment and storage medium

Through the unified API interface, the problem of high cost of data query interface in the existing technology is solved, and efficient data query response is achieved.

CN120407629APending Publication Date: 2025-08-01SF TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410147502.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-01
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In the prior art, configuring dedicated data query interfaces for different types of data leads to an increase in development and operation costs. As the amount of data increases, the development cost of data query interfaces gradually increases.

Method used

Using a unified API interface, the data query template is determined by obtaining the user's data query request, and the data query statement is filled based on the query content, and sent to the database for execution in response to the query request.

Benefits of technology

It realizes accurate response of different types of data, reduces development, maintenance and operation costs, and improves the efficiency of data query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407629A_ABST
    Figure CN120407629A_ABST
Patent Text Reader

Abstract

The invention provides a data processing method and system, electronic equipment and a storage medium, the data processing method is applied to a unified API interface set for different types of data, and the data processing method comprises the steps that a data query request of a user is acquired, and the data query request comprises query content of to-be-queried data; determining a data query template set for the to-be-queried data; filling the data query template based on the query content of the to-be-queried data to obtain a data query statement of the to-be-queried data; sending the data query statement to a database corresponding to the unified API interface, so that the database executes the data query statement, and determining data used for responding to the data query request; wherein different types of data are stored in the database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and specifically to a data processing method, system, electronic device and storage medium. The present application also relates to a data processing device. Background Art

[0002] In fields such as market research, warehousing, and retail, relevant staff often need to analyze data to determine information such as product sales, the entry and exit status of warehouse storage items, etc.

[0003] In the existing technology, in order to query the above data, it is usually necessary to configure a dedicated data query interface for different data to call the data query interface to query related data. However, as the amount of data increases, the development cost of the data query interface will become increasingly higher, and the operating cost of the data development team will also gradually increase. Summary of the Invention

[0004] Based on the above technical status, the present application provides a data processing method, system, electronic device and storage medium.

[0005] According to a first aspect of an embodiment of the present application, a data processing method is provided, which is applied to a unified API interface set for different types of data, including:

[0006] Obtaining a user's data query request, wherein the data query request includes query content of the data to be queried;

[0007] Determine a data query template set for the data to be queried;

[0008] Filling the data query template based on the query content of the data to be queried to obtain a data query statement for the data to be queried;

[0009] The data query statement is sent to a database corresponding to the unified API interface, so that the database executes the data query statement and determines data for responding to the data query request; wherein the database stores different types of data.

[0010] In an optional implementation manner of the present application, the data query request further includes identification information of the data to be queried;

[0011] The determining of a data query template set for the data to be queried includes:

[0012] A data query template set for the data to be queried is determined according to the identification information of the data to be queried.

[0013] In an alternative embodiment of the present application, the data query content includes at least one of the following data:

[0014] The query date of the data to be queried, the brand information of the data to be queried, the name information of the data to be queried, and the storage location information of the data to be queried.

[0015] In an alternative embodiment of the present application, filling the data query template based on the query content of the data to be queried to obtain the data query statement of the data to be queried includes:

[0016] Determine the query permission of the user according to the user information of the user;

[0017] Fill the query content of the data to be queried and the query permission of the user into the data query template to obtain the data query statement of the data to be queried.

[0018] According to the second aspect of the embodiments of the present application, a data processing method is provided, which is applied to a database and includes:

[0019] Obtain the data query statement sent by the unified API interface;

[0020] Execute the data query statement to determine the data for responding to the data query request;

[0021] Wherein, the database stores different types of data, the unified API interface is used to obtain the data query request of the user, the data query request includes the query content of the data to be queried; determine the data query template set for the data to be queried; fill the data query template based on the query content of the data to be queried to obtain the data query statement of the data to be queried.

[0022] In an alternative embodiment of the present application, executing the data query statement to determine the data for responding to the data query request includes:

[0023] Obtain the user information sent by the unified API interface;

[0024] Determine the query permission of the user according to the user information;

[0025] Execute the data query statement according to the query permission of the user to determine the data for responding to the data query request.

[0026] In an alternative embodiment of the present application, executing the data query statement according to the query permission of the user to determine the data for responding to the data query request includes:

[0027] Determine whether the query content involved in the data query statement complies with the user's query authority;

[0028] When the query content complies with the query authority, execute the data query statement to determine the data for the user to respond to the data query request;

[0029] When the query content does not comply with the query authority, send a prompt message indicating query failure to the unified API interface.

[0030] According to the third aspect of the embodiments of the present application, a data processing system is provided, including: a terminal device, a unified API interface, and a database;

[0031] The terminal device is configured to receive a data query request from a user and send the data query request to the unified API interface;

[0032] The unified API interface is configured to obtain a data query request from a user, where the data query request includes query content of data to be queried; determine a data query template set for the data to be queried; fill the data query template based on the query content of the data to be queried to obtain a data query statement for the data to be queried; send the data query statement to a database corresponding to the unified API interface;

[0033] The database is configured to execute the data query statement to determine the data for responding to the data query request.

[0034] According to the fourth aspect of the embodiments of the present application, an electronic device is provided, including:

[0035] A processor;

[0036] A memory for storing executable instructions of the processor;

[0037] The processor is configured to execute the above data processing method by running the instructions in the memory.

[0038] According to the fifth aspect of the embodiments of the present application, a computer storage medium is provided, where the storage medium stores a computer program, and when the computer program is run by a processor, the above data processing method is executed.

[0039] The present application provides a data processing method, system, electronic device, and storage medium. The data processing method is applied to a unified API interface set for different types of data and includes: obtaining a data query request from a user, where the data query request includes the query content of the data to be queried; determining a data query template set for the data to be queried; filling the data query template based on the query content of the data to be queried to obtain a data query statement for the data to be queried; and sending the data query statement to a database corresponding to the unified API interface so that the database executes the data query statement to determine the data for responding to the data query request; where the database stores different types of data.

[0040] The data processing method sets a unified API interface for different types of data, and enables the unified API interface to determine a data query template corresponding to the data to be queried after obtaining a data query request carrying the query content of the data to be queried, and fills the data query content into the data filling template to obtain a corresponding data query statement, so that the database determines the data for corresponding to the data query request based on the data query statement. By setting the unified API interface, this method eliminates the need for the data development team to separately set corresponding API interfaces for different types of data, saving development and maintenance costs as well as operation costs, and achieving accurate response to data query requests. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] To more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0042] Figure 1 It is a schematic structural diagram of a data processing system provided by an embodiment of the present application;

[0043] Figure 2 It is a flowchart of the first data processing method provided by an embodiment of the present application;

[0044] Figure 3 It is a flowchart of the second data processing method provided by an embodiment of the present application;

[0045] Figure 4 It is a schematic structural diagram of the first data processing device provided by an embodiment of the present application;

[0046] Figure 5 It is a schematic structural diagram of the second data processing device provided by an embodiment of the present application;

[0047] Figure 6 A schematic diagram of the electronic device structure provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In fields such as market research, warehousing, and retail, relevant staff often need to analyze data to determine information such as product sales, the entry and exit status of warehouse storage items, etc.

[0049] In the existing technology, in order to query the above data, it is usually necessary to configure a dedicated data query interface for different data to call the data query interface to query related data. However, as the amount of data increases, the development cost of the data query interface will become increasingly higher, and the operating cost of the data development team will also gradually increase.

[0050] In view of the above-mentioned technical status, the present application provides a data processing method, device, electronic device and storage medium, which are described in detail one by one in the following embodiments.

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

[0052] Exemplary System

[0053] In order to facilitate understanding of the data processing method, system, electronic device and storage medium provided in this application, the embodiments of this application first introduce the data processing system in combination with the application scenario of the data processing system.

[0054] Please refer to Figure 1 , Figure 1 A schematic diagram of the data processing system structure provided in an embodiment of the present application.

[0055] like Figure 1 As shown, the data processing system includes: a terminal device 101 and a server 102 , wherein the server 102 includes a unified API interface 103 and a database 104 .

[0056] The terminal device 101 can be understood as the final node or user device of a computer network connected to the network, which is used to send, receive and display data. The terminal device can be various types of devices, including personal computers, laptops, smart phones, tablets, etc.

[0057] Server 102 is used to store and process data, and provide data and service resources to terminal device 101. Among them, the unified API interface 103 can be understood as an application programming interface. In the embodiments of the present application, the unified API interface 103 provides a set of methods or functions for constructing an SQL statement and sending it to database 104 for execution to complete the corresponding data processing task; at the same time, the unified API interface can also obtain the data processing result from database 104 so that terminal device 101 can display the data processing result.

[0058] In the embodiments of the present application, the data processing system is used to query the inbound and outbound situation of goods stored in the warehouse. Among them, the inbound and outbound situation includes the sales order information and inbound order information of goods. Among them, the sales order information can be understood as the sales volume information of goods, and the inbound order information can be understood as the production volume or purchase volume information of goods.

[0059] In the embodiments of the present application, the sales volume information, production volume information, and purchase volume information of the goods can all be regarded as a kind of data to be queried.

[0060] The following takes the sales information of goods as the data to be queried to introduce the data processing system in detail. <s

[0061] In an alternative embodiment of the present application, terminal device 101 displays a data query page, and the data query page includes query controls 1 for commodity sales information, query controls 2 for commodity purchase volume information, query controls 3 for commodity production volume information, etc., which are query controls corresponding to different types of data to be queried.

[0062] After the user selects query control 1, the data query page displayed by terminal device 101 jumps to a query content page for the user to fill in the corresponding query content. <s

[0063] For example, when the user wants to query the daily sales information of commodity A, information such as the query date and commodity name can be filled in the query content page.

[0064] After terminal device 101 obtains the query content filled in by the user, it sends a query request carrying the data to be queried (commodity sales volume information) and the query content filled in by the user to the unified API interface 103 of server 102.

[0065] The unified API interface 103 is configured with data query templates corresponding to each data to be queried. The unified API interface 103 determines the data query template corresponding to the data to be queried according to the data to be queried, and fills the query content into the data query template to obtain the data query statement of the data to be queried.

[0066] Among them, the data query statement can be understood as a SQL statement. Correspondingly, the data query template is to remove the changeable query content in the SQL statement and retain the main content of the SQL statement.

[0067] For example, in an optional implementation manner of the present application, when the data to be queried is commodity sales information, the data query template may be:

[0068] select sales_volume from sale_{date} where item_name={commodity name}.

[0069] In the case where the user queries the daily sales information of commodity A, the query date and commodity name are filled into this template, and the generated data query statement is:

[0070] select sales_volume from sale_daily where item_name={commodity A}.

[0071] Further, after the unified API interface generates the data query statement, the data query statement is sent to the database 104, so that the database 104 executes the data query statement, obtains the daily sales information of commodity A, and sends it to the terminal device 101 for display.

[0072] It should be noted that the above introduction to the application scenario of the data processing system is only for facilitating the understanding of the data processing system provided by the present application, rather than limiting the specific application scenario. For example, the terminal device 101 of the data processing system receives a data query request sent by the user in a voice interaction manner, or a data query request sent in a text interaction manner, etc.

[0073] Exemplary Method

[0074] The embodiment of the present application further provides a data processing method, which is applied to a unified API interface set for different types of data. The core lies in setting a unified API interface for different types of data, and enabling the unified API interface to determine a data query template corresponding to the data to be queried after obtaining a data query request carrying query content of the data to be queried, and filling the data query content into the data filling template to obtain a corresponding data query statement, so that the database determines the data corresponding to the data query request based on the data query statement. By setting the unified API interface, this method does not require the data development team to set corresponding API interfaces for different types of data respectively, saving the development and maintenance costs and operation costs, and at the same time achieving accurate response to data query requests.

[0075] Please refer to Figure 2 , Figure 2 which is the flowchart of the first data processing method provided by the embodiment of the present application.

[0076] As Figure 2 shown, the data processing method includes the following steps S201 to S204:

[0077] Step S201, obtain a data query request from the user, where the data query request includes the query content of the data to be queried.

[0078] As mentioned in the above scenario embodiment, the data query request can be the request information sent by the user through the terminal device 101 for querying the relevant data stored in the database 104.

[0079] The query content of the data to be queried refers to the specific content of the data to be queried. In the actual application process, the role of the query content to be queried is to limit the query range of the data to be queried. For example, in an alternative embodiment of the present application, the query content to be queried includes at least one of the following data:

[0080] The query date of the data to be queried. For example, when the data to be queried is the sales information of a commodity, the query date of the data to be queried is used to limit the sales information of the commodity on a certain day;

[0081] The brand information of the data to be queried. For example, when the data to be queried is the sales information of a commodity, the brand information of the data to be queried is used to limit the sales information of the commodity of which brand;

[0082] The name information of the data to be queried. For example, when the data to be queried is the sales information of a commodity, the name information of the data to be queried is used to limit the sales information of which commodity;

[0083] The warehousing location information of the data to be queried. For example, when the data to be queried is the sales information of a commodity, the warehousing location information of the commodity to be queried is used to limit the sales information of the commodity located in which warehouse.

[0084] Step S202, determine a data query template set for the data to be queried.

[0085] In an embodiment of the present application, different types of data to be queried correspond to different data query templates; the data query template is used to construct a corresponding data query statement.

[0086] To determine the data query template for the data to be queried, the data query request further includes the identification information of the data to be queried, and the identification information can be understood as the ID of the data to be queried. After the unified API interface obtains the data query request, the data query template corresponding to the data to be queried can be obtained according to the identification information of the data to be queried.

[0087] Among them, the data query template is a query template set in advance for different types of data. In the embodiments of the present application, the data query template can be configured in the unified API service interface according to actual requirements.

[0088] For example, in the case where the queried data may be exported in the format of a data table, the data query template may further include corresponding export statements; for example, the data export statement includes: select sales_volume as 'commodity sales volume data', that is, when exporting commodity sales volume data in the format of a data table, replace volume in the data table with commodity sales volume data.

[0089] Another example is that in the case where there are user permission issues for the data to be queried, the data query template includes corresponding permission setting statements. For example, the permission setting statement includes {"name": "warehouseCode", "type": "Warehouse"}, and the field "warehouseCode" is used to fill in the corresponding warehouse code according to user permissions.

[0090] Step S203: Fill the data query template based on the query content of the data to be queried to obtain the data query statement of the data to be queried.

[0091] The above step S203 means filling the query content of the data to be queried into the position to be filled in the data query template, and then obtaining the data query statement of the data to be queried. The data query statement can be understood as a kind of SQL statement.

[0092] In an alternative embodiment of the present application, assume that the data to be queried is the sales volume of a commodity. In the query content of the data to be queried, the query date of the data to be queried is "every day", the name information of the data to be queried is "Commodity A", and the storage location information of the data to be queried is "Warehouse 1".

[0093] The data query template corresponding to the data to be queried is:

[0094] select sales_volume from {date} where item_name = {product_name} and warehouseCode in #{warehouse location information}。

[0095] Then, the data query statement obtained by filling the query content of the data to be queried into the data query template is:

[0096] select sales_volume from sale_daily where item_name = {Product A} and warehouseCode in #{Warehouse 1}。

[0097] In an alternative embodiment of the present application, considering that during the data query process, issues related to user query permissions may be involved.

[0098] For example, assume that a user wants to query the sales information of Product A, but Product A is distributed at multiple locations, and the user may only have the query permission for a certain distribution location. In this case, the data corresponding to the distribution location within the user's query permission can also be returned in combination with the user's query permission.

[0099] Another example, assume that a user wants to query the sales information of Product A at Distribution Location 1 and Distribution Location 2, and fills in Distribution Location 1 and Distribution Location 2 in the query content, but the user only has the query permission for Distribution Location 1. In this case, a prompt message indicating insufficient permission can be returned to the user in combination with the user's query permission.

[0100] Specifically, in order to return corresponding data to the user based on the user's query permission, the data query request further includes user information.

[0101] The user information can be understood as the account information used by the user when logging in to the terminal device 101 mentioned in the scenario embodiment, or other information that can represent the user's identity. The present application does not make any limitations in this regard.

[0102] Furthermore, filling the data query template based on the query content of the data to be queried to obtain the data query statement of the data to be queried includes:

[0103] Determine the query permission of the user according to the user information of the user; fill the query content of the data to be queried and the query permission of the user into the data query template to obtain the data query statement of the data to be queried.

[0104] Step S204: Send the data query statement to the database corresponding to the unified API interface, so that the database executes the data query statement to determine the data for responding to the data query request; wherein, different types of data are stored in the database.

[0105] That is, after obtaining the data query statement based on the query content in the data query request and the data query template, the data query statement can be sent to the database, so that the database executes the data query statement to obtain the data corresponding to the data query request.

[0106] In another alternative embodiment of the present application, when the data query template does not configure a statement for representing user permission information, the database can also determine the query permission of the user according to the user information, and execute the data query statement based on the query permission of the user.

[0107] Specifically, the step of executing the data query statement according to the query permission of the user to determine the data for responding to the data query request includes:

[0108] Judge whether the query content involved in the data query statement conforms to the query permission of the user; when the query content conforms to the query permission, execute the data query statement to determine the data for the user to respond to the data query request; when the query content does not conform to the query permission, send a prompt message of query failure to the unified API interface.

[0109] In summary, the data processing method sets a unified API interface for different types of data, and enables the unified API interface to determine a data query template corresponding to the data to be queried after obtaining a data query request carrying the query content of the data to be queried, and fills the data query content into the data filling template to obtain a corresponding data query statement, so that the database determines the data for corresponding to the data query request based on the data query statement. By setting the unified API interface, this method does not require the data development team to set corresponding API interfaces for different types of data respectively, saving development and maintenance costs as well as operation costs, and realizing accurate response to data query requests.

[0110] Exemplary Method II

[0111] Another data processing method of the present application is applied to the database. Please refer to Figure 3 , Figure 3 This is the flowchart of the second data processing method provided by the embodiment of the present application.

[0112] AsFigure 3 As shown, the data processing method includes the following steps S301 to S302:

[0113] Step S301: Obtain a data query statement sent by the unified API interface;

[0114] Step S302: Execute the data query statement to determine the data for responding to the data query request;

[0115] Among them, the database stores different types of data. The unified API interface is used to obtain the data query request of the user. The data query request includes the query content of the data to be queried; determine the data query template set for the data to be queried; fill the data query template based on the query content of the data to be queried to obtain the data query statement of the data to be queried.

[0116] In an alternative embodiment of the present application, the executing the data query statement to determine the data for responding to the data query request includes:

[0117] Obtain the user information sent by the unified API interface;

[0118] Determine the query permission of the user according to the user information;

[0119] Execute the data query statement according to the query permission of the user to determine the data for responding to the data query request.

[0120] In an alternative embodiment of the present application, the executing the data query statement according to the query permission of the user to determine the data for responding to the data query request includes:

[0121] Judge whether the query content involved in the data query statement conforms to the query permission of the user;

[0122] When the query content conforms to the query permission, execute the data query statement to determine the data for the user to respond to the data query request;

[0123] When the query content does not conform to the query permission, send a prompt message of query failure to the unified API interface.

[0124] It should be noted that the data processing method provided by Exemplary Method 2 is basically the same as the data processing process of the database in the data processing method mentioned in Exemplary Method 1. For the relevant parts, please refer to the introduction of the database in Exemplary Method 1 or the scenario embodiment, and will not be elaborated here.

[0125] Exemplary Device I

[0126] Corresponding to the data processing method provided in the above exemplary method 1, the present application also provides a data processing device, which is applied to a unified API interface. Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of the first data processing device provided in the embodiments of the present application.

[0127] As Figure 4 shown, the data processing device includes:

[0128] A first unit 401, configured to obtain a data query request of a user, where the data query request includes a query content of data to be queried;

[0129] A second unit 402, configured to determine a data query template set for the data to be queried;

[0130] A third unit 403, configured to fill the data query template based on the query content of the data to be queried to obtain a data query statement of the data to be queried;

[0131] A fourth unit 404, configured to send the data query statement to a database corresponding to the unified API interface, so that the database executes the data query statement to determine data for responding to the data query request; wherein, the database stores different types of data.

[0132] In an alternative embodiment of the present application, the data query request further includes identification information of the data to be queried;

[0133] The determining of the data query template set for the data to be queried includes:

[0134] Determining a data query template set for the data to be queried according to the identification information of the data to be queried.

[0135] In an alternative embodiment of the present application, the data query content includes at least one of the following data:

[0136] A query date of the data to be queried, a brand information of the data to be queried, a name information of the data to be queried, a warehousing location information of the data to be queried.

[0137] In an alternative embodiment of the present application, the filling of the data query template based on the query content of the data to be queried to obtain a data query statement of the data to be queried includes:

[0138] Determining a query permission of the user according to the user information of the user;

[0139] Fill the query content of the data to be queried and the query permission of the user into the data query template to obtain the data query statement of the data to be queried.

[0140] Exemplary Device II

[0141] Corresponding to the data processing method provided in the above exemplary method two, the present application also provides a data processing device, which is applied to a database. Please refer to Figure 5 , Figure 5 which is the structural schematic diagram of the second data processing device provided in the embodiments of the present application.

[0142] As Figure 5 shown, the data processing device includes:

[0143] A fifth unit 501, configured to obtain a data query statement sent by a unified API interface;

[0144] A sixth unit 502, configured to execute the data query statement to determine data for responding to a data query request;

[0145] Wherein, the database stores different types of data, and the unified API interface is used to obtain the data query request of the user. The data query request includes the query content of the data to be queried; determine a data query template set for the data to be queried; fill the data query template based on the query content of the data to be queried to obtain the data query statement of the data to be queried.

[0146] In an alternative embodiment of the present application, the executing the data query statement to determine data for responding to a data query request includes:

[0147] Obtain user information sent by a unified API interface;

[0148] Determine the query permission of the user according to the user information;

[0149] Execute the data query statement according to the query permission of the user to determine data for responding to the data query request.

[0150] In an alternative embodiment of the present application, the executing the data query statement according to the query permission of the user to determine data for responding to the data query request includes:

[0151] Judge whether the query content involved in the data query statement conforms to the query permission of the user;

[0152] When the query content meets the query authority, execute the data query statement to determine the data for the user to respond to the data query request;

[0153] When the query content does not meet the query authority, send a prompt message indicating query failure to the unified API interface.

[0154] The data processing device provided in this embodiment belongs to the same inventive concept as the data processing method provided in the foregoing embodiments of the present application, and can execute the data processing methods provided in any of the foregoing embodiments of the present application, and has corresponding functional modules and beneficial effects for executing the data processing method. For technical details not described in detail in this embodiment, reference may be made to the specific processing content of the data processing method provided in the foregoing embodiments of the present application, which will not be elaborated herein.

[0155] It should be understood that the units in the above device can be implemented in the form of a processor calling software. For example, the device includes a processor, the processor is connected to a memory, and instructions are stored in the memory. The processor calls the instructions stored in the memory to implement any of the above methods or the functions of each unit of the device. The processor can be a general-purpose processor, such as a CPU or a microprocessor, etc., and the memory can be a memory inside or outside the device. Alternatively, the units in the device can be implemented in the form of hardware circuits, and the functions of some or all of the units can be implemented through the design of the hardware circuits. The hardware circuits can be understood as one or more processors; for example, in one implementation, the hardware circuit is an ASIC, and the functions of some or all of the above units are implemented through the design of the logical relationship between the components in the circuit; again, in another implementation, the hardware circuit can be implemented through a PLD. Taking an FPGA as an example, it can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured through a configuration file to implement the functions of some or all of the above units. All units of the above device can be all implemented in the form of a processor calling software, or all implemented in the form of hardware circuits, or some implemented in the form of a processor calling software, and the remaining part implemented in the form of hardware circuits.

[0156] In an embodiment of the present application, a processor is a circuit with signal processing capabilities. In one implementation, the processor can be a circuit with instruction reading and running capabilities, such as a CPU, microprocessor, GPU, or DSP, etc.; in another implementation, the processor can implement certain functions through the logical relationship of hardware circuits, and the logical relationship of the hardware circuits is fixed or can be reconfigured. For example, the processor is a hardware circuit implemented by an ASIC or PLD, such as an FPGA, etc. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the configuration of the hardware circuit can be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as a type of ASIC, such as an NPU, TPU, DPU, etc.

[0157] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0158] In addition, each unit in the above device can be integrated in whole or in part, or can be independently implemented. In one implementation, these units are integrated together and implemented in the form of an SOC. The SOC can include at least one processor for implementing any of the above methods or implementing the functions of each unit of the device. The types of the at least one processor can be different, such as including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.

[0159] Exemplary Electronic Device

[0160] Another embodiment of the present application also proposes an electronic device. Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of the electronic device provided by the embodiment of the present application.

[0161] As Figure 6 shown, the electronic device includes:

[0162] a memory 200 and a processor 210;

[0163] wherein, the memory 200 is connected to the processor 210 and is used for storing programs;

[0164] The processor 210 is used for implementing the data processing method disclosed in any of the above embodiments by running the programs stored in the memory 200.

[0165] Specifically, the above electronic device may further include: a bus, a communication interface 220, an input device 230, and an output device 240.

[0166] The processor 210, the memory 200, the communication interface 220, the input device 230, and the output device 240 are interconnected via the bus. Among them:

[0167] The bus may include a path for transmitting information between various components of the computer system.

[0168] The processor 210 may be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present invention. It may 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 gate or transistor logic devices, discrete hardware components.

[0169] The processor 210 may include a main processor, and may also include a baseband chip, a modem, etc.

[0170] The memory 200 stores a program for implementing the technical solution of the present invention, and may also store an operating system and other critical services. Specifically, the program may include program code, and the program code includes computer operation instructions. More specifically, the memory 200 may include a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a random access memory (RAM), other types of dynamic storage devices that can store information and instructions, a disk memory, a flash memory, etc.

[0171] The input device 230 may include a device for receiving data and information input by a user, such as a keyboard, a mouse, a camera, a scanner, a light pen, a voice input device, a touch screen, a pedometer, or a gravity sensor, etc.

[0172] The output device 240 may include a device for allowing information to be output to a user, such as a display screen, a printer, a speaker, etc.

[0173] The communication interface 220 may include a device of any transceiver type for communicating with other devices or communication networks, such as an Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc.

[0174] The processor 210 executes the program stored in the memory 200 and calls other devices, which can be used to implement each step of any data processing method provided in the above embodiments of the present application.

[0175] Exemplary Computer Program Product and Storage Medium

[0176] In addition to the above methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions. When the computer program instructions are run by a processor, the processor is caused to execute the steps in the data processing methods according to various embodiments of the present application described in the above "Exemplary Method" section of this specification.

[0177] The computer program product can be written in any combination of one or more programming languages for programming code to perform the operations of the embodiments of the present application. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, executed as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0178] In addition, an embodiment of the present application may also be a storage medium, on which a computer program is stored. The computer program is executed by a processor to perform the steps in the data processing methods according to various embodiments of the present application described in the above "Exemplary Method" section of this specification.

[0179] For the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0180] It should be noted that the embodiments in this specification are all described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0181] The steps in the methods of the embodiments of the present application can be adjusted, combined, and deleted according to actual needs, and the technical features recorded in each embodiment can be replaced or combined.

[0182] In each embodiment of the present application, the modules and sub-modules in the device and the terminal can be combined, divided, and deleted according to actual needs.

[0183] In several embodiments provided in the present application, it should be understood that the disclosed terminal, device, and method can be implemented in other ways. For example, the terminal embodiments described above are merely illustrative. For example, the division of modules or sub-modules is only a logical function division. In actual implementation, there can be other division methods. For example, multiple sub-modules or modules can be combined or integrated into another module, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or module can be in an electrical, mechanical, or other form.

[0184] The modules or sub-modules described as separate components may or may not be physically separated. The components as modules or sub-modules may or may not be physical modules or sub-modules, that is, they can be located in one place, or they can be distributed to multiple network modules or sub-modules. Some or all of the modules or sub-modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0185] In addition, in each embodiment of the present application, each functional module or sub-module can be integrated in a processing module, or each module or sub-module can exist physically alone, or two or more modules or sub-modules can be integrated in one module. The above-mentioned integrated modules or sub-modules can be implemented in the form of hardware or in the form of software functional modules or sub-modules.

[0186] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0187] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, software units executed by a processor, or a combination of the two. The software units may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0188] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0189] The above description of the disclosed embodiments will enable those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is to be construed in the widest manner consistent with the principles and novel features disclosed herein.

Claims

1. A data processing method, characterized in that, Applied to a unified API interface set for different types of data, including: Obtain a user's data query request, where the data query request includes the query content of the data to be queried; Determine a data query template set for the data to be queried; Fill the data query template based on the query content of the data to be queried to obtain a data query statement for the data to be queried; Send the data query statement to a database corresponding to the unified API interface, so that the database executes the data query statement to determine the data for responding to the data query request; wherein, the database stores different types of data.

2. The method according to claim 1, characterized in that, The data query request further includes identification information of the data to be queried; The determining of the data query template set for the data to be queried includes: Determine a data query template set for the data to be queried according to the identification information of the data to be queried.

3. The method according to claim 1, characterized in that, The data query content includes at least one of the following data: The query date of the data to be queried, the brand information of the data to be queried, the name information of the data to be queried, the storage location information of the data to be queried.

4. The method according to any one of claims 1 to 3, characterized in that, The filling of the data query template based on the query content of the data to be queried to obtain a data query statement for the data to be queried includes: Determine the query permission of the user according to the user information of the user; Fill the query content of the data to be queried and the query permission of the user into the data query template to obtain a data query statement for the data to be queried.

5. A data processing method, characterized in that, Applied to a database, including: Obtain a data query statement sent by a unified API interface; Execute the data query statement to determine the data for responding to a data query request; Wherein, the database stores different types of data, and the unified API interface is used to obtain the user's data query request, where the data query request includes the query content of the data to be queried; determine a data query template set for the data to be queried; fill the data query template based on the query content of the data to be queried to obtain a data query statement for the data to be queried.

6. The method according to claim 5, characterized in that, The executing of the data query statement to determine the data for responding to a data query request includes: Obtain the user information sent by a unified API interface; Determine the query permission of the user according to the user information; Execute the data query statement according to the query permission of the user to determine the data for responding to the data query request.

7. The method according to claim 6, characterized in that The executing of the data query statement according to the query permission of the user to determine the data for responding to the data query request includes: Judge whether the query content involved in the data query statement conforms to the query permission of the user; When the query content conforms to the query permission, execute the data query statement to determine the data for the user to respond to the data query request; When the query content does not conform to the query permission, send a prompt message of query failure to the unified API interface.

8. A data processing system, characterized in that, Including: Terminal device, unified API interface, and database; The terminal device is used to receive a data query request from a user and send the data query request to the unified API interface; The unified API interface is used to obtain a data query request from a user, and the data query request includes the query content of the data to be queried; Determine a data query template set for the data to be queried; Populate the data query template based on the query content of the data to be queried to obtain a data query statement for the data to be queried; Send the data query statement to a database corresponding to the unified API interface; The database is used to execute the data query statement and determine the data for responding to the data query request.

9. An electronic device, characterized in that, It includes: A processor; A memory for storing instructions executable by the processor; The processor is used to execute the data processing method according to any one of claims 1 to 7 by running the instructions in the memory.

10. A computer storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is run by the processor, it executes the data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data query method, device and equipment and readable storage medium

    CN113590648A

  • Database query method and device, equipment and storage medium

    CN113779071A

  • Data processing method and device

    CN114064690A

  • Efficient data query processing method, system and device

    CN117271552A