CN112823336A - Data processing method, data processing device, electronic equipment and storage medium - Google Patents

Data processing method, data processing device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112823336A
CN112823336A CN201880098464.7A CN201880098464A CN112823336A CN 112823336 A CN112823336 A CN 112823336A CN 201880098464 A CN201880098464 A CN 201880098464A CN 112823336 A CN112823336 A CN 112823336A
Authority
CN
China
Prior art keywords
data packet
resource file
target resource
memory
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201880098464.7A
Other languages
Chinese (zh)
Inventor
熊晨宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN112823336A publication Critical patent/CN112823336A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application discloses a data processing method and device, electronic equipment and a storage medium. The method comprises the following steps: the electronic equipment acquires a data packet to be operated from the persistent storage area; processing the data packet to obtain a target resource file, and directly storing the target resource file in a memory; and reading the target resource file from the memory. According to the method, the target resource file included in the data packet obtained after the data packet is processed is directly stored in the memory, so that the target resource file is not easy to acquire by other programs, the safety of the target resource file is improved, and the safety of the data packet is improved.

Description

Data processing method, data processing device, electronic equipment and storage medium Technical Field
The present application relates to the field of data processing technologies, and in particular, to a data processing method and apparatus, an electronic device, and a storage medium.
Background
H5 is a series of technologies for making web page interaction effects, and H5 game can be regarded as a mobile-end web game, and the H5 game can be experienced without downloading other client software specially. The security of the data of the H5 game is yet to be improved.
Disclosure of Invention
In view of the above problems, the present application provides a data processing method, an apparatus, an electronic device, and a storage medium to achieve an improvement of the above problems.
In a first aspect, the present application provides a data processing method applied to an electronic device, where the method includes: the electronic equipment acquires a data packet to be operated from the persistent storage area; processing the data packet to obtain a target resource file, and directly storing the target resource file in a memory; and reading the target resource file from the memory.
In a second aspect, the present application provides a data processing apparatus, operable on an electronic device, the apparatus comprising: the data acquisition unit is used for acquiring a data packet to be operated from the persistent storage area; the data processing unit is used for processing the data packet to obtain a target resource file and directly storing the target resource file in the memory; and the data reading unit is used for reading the target resource file from the memory.
In a third aspect, the present application provides an electronic device comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a fourth aspect, the present application provides a computer-readable storage medium having a program code stored therein, wherein the program code performs the above method when running.
According to the data processing method and device, the electronic equipment and the storage medium, the electronic equipment obtains the data packet to be operated from the persistent storage area, then processes the data packet to obtain the target resource file, directly stores the target resource file in the memory, and further reads the target resource file from the memory. Therefore, the target resource file included in the data packet obtained after the data packet is processed is directly stored in the memory, so that the target resource file is not easy to acquire by other programs, the safety of the target resource file is improved, and the safety of the data packet is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating a transmission path of a data packet proposed in the present application;
fig. 2 is a flowchart illustrating a data processing method according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating application program downloading in a data processing method according to an embodiment of the present application;
fig. 4 shows a flow chart of a data processing method according to another embodiment of the present application;
fig. 5 is a flow chart illustrating a data processing method according to still another embodiment of the present application;
fig. 6 is a block diagram showing a structure of an information transmission apparatus according to an embodiment of the present application;
fig. 7 is a block diagram showing a structure of an information transmission apparatus according to another embodiment of the present application;
fig. 8 is a block diagram showing a structure of an information transmission apparatus according to still another embodiment of the present application;
fig. 9 shows a block diagram of an electronic device proposed in the present application;
fig. 10 is a storage unit according to an embodiment of the present application, configured to store or carry program code for implementing a data processing method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
HTML5 (i.e., H5) is a new set of web standards that includes both newly defined HTML tags and more normalized HTML tags, CSS3, and a completely new javascript API interface. These interfaces can operate on data that is both what the front end sees and what the back end delivers to the front end, such as off-line storage functions. With the development of the technology of HTML5, the technology of HTML5 is also applied to the field of games. In this case, HTML5 is a web page of the mobile terminal. And the HTML5 game can be regarded as a mobile-end web game, which can be experienced without special downloading of clients.
While the data packages for games developed based on the HTML5 language typically include multiple categories of files. For example, it will typically include code asset files as well as media asset files. The code resource file mainly comprises an html code and a JavaScript code. The media resource files mainly include pictures, audio files, video files, and the like.
Generally, as shown in fig. 1, the data packets of the H5 game are developed by the developer through the development device 99 and then uploaded to the server 98, and the server 98 encrypts the data packets uploaded by the developer. The electronic device 100 decrypts or compresses the data packet after downloading the game package from the server 98 through the wireless access point 97, so as to obtain the resource file included in the aforementioned data. The electronic device 100 may be a smart phone, a tablet computer, or a computer. However, the inventor of the present invention has found that, after the electronic device acquires the resource file in the above manner, the resource file stored on the electronic device is not encrypted and is not stored in a special security chip, so that the security of the resource file may be problematic. Therefore, the inventor proposes a data processing method, a data processing device, an electronic device, and a storage medium that can improve the security of a data packet in the present application.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 2, a data processing method provided in the present application is applied to an electronic device, and the method includes:
step S110: and the electronic equipment acquires the data packet to be operated from the persistent storage area.
As one way, as shown in fig. 2, after the developer completes the development of the data package of the application program, the data package may be uploaded to a server, for example, a server of a software center, through the developer terminal. The server may then encrypt the data packet uploaded from the developer terminal. And the electronic equipment can request the data packet of the application program selected by the user from the server and store the data packet returned by the server in the persistent storage area.
Among other things, persistence is a mechanism to transition program data between persistent and transient states. Colloquially, transient data (such as data in a memory, which cannot be permanently stored) is persisted to persistent data (such as persisted to a database, which can be permanently stored). And the persistent storage means that data is persistently stored in a disk of the electronic device or an SD of the peripheral device, so that the data cannot be lost even if the electronic device is powered off or restarted.
As the operation interface 96 shown in fig. 3, a plurality of application programs are displayed in the operation interface 96 so as to be downloadable. For example, application "WZRY", application "YZWR", application "MHXY", and application "DHXY". The electronic device may download the data package of the application program to the local storage in the persistent storage area after the user clicks the "download" button corresponding to the application program. For example, a magnetic disk of an electronic device or an SD card of a peripheral device.
The data package of the application program usually includes various types of resource files. For example, code asset files and media asset files may be included. The media resource file records pictures and videos to be displayed by an interface of the application program, or audio files corresponding to the application program in the running process.
Furthermore, the electronic device starts to acquire the data packet to be run from the persistent storage area after detecting that the application program to which the data packet belongs starts to run. That is, when the electronic device stores a plurality of data packets, the electronic device may start to acquire a data packet to be run corresponding to a certain application program from the persistent storage area after detecting the application program is started.
And the electronic device may have a number of ways to determine the currently running application. As one method, when the operating system of the electronic device is an android operating system and the application program is a client-type application program, the name of the application program currently running in the foreground may be obtained by executing a getreporting tasks method of ActivityManager. In addition, the electronic device may further acquire a list of programs used by the user through the usagetstatsmanager, and identify a most recently used application program recorded in the list as a current foreground application. Moreover, the change of the focus of the window can be monitored through the barrier-free function of the android, and the package name corresponding to the focus window is taken as the application program which runs in the foreground at the present time.
And for web page type applications, for example, H5 type applications, are running in a client. There are several ways for the electronic device to detect whether it is running for a web page type application. It will be appreciated that web-type applications typically require access to a network, and as a way of doing so, the electronic device may detect whether data is being requested from the target IP address to detect whether a web-type application is running. Specifically, the electronic device may establish an IP address table, and store, in the IP address table, an IP address accessed by an application program of a web page type downloaded in advance by a user during an operation process. When the electronic device grabs a data request for accessing the IP address in the IP address table, it is determined that the application program corresponding to the IP address of the grabbed data request starts to run.
Step S120: and processing the data packet to obtain a target resource file, and directly storing the target resource file in a memory.
It should be noted that, after the server receives the uploaded data packet, the data packet may be compressed or encrypted. The data packet is compressed to reduce the storage space occupied by the data packet, and the data packet is encrypted to improve the safety of the data packet. Correspondingly, after the electronic device receives the data packet from the server, it needs to first determine whether the data packet has been compressed or encrypted, then determine the corresponding processing, and further obtain the target resource file from the data packet. The target resource file may be all resource files in the data package, or may be a part of the resource files. For example, generally, the storage space occupied by the media resource file is large, and as a way, only the code resource file can be used as the target resource file, thereby avoiding occupying a large amount of storage space of the memory for a long time.
Step S130: and reading the target resource file from the memory.
It should be noted that, generally, the memory is configured with a certain recovery mechanism, which can kill some processes of the application program occupying the memory when the memory is insufficient, thereby increasing the available amount of the memory. As a way, after the electronic device detects that the target condition is met, the target resource file is deleted from the memory, so as to reduce the occupation of the memory.
In the embodiments of the present application, the target condition may be determined in various ways.
Optionally, the target conditions include: detecting that the application program to which the data packet belongs is closed. Optionally, the target conditions include: and detecting that the application program to which the data packet belongs is closed and the remaining memory space of the memory is less than a specified value. It will be appreciated that the foregoing method is to begin processing the data packet to obtain the target resource file after detecting that the application program has started running. Then, after the application program is closed, the electronic device may preliminarily determine that the user no longer needs to use the application program, and then the electronic device may delete the target resource file stored in the memory corresponding to the application program, so as to save the memory space.
As another way, for some types of applications, although the application is currently closed by the user, it may be started by the user soon afterwards, and if the electronic device detects that the application is closed before and deletes the target resource file stored in the memory, the electronic device needs to process the data packet again to obtain the target resource file after detecting that the application is started again later. Therefore, the electronic equipment not only writes data into the memory more frequently, but also occupies CPU resources more frequently to process the data packet. Then, as one way, the target resource file may be deleted from the memory only after detecting that the application program to which the data packet belongs is closed and the remaining storage space in the memory is less than the specified value.
It should be noted that some operating systems are configured with an inherent memory reclamation mechanism to ensure the normal operation of the system. The specified value may be greater than a memory threshold value when the operating system starts to perform memory recovery, so as to reduce the probability of performing memory recovery by the electronic device, thereby avoiding an influence on other running applications.
In addition, the electronic device can determine at what time to delete the target resource file in the memory according to the use habit of the user.
As one way, the electronic device may count the running time of all the applications installed therein, so as to determine in which time period each application is frequently run or is started multiple times in which time period during the day, and for these applications, the electronic device may determine the application to be determined. In this case, after detecting that an application is closed, the electronic device may start to determine whether the closed application satisfies the application to be determined, so as to determine the deletion timing of the target resource file corresponding to the closed application. For example, for an application a, the electronic device may determine that the application a is an application to be determined, where the time from the time a to the time b is a condition to be determined, by counting that the application a is started many times between the time a and the time b, or detecting that the running time of the application a between the time a and the time b is greater than a target time.
When the application program A is detected to be triggered and started, a data packet to be operated corresponding to the application program A is obtained from a persistent storage area, the data packet is processed to obtain a target resource file corresponding to the data packet, the target resource file is directly stored in a memory, and the target resource file stored in the memory is read so that the application program A can normally operate. And after detecting that the application program A is closed, judging whether the application program A is an application program to be judged, if so, further acquiring conditions to be judged of the application program A, and if detecting that the current moment is before a moment a to a moment b, continuing to reserve a target resource file corresponding to the application program A in the memory by the electronic equipment.
In addition, it should be noted that if other people want to illegally acquire a target resource file that the electronic device runs in the memory, the electronic device and the calculator are connected in a serial port manner, and then data is read from the memory in the serial port manner. Then, as a manner, the electronic device may directly delete the target resource file in the memory after detecting that the application is closed and the current electronic device is in a wired connection state with the external device. Therefore, the security of the target resource file is further improved in the mode.
According to the data processing method, the electronic equipment acquires the data packet to be operated from the persistent storage area, processes the data packet to obtain the target resource file, directly stores the target resource file in the memory, and then reads the target resource file from the memory. Therefore, the target resource file included in the data packet obtained after the data packet is processed is directly stored in the memory, so that the target resource file is not easy to acquire by other programs, the safety of the target resource file is improved, and the safety of the data packet is improved.
Referring to fig. 4, a data processing method provided in the present application is applied to an electronic device, and the method includes:
step S210: and the electronic equipment acquires the data packet to be operated from the persistent storage area.
Step S220: and processing the data packet to obtain a processed resource file.
The server may encrypt or compress the uploaded data packet. Correspondingly, after acquiring the data packet from the server, the electronic device also performs corresponding decompression or decryption processing, and further acquires the resource file from the data packet.
As a mode, if it is identified that the data packet to be operated is a compressed and unencrypted data packet, performing decompression processing on the data packet to be operated to obtain a target resource file. As another way, if it is identified that the data packet to be operated is an encrypted and uncompressed data packet, the data packet to be operated is decrypted to obtain a target resource file. As another way, if it is identified that the data packet to be operated is a compressed and encrypted data packet, performing decompression processing and encryption processing on the data packet to be operated to obtain a target resource file.
Specifically, for the compressed resource file, the specific compression rule of the compressed resource file can be identified by the file format of the compressed resource file, so that the corresponding rule is adopted for decompression. And for the encrypted file, the encryption mode adopted by the encrypted file can be determined by configuring the description file.
Step S230: and detecting the target parameters of the processed resource file.
Step S240: and taking the file with the target parameters meeting the target conditions as a target resource file, and directly storing the target resource file in the memory.
It will be appreciated that typically a data package for an application will typically include multiple types of resource files. For example, code asset files and media asset files may be included. The media resource file records pictures and videos to be displayed by an interface of the application program, or audio files corresponding to the application program in the running process. For the media resource class files, some of the files occupy a large storage space, and some of the files do not occupy too much storage space.
In that case, the target condition includes at least one of the following conditions: the data type is a resource file of a specified type; and the resource file occupies a storage space smaller than the designated space.
Of all resource files included in the data package, part of the resource files are not so important, such as some small icon resource files or some audio resource files. If all the obtained resource files are used as target resource files after the resource files are obtained by processing the data packet, all the processed resource files are identified to be directly stored in the memory. Thus, while the security of the resource file which is relatively less important is further improved, the memory space is sacrificed. In this case, as one way, the electronic device may determine the target resource file by the type of the resource file.
For example, if the electronic device obtains the resource file of the obtained application program B by processing the data packet, the resource file includes a code resource file, a picture resource file, and an audio resource file. Then, as one way, the electronic device may directly store the code resource file and the picture resource file as target resource files in the memory, and store the audio resource file in the persistent storage area. And only when the required audio file is called, the required resource file is loaded into the memory so as to be read.
In addition, as a way, the target resource files corresponding to the data packages of different applications may be different. For example, if the application is an audio-type game program, the audio resource file may be important. For a game program of logic class, the code resource file is more important relatively. In this case, the electronic device may first identify the type of application and then determine the target resource file based on the identified type. Specifically, the electronic device may locally store a data table, where the data table stores a corresponding relationship between the application program type and the target resource file, so that when the electronic device identifies a certain application program type, it may be determined by table lookup which of the processed resource files are the target resource files.
For example, if a target resource file corresponding to the social application program is recorded in a data table stored in the electronic device, the target resource file includes a picture resource file and a code resource file, and a target resource file corresponding to the interesting application program is also recorded, the target resource file includes a code resource file. And when the electronic equipment detects that the application program C is started, processing the data packet of the application program C, identifying the type of the processed resource file by the electronic equipment, taking the identified code resource file and the identified picture resource file as target resource files under the condition that the application program C is judged to be a social application program, and taking only the code resource file as the target resource file under the condition that the application program C is judged to be an interesting application program.
Step S250: and reading the target resource file from the memory.
According to the data processing method, the electronic equipment acquires the data packet to be operated from the persistent storage area, processes the data packet, obtains the target resource file based on the target parameters of the processed resource file, directly stores the target resource file in the memory, and further reads the target resource file from the memory. Therefore, the target resource file included in the data packet obtained after the data packet is processed is directly stored in the memory, so that the target resource file is not easy to acquire by other programs, the safety of the target resource file is improved, and the safety of the data packet is improved.
Referring to fig. 5, a data processing method provided in the present application is applied to an electronic device, and the method includes:
step S310: and the electronic equipment acquires the data packet to be operated from the persistent storage area.
Step S320: and detecting whether the application program to which the data packet belongs is a specified application program.
Step S330: and if the application program to which the data packet belongs is not detected to be the designated application program, processing the data packet to obtain a target resource file, and storing the target resource file in a persistent storage area.
It should be noted that the storage of the electronic device is limited, and if all the application programs installed in the electronic device directly store all the resource files after the data packet processing in the memory, there may be a shortage of memory resources. As a mode, the electronic device may select a target resource file obtained after processing a data packet of a part of the application program to be directly stored in the memory.
In this case, as a mode, a data table in which the representation operation resource file is directly stored in the memory may be configured in the electronic device. When the electronic device starts an application program, it may be determined whether the name of the started application program exists in the data table in which the representation running resource file is directly stored in the memory, if so, the data packet representing the started application program may be directly stored in the memory after being processed to obtain the resource file, and if not, the resource file obtained after being processed by the electronic device to the data packet of the application program may be stored in the persistent storage area first, and when a certain resource file needs to be used, the required resource file is loaded from the persistent storage area into the memory and then read from the memory.
For example, if the application program a, the application program B, and the application program C are stored in the data table, after the electronic device detects that the application program a is started, it is detected that the name of the application program a is in the data table in which the representation running resource file is directly stored in the memory, then the electronic device obtains a data packet to be run of the application program a from the persistent storage area, processes the data packet to obtain a target resource file, and directly stores the target resource file in the memory. If the electronic device detects that the application program D is started, and detects that the name of the application program D is not in the data table in the memory where the representation running resource file is directly stored, the resource file obtained by processing the data packet of the application program D by the electronic device is stored in the persistent storage area, and when a certain resource file needs to be used, the required resource file is loaded from the persistent storage area to the memory, and then read from the memory.
The data table directly stored in the memory for the representation operation resource file may specifically include which application programs can be determined by the electronic device according to various situations.
For example, the electronic device may add a security-critical application to the data table as a way. Further, the electronic device may add an application to the data table that occupies memory less than the target value. Of course, the application names in the data table may be manually configured by the user as well. For example, the electronic device may configure a management interface, display all the applications installed in the electronic device in a page-turning or paging manner in the management interface, and each application may correspond to a switch, and when a user triggers the switch to be in an on state, characterize that the electronic device may directly store a target resource file obtained by processing a data packet of the application in the memory.
Step S340: and transferring the target resource file in the persistent storage area to a memory for reading.
Step S350: and if the application program to which the data packet belongs is detected to be the designated application program, processing the data packet to obtain a target resource file, and directly storing the target resource file in a memory.
Step S360: and reading the target resource file from the memory.
According to the data processing method, the electronic equipment acquires the data packet to be operated from the persistent storage area, judges whether the application program to which the data packet belongs is the designated application program, processes the data packet to obtain the target resource file if the application program is the designated application program, directly stores the target resource file in the memory, and further reads the target resource file from the memory. Therefore, the target resource file included in the data packet obtained after the data packet is processed is directly stored in the memory, so that the target resource file is not easy to acquire by other programs, the safety of the target resource file is improved, and the safety of the data packet is improved.
Referring to fig. 6, a data processing apparatus 400 provided in the present application runs on an electronic device, and the apparatus 400 includes: a data acquisition unit 410, a data processing unit 420, and a data reading unit 430.
And a data obtaining unit 410, configured to obtain a data packet to be executed from the persistent storage area.
As one mode, the data acquisition unit is further configured to: sending a data packet acquisition request to a server; and storing the data packet returned by the server in a persistent storage area.
And the data processing unit 420 is configured to process the data packet to obtain a target resource file, and directly store the target resource file in the memory.
A data reading unit 430, configured to read the target resource file from the memory.
According to the data processing device, the electronic equipment obtains the data packet to be operated from the persistent storage area, then processes the data packet to obtain the target resource file, directly stores the target resource file in the memory, and then reads the target resource file from the memory. Therefore, the target resource file included in the data packet obtained after the data packet is processed is directly stored in the memory, so that the target resource file is not easy to acquire by other programs, the safety of the target resource file is improved, and the safety of the data packet is improved.
Referring to fig. 7, a data processing apparatus 500 provided by the present application, operating on an electronic device, includes: a data acquisition unit 510, a data processing unit 520, a parameter detection unit 530, a target file identification unit 540, and a data reading unit 550.
A data obtaining unit 510, configured to obtain a data packet to be executed from the persistent storage area.
And a data processing unit 520, configured to process the data packet to obtain a processed resource file.
As a mode, the step of the data processing unit 520, specifically configured to process the data packet to obtain the target resource file, includes at least one of the following steps: decompressing the data packet; and carrying out decryption processing on the data packet.
Optionally, the data processing unit 520 is configured to, if it is identified that the data packet to be operated is a compressed and unencrypted data packet, perform decompression processing on the data packet to be operated to obtain a target resource file.
Optionally, the data processing unit 520 is configured to, if it is identified that the data packet to be operated is an encrypted and uncompressed data packet, perform decryption processing on the data packet to be operated to obtain the target resource file.
Optionally, the data processing unit 520 is configured to, if it is identified that the data packet to be operated is a compressed and encrypted data packet, perform decompression processing and encryption processing on the data packet to be operated to obtain a target resource file.
A parameter detecting unit 530, configured to detect a target parameter of the processed resource file.
And the target file identification unit 540 is configured to use a file with a target parameter meeting a target condition as a target resource file, and directly store the target resource file in the memory.
By way of example, the target condition includes at least one of the following conditions: the data type is a resource file of a specified type; and the resource file occupies a storage space smaller than the designated space.
A data reading unit 550, configured to read the target resource file from a memory.
According to the data processing device, the electronic equipment obtains the data packet to be operated from the persistent storage area, then processes the data packet, obtains the target resource file based on the target parameters of the processed resource file, directly stores the target resource file in the memory, and then reads the target resource file from the memory. Therefore, the target resource file included in the data packet obtained after the data packet is processed is directly stored in the memory, so that the target resource file is not easy to acquire by other programs, the safety of the target resource file is improved, and the safety of the data packet is improved.
Referring to fig. 8, a data processing apparatus 600 provided by the present application, operating on an electronic device, includes: a data acquisition unit 610, a program judgment unit 620, a data processing unit 630, and a data reading unit 640.
A data obtaining unit 610, configured to obtain a data packet to be executed from the persistent storage area.
And a program judging unit 620, configured to detect whether the application program to which the data packet belongs is a designated application program.
The data processing unit 630 is configured to detect that the application program to which the data packet belongs is a designated application program, process the data packet to obtain a target resource file, and directly store the target resource file in a memory.
The data processing unit 630 is further configured to, if it is detected that the application program to which the data packet belongs is not the designated application program, process the data packet to obtain a target resource file, and store the target resource file in a persistent storage area.
A data reading unit 640, configured to read the target resource file from the memory.
According to the data processing device, the data packet to be operated is obtained from the persistent storage area, whether the application program to which the data packet belongs is the designated application program or not is judged, if the application program is the designated application program, the data packet is processed to obtain the target resource file, the target resource file is directly stored in the memory, and then the target resource file is read from the memory. Therefore, the target resource file included in the data packet obtained after the data packet is processed is directly stored in the memory, so that the target resource file is not easy to acquire by other programs, the safety of the target resource file is improved, and the safety of the data packet is improved.
It should be noted that, as will be clear to those skilled in the art, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In several embodiments provided herein, the coupling of modules to each other may be electrical. In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
To sum up, according to the data processing method, the data processing device, the electronic device and the storage medium provided by the application, the electronic device obtains the data packet to be operated from the persistent storage area, processes the data packet to obtain the target resource file, directly stores the target resource file in the memory, and then reads the target resource file from the memory. Therefore, the target resource file included in the data packet obtained after the data packet is processed is directly stored in the memory, so that the target resource file is not easy to be obtained by other programs, the safety of the target resource file is improved, and the safety of the data packet is improved.
An electronic device provided by the present application will be described below with reference to fig. 9.
Referring to fig. 9, based on the data processing method and apparatus, another electronic device 100 capable of executing the data processing method is further provided in the embodiment of the present application. The electronic device 100 includes one or more processors 102 (only one shown), a memory 104, a network module 106, and a location acquisition module 108 coupled to each other. The memory 104 stores programs that can execute the content of the foregoing embodiments, and the processor 102 can execute the programs stored in the memory 104.
Processor 102 may include one or more processing cores, among other things. The processor 102 interfaces with various components throughout the electronic device 100 using various interfaces and circuitry to perform various functions of the electronic device 100 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 104 and invoking data stored in the memory 104. Alternatively, the processor 102 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 102 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 102, but may be implemented by a communication chip.
The Memory 104 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 104 may be used to store instructions, programs, code sets, or instruction sets. The memory 104 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The data storage area may also store data created by the electronic device 100 during use (e.g., phone book, audio-video data, chat log data), and the like.
In one way, the network module 106 may be a radio frequency module, which is configured to receive and transmit electromagnetic waves, and to perform interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices, such as an audio playing device. The radio frequency module may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. Alternatively, the network module 106 may be a network adapter that can communicate with various networks, such as the internet, an intranet, a wireless network, or with other devices across a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network.
Referring to fig. 10, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 800 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-volatile computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (20)

  1. A data processing method is applied to an electronic device, and the method comprises the following steps:
    the electronic equipment acquires a data packet to be operated from the persistent storage area;
    processing the data packet to obtain a target resource file, and directly storing the target resource file in a memory;
    and reading the target resource file from the memory.
  2. The method according to claim 1, wherein the step of processing the data packet to obtain a target resource file, and storing the target resource file in a memory comprises:
    processing the data packet to obtain a processed resource file;
    detecting target parameters of the processed resource file;
    and taking the file with the target parameter meeting the target condition as a target resource file.
  3. The method of claim 2, wherein the target condition comprises at least one of:
    the data type is a resource file of a specified type;
    and the resource file occupies a storage space smaller than the designated space.
  4. The method according to any one of claims 1 to 3, wherein the step of processing the data packet to obtain the target resource file comprises at least one of the following steps:
    decompressing the data packet; and
    and carrying out decryption processing on the data packet.
  5. The method of claim 4, wherein the step of processing the data packet to obtain the target resource file comprises:
    and if the data packet to be operated is identified to be a compressed and unencrypted data packet, carrying out decompression processing on the data packet to be operated to obtain a target resource file.
  6. The method of claim 4, wherein the step of processing the data packet to obtain the target resource file comprises:
    and if the data packet to be operated is identified to be an encrypted and uncompressed data packet, decrypting the data packet to be operated to obtain a target resource file.
  7. The method of claim 4, wherein the step of processing the data packet to obtain the target resource file comprises:
    and if the data packet to be operated is identified to be a compressed and encrypted data packet, carrying out decompression processing and encryption processing on the data packet to be operated to obtain a target resource file.
  8. The method according to any one of claims 1 to 7, wherein the step of processing the data packet to obtain a target resource file and storing the target resource file in the memory further comprises:
    detecting whether the application program to which the data packet belongs is a designated application program;
    and if the application program to which the data packet belongs is detected to be the designated application program, executing the data packet to process to obtain a target resource file, and storing the target resource file in a memory.
  9. The method of claim 8, further comprising:
    and if the application program to which the data packet belongs is not detected to be the designated application program, processing the data packet to obtain a target resource file, and storing the target resource file in the persistent storage area.
  10. The method according to any one of claims 1-9, wherein the step of reading the target resource file from the memory further comprises:
    and deleting the target resource file from the memory after the target condition is detected to be met.
  11. The method of claim 10, wherein the target conditions comprise:
    detecting that the application program to which the data packet belongs is closed.
  12. The method of claim 10, wherein the target conditions comprise:
    and detecting that the application program to which the data packet belongs is closed and the remaining memory space of the memory is less than a specified value.
  13. The method of any of claims 1-12, wherein the step of the electronic device obtaining the data packet to be run from the persistent storage area is preceded by the step of:
    the electronic equipment sends a data packet acquisition request to a server;
    and storing the data packet returned by the server in a persistent storage area.
  14. A data processing apparatus, operable on an electronic device, the apparatus comprising:
    the data acquisition unit is used for acquiring a data packet to be operated from the persistent storage area;
    the data processing unit is used for processing the data packet to obtain a target resource file and directly storing the target resource file in the memory;
    and the data reading unit is used for reading the target resource file from the memory.
  15. The apparatus of claim 14, wherein the data processing unit comprises:
    the data processing unit is used for processing the data packet to obtain a processed resource file;
    the parameter detection unit is used for detecting the target parameters of the processed resource file;
    and the target file identification unit is used for taking the file with the target parameter meeting the target condition as the target resource file.
  16. The apparatus of claim 15, wherein the target condition comprises at least one of:
    the data type is a resource file of a specified type;
    and the resource file occupies a storage space smaller than the designated space.
  17. The apparatus according to any one of claims 14 to 16, wherein the data processing unit, specifically configured to process the data packet to obtain the target resource file, includes at least one of the following steps:
    decompressing the data packet; and
    and carrying out decryption processing on the data packet.
  18. The apparatus according to any of claims 14-17, wherein the data acquisition unit is further configured to:
    sending a data packet acquisition request to a server;
    and storing the data packet returned by the server in a persistent storage area.
  19. An electronic device comprising one or more processors and memory;
    one or more programs stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-13.
  20. A computer-readable storage medium, having program code stored therein, wherein the method of any of claims 1-13 is performed when the program code is run.
CN201880098464.7A 2018-11-21 2018-11-21 Data processing method, data processing device, electronic equipment and storage medium Pending CN112823336A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/116803 WO2020103057A1 (en) 2018-11-21 2018-11-21 Data processing method, apparatus, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN112823336A true CN112823336A (en) 2021-05-18

Family

ID=70773596

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880098464.7A Pending CN112823336A (en) 2018-11-21 2018-11-21 Data processing method, data processing device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN112823336A (en)
WO (1) WO2020103057A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111710051A (en) * 2020-06-17 2020-09-25 京东方科技集团股份有限公司 Human body model data processing method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819702A (en) * 2012-07-19 2012-12-12 腾讯科技(深圳)有限公司 File encryption operation method and file encryption operation system
CN103605577A (en) * 2013-12-04 2014-02-26 广州博冠信息科技有限公司 Cross-process resource sharing method and equipment
CN105227565A (en) * 2015-10-13 2016-01-06 北京娜迦信息科技发展有限公司 Anti-reversing for Android system cracks the method and apparatus of shared object file
CN106293852A (en) * 2016-08-19 2017-01-04 北京奇虎科技有限公司 A kind of method and apparatus of the resource file reinforcing installation kit
CN106598584A (en) * 2016-12-08 2017-04-26 广州华多网络科技有限公司 Resource file processing method, apparatus and system
CN106709282A (en) * 2016-06-28 2017-05-24 腾讯科技(深圳)有限公司 Resource file decryption method and device
CN107066298A (en) * 2017-04-18 2017-08-18 北京元心科技有限公司 Method and device for running application program without traces
CN107292134A (en) * 2017-05-27 2017-10-24 北京思特奇信息技术股份有限公司 It is a kind of to prevent Android from applying by the application reinforcement means and system of decompiling

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101626391A (en) * 2008-07-08 2010-01-13 盛大计算机(上海)有限公司 Method for processing resource of network game client
US8892876B1 (en) * 2012-04-20 2014-11-18 Trend Micro Incorporated Secured application package files for mobile computing devices
CN106843880A (en) * 2017-01-20 2017-06-13 广东欧珀移动通信有限公司 The method for customizing of Android installation kits APK, device and server

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819702A (en) * 2012-07-19 2012-12-12 腾讯科技(深圳)有限公司 File encryption operation method and file encryption operation system
CN103605577A (en) * 2013-12-04 2014-02-26 广州博冠信息科技有限公司 Cross-process resource sharing method and equipment
CN105227565A (en) * 2015-10-13 2016-01-06 北京娜迦信息科技发展有限公司 Anti-reversing for Android system cracks the method and apparatus of shared object file
CN106709282A (en) * 2016-06-28 2017-05-24 腾讯科技(深圳)有限公司 Resource file decryption method and device
CN106293852A (en) * 2016-08-19 2017-01-04 北京奇虎科技有限公司 A kind of method and apparatus of the resource file reinforcing installation kit
CN106598584A (en) * 2016-12-08 2017-04-26 广州华多网络科技有限公司 Resource file processing method, apparatus and system
CN107066298A (en) * 2017-04-18 2017-08-18 北京元心科技有限公司 Method and device for running application program without traces
CN107292134A (en) * 2017-05-27 2017-10-24 北京思特奇信息技术股份有限公司 It is a kind of to prevent Android from applying by the application reinforcement means and system of decompiling

Also Published As

Publication number Publication date
WO2020103057A1 (en) 2020-05-28

Similar Documents

Publication Publication Date Title
CN108521608B (en) Video file processing method and device, terminal and storage medium
CN106909855B (en) File hiding method and device
CN106227585B (en) Application program starting method, device and equipment
CN113055451B (en) Resource downloading method and device, electronic equipment and storage medium
CN106155789B (en) Application freezing method and mobile terminal
CN105138376A (en) Mixed model application, webpage resource upgrading method thereof, mobile terminal and system
CN106453572A (en) Method and system for synchronizing images based on cloud server
WO2021138823A1 (en) Information pushing method and apparatus, server, and storage medium
CN108984339B (en) Data recovery method and related product
CN114223177A (en) Access control method, device, server and computer readable medium
US10938773B2 (en) Method and apparatus for synchronizing contact information and medium
CN103716340B (en) Terminal device and information processing method
CN112823349A (en) Data processing method, data processing device, electronic equipment and storage medium
CN112823336A (en) Data processing method, data processing device, electronic equipment and storage medium
CN104426685A (en) Information management method and apparatus
CN108874591B (en) Document processing method and related product
WO2020103060A1 (en) Data processing method and apparatus, system, server, and electronic device
CN111338710A (en) Application program control method and device, electronic equipment and storage medium
CN107168648B (en) File storage method and device and terminal
CN109766347B (en) Data updating method, device, system, computer equipment and storage medium
CN116610648A (en) Log storage method and device, electronic equipment and storage medium
CN110704157B (en) Application starting method, related device and medium
CN114270309A (en) Resource acquisition method and device and electronic equipment
CN108874586B (en) Data recovery method and related product
CN113918060A (en) Application management method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination