Data processing method, device, electronic device and storage medium
By encapsulating the code file of the memory list into an API and calling the matching API after the data operation request, the cumbersome synchronization problem of persistent record list business in the APP is solved, and the code consistency and maintenance cost are reduced.
Patent Information
- Application Number
- CN202111473139.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-02
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2041-12-02
AI Technical Summary
In the prior art, the service maintenance of the persistent record list in the APP is cumbersome and the maintenance cost is high.
The code files used to perform different data operations on the memory list are encapsulated into an application program interface (API), and after obtaining the data operation request, they find and call the matching API to perform data operations on the memory list, and at the same time synchronize the corresponding operations in the database.
Improve code consistency, simplify the process of synchronizing memory record lists and database records, and reduce the development and maintenance costs of APP.
Smart Images

Figure CN114281822B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data processing method, device, electronic device, and storage medium. Background Art
[0002] Currently, most applications (APPs) installed on terminal devices involve data persistence storage requirements. For example, an APP stores the user's favorite stickers and the usage status of the stickers (whether they have been downloaded, clicked, or collected). Based on these storage statuses, the user's favorite sticker list can be displayed and managed.
[0003] Because the app interface uses an in-memory list to display related list data, every app developer who needs to store data records must write the logic for maintaining the in-memory list and be responsible for synchronizing the in-memory list with the database. For example, after restarting the app, database records need to be read into the in-memory list. During app use, changes to the in-memory list need to be synchronized with the database records, which increases the development cycle.
[0004] As can be seen, for each business requiring a persistent record list, developers need to repeatedly write similar code to synchronize the in-memory list with the database records. Furthermore, if a vulnerability is discovered between the in-memory list and database records for a particular business, all other businesses must be checked for similar issues, potentially requiring modifications to the relevant logic of different businesses to fix the problem, increasing maintenance costs.
[0005] As can be seen from the above, in the prior art, for the business of persisting record lists in APPs, the process of maintaining synchronization between memory record lists and database records is cumbersome and has high maintenance costs. Summary of the Invention
[0006] The present disclosure provides a data processing method, device, electronic device, and storage medium to at least address the related art issues of maintaining a persistent record list in an app, such as the cumbersome process of synchronizing the in-memory record list with the database record, and the high maintenance cost. The technical solutions of the present disclosure are as follows:
[0007] According to a first aspect of an embodiment of the present disclosure, a data processing method is provided, the method comprising:
[0008] Obtaining a data operation request, wherein the data request includes business information;
[0009] Obtaining a memory list associated with the business information;
[0010] Searching for an application program interface that matches the data operation request from an application program interface pre-encapsulated from a target code file, wherein the target code file includes a code file for performing different data operations on a memory list;
[0011] An application program interface matching the data operation request is called to perform a data operation corresponding to the data operation request on the memory list.
[0012] In one possible implementation, after calling the application program interface that matches the data operation request and performing the data operation corresponding to the data operation request on the memory list, the method further includes:
[0013] If the data operation request corresponds to a preset operation and a data table associated with the business information exists in the database, searching for an operation function that matches the data operation request from operation functions pre-encapsulated from target operation statements, wherein the target operation statements include operation statements for performing different data operations on the data tables in the database;
[0014] An operation function matching the data operation request is called to perform a data operation corresponding to the data request on a data table associated with the business information.
[0015] In one possible implementation, obtaining a memory list associated with the service information includes:
[0016] Searching for a memory list whose name is associated with the business information in a pre-stored list of memory lists;
[0017] In the case where a memory list whose list name is associated with the business information is found, the found memory list is determined as the memory list associated with the business information.
[0018] In one possible implementation, obtaining a memory list associated with the service information further includes:
[0019] If no memory list with a list name associated with the business information is found, creating a new memory list;
[0020] Determine a name of a newly created memory list according to the service information, and add the name of the newly created memory list to the memory list list;
[0021] In the case that a data table associated with the business information exists in the database, the data in the data table associated with the business information is synchronized to the newly established memory list to obtain the memory list associated with the business information.
[0022] In one possible implementation, synchronizing the data in the data table associated with the business information to the newly established memory list includes:
[0023] Synchronize the data in the data table associated with the business information to the newly established memory list according to the pre-established object relationship mapping corresponding to the business information;
[0024] The object relationship mapping corresponding to the business information includes: mapping between attributes of the model objects in the memory list associated with the business information and record fields in the data table associated with the business information.
[0025] In one possible implementation, the method further includes:
[0026] In the case that the data table associated with the business information does not exist in the database, an empty data table is created as the data table associated with the business information.
[0027] In one possible implementation, after calling the application program interface that matches the data operation request and performing the data operation corresponding to the data operation request on the memory list, the method further includes:
[0028] In a case where the data operation request corresponds to a memory list closing operation, the list name of the memory list matching the business information is removed from the pre-stored memory list name list, and the memory list matching the business information is released.
[0029] According to a second aspect of an embodiment of the present disclosure, there is provided a data processing device, the device comprising:
[0030] a request receiving module, configured to obtain a data operation request, wherein the data request includes business information;
[0031] A list acquisition module is configured to acquire a memory list associated with the business information;
[0032] A first search module is configured to search for an application program interface that matches the data operation request from application program interfaces pre-encapsulated from target code files, wherein the target code files include code files for performing different data operations on a memory list;
[0033] The first calling module is configured to call an application program interface that matches the data operation request and perform a data operation corresponding to the data operation request on the memory list.
[0034] In one possible implementation, the device further includes:
[0035] a second search module configured to, if the data operation request corresponds to a preset operation and a data table associated with the business information exists in the database, search for an operation function that matches the data operation request from operation functions pre-encapsulated from target operation statements, wherein the target operation statement includes an operation statement for performing different data operations on the data table in the database;
[0036] The second calling module is configured to call an operation function that matches the data operation request and perform a data operation corresponding to the data request on a data table associated with the business information.
[0037] In one possible implementation, the list acquisition module includes:
[0038] A search submodule is configured to search for a memory list whose list name is associated with the business information in a pre-stored memory list list;
[0039] The first determining submodule is configured to, when a memory list whose list name is associated with the business information is found, determine the found memory list as the memory list associated with the business information.
[0040] In one possible implementation, the list acquisition module further includes:
[0041] a new creation submodule, configured to create a new memory list if no memory list with a list name associated with the business information is found;
[0042] a name determination submodule, configured to determine a name of the newly created memory list according to the service information, and add the name of the newly created memory list to the memory list list;
[0043] The synchronization submodule is configured to synchronize the data in the data table associated with the business information to the newly established memory list when there is a data table associated with the business information in the database, so as to obtain the memory list associated with the business information.
[0044] In one possible implementation, the synchronization submodule is specifically configured as follows:
[0045] Synchronize the data in the data table associated with the business information to the newly established memory list according to the pre-established object relationship mapping corresponding to the business information;
[0046] The object relationship mapping corresponding to the business information includes: mapping between attributes of the model objects in the memory list associated with the business information and record fields in the data table associated with the business information.
[0047] In one possible implementation, the device further includes:
[0048] The data table establishment module is configured to establish an empty data table as the data table associated with the business information if the data table associated with the business information does not exist in the database.
[0049] In one possible implementation, the device further includes:
[0050] The release module is configured to remove the list name of the memory list matching the business information from the pre-stored memory list list and release the memory list matching the business information when the data operation request corresponds to a memory list closing operation.
[0051] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, the electronic device including:
[0052] processor;
[0053] a memory for storing instructions executable by the processor;
[0054] The processor is configured to execute the instructions to implement the data processing method provided by the present disclosure.
[0055] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data processing method described in the first aspect above.
[0056] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program, which implements the data processing method provided by the present disclosure when executed by a processor.
[0057] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:
[0058] The technical solution provided by the embodiments of the present disclosure can pre-encapsulate the code files used to perform different data operations on the memory list, thereby forming an application programming interface (API) that can perform different operations on the memory list. After obtaining the data operation request, the memory list associated with the business information carried in the data request is obtained, and then the API that matches the data operation request is searched from the multiple APIs obtained, and then the API that matches the data operation request is called to perform the data operation corresponding to the data operation request on the obtained memory list.
[0059] As can be seen, in the embodiments of the present disclosure, the code files used to perform different data operations on the in-memory list are encapsulated into an API. This allows developers to directly call the API that matches the data operation when a certain data operation is required. This improves code consistency and prevents developers from having to maintain the business logic of multiple persistent lists with different services. This simplifies the process of maintaining synchronization between in-memory record lists and database records, reducing subsequent app development and maintenance costs.
[0060] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.
[0062] Figure 1 is a flow chart showing a data processing method according to an exemplary embodiment;
[0063] Figure 2 is a flow chart showing another data processing method according to an exemplary embodiment;
[0064] Figure 3 is a flowchart showing a specific implementation of a data processing method according to an exemplary embodiment;
[0065] Figure 4 is a block diagram of a data processing device according to an exemplary embodiment;
[0066] Figure 5 is a block diagram of another data processing device according to an exemplary embodiment;
[0067] Figure 6 is a block diagram of an electronic device according to an exemplary embodiment;
[0068] Figure 7 is a block diagram of another electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0069] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0070] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.
[0071] The user information (including but not limited to the user's device information, user personal information, etc.) and related data involved in this disclosure are all information authorized by the user or authorized by all parties.
[0072] Figure 1 FIG. 1 is a flow chart showing a data processing method according to an exemplary embodiment. The data processing method can be applied to electronic devices such as mobile phones, computers, etc. Figure 1 As shown, the data processing method includes the following steps.
[0073] In step S11, a data operation request is obtained.
[0074] The data request includes business information, which is used to determine the memory list on which data operations need to be performed.
[0075] It should be noted that a memory list includes multiple model objects, and a model object includes multiple attributes. For example, the memory list of the music collection service includes multiple music model objects, and a music model object includes attributes such as the music's name, author, and whether it is a collection.
[0076] In addition, in an embodiment of the present disclosure, the above-mentioned data operations may include at least one of an operation of adding data records (i.e., an operation of adding data in a memory list), an operation of deleting data records (i.e., an operation of deleting data in a memory list), and an operation of changing data records (i.e., an operation of changing data in a memory list).
[0077] In addition, the data operation request may further include at least one of an operation record restriction condition, a database storage directory, and a database name. The operation record restriction condition, the database storage directory, the database name, and the business information (e.g., the business table name) may be collectively referred to as operation parameters. Furthermore, if the data operation request does not include the database storage directory and the database name, the electronic device may search for a data table associated with the business information based on a default database storage directory and database name.
[0078] It should be noted that the above-mentioned operation record limitation conditions mainly identify whether the data operation is for a certain model object in the memory list, or for a model object in the memory list that meets specific conditions, or for all model objects in the memory list, such as querying all records, querying records that meet specific conditions, etc.
[0079] Optionally, step S11 may include: receiving a data operation request sent by an application program (APP).
[0080] That is, the electronic device can perform data operations based on the data operation request of the APP. For example, if the APP is a music APP and the terminal device installed with the music APP receives an operation to add music A to the collection, the music APP will trigger the music APP to send a data operation request to the electronic device to instruct it to add data to the memory list of the music collection service.
[0081] In step S12, a memory list associated with the business information is obtained.
[0082] The business information is used to identify the data of which one or several businesses currently need to perform data operations. For example, the business information can be the name of the business table (i.e., the name of the memory list of the business). In this case, the name of the specific memory list on which the data operation needs to be performed is specified in the data operation request; or the business information can be the business ID. In this case, the name of the specific memory list on which the data operation needs to be performed is not clearly specified, but the business table name corresponding to the business ID carried in the data operation request can be determined based on the business ID and the predetermined business table name corresponding to the business ID, as the name of the memory list on which the data operation needs to be performed.
[0083] In step S13, an application program interface matching the data operation request is searched from the application program interfaces pre-encapsulated from the target code files.
[0084] The target code file includes code files for performing different data operations on the memory list; that is, one target code file is used to perform one data operation, and therefore, an application program interface (API) obtained by encapsulating one target code file can perform the corresponding data operation.
[0085] In addition, the API that matches the data operation request is an API that can execute the data operation corresponding to the data operation request.
[0086] From the above, it can be seen that in the embodiments of the present disclosure, multiple target code files can be encapsulated in advance to obtain APIs for performing different data operations, and these APIs can be stored so that when a data operation request is obtained, the API that can perform the data operation corresponding to the data operation request can be found from these APIs.
[0087] In step S14, an application program interface matching the data operation request is called to perform the data operation corresponding to the data operation request on the memory list.
[0088] After step S13, after finding an API that matches the data operation request, the API can be called to perform the data operation corresponding to the data operation request on the memory list obtained in step S12.
[0089] From the above, it can be seen that in the embodiments of the present disclosure, the code files used to perform different data operations on the memory list can be encapsulated in advance, thereby forming an application programming interface (API) that can perform different operations on the memory list. After obtaining the data operation request, the memory list associated with the business information carried in the data request is obtained, and then the API that matches the data operation request is searched from the multiple APIs obtained, and then the API that matches the data operation request is called to perform the data operation corresponding to the data operation request on the obtained memory list.
[0090] As can be seen, in the embodiments of the present disclosure, the code files used to perform different data operations on the in-memory list are encapsulated into an API. This allows developers to directly call the API that matches the data operation when a certain data operation is required. This improves code consistency and prevents developers from having to maintain the business logic of multiple persistent lists with different services. This simplifies the process of maintaining synchronization between in-memory record lists and database records, reducing subsequent app development and maintenance costs.
[0091] Figure 2 FIG. 1 is a flow chart showing a data processing method according to an exemplary embodiment. The data processing method can be applied to electronic devices such as mobile phones, computers, etc. Figure 2 As shown, the data processing method includes the following steps.
[0092] In step S21 , a data operation request is obtained.
[0093] The data request includes business information, which is used to determine the memory list on which data operations need to be performed.
[0094] It should be noted that a memory list includes multiple model objects, and a model object includes multiple attributes. For example, the memory list of the music collection service includes multiple music model objects, and a music model object includes attributes such as the music's name, author, and whether it is a collection.
[0095] In addition, in an embodiment of the present disclosure, the above-mentioned data operations may include at least one of an operation of adding data records (i.e., an operation of adding data in a memory list), an operation of deleting data records (i.e., an operation of deleting data in a memory list), and an operation of changing data records (i.e., an operation of changing data in a memory list).
[0096] In addition, the data operation request may further include at least one of an operation record restriction condition, a database storage directory, and a database name. The operation record restriction condition, the database storage directory, the database name, and the business information (e.g., the business table name) may be collectively referred to as operation parameters. Furthermore, if the data operation request does not include the database storage directory and the database name, the electronic device may search for a data table associated with the business information based on a default database storage directory and database name.
[0097] It should be noted that the above-mentioned operation record limitation conditions mainly identify whether the data operation is for a certain model object in the memory list, or for a model object in the memory list that meets specific conditions, or for all model objects in the memory list, such as querying all records, querying records that meet specific conditions, etc.; the above-mentioned database storage directory and database name are used to find data tables associated with the above-mentioned business information.
[0098] Optionally, step S21 may include: receiving a data operation request sent by an application program (APP).
[0099] That is, the electronic device can perform data operations based on the data operation request of the APP. For example, if the APP is a music APP and the terminal device installed with the music APP receives an operation to add music A to the collection, the application APP will trigger the application APP to send a data operation request to the electronic device to instruct it to add data to the memory list of the music collection service.
[0100] In step S22, a memory list associated with the business information is obtained.
[0101] Among them, the memory list associated with the business information is a memory list including the relevant content of the business indicated by the business information. Therefore, the business information is used to identify the data of which one or several businesses currently need to perform data operations. For example, the business information can be the name of the business table (that is, the name of the memory list of the business). In this case, the name of the specific memory list on which the data operation needs to be performed is specified in the data operation request; or, the business information can be a business ID. In this case, the name of the specific memory list on which the data operation needs to be performed is not clearly specified, but based on the business ID and the predetermined business table name corresponding to the business ID, the business table name corresponding to the business ID carried in the data operation request is determined as the name of the memory list on which the data operation needs to be performed.
[0102] In step S23, an application program interface matching the data operation request is searched from the application program interfaces pre-encapsulated from the target code files.
[0103] The target code file includes code files for performing different data operations on the memory list; that is, one target code file is used to perform one data operation, and therefore, an application program interface (API) obtained by encapsulating one target code file can perform the corresponding data operation.
[0104] In addition, the API that matches the data operation request is an API that can execute the data operation corresponding to the data operation request.
[0105] From the above, it can be seen that in the embodiments of the present disclosure, multiple target code files can be encapsulated in advance to obtain APIs for performing different data operations, and these APIs can be stored so that when a data operation request is obtained, the API that can perform the data operation corresponding to the data operation request can be found from these APIs.
[0106] In step S24, an application program interface matching the data operation request is called to perform the data operation corresponding to the data operation request on the memory list.
[0107] After step S23, after finding an API that matches the data operation request, the API can be called to perform the data operation corresponding to the data operation request on the memory list obtained in step S22.
[0108] In step S25, if the data operation request corresponds to a preset operation and a data table associated with the business information exists in the database, an operation function matching the data operation request is searched from the operation functions pre-encapsulated from the target operation statement.
[0109] The data table associated with the business information is a data table including relevant contents of the business indicated by the business information; and the preset operation includes at least one of an operation of adding a data record, an operation of deleting a data record, and an operation of modifying a data record.
[0110] In an embodiment of the present disclosure, the data in the memory list associated with the same business needs to be consistent with the data in the data table in the database. Therefore, after step S24 executes the data operation corresponding to the data operation request on the memory list obtained in step S23, if the operation corresponding to the above data operation request is at least one of adding data record operation, deleting data record operation, and changing data record operation, it is necessary to synchronously execute the same operation on the data table associated with the above business information in the database; and if the operation corresponding to the above data operation request is a query operation, after executing the operation corresponding to the data operation request, the data in the memory list associated with the business information has not changed. Therefore, if the above data operation request corresponds to a query operation, it is not necessary to synchronously execute the data operation corresponding to the data operation request on the data table associated with the business information.
[0111] In addition, the target operation statements include operation statements (i.e., logical and command statements) for performing different data operations on data tables in the database. That is, each target operation statement is used to perform a data operation. Therefore, an operation function encapsulated by a target operation statement can perform the corresponding data operation. In other words, the operation function that matches the data operation request is the operation function that can perform the data operation corresponding to the data operation request.
[0112] It can be seen from this that in the embodiments of the present disclosure, multiple target operation statements can be encapsulated in advance to obtain operation functions for performing different data operations, and these operation functions can be stored so that when it is necessary to synchronize the data tables in the database, the operation functions that can perform the data operations corresponding to the data operation requests can be found from these operation functions.
[0113] Among them, the relevant database operation logic and command statements are encapsulated to store the encapsulated operation functions, avoiding the need for different businesses to spell out their own database record operation statements, thereby improving the readability and maintainability of the code.
[0114] In step S26, an operation function matching the data operation request is called to perform a data operation corresponding to the data request on the data table associated with the business information.
[0115] After step S25, after finding the operation function that matches the data operation request, the operation function can be called to perform the data operation corresponding to the data operation request on the data table associated with the business information in the database.
[0116] As can be seen from the above, in the embodiments of the present disclosure, the code files used to perform different data operations on the memory list are encapsulated into an API, so that when a certain data operation needs to be performed, the API that matches the data operation can be directly called; and, in addition, when the data operation request is the above-mentioned preset operation and there is a data table associated with the business information in the database, the operation function that matches the data operation request can be called to update the data table associated with the business information. In this way, the consistency of the code and the operation statement is improved, and developers are prevented from maintaining the business logic of multiple different persistent lists at the same time, thereby simplifying the process of maintaining the synchronization of the memory record list and the database record, and reducing the subsequent development and maintenance costs of the APP.
[0117] Optionally, obtaining a memory list associated with the business information includes:
[0118] Searching for a memory list whose name is associated with the business information in a pre-stored list of memory lists;
[0119] In the case where a memory list whose list name is associated with the business information is found, the found memory list is determined as the memory list associated with the business information.
[0120] The above-mentioned memory list list includes the names of memory lists of different services. The list name is associated with the service information, indicating that the content stored in the memory list represented by the list name belongs to the service indicated by the service information.
[0121] For example, if the above-mentioned business information is the name of a memory list, then if there is a name in the memory list that matches the name of the memory list included in the data operation request (for example, the name of the memory list included in the data operation request exists in the memory list, or there is a name in the memory list that is the same as the keyword in the name of the memory list included in the data operation request), it means that the memory list whose list name is associated with the above-mentioned business information can be found in the memory list.
[0122] In addition, in the above memory list, the name of the memory list and the model objects in the memory list can be stored in the form of key-value pairs (i.e., keyword-value). Among them, the key represents the name of the memory list, and the value represents the model object in the memory list (i.e., the relevant content in the memory list).
[0123] From the above, it can be seen that in the embodiment of the present disclosure, a list of memory lists of different businesses (also called a memory record list dictionary) can be pre-stored, so that based on the memory list, it can be found whether there is a memory list associated with the business information.
[0124] Optionally, the acquiring of a memory list associated with the business information further includes:
[0125] If no memory list with a list name associated with the business information is found, creating a new memory list;
[0126] Determine a name of a newly created memory list according to the service information, and add the name of the newly created memory list to the memory list list;
[0127] In the case that a data table associated with the business information exists in the database, the data in the data table associated with the business information is synchronized to the newly established memory list to obtain the memory list associated with the business information.
[0128] Among them, when determining the name of the newly established memory list based on business information, if the business information is a memory list name, the memory list name represented by the business information can be determined as the name of the newly established memory list; or, according to predetermined rules, the business information can be modified to use the modified business information as the name of the newly established memory list (for example, adding predetermined characters at the end of the business information).
[0129] In addition, no memory list with a list name associated with the business information is found in the memory list list, indicating that there is currently no memory list associated with the business information.
[0130] From the above, it can be seen that in an embodiment of the present disclosure, if there is currently no memory list associated with the business information, a new memory list can be established, and the name of the newly established memory list can be determined based on the business information, so that the name of the newly established memory list can be added to the memory list list, and then the data in the data table associated with the business information in the database can be synchronized to the newly established memory list.
[0131] Optionally, synchronizing the data in the data table associated with the business information to the newly established memory list includes:
[0132] Synchronize the data in the data table associated with the business information to the newly established memory list according to the pre-established object relationship mapping corresponding to the business information;
[0133] The object relationship mapping corresponding to the business information includes: mapping between attributes of the model objects in the memory list associated with the business information and record fields in the data table associated with the business information.
[0134] In the disclosed embodiments, a memory list contains multiple model objects, each of which includes multiple attributes; a data table contains multiple records, each of which includes multiple fields. Therefore, memory lists and data tables store data differently. Therefore, when synchronizing data from a data table to a memory list, it is necessary to map the fields in the data table records to the attributes of the model objects in the memory list.
[0135] Among them, each record in the data table can be converted into a model object in the memory list through the ORM of the attributes of the model object in the predetermined memory list and the record fields in the data table; the ROM includes, for example, that the attribute names of the record fields in the data table and the model objects in the memory list are the same, and there is also a corresponding mapping relationship between the attribute types.
[0136] It should be noted that ORM is an object-relational mapping, a programming technique used to convert data between different types of systems in object-oriented programming languages. In effect, it creates a "virtual object database" that can be used in programming languages.
[0137] Optionally, the method further includes:
[0138] In the case that the data table associated with the business information does not exist in the database, an empty data table is created as the data table associated with the business information.
[0139] It can be seen from this that in the embodiment of the present disclosure, if there is no data table associated with the business information in the database, an empty data table can be created first so that the business indicated by the business information can be stored in the data table when data that needs to be stored is generated subsequently.
[0140] Optionally, after calling the application program interface that matches the data operation request and performing the data operation corresponding to the data operation request on the memory list, the method further includes:
[0141] In a case where the data operation request corresponds to a memory list closing operation, the list name of the memory list matching the business information is removed from the pre-stored memory list name list, and the memory list matching the business information is released.
[0142] Among them, in the IOS operating system, the operations of the memory list are completed in an independent thread. Therefore, if the above data operation request corresponds to the operation of closing the memory list, it means that the corresponding business scenario has been left and the memory resources occupied by the memory list need to be released. Therefore, in this case, the memory list can be removed from the "memory list list" and the memory list can be released.
[0143] Optionally, after calling the application program interface that matches the data operation request and performing the data operation corresponding to the data operation request on the memory list, the method further includes:
[0144] Sending the execution result of the data operation corresponding to the data operation request to the application.
[0145] It can be seen from this that in an embodiment of the present disclosure, after the electronic device receives a data operation request sent by an APP and executes the data operation corresponding to the data operation request on the memory list associated with the business information in the data operation request, it can return the execution result to the APP.
[0146] In summary, the specific implementation of the data processing method of the embodiment of the present disclosure can be as follows: Figure 3 shown.
[0147] The data processing method is applied to an electronic device. Furthermore, a secondary data record cache module is provided in the electronic device. The secondary data record cache module stores an API pre-encapsulated from target code files and operation functions pre-encapsulated from target operation statements. The target code files include code files for performing different data operations on memory lists, and the target operation statements include operation statements for performing different data operations on data tables in a database.
[0148] In addition, in this embodiment, the specific execution process of the data processing method is as follows (1) to (8):
[0149] (1) The secondary data record cache module receives data operation requests sent by the APP; among them, the supported data operation requests include adding data records, deleting data records, querying data records, changing data records, closing the memory list, closing the database connection and other general data record operations; the operation parameters attached to the data operation request include the business table name, the operation record restriction condition (mainly restricting the data operation to a certain model object in the memory list, or to a model object in the memory list that meets specific conditions, or to all model objects in the memory list, such as querying all records, querying records that meet specific conditions, etc.), the database storage directory (optional, if the database storage directory is not included in the data operation request sent by the APP, the secondary data record cache module uses the set default value), and the database name (optional, if the database name is not included in the data operation request sent by the APP, the secondary data record cache module uses the set default value).
[0150] (2) According to the business table name in the data operation request, query whether a memory list corresponding to the business table name already exists; wherein, a "memory record list dictionary" is pre-stored in the secondary data record cache module, and in the memory record list dictionary, the corresponding key is the memory list name, and the value is the memory record of the related table, so the "memory list dictionary" can be queried to determine whether there is a memory list corresponding to the business table name in the data operation request.
[0151] (3) If there is no memory list corresponding to the business table name in the data operation request, a new memory list is constructed and added to the "memory list dictionary" using the business table name in the data operation request as the key and the constructed memory list as the value.
[0152] (4) According to the business table name in the data operation request, the data table associated with the business in the database is queried, and the records in the data table are synchronized to the newly established memory list; wherein, each record in the data table can be converted into a model object in the memory list through the predetermined ORM of the attributes of the model object in the memory list and the record fields in the data table; the ROM includes, for example, a mapping relationship between the attribute names of the record fields in the data table and the attribute types of the model objects in the memory list being the same and the corresponding attribute types.
[0153] (5) Continue to execute the data record request operation, that is, call the API provided by the secondary data record cache module that matches the data operation request, and execute the data operation corresponding to the data operation request on the memory list.
[0154] (6) When the data operation request corresponds to a memory list closing operation, the business table name in the data operation request is removed from the memory list dictionary, and the memory list corresponding to the business table name is released.
[0155] (7) When the data operation request corresponds to any of the operations of adding, deleting, and changing data records, the database is updated; that is, when there is a data table associated with the business corresponding to the above-mentioned business list name in the database, the operation function matching the data operation request is searched from the operation functions obtained by pre-encapsulating the target operation statement, and the operation function matching the data operation request is called to perform the data operation corresponding to the data table associated with the business corresponding to the above-mentioned business list name in the database; wherein the target operation statement includes operation statements (i.e., logic and command statements) for performing different data operations on the data tables in the database; when there is no data table associated with the business corresponding to the above-mentioned business list name in the database, a data table associated with the business corresponding to the above-mentioned business list name is created.
[0156] (8) Return the results of the data operation to the upper-level business call: such as the list of queried records, whether the deletion is successful, etc.
[0157] Among them, in the existing technology, developers need to maintain the business logic of persistent lists of different businesses at the same time, which can easily miss the logic of synchronizing memory and library database records, resulting in problems such as inconsistencies between memory lists and database records. In the embodiment of the present disclosure, all data recording logic for business lists is abstractly encapsulated in the secondary data record cache module, which improves code consistency and avoids developers maintaining the business logic of persistent lists of different businesses at the same time, thereby reducing the subsequent development and maintenance costs of the APP and reducing the problem of inconsistencies between memory lists and database records.
[0158] In addition, in the embodiment of the present disclosure, since the database operation statements do not have syntax checking and syntax prompts in the system development language of the terminal device, the writing efficiency is relatively low, and it is not conducive to code reading and correctness checking. In the embodiment of the present disclosure, the relevant database operation logic and command statements are encapsulated in the secondary data record cache module, avoiding the spelling of respective database record operation statements in other places of the APP, thereby improving the readability and maintainability of the code.
[0159] In summary, the embodiments of the present disclosure implement a secondary data record caching mechanism. For businesses with persistent record lists, developers do not need to implement memory record lists for specific businesses, and do not need to worry about and implement the synchronization of memory record lists and database records.
[0160] Figure 4 This is a block diagram of a data processing device according to an exemplary embodiment. The device can be applied to electronic devices such as mobile phones and computers.
[0161] Reference Figure 4 The data processing device 40 includes a request receiving module 41, a list obtaining module 42, a first searching module 43 and a first calling module 44.
[0162] The request receiving module 41 is configured to obtain a data operation request, wherein the data request includes business information;
[0163] A list acquisition module 42 is configured to acquire a memory list associated with the business information;
[0164] A first search module 43 is configured to search for an application program interface matching the data operation request from application program interfaces pre-encapsulated from target code files, wherein the target code files include code files for performing different data operations on the memory list;
[0165] The first calling module 44 is configured to call an application program interface that matches the data operation request and perform a data operation corresponding to the data operation request on the memory list.
[0166] From the above, it can be seen that the data processing device of the embodiment of the present disclosure can pre-encapsulate the code files used to perform different data operations on the memory list, thereby forming an application programming interface (API) that can perform different operations on the memory list, and then after obtaining the data operation request, obtain the memory list associated with the business information carried in the data request, and then search for the API that matches the data operation request from the multiple APIs obtained, and then call the API that matches the data operation request to perform the data operation corresponding to the data operation request on the obtained memory list.
[0167] As can be seen, in the embodiments of the present disclosure, the code files used to perform different data operations on the in-memory list are encapsulated into an API. This allows developers to directly call the API that matches the data operation when a certain data operation is required. This improves code consistency and prevents developers from having to maintain the business logic of multiple persistent lists with different services. This simplifies the process of maintaining synchronization between in-memory record lists and database records, reducing subsequent app development and maintenance costs.
[0168] Figure 5 This is a block diagram of another data processing device according to an exemplary embodiment. The device can be applied to electronic devices such as mobile phones and computers.
[0169] Reference Figure 5 The data processing device 50 includes a request receiving module 51, a list obtaining module 52, a first searching module 53 and a first calling module 54.
[0170] The request receiving module 51 is configured to obtain a data operation request, wherein the data request includes business information;
[0171] A list acquisition module 52 is configured to acquire a memory list associated with the business information;
[0172] A first search module 53 is configured to search for an application program interface matching the data operation request from application program interfaces pre-encapsulated from target code files, wherein the target code files include code files for performing different data operations on the memory list;
[0173] The first calling module 54 is configured to call an application program interface that matches the data operation request and perform a data operation corresponding to the data operation request on the memory list.
[0174] In one possible implementation, the device further includes:
[0175] The second search module 57 is configured to search for an operation function that matches the data operation request from the operation functions pre-encapsulated from the target operation statement, if the data operation request corresponds to a preset operation and a data table associated with the business information exists in the database;
[0176] The second calling module 58 is configured to call an operation function that matches the data operation request, and perform a data operation corresponding to the data request on a data table associated with the business information, wherein the target operation statement includes an operation statement for performing different data operations on a data table in a database.
[0177] In one possible implementation, the list acquisition module 52 includes:
[0178] The search submodule 521 is configured to search for a memory list whose list name is associated with the business information in a pre-stored list of memory lists;
[0179] The first determining submodule 522 is configured to, when a memory list whose list name is associated with the business information is found, determine the found memory list as the memory list associated with the business information.
[0180] In one possible implementation, the list acquisition module 52 further includes:
[0181] A new creation submodule 523 is configured to create a new memory list if no memory list with a list name associated with the business information is found;
[0182] The name determination submodule 524 is configured to determine the name of the newly created memory list according to the service information, and add the name of the newly created memory list to the memory list list;
[0183] The synchronization submodule 525 is configured to synchronize the data in the data table associated with the business information to the newly established memory list when there is a data table associated with the business information in the database, so as to obtain the memory list associated with the business information.
[0184] In one possible implementation, the synchronization submodule 525 is specifically configured to:
[0185] Synchronize the data in the data table associated with the business information to the newly established memory list according to the pre-established object relationship mapping corresponding to the business information;
[0186] The object relationship mapping corresponding to the business information includes: mapping between attributes of the model objects in the memory list associated with the business information and record fields in the data table associated with the business information.
[0187] In one possible implementation, the device further includes:
[0188] The data table creation module 55 is configured to create an empty data table as the data table associated with the business information if the data table associated with the business information does not exist in the database.
[0189] In one possible implementation, the device further includes:
[0190] The release module 56 is configured to remove the list name of the memory list matching the business information from the pre-stored memory list list and release the memory list matching the business information when the data operation request corresponds to a memory list closing operation.
[0191] From the above, it can be seen that the data processing device of the embodiment of the present disclosure can pre-encapsulate the code files used to perform different data operations on the memory list, thereby forming an application programming interface (API) that can perform different operations on the memory list, and then after obtaining the data operation request, obtain the memory list associated with the business information carried in the data request, and then search for the API that matches the data operation request from the multiple APIs obtained, and then call the API that matches the data operation request to perform the data operation corresponding to the data operation request on the obtained memory list.
[0192] As can be seen, in the embodiments of the present disclosure, the code files used to perform different data operations on the in-memory list are encapsulated into an API. This allows developers to directly call the API that matches the data operation when a certain data operation is required. This improves code consistency and prevents developers from having to maintain the business logic of multiple persistent lists with different services. This simplifies the process of maintaining synchronization between in-memory record lists and database records, reducing subsequent app development and maintenance costs.
[0193] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0194] Figure 6 FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment. Figure 6 , the electronic device comprises:
[0195] Processor 610;
[0196] a memory 620 for storing instructions executable by the processor;
[0197] The processor is configured to execute the instructions to implement the above-mentioned data processing method applied to the electronic device.
[0198] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions. The instructions can be executed by the processor 610 of the electronic device to perform the above method. Alternatively, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0199] like Figure 7 As shown, an embodiment of the present disclosure further provides an electronic device, which electronic device 700 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0200] Reference Figure 7 , electronic device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .
[0201] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 702 may include one or more modules to facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
[0202] The memory 704 is configured to store various types of data to support operations on the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, videos, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0203] The power supply component 706 provides power to the various components of the electronic device 700. The power supply component 707 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 700.
[0204] The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0205] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 704 or transmitted via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.
[0206] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0207] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect the open / closed state of the electronic device 700, the relative positioning of components, such as the display and keypad of the electronic device 700. The sensor assembly 714 can also detect changes in the position of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and temperature changes of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0208] The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 can access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 8G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0209] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the data processing method described above.
[0210] In an exemplary embodiment, a computer program product is further provided, including a computer program, wherein the computer program implements the above-mentioned data processing method when executed by a processor.
[0211] In addition, the data processing scheme provided here is not inherently relevant to any particular computer, virtual system or other equipment. Various general-purpose systems also can be used together with based on the teachings herein. According to the above description, it is apparent that the structure required by the system with the solution of the present invention is constructed. In addition, the present invention is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present invention described here, and the above description of specific languages is for disclosing the best mode of implementation of the present invention.
[0212] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0213] Similarly, it should be understood that in order to streamline the present disclosure and aid understanding of one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the claims, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Accordingly, the claims that follow the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the invention.
[0214] Those skilled in the art will appreciate that the modules in the devices of the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device so disclosed may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0215] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
[0216] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the information extraction scheme according to the disclosed embodiments. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing a part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0217] It should be noted that the above embodiments illustrate rather than limit the invention, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0218] In summary, those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0219] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data processing method, characterized in that: The method comprises: Obtaining a data operation request, wherein the data request includes business information; Obtaining a memory list associated with the business information; Searching for an application program interface that matches the data operation request from an application program interface pre-encapsulated from a target code file, wherein the target code file includes a code file for performing different data operations on a memory list; Calling an application program interface that matches the data operation request to perform a data operation corresponding to the data operation request on the memory list; The acquiring of a memory list associated with the service information includes: Searching for a memory list whose name is associated with the business information in a pre-stored list of memory lists; If no memory list with a list name associated with the business information is found, creating a new memory list; Determine the name of the newly created memory list according to the service information, and add the name of the newly created memory list to the memory list list; the name of the newly created memory list is the name of the memory list indicated by the service information; If a data table associated with the business information exists in a database, synchronizing data in the data table associated with the business information to a newly established memory list according to a pre-established object-relationship mapping corresponding to the business information, thereby obtaining a memory list associated with the business information; the object-relationship mapping corresponding to the business information includes mappings between attributes of model objects in the memory list associated with the business information and record fields in the data table associated with the business information; After calling the application program interface that matches the data operation request and performing the data operation corresponding to the data operation request on the memory list, the method further includes: In a case where the data operation request corresponds to a memory list closing operation, the list name of the memory list matching the business information is removed from the pre-stored memory list name list, and the memory list matching the business information is released.
2. The method according to claim 1, characterized in that After calling the application program interface that matches the data operation request and performing the data operation corresponding to the data operation request on the memory list, the method further includes: If the data operation request corresponds to a preset operation and a data table associated with the business information exists in the database, searching for an operation function that matches the data operation request from operation functions pre-encapsulated from target operation statements, wherein the target operation statements include operation statements for performing different data operations on the data tables in the database; An operation function matching the data operation request is called to perform a data operation corresponding to the data request on a data table associated with the business information.
3. The method according to claim 1, characterized in that The acquiring of the memory list associated with the business information further includes: In the case where a memory list whose list name is associated with the business information is found, the found memory list is determined as the memory list associated with the business information.
4. The method according to claim 1 or 2, characterized in that The method further comprises: In the case that the data table associated with the business information does not exist in the database, an empty data table is created as the data table associated with the business information.
5. A data processing device, characterized in that: The device comprises: a request receiving module, configured to obtain a data operation request, wherein the data request includes business information; A list acquisition module is configured to acquire a memory list associated with the business information; A first search module is configured to search for an application program interface that matches the data operation request from application program interfaces pre-encapsulated from target code files, wherein the target code files include code files for performing different data operations on a memory list; a first calling module, configured to call an application program interface matching the data operation request, and perform a data operation corresponding to the data operation request on the memory list; A search submodule is configured to search for a memory list whose list name is associated with the business information in a pre-stored memory list list; a new creation submodule, configured to create a new memory list if no memory list with a list name associated with the business information is found; a name determination submodule configured to determine a name of a newly created memory list according to the service information, and add the name of the newly created memory list to the memory list list; the name of the newly created memory list is the name of the memory list indicated by the service information; A synchronization submodule is configured to, if a data table associated with the business information exists in a database, synchronize the data in the data table associated with the business information to a newly established memory list based on a pre-established object-relationship mapping corresponding to the business information, thereby obtaining a memory list associated with the business information; the object-relationship mapping corresponding to the business information includes: a mapping between attributes of model objects in the memory list associated with the business information and record fields in the data table associated with the business information; The release module is configured to remove the list name of the memory list matching the business information from the pre-stored memory list list and release the memory list matching the business information when the data operation request corresponds to a memory list closing operation.
6. The device according to claim 5, characterized in that The device further comprises: a second search module configured to, if the data operation request corresponds to a preset operation and a data table associated with the business information exists in the database, search for an operation function that matches the data operation request from operation functions pre-encapsulated from target operation statements, wherein the target operation statement includes an operation statement for performing different data operations on the data table in the database; The second calling module is configured to call an operation function that matches the data operation request and perform a data operation corresponding to the data request on a data table associated with the business information.
7. The device according to claim 5, characterized in that The list acquisition module also includes: The first determining submodule is configured to, when a memory list whose list name is associated with the business information is found, determine the found memory list as the memory list associated with the business information.
8. The device according to claim 5 or 6, characterized in that The device further comprises: The data table establishment module is configured to establish an empty data table as the data table associated with the business information if the data table associated with the business information does not exist in the database.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the data processing method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data processing method according to any one of claims 1 to 4.
11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the data processing method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Data processing method and device, electronic device and storage medium
CN110851209A
Batch task processing method and device, computer equipment and storage medium
CN111078733A
Data synchronization method and device and server
CN112925835A