Data acquisition method and device, electronic equipment and storage medium

By integrating the target database in the client application and providing a standardized data acquisition process, the problem of complex and inefficient client data management process is solved, automated and standardized data management is realized, and data management efficiency is improved.

CN119938711APending Publication Date: 2025-05-06AIJI MICRO CONSULTING (XIAMEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510020490.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-01-08
Filing Date
2025-01-07
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In the prior art, the client data management process is complex, inefficient and difficult to standardize. Developers need to manually write complex query logic to retrieve data and perform state synchronization.

Method used

Integrate the target database in the client's application to provide a standardized data acquisition process. The process includes defining a data acquisition request through the target database, parsing the request to generate query conditions, sending interface requests to the backend data source, and cacheing the acquired data.

Benefits of technology

It realizes an automated and standardized data management method, simplifies the client data management process, improves the efficiency of data management, and reduces the complexity of application development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938711A_ABST
    Figure CN119938711A_ABST
Patent Text Reader

Abstract

The invention provides a data acquisition method and device, electronic equipment and a storage medium. The method comprises the steps that a target database is integrated in an application program of a client side, the target database provides a standardized data obtaining process, and the standardized data obtaining process comprises the steps that a data obtaining request is defined through a target function provided by the target database, and the data obtaining request comprises target data to be obtained; analyzing the data acquisition request through a query engine provided by the target database to obtain a query condition; generating a target interface request according to the query condition, and sending the target interface request to a back-end data source; and acquiring corresponding target data from the back-end data source, and caching the target data. Therefore, by means of the target database such as the TanStack Query library, an automatic and standardized data management mode can be provided, so that the client data management process is simplified, and the client data management efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a data acquisition method and device, an electronic device, and a storage medium. Background Art

[0002] Client data management generally includes tasks such as data query, data caching, state synchronization, and asynchronous requests. In the prior art, developers are often required to manually write complex query logic to retrieve the required data and perform other tasks such as state synchronization. This process will result in lengthy code and tedious maintenance work, and the efficiency of data management is low. Although there are currently some front-end frameworks and tools that attempt to simplify data retrieval methods, their performance and ease of use vary and cannot be standardized. For example, some methods still require developers to manually store the queried data and synchronize the state, which still makes the data management process more complicated and the data management efficiency is low. Summary of the invention

[0003] In view of this, the present application provides a data acquisition method and device, an electronic device, and a storage medium, which can improve the problem that the process of client acquiring data is relatively complicated, inefficient, and difficult to standardize.

[0004] The present application provides a data acquisition method, comprising:

[0005] The target database is integrated into the client application, and the target database provides a standardized data acquisition process, which includes:

[0006] Define a data acquisition request through a target function provided by the target database, wherein the data acquisition request includes target data to be acquired;

[0007] Parsing the data acquisition request through a query engine provided by the target database to obtain query conditions;

[0008] Generate a target interface request according to the query condition, and send the target interface request to a backend data source;

[0009] The corresponding target data is obtained from the backend data source, and the target data is cached.

[0010] Optionally, the standardized data acquisition process further includes:

[0011] The target database obtains updated target data from the backend data source in real time, updates the cached target data, and marks the replaced content as invalid data.

[0012] Optionally, the standardized data acquisition process provided by the target database and the execution of the application program adopt an asynchronous request method.

[0013] Optionally, integrating the target database into the client application includes:

[0014] Initialize the target database;

[0015] integrating a backend data source in the target database;

[0016] A preset function is used to determine whether the event in which the target database calls data from the backend data source has passed verification, and if the verification has passed, it is confirmed that the target database is integrated into the application program of the client.

[0017] Optionally, the target function includes a hook function, and the target function definition data acquisition request provided by the target database includes:

[0018] Locate the primitive function used to retrieve the target data;

[0019] Save the initial preset bytes of the original function;

[0020] The calling preset assembly instruction covers the initial preset bytes of the original function, and the preset assembly instruction is used to instruct to jump to the hook function when the thread calls the original function. The hook function has the same declaration as the original function.

[0021] Optionally, a separate hook list is provided for the hook function of each event type; the target function definition data acquisition request provided by the target database further includes:

[0022] Determine the target event type corresponding to the hook function;

[0023] Determine a corresponding target hook chain list according to the target event type;

[0024] The hook function is written at the beginning of the target hook linked list.

[0025] Optionally, the standardized data acquisition process is integrated into the front-end framework of the client to provide a universal data acquisition process.

[0026] The present application provides a data acquisition device, comprising: an integration module, a definition module, a parsing module, a retrieval module and a cache module;

[0027] The integration module is used to integrate the target database in the client application, the target database provides a standardized data acquisition process, and the standardized data acquisition process is executed by the definition module, the parsing module, the retrieval module and the cache module;

[0028] The definition module is used to define a data acquisition request through a target function provided by the target database, wherein the data acquisition request includes target data to be acquired;

[0029] The parsing module is used to parse the data acquisition request through a query engine provided by the target database to obtain a query condition;

[0030] The retrieval module is used to generate a target interface request according to the query condition, send the target interface request to a backend data source, and obtain corresponding target data from the backend data source;

[0031] The cache module is used to cache the target data.

[0032] Another data acquisition method provided by the present application includes:

[0033] Integrate the TanStack Query library on the client, where the TanStack Query library provides a standardized data acquisition process;

[0034] Use the Hook method to define data acquisition requests;

[0035] Parsing the data acquisition request based on the TanStack Query library to obtain query conditions;

[0036] Control the TanStack Query library to generate an API request according to the query condition and send it to the backend to retrieve the target data corresponding to the query condition;

[0037] The target data is cached, for example, to return the cached target data to the client.

[0038] Optionally, the front-end framework of the client includes any one of React, Vue, Svelte and Solid; and the TanStack Query library is integrated in the front-end framework of the client through the npm or yarn resource manager.

[0039] Optionally, the use of the Hook method to define a data acquisition request includes:

[0040] Locate the original function corresponding to the data retrieval;

[0041] Save the initial preset bytes of the original function;

[0042] The JUMP assembly instruction is called to overwrite the initial preset bytes of the original function. The JUMP assembly instruction is used to instruct to jump to the hook function when the thread calls the original function. The hook function has the same declaration as the original function.

[0043] Optionally, a separate hook list is provided for the hook function of each event type; the method of defining a data acquisition request using the Hook method further includes:

[0044] Determine the target event type corresponding to the hook function;

[0045] Determine a corresponding target hook chain list according to the target event type;

[0046] The hook function is written at the beginning of the target hook linked list.

[0047] Optionally, the hook function includes at least one of a useQuery function and a useMutation function.

[0048] Optionally, the backend includes at least one of a relational database, a NoSQL database, and a RESTful API.

[0049] Optionally, the method further includes:

[0050] When it is determined that the target data is changed in the backend, the TanStack Query library is controlled to mark the cached target data as invalid data.

[0051] Another data acquisition device provided by the present application includes:

[0052] Integration module, used to integrate TanStack Query library on the client side;

[0053] Define a module for defining data acquisition requests using the Hook method;

[0054] A parsing module, used for parsing the data acquisition request based on the TanStack Query library to obtain query conditions;

[0055] A retrieval module, used to control the TanStack Query library to generate an API request according to the query condition and send it to the backend to retrieve the target data corresponding to the query condition;

[0056] A cache module is used to cache the target data.

[0057] An electronic device provided by the present application includes a memory and a processor, wherein a data acquisition program is stored in the memory, and the data acquisition program implements the above data acquisition method when executed by the processor.

[0058] The present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above data acquisition method is implemented.

[0059] As described above, the present application integrates a target database on the client side, and with the help of the target database, a standardized data acquisition process can be provided to achieve an automated and standardized data management method, thereby simplifying the client side data management process and improving the efficiency of client side data management. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 It is a flow chart of a data acquisition method provided in an embodiment of the present application;

[0061] Figure 2 It is a flowchart of another data acquisition method provided in an embodiment of the present application;

[0062] Figure 3 It is a structural schematic diagram of a data acquisition device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] In order to solve the above problems existing in the prior art, the present application provides a data acquisition method and device, an electronic device, and a storage medium. These protection themes are based on the same concept, and the principles of solving the problems are basically the same or similar. The implementation methods of each protection theme can refer to each other, and the repeated parts will not be repeated.

[0064] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly described below in conjunction with specific embodiments and corresponding drawings. Obviously, the embodiments described below are only part of the embodiments of the present application, not all of the embodiments. In the absence of conflict, the following embodiments and their technical features can be combined with each other and also belong to the technical solutions of the present application.

[0065] Figure 1It is a flow chart of a data acquisition method provided by an embodiment of the present application. The data acquisition method can be referred to as a method, which can be applied to the client so that the client can perform data management based on the acquired data, that is, to realize client data management. Client data management generally includes tasks such as data query, data cache, state synchronization, asynchronous request, etc. Here, the execution subject of each step of the method of the present application can be a client, a front-end framework, an application, a processor installed with the application or capable of executing the application, a storage unit, an electronic device, etc. The specific form of the electronic device includes but is not limited to at least one of a smart terminal such as a mobile phone, a tablet computer, and a car computer.

[0066] See also Figure 1 , the data acquisition method may include the following S1 to S5.

[0067] S1: Integrate a target database in a client application, wherein the target database provides a standardized data acquisition process.

[0068] The present application can integrate the target database in the front-end framework of the client, thereby integrating the standardized data acquisition process in the front-end framework to provide a general data acquisition process. The standardized data acquisition process may include the following steps S2 to S5. In other words, after the target database is integrated, if data acquisition is not performed on the client, steps S2 to S5 are not performed.

[0069] The process of integrating the target database is actually to introduce a data request and cache management tool into the client application, which can be regarded as setting a "steward" in the application to manage data requests, so as to obtain and process data from the server more efficiently. In one example, the method of integrating the target database in the client application may include S11 to S13.

[0070] S11. Initialize the target database.

[0071] This application can install the target database in the client's front-end framework through npm (Node Package Manager) or yarn (YetAnother Resource Negotiator) resource manager. For example, you can use the relatively simple code "#use npm npm ireact-query" or "#useyarn yarn add react-query" to achieve the installation of the target database. Then, in the root component of the application, initialization is performed by calling, for example, the useQuery function or the useMutation function. Initializing the target database allows the application to know how to use the target database to request data, process data, and cache data.

[0072] S12. Integrate the backend data source into the target database.

[0073] This application can call, for example, the useQuery('userList', fetchUsers) function (UQ function for short) to integrate the backend data source. The UQ function includes a data identifier 'userList' and an identifier fetchUsers used to identify the UQ function as a request function to inform the application of the interaction method with the backend data source. The backend data source contains a database of user lists. Through the UQ function, requests can be sent to the backend data source and returned data can be received from the backend data source to achieve the integration.

[0074] S13. Determine through a preset function whether the event of the target database calling data from the backend data source has passed verification, and, if passed verification, confirm that the target database is integrated into the client application.

[0075] The purpose of verifying the integration effect is to ensure that the target database has been correctly integrated and that the data can be successfully acquired and displayed. In this regard, the application can acquire data through the UQ function and verify whether at least one of the following three situations is met, thereby determining whether the integration has passed the verification.

[0076] Scenario 1: Whether the data is successfully returned from the backend data source and displayed correctly;

[0077] Scenario 2: Is the data cached incorrectly or is the data request sent repeatedly?

[0078] Scenario 3: Whether the application interface performance meets expectations.

[0079] In actual scenarios, the present application can perform verification of any of the above situations through manual inspection or using automated testing tools. The verification principle and process can refer to the existing technology in the field.

[0080] The target database includes but is not limited to the TanStack Query library. Taking the TanStack Query library as an example, Figure 2 As shown, the step S1 is performed as follows: integrating the TanStack Query library on the client, and the TanStack Query library provides a standardized data acquisition process.

[0081] TanStack Query library can provide a simple and intuitive API (Application Programming Interface) for querying data. It is based on Fetch API and allows developers to write concise and declarative code to perform HTTP (Hypertext Transfer Protocol) requests and process responses. The TanStack Query library can be easily integrated into various types of front-end frameworks. For example, for any client-side front-end framework including React, Vue, Svelte and Solid, the application can install and integrate the TanStack Query library in the client-side front-end framework through npm or yarn resource manager.

[0082] The TanStack Query library itself has a data query engine.

[0083] After integrating the TanStack Query library, the present application can also import dependencies in the client's front-end framework, and configure parameters for the TanStack Query library, etc. The specific contents of the dependencies and the import method, the specific contents of the parameters and the configuration method can refer to the prior art. For example, when initializing the React project of the front-end framework, set the query in the app.jsx file, use the code "import{QueryClient,QueryClientProvider,useQuery}from'@tanstack / react-query'" to import the required components from the TanStack Query library, and then create a new QueryClient object instance to manage data query, caching and other tasks, and then use the QueryClientProvider component to wrap it and provide the QueryClient object instance to all components under the application.

[0084] S2: defining a data acquisition request through a target function provided by the target database, wherein the data acquisition request includes target data to be acquired.

[0085] The operating system where the application is located is essentially implemented through the transmission of messages, and the target function can monitor the transmission process through the hook function. The hook function provides a hook, which is actually a program segment in the operating system that processes messages. It can monitor various event messages in the operating system and its processes, intercept the messages and process them. Here, the application installs a custom hook in the operating system where the application is located to monitor the occurrence of specific events in the operating system. Before the message reaches the target window, the hook captures the message first, that is, the control of the message is first obtained through the hook function. At this time, the hook function can process the message and complete specific functions, such as managing application data, screen word capture, log monitoring, etc.

[0086] In one example, the hook provided by the hook function can be a global hook. The global hook is written into a DLL (Dynamic Link Library), and the operating system automatically maps the DLL to the address space of all processes affected by the hook function, that is, the DLL is injected into all processes, thereby achieving the purpose of the hook capturing global messages.

[0087] This application can use the Hook method to define data acquisition requests, combined with Figure 2 As shown, the step S2 may be performed as follows: using the Hook method to define a data acquisition request. The data acquisition request may be called a query request, and the Hook method may be used to define a query request and return a query object, which may be used in multiple components under the application.

[0088] The Hook method can use at least one of the useQuery function and the useMutation function as a hook function. In this step, the useQuery function can be called a query function, and the useMutation function can be called a modification function. Taking the useQuery function as an example, the useQuery function accepts a query key, which is a string used to uniquely identify the query request, and the query conditions can be set through the parameter group corresponding to the string. The query key can not only be used to retrieve the query object from the cache according to the query conditions, but also accept a data query request function, such as a queryFn function, which is used to initiate an asynchronous request with the backend (such as the server) to obtain the query object according to the query conditions. The returned query object contains three attributes, namely, the data attribute, the error attribute, and the isLoading attribute. The data attribute contains the response data contained in this request, that is, the target data, the error attribute contains any errors that occurred during the request process, and the isLoading attribute is a Boolean value indicating whether the request is still loading.

[0089] In addition to the standard data acquisition method, this application also allows developers to customize data acquisition logic to meet specific application needs, which means that developers can fine-tune data acquisition according to specific circumstances without being restricted to general data acquisition modes. Moreover, compared with the prior art that requires manual writing of complex query logic to retrieve data, this application writes hook functions to define the code required for data acquisition requests, which is relatively simple. Developers can customize query conditions more easily without having to manually write complex query code, making data acquisition simple and consistent.

[0090] In addition, unlike the prior art, an example of calling a hook function in the present application includes: for example, locating the original function for retrieving target data by calling the GetProcAddress function to obtain its memory address; then, saving the initial preset bytes of the original function, for example, saving to the memory address of the hook function; then, calling a preset assembly instruction (such as a JUMP assembly instruction) to overwrite the initial preset bytes of the original function, and the preset assembly instruction is used to indicate a jump to the hook function when the thread calls the original function; the so-called overwriting can be understood as establishing a trigger relationship between the initial preset bytes of the original function and the hook function. The hook function has the same declaration as the original function, such as the same parameters, the same return value, and the same calling convention. Here, when the thread calls the original function, the present application only needs to detect that the initial few bytes (i.e., the preset bytes) of the original function are called, and then jump to the hook function to execute the corresponding function, and the memory required for overwriting the original function is relatively small.

[0091] In one example, the present application can set up an independent hook linked list corresponding to the hook function of each event type. For example, the CallNextHookEx function is called to add the query type and interception type hook functions to their respective corresponding hook linked lists. The method of writing the hook function in step S2 includes: first determining the target event type corresponding to the hook function, then determining the corresponding target hook linked list according to the target event type, and finally writing the hook function at the beginning position of the target hook linked list.

[0092] Since the operating system must process each message, the use of hooks will increase the amount of processing that the operating system must perform on each message, so hooks will slow down the execution efficiency of the operating system. This application calls the hook function according to the event type, so that the hook is installed only when necessary, reducing the impact on the operating system.

[0093] S3: Parse the data acquisition request through the query engine provided by the target database to obtain the query conditions.

[0094] For example, the data acquisition request is parsed based on the TanStack Query library to obtain the query conditions.

[0095] S4: Generate a target interface request according to the query conditions, and send the target interface request to the backend data source. Taking the target database as the TanStack Query library as an example, control the TanStack Query library to generate an API request according to the query conditions, and send it to the backend (e.g., server) to retrieve the target data corresponding to the query conditions.

[0096] S5: Obtain the corresponding target data from the backend data source and cache the target data.

[0097] As described above, the present application integrates a target database on the client side, and with the help of the target database, a standardized data acquisition process can be provided to achieve an automated and standardized data management method, thereby simplifying the client side data management process and improving the efficiency of client side data management.

[0098] Taking the TanStack Query library as an example, the present application can integrate the TanStack Query library in the client. The TanStack Query library has a built-in highly optimized query engine, which automatically processes data query operations and communicates with the backend to return the results to the application, thereby ensuring fast data retrieval and being compatible with various data storage backends. With the help of the TanStack Query library, an automated and standardized data acquisition method can be provided. The present application can simplify the client data management process and improve the efficiency of client data management, thereby reducing the complexity of application development, which is conducive to improving application performance, and further conducive to improving the efficiency and quality of application development.

[0099] The backend can be understood as a data source or server, etc., including but not limited to at least one of a relational database, a NoSQL database, and a RESTful API. Here, the present application can be compatible with backends of multiple data storage types, which means that developers can use the same standardized data acquisition method to access different types of data storage backends without modifying the existing query logic.

[0100] In addition, the data retrieved by the TanStack Query library will also be automatically cached so that it can be reused in subsequent data acquisition requests. In other words, the TanStack Query library has an automatic data caching function, allowing the latest data to be stored locally, which not only reduces frequent requests to the backend, but also helps to improve the speed and efficiency of data acquisition.

[0101] Based on any of the above examples, the standardized data acquisition process may further include:

[0102] The target database obtains updated target data from the backend data source in real time, updates the cached target data, and marks the replaced content as invalid data.

[0103] Still taking the TanStack Query library as an example, the TanStack Query library can provide a state synchronization mechanism, whereby when it is determined that the target data has changed in the backend, the TanStack Query library is controlled to mark the cached target data as invalid data, and cache the changed data. This state synchronization mechanism can ensure the real-time consistency of client data and backend data.

[0104] Optionally, the standardized data acquisition process provided by the target database and the execution of the application program adopt an asynchronous request method. The process of implementing an asynchronous request is: first, query the cache through a hook function to determine whether the data to be retrieved has been acquired; if the data is not in the cache, or the cached data has expired, that is, it has been marked as invalid data, then customize and send a data acquisition request to retrieve the data, and then store the retrieved data in the cache; finally, get the data to be retrieved this time from the cache, and return the data to the user. This asynchronous request can ensure that the data acquisition operation will not block the execution of the application program, thereby improving the responsiveness of the application program.

[0105] It should be understood that any of the aforementioned examples of the present application may also include the following steps:

[0106] Step 1: Developers manually write complex query logic to retrieve the required data and perform other tasks such as state synchronization. This step 1 can be regarded as manual data acquisition and state management. Although this requires more coding work, for some complex data acquisition requirements, more control may be required. This manual method is still an effective operation.

[0107] Step 2: Integrate other third-party databases on the client side. In addition to the target databases such as the aforementioned TanStack Query library, there are other third-party databases that can be used for data acquisition, such as Redux, Mobx, etc. Developers can choose to use these databases to implement data acquisition according to the specific needs of their applications.

[0108] like Figure 3 As shown, the embodiment of the present application further provides a data acquisition device 20, including an integration module 21, a definition module 22, a parsing module 23, a retrieval module 24 and a cache module 25. Among them:

[0109] The integration module 21 is used to integrate the target database in the client application, and the target database provides a standardized data acquisition process, which is executed by a definition module, a parsing module, a retrieval module and a cache module;

[0110] The definition module 22 is used to define a data acquisition request through the target function provided by the target database, and the data acquisition request includes the target data to be acquired;

[0111] The parsing module 23 is used to parse the data acquisition request through the query engine provided by the target database to obtain the query condition;

[0112] The retrieval module 24 is used to generate a target interface request according to the query condition, send the target interface request to a backend data source, and obtain corresponding target data from the backend data source;

[0113] The cache module 25 is used to cache the target data.

[0114] In the example where the target database is the TanStack Query library, the functions of each module are as follows:

[0115] The integration module 21 is used to integrate the TanStack Query library on the client, and the TanStack Query library provides a standardized data acquisition process;

[0116] The definition module 22 is used to define a data acquisition request using a Hook method;

[0117] The parsing module 23 is used to parse the data acquisition request based on the TanStack Query library to obtain query conditions;

[0118] The retrieval module 24 is used to control the TanStack Query library to generate an API request according to the query condition and send it to the backend to retrieve the target data corresponding to the query condition;

[0119] The cache module 25 is used to cache the target data.

[0120] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein a data acquisition program is stored in the memory, and when the data acquisition program is executed by the processor, the steps corresponding to the data acquisition method in any of the above examples can be implemented.

[0121] The specific form of the electronic device is not limited in this application.

[0122] An embodiment of the present application further provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps corresponding to the data acquisition method in any example are implemented.

[0123] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0124] Since the instructions stored in the storage medium can execute the steps in any data acquisition method provided in the embodiments of the present application, the beneficial effects that can be achieved by any data acquisition method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0125] In addition, the data acquisition device 20, electronic device and storage medium provided in the embodiments of the present application are complete devices respectively, and also have the corresponding structures of known devices. This application only provides an illustrative description of some structural elements involved in data acquisition, and other structural elements are not listed one by one.

[0126] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. For ordinary technicians in this field, all equivalent structural changes made using the contents of this specification and drawings are also included in the patent protection scope of the present application.

[0127] This document uses step codes such as S1, S2, etc., the purpose of which is to express the corresponding content more clearly and concisely, and does not constitute a substantial limitation on the order. When technical personnel in this field implement the specific steps, they may execute S2 first and then S1, etc., but these should all be within the scope of protection of this application.

[0128] Although the terms "first, second", etc. are used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. In addition, the singular forms "one", "an", and "the" are intended to include plural forms as well. The terms "or" and "and / or" are interpreted as inclusive, or mean any one or any combination. Only when the combination of elements, functions, steps, or operations is inherently mutually exclusive in some way, an exception to this definition will occur.

Claims

1. A data acquisition method, characterized in that: include: The target database is integrated into the client application, and the target database provides a standardized data acquisition process, which includes: Define a data acquisition request through a target function provided by the target database, wherein the data acquisition request includes target data to be acquired; Parsing the data acquisition request through a query engine provided by the target database to obtain query conditions; Generate a target interface request according to the query condition, and send the target interface request to a backend data source; The corresponding target data is obtained from the backend data source, and the target data is cached.

2. The method according to claim 1, characterized in that The standardized data acquisition process also includes: The target database obtains updated target data from the backend data source in real time, updates the cached target data, and marks the replaced content as invalid data.

3. The method according to claim 1, characterized in that The standardized data acquisition process provided by the target database and the execution of the application program adopt an asynchronous request method.

4. The method according to claim 1, characterized in that: The integration of the target database in the client application includes: Initialize the target database; integrating a backend data source in the target database; A preset function is used to determine whether the event in which the target database calls data from the backend data source has passed verification, and if the verification has passed, it is confirmed that the target database is integrated into the application program of the client.

5. The method according to claim 1, characterized in that The target function includes a hook function, and the target function definition data acquisition request provided by the target database includes: Locate the primitive function used to retrieve the target data; Save the initial preset bytes of the original function; The calling preset assembly instruction covers the initial preset bytes of the original function, and the preset assembly instruction is used to instruct to jump to the hook function when the thread calls the original function. The hook function has the same declaration as the original function.

6. The method according to claim 5, characterized in that A separate hook list is correspondingly provided for the hook function of each event type; the target function definition data acquisition request provided by the target database further includes: Determine the target event type corresponding to the hook function; Determine a corresponding target hook chain list according to the target event type; The hook function is written at the beginning of the target hook linked list.

7. The method according to any one of claims 1 to 6, characterized in that: The standardized data acquisition process is integrated into the front-end framework of the client to provide a universal data acquisition process.

8. A data acquisition device, characterized in that: include: Integration module, definition module, parsing module, retrieval module and cache module; The integration module is used to integrate the target database in the client application, the target database provides a standardized data acquisition process, and the standardized data acquisition process is executed by the definition module, the parsing module, the retrieval module and the cache module; The definition module is used to define a data acquisition request through a target function provided by the target database, wherein the data acquisition request includes target data to be acquired; The parsing module is used to parse the data acquisition request through a query engine provided by the target database to obtain a query condition; The retrieval module is used to generate a target interface request according to the query condition, send the target interface request to a backend data source, and obtain corresponding target data from the backend data source; The cache module is used to cache the target data.

9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores a data acquisition program, and when the data acquisition program is executed by the processor, the steps of the data acquisition method according to any one of claims 1 to 7 are implemented.

10. A storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a processor, the data acquisition method according to any one of claims 1 to 7 is implemented.