Search

CN-122019014-A - Data processing method, device, terminal equipment and computer readable storage medium

CN122019014ACN 122019014 ACN122019014 ACN 122019014ACN-122019014-A

Abstract

The application discloses a data processing method, a device, terminal equipment and a computer readable storage medium, wherein the method comprises the steps of receiving a plug-in data access request aiming at a target plug-in; and accessing the plug-in data of the target plug-in based on the target access path. When the method is adopted to access the plug-in data, independent access paths of all plug-ins can be found based on the names of the plug-ins, the data of different plug-ins can be distinguished, the data of other plug-ins or the data of host application cannot be influenced when the plug-in data is modified, and the data isolation of all plug-ins is realized.

Inventors

  • LI HE

Assignees

  • 深圳TCL新技术有限公司

Dates

Publication Date
20260512
Application Date
20260114

Claims (10)

  1. 1. A method of data processing, comprising: Receiving a plug-in data access request for a target plug-in; Determining a target access path marked with a plug-in identification of the target plug-in response to the plug-in data access request; and accessing plug-in data of the target plug-in based on the target access path.
  2. 2. The method according to claim 1, wherein the determining, in response to the plug-in data access request, a target access path marked with a plug-in identification of the target plug-in includes: determining the plug-in identification corresponding to the plug-in data access request; Determining a target context function package class corresponding to the target plugin according to the plugin identifier; And determining the target access path through the target context function encapsulation class.
  3. 3. The method according to claim 2, wherein the determining, according to the plug-in identifier, a target context function package class corresponding to the target plug-in includes: Detecting whether a context function package class matched with the plug-in identification exists; determining the context function encapsulation class matched with the plug-in identification as the target context function encapsulation class in the case that the context function encapsulation class matched with the plug-in identification exists; and under the condition that the context function packaging class matched with the plug-in identification does not exist, a new context function packaging class is established, and the new context function packaging class is bound with the plug-in identification to obtain the target context function packaging class.
  4. 4. The data processing method according to claim 2, wherein the determining the target access path by the target context function package class includes: determining a data access method corresponding to the plug-in data access request according to the data access type corresponding to the plug-in data access request; and calling the data access method through the target context function packaging class to acquire the target access path.
  5. 5. The data processing method of claim 4, wherein invoking the data access method through the target context function encapsulation class to obtain the target access path comprises: and calling the data access method through the target context function encapsulation class to insert the plug-in identification into an original access path to obtain the target access path, wherein the target access path is isolated from paths of plug-in data stored with other plug-ins.
  6. 6. The data processing method of claim 5, comprising, prior to said receiving a plug-in data access request for a target plug-in: Writing the plug-in identification into a basic file of the target plug-in so as to automatically read the plug-in identification in the basic file and insert the plug-in identification into a currently called method.
  7. 7. The data processing method of claim 1, further comprising, prior to said receiving a plug-in data access request for a target plug-in: Detecting whether an abnormal code exists in the running code of the target plugin, wherein the abnormal code comprises at least one code of a code for acquiring data from a global path of an application and a code for acquiring the plugin data in a mode other than a context tool class; And generating an exception prompt under the condition that the exception code exists in the running code of the target plug-in, wherein the exception prompt is used for prompting that the data of the target plug-in exist uninsulated data.
  8. 8. A data processing apparatus, comprising: The receiving module is used for receiving a plug-in data access request aiming at the target plug-in; A determining module, configured to determine, in response to the plug-in data access request, a target access path marked with a plug-in identifier of the target plug-in; And the access module is used for accessing the plug-in data of the target plug-in based on the target access path.
  9. 9. A terminal device comprising one or more processors, memory, and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the data processing method of any of claims 1 to 7.
  10. 10. A computer readable storage medium, characterized in that it has stored thereon a computer program, which is loaded by a processor to perform the steps in the data processing method according to any of claims 1 to 7.

Description

Data processing method, device, terminal equipment and computer readable storage medium Technical Field The present application relates to the field of software engineering technologies, and in particular, to a data processing method, a data processing device, a terminal device, and a computer readable storage medium. Background With the rapid development of android systems, plug-in architecture becomes a mainstream trend of large mobile application development. The plug-in technology can effectively support dynamic loading and upgrading of application components, and improves development and maintenance efficiency. In the current android plug-in project, the plug-in will typically perform local data operations such as file creation, database storage, and the like. However, in practical projects, each plug-in often shares the same running process and data storage space, and the storage directory (such as cache, files, database) has no effective isolation mechanism, so that the risk is generated that if the plug-in deletes other files under the same level directory. Disclosure of Invention The embodiment of the application provides a data processing method, a device, terminal equipment and a computer readable storage medium, which can find independent access paths of all plugins based on the names of the plugins, can distinguish data of different plugins, can not influence the data of other plugins or data of host applications when the plugin data is modified, and realize data isolation of all plugins. The technical scheme adopted by the invention for solving the problems is as follows: In one aspect, the present application provides a data processing method, including: Receiving a plug-in data access request for a target plug-in; Determining a target access path marked with a plug-in identification of a target plug-in response to the plug-in data access request; based on the target access path, plug-in data of the target plug-in is accessed. In some embodiments of the present application, determining a target access path marked with a plug-in identification of a target plug-in response to a plug-in data access request includes: Determining a plug-in identifier corresponding to the plug-in data access request; determining a target context function package class corresponding to the target plugin according to the plugin identifier; and determining a target access path through the target context function encapsulation class. In some embodiments of the present application, determining, according to the plug-in identifier, a target context function package class corresponding to a target plug-in includes: detecting whether a context function package class matched with the plug-in identification exists; In the case that the context function packaging class matched with the plug-in identification exists, determining the context function packaging class matched with the plug-in identification as a target context function packaging class; and under the condition that the context function packaging class matched with the plug-in identification does not exist, establishing a new context function packaging class, and binding the new context function packaging class with the plug-in identification to obtain a target context function packaging class. In some embodiments of the present application, determining a target access path through a target context function encapsulation class includes: Determining a data access method corresponding to the plug-in data access request according to the data access type corresponding to the plug-in data access request; And calling a data access method through the target context function packaging class to acquire a target access path. In some embodiments of the present application, the method for calling the data access method by the target context function package class to obtain the target access path includes: and calling a data access method through the target context function packaging class to insert the plug-in identification into the original access path to obtain a target access path, wherein the target access path is isolated from paths of plug-in data stored with other plug-ins. In some embodiments of the present application, prior to receiving a plug-in data access request for a target plug-in, comprising: And writing the plug-in identification into a basic file of the target plug-in so as to automatically read the plug-in identification in the basic file and insert the plug-in identification into the currently called method. In some embodiments of the present application, before receiving the plug-in data access request for the target plug-in, further comprising: detecting whether an abnormal code exists in the running code of the target plugin, wherein the abnormal code comprises at least one code of acquiring data from a global path of an application and acquiring plugin data in a mode other than a context tool class; and generating an abnormal prompt under the conditio