CN112306963A - Resource file loading method and device and computer readable storage medium - Google Patents

Resource file loading method and device and computer readable storage medium Download PDF

Info

Publication number
CN112306963A
CN112306963A CN201910695633.1A CN201910695633A CN112306963A CN 112306963 A CN112306963 A CN 112306963A CN 201910695633 A CN201910695633 A CN 201910695633A CN 112306963 A CN112306963 A CN 112306963A
Authority
CN
China
Prior art keywords
resource file
file
encrypted
configuration file
compressed
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
CN201910695633.1A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910695633.1A priority Critical patent/CN112306963A/en
Publication of CN112306963A publication Critical patent/CN112306963A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6209Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a resource file loading method, a device and a computer readable storage medium, comprising the following steps: acquiring a target configuration file through a configuration file server; determining a content distribution server based on the target profile; downloading an encrypted and compressed resource file through the content distribution server, wherein the encrypted and compressed resource file is a resource file to be loaded after encryption and compression; and loading the encrypted and compressed resource file. The configuration file and the resource file are respectively stored in different servers, so that a client can directly obtain the configuration file and the resource file without waiting for an audit result of the resource file, the resource file is encrypted and compressed, and information related to decompression and decryption is required to be obtained through the configuration file to load the resource file, so that even if the resource file is maliciously obtained, only encrypted messy codes can be obtained, and the safety of the resource file is ensured.

Description

Resource file loading method and device and computer readable storage medium
Technical Field
The invention relates to the technical field of application management, in particular to a resource file loading method and device and a computer readable storage medium.
Background
With the popularization of more and more mobile phones, people use several or even more than ten application program APP products every day. For some APP products of a specific mobile phone, the period of product audit sometimes becomes very unfixed, thereby reducing the user experience. For functions that frequently need to be developed iteratively, it is common practice for the details page to be implemented by opening a link through the Web. The disadvantage of this approach is that the time for the Web to load pages can vary depending on the network environment. Even in a case where the network environment is very good, it takes approximately 1 second to turn on. If the environment of other networks is not good, the time consumption is longer. Such time is fatal to the user using the function in terms of experience. Therefore, how to use an effective scheme or means to help solve the problem of long time consumption becomes a problem which is keenly solved by many people.
Disclosure of Invention
The invention provides a resource file loading method, a resource file loading device and a computer readable storage medium, and provides a scheme for effectively updating a resource file and safely loading the resource file to an application program. The invention is realized by the following technical scheme:
in one aspect, the present invention provides a resource file loading method, including:
acquiring a target configuration file through a configuration file server;
determining a content distribution server based on the target profile;
downloading an encrypted and compressed resource file through the content distribution server, wherein the encrypted and compressed resource file is a resource file to be loaded after encryption and compression;
and loading the encrypted and compressed resource file.
In another aspect, the present invention provides a method for loading a resource file, including:
sending the target configuration file to a configuration file server;
encrypting the resource file to be loaded to obtain an encrypted resource file;
compressing the encrypted resource file to obtain an encrypted and compressed resource file;
and sending the encrypted and compressed resource file to a content distribution server so that a client downloads the encrypted and compressed resource file to the content distribution server, wherein the content distribution server is determined by the client according to a configuration file acquired from the configuration file server.
In another aspect, the present invention provides a resource file loading apparatus, including:
the target configuration file acquisition module is used for acquiring a target configuration file through a configuration file server;
a first determining module for determining a content distribution server based on the target profile;
the downloading module is used for downloading the encrypted and compressed resource file through the content distribution server, wherein the encrypted and compressed resource file is a resource file to be loaded after encryption and compression;
and the loading module is used for loading the encrypted and compressed resource file.
In some embodiments, the target profile acquisition module comprises:
and the acquisition unit is used for responding to the triggering of the cloud instruction to acquire the target configuration file.
In some embodiments, the first determining module comprises:
the configuration file decompression unit is used for decompressing the target configuration file to obtain a decompressed configuration file;
the analysis unit is used for analyzing the decompressed configuration file to obtain configuration file information, wherein the configuration file information comprises a download address, a decryption key and decompression information of the encrypted and compressed resource file;
and the determining unit is used for determining the content distribution server according to the download address of the encrypted and compressed resource file.
In some embodiments, the load module comprises:
the resource file decompression unit is used for decompressing the encrypted and compressed resource file to obtain an encrypted resource file;
the resource file decryption unit is used for decrypting the encrypted resource file to obtain a resource file to be loaded;
the storage unit is used for storing the resource file to be loaded into a memory;
and the loading unit is used for loading the resource file to be loaded from the memory.
In another aspect, the present invention provides a resource file loading apparatus, including:
the configuration file issuing module is used for issuing the target configuration file to the configuration file server;
the encryption module is used for encrypting the resource file to be loaded to obtain an encrypted resource file;
the resource file compression module is used for compressing the encrypted resource file to obtain an encrypted and compressed resource file;
and the resource file issuing module is used for issuing the encrypted and compressed resource file to a content distribution server so as to enable a client to download the encrypted and compressed resource file to the content distribution server, and the content distribution server is determined by the client according to the configuration file acquired from the configuration file server.
In some embodiments, the apparatus further comprises:
the generating module is used for generating a configuration file based on the configuration file information;
and the configuration file compression module is used for compressing the configuration file to obtain a target configuration file.
In some embodiments, the configuration file issuing module includes:
the release information determining module is used for determining the release information of the configuration file according to the content of the encrypted and compressed resource file and the characteristic information of the area where the client is located, wherein the release information comprises the area and the quantity of the encrypted and compressed resource file;
and the configuration file issuing unit is used for issuing the target configuration file to a corresponding configuration file server based on the issuing information.
In some embodiments, the apparatus further comprises:
and the triggering module is used for responding to the triggering of the instruction with the custom format and sending the encrypted and compressed resource file to the client.
In some embodiments, the configuration file issuing module further includes:
and the configuration file issuing unit is used for issuing the target configuration file to the configuration file server through the encryption channel.
On the other hand, the invention provides a system based on resource file loading, which comprises a client, a management end, a configuration file server and a content distribution server;
the management terminal is used for sending the target configuration file to the configuration file server; the system comprises a processor, a storage unit, a data processing unit and a data processing unit, wherein the processor is used for encrypting a resource file to be loaded to obtain an encrypted resource file; the resource file encryption device is used for compressing the encrypted resource file to obtain an encrypted and compressed resource file; the system is used for sending the encrypted and compressed resource file to a content distribution server;
the client is used for acquiring a target configuration file through the configuration file server; for determining a content distribution server based on the target profile; a resource file for downloading the encrypted and compressed resource file through the content distribution server; for loading the encrypted and compressed resource file.
In another aspect, the present invention provides a resource file loading apparatus, including a processor and a memory, where the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions, and the at least one instruction, the at least one program, the set of codes, or the set of instructions is loaded and executed by the processor to implement the resource file loading method.
In another aspect, the present invention provides a computer readable storage medium having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, which is loaded and executed by a processor to implement the resource file loading method as described above.
The invention provides a resource file loading method, a resource file loading device and a computer readable medium, and a content distribution server stored in a resource file is determined through a configuration file acquired from a configuration file server, so that an encrypted and compressed resource file stored in the content distribution server can be acquired through the content distribution server, and the encrypted and compressed resource file is further used for loading. The configuration file and the resource file are respectively stored in different servers, so that a client can directly acquire the configuration file and the resource file without waiting for an audit result of the resource file, the resource file is encrypted and compressed, and information related to decompression and decryption is acquired through the configuration file to load the resource file, so that only encrypted messy codes can be acquired even if the resource file is acquired maliciously, and the safety of the resource file is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a schematic diagram of a system for loading based on resource files according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a resource file loading method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for determining a content distribution server according to a configuration file according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for loading an encrypted and compressed resource file according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of another resource file loading method according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an application architecture for loading a resource file according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a pre-escape configuration file according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of an escaped configuration file according to an embodiment of the present invention;
FIG. 9 is a flowchart illustrating a basic process of loading a resource detail page according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a resource file loading apparatus according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of another resource file loading apparatus according to an embodiment of the present invention;
fig. 12 is a hardware structural diagram of an apparatus for implementing the method provided by the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The resource file loading method of the present invention is described below, and the present specification provides the method operation steps as described in the embodiment or the flowchart, but may include more or less operation steps based on the conventional or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. In practice, the system or server product may be implemented in a sequential or parallel manner (e.g., parallel processor or multi-threaded environment) according to the embodiments or methods shown in the figures.
Fig. 1 is a schematic diagram of a system for loading based on a resource file according to an embodiment of the present specification. As shown in fig. 1, the system includes: client 01, configuration server 02, content distribution server 03, and management side 04.
Specifically, the client 01 is a device capable of connecting to a wireless network, and may include: the physical devices may also include software running in the physical devices, such as applications, and the like. The client 01 may be a mobile terminal of a mobile user.
The configuration server 02 and the content distribution server 03 may be distributed servers or a server cluster composed of a plurality of servers. In practical applications, the configuration server 02 and the content distribution server 03 may exist independently or may be integrated on the same server, and this description is not limited herein. The configuration server 02 and the content distribution server 03 may also be cloud servers, and cloud servers (ECSs) are computing services that are simple, efficient, safe, reliable, and elastically scalable in processing capability. The management mode is simpler and more efficient than that of a physical server.
The management terminal 04 may be a server with a display terminal, or may be a display platform, and is used to implement functions such as packaging, encryption, and instruction setting.
Aiming at the problem that the Web page is too long in loading time, the existing solution for dynamic layout provides a solution based on a scripting language JavaScript, but the existing solution is rarely mentioned for a Bundle file of JS and the loading safety of the Bundle file. Most of the prior art schemes directly include a resource bundle file to be loaded in a directory of an App or directly store the file in a local resource directory in a plaintext after downloading. The biggest drawbacks of operating in this way are: there is no guarantee of security for the resource files updated locally, and this hidden security problem is sometimes immeasurable for financial products. The dynamic layout refers to dynamically modifying the display layout of the graphical user interface UI according to the content of the page details without releasing a new terminal version. Seamless experience switching from JS to Native can be realized. The display of all pages is automatically completed by a program without frequently releasing versions. The Bundle file refers to a file generated by packaging part of resource files (similar to scripts,. CSS,. js files) by script file packaging, and is mainly convenient for integration or downloading into a terminal.
Therefore, the embodiments of the present specification propose a scheme based on end-pipe-cloud systematics based on terminal characteristics. The process comprises a series of processes of encryption, packaging, CDN uploading/downloading, unpacking and decryption, the safety and the performance of the method exceed those of similar products, and the method can well meet the actual application requirements of services. The CDN is called a Content Delivery Network, that is, a Content Delivery Network. The CDN is a content delivery network constructed on the network, and by means of edge servers deployed in various places, a user can obtain required content nearby through functional modules of a central platform, such as load balancing, content delivery, scheduling and the like, so that network congestion is reduced, and the access response speed and hit rate of the user are improved. The key technology of the CDN is mainly content storage and distribution technology.
Fig. 2 is a schematic flowchart of a resource file loading method provided in an embodiment of the present invention, and as shown in fig. 2, the method specifically includes:
s201: and acquiring the target configuration file through the configuration file server.
In practical applications, the obtaining of the target configuration file by the configuration file server includes: and acquiring the target configuration file in response to the triggering of the cloud instruction. The client is automatically linked to the cloud server in an online state, the cloud server issues an instruction, and the client executes the instruction.
The generation process of the target configuration file comprises the following steps: the management terminal generates a configuration file based on the configuration file information; and compressing the configuration file to obtain a target configuration file.
Before the target configuration file is acquired by the configuration file server, the management terminal determines the release information of the configuration file according to the content of the encrypted and compressed resource file and the characteristic information of the area where the client is located, wherein the release information comprises the area and the quantity of the encrypted and compressed resource file; determining a corresponding profile server based on the release information; and sending the target configuration file to the corresponding configuration file server.
And the management terminal issues the target configuration file to a configuration file server through an encryption channel.
S203: determining a content distribution server based on the target profile.
S205: and downloading the encrypted and compressed resource file through the content distribution server, wherein the encrypted and compressed resource file is the resource file to be loaded after encryption and compression.
The content distribution server receives the encrypted compressed resource file in response to a trigger of an instruction in a custom format before the encrypted compressed resource file is downloaded by the content distribution server.
S207: and loading the encrypted and compressed resource file.
In the embodiment of the present specification, the resource file is encrypted and compressed, and then is sent to the content distribution server, and the target content distribution server is determined according to the configuration file in the configuration file server, so that even if the resource file is maliciously acquired, the resource file cannot be smoothly loaded because the resource file is encrypted, and thus the security in the resource file loading process is improved. And moreover, the resource files are compressed, transmitted and stored, so that the transmission bandwidth and the space occupied by storage are reduced.
Fig. 3 is a schematic flowchart of a method for determining a content distribution server according to a configuration file according to an embodiment of the present invention, as shown in fig. 3, specifically including:
s301: and decompressing the target configuration file to obtain a decompressed configuration file.
It will be appreciated that the profile stored in the profile server is compressed, thereby reducing transmission bandwidth and storage space.
S303: and analyzing the decompressed configuration file to obtain configuration file information, wherein the configuration file information comprises a download address, a decryption key and decompression information of the encrypted and compressed resource file.
S305: and determining a content distribution server according to the download address of the encrypted and compressed resource file.
Fig. 4 is a schematic flowchart of a method for loading an encrypted and compressed resource file according to an embodiment of the present invention, as shown in fig. 4, specifically including:
s401: and decompressing the encrypted and compressed resource file to obtain an encrypted resource file.
S403: and decrypting the encrypted resource file to obtain the resource file to be loaded.
S405: and storing the resource file to be loaded into a memory.
S407: and loading the resource file to be loaded from the memory.
Specifically, after the resource file to be loaded is loaded from the memory by the client, the resource file to be loaded is automatically deleted after a preset time, so that the risk that the resource file in a plaintext form is maliciously acquired and loaded is reduced.
Fig. 5 is a schematic flowchart of another resource file loading method provided in the embodiment of the present invention, and as shown in fig. 5, the method specifically includes:
s501: and sending the target configuration file to a configuration file server.
Wherein, the target configuration file can be obtained by the following steps: generated based on the profile information; and compressing the configuration file to obtain a target configuration file.
In some embodiments, said issuing the target profile to the profile server includes: determining the release information of the configuration file according to the content of the encrypted and compressed resource file and the characteristic information of the area where the client is located, wherein the release information comprises the area and the number of the encrypted and compressed resource file release; and issuing the target configuration file to a corresponding configuration file server based on the issuing information. For example, if the content of the resource file is related to shanghai, the configuration file may be sent to a configuration file server dedicated to sending the resource information to the shanghai client, so that the shanghai client can obtain the corresponding resource file according to the configuration information.
In some embodiments, said issuing the target profile to the profile server includes: and issuing the target configuration file to a configuration file server through an encryption channel. The configuration file is issued through the encryption channel, and the safety of the configuration file is guaranteed.
S503: and encrypting the resource file to be loaded to obtain the encrypted resource file.
S505: and compressing the encrypted resource file to obtain the encrypted and compressed resource file.
Through steps S503 to S505, the resource file is encrypted and then compressed for transmission and storage, so that even if a malicious resource file acquirer acquires and decompresses the compressed resource file, the resource file is encrypted and then compressed, which results in that the encrypted resource file cannot be loaded.
S507: and sending the encrypted and compressed resource file to a content distribution server so that a client downloads the encrypted and compressed resource file to the content distribution server, wherein the content distribution server is determined by the client according to a configuration file acquired from the configuration file server.
After the sending the encrypted and compressed resource file to be loaded to the content distribution server, the method further includes: and responding to the trigger of the instruction with the custom format, and sending the encrypted and compressed resource file to the client. The instruction is configured in a non-universal self-defined format, so that even if the instruction is acquired maliciously, the instruction cannot be identified, the safety of the instruction is improved, and the safety in the process of loading the resource file is also ensured.
As shown in fig. 6, the present specification provides an application architecture schematic diagram of resource file loading, and designs a solution for resource file publishing and encrypted pulling by using a cloud instruction and a CDN based on a code security consideration, so as to ensure the security of a JS Bundle file during use, where all decrypted data is only stored in a memory. And after the bundle file is successfully loaded, removing the bundle file in the memory.
The basic process of the resource file loading method as shown in fig. 6 is described as follows:
1. and (3) local file generation: and (3) locally packaging a file to be issued by the Web front end, such as a JS + CSS file, through a Vue. The method comprises the steps of configuring corresponding plist files (including version information, supported system versions, effective dates of resource files, supported bundle list information and the like), and generating encrypted resource files and vueconfig configuration files after encryption and compression (completed by a local packaging tool).
2. Configuring a release platform and uploading resource files: and uploading the encrypted resource file generated in the first step to the CDN, and verifying by the MD 5. The generated configuration files are uploaded to a configuration file platform, and the region, the number and the like of the configuration file can be set like the common configuration file publishing. Among them, the MD5 Message Digest Algorithm (english: MD5 Message-Digest Algorithm), a widely used cryptographic hash function, can generate a 128-bit (16-byte) hash value (hash value) to ensure the integrity and consistency of information transmission.
3. Pulling the configuration file and downloading the resource file: when the client side App is started, the client side App receives the configuration file information of the current version, and can obtain the information such as the download address, the decompression key and the decryption key of the bundle file by analyzing the configuration file. And directly downloading the bundle file to be updated through the download address, and preloading.
4. Configuration file cloud instructions and format descriptions:
(1) cloud instructions: the configuration file cloud instruction adopts a custom format and a non-universal format.
(2) Details of the configuration file: fig. 7 is a schematic diagram of a configuration file before escaping, the content of the configuration file before escaping cannot be directly loaded, and fig. 8 is a schematic diagram of the configuration file after escaping. The configuration file is primarily based on considerations of supporting system, date, downloading URL address, Zip compression and Bundle encryption/decryption symmetric keys, setting, loading/unloading resource files, MD5 verification, etc. The data exist in a ciphertext mode in the downloading and using process.
5. Information detail page loading logic
Since the information detail page can be loaded through Vue, the loading process is more complicated than before. Fig. 9 is a schematic flowchart of a basic resource detail page loading process provided by an embodiment of the present specification.
The Feed stream is a personalized content recommendation mode, Vue is a set of progressive JavaScript framework for constructing a user interface, and Item is an Item. In general, if the cloud instruction is not opened, no resource file is available, and the resource loading fails, the information detail page is opened through the Webview (Web browser), so that the user experience of the original information is not influenced to serve as a solution to the background.
An embodiment of the present invention further provides a resource file loading apparatus, as shown in fig. 10, the apparatus includes:
a target configuration file obtaining module 1001, configured to obtain a target configuration file through a configuration file server;
a first determining module 1003 for determining a content distribution server based on the target profile;
a downloading module 1005, configured to download, by the content distribution server, an encrypted and compressed resource file, where the encrypted and compressed resource file is a resource file to be loaded after being encrypted and compressed;
a loading module 1007, configured to load the encrypted and compressed resource file.
In some embodiments, the target profile acquisition module comprises:
and the acquisition unit is used for responding to the triggering of the cloud instruction to acquire the target configuration file.
In some embodiments, the first determining module comprises:
the configuration file decompression unit is used for decompressing the target configuration file to obtain a decompressed configuration file;
the analysis unit is used for analyzing the decompressed configuration file to obtain configuration file information, wherein the configuration file information comprises a download address, a decryption key and decompression information of the encrypted and compressed resource file;
and the determining unit is used for determining the content distribution server according to the download address of the encrypted and compressed resource file.
In some embodiments, the load module comprises:
the resource file decompression unit is used for decompressing the encrypted and compressed resource file to obtain an encrypted resource file;
the resource file decryption unit is used for decrypting the encrypted resource file to obtain a resource file to be loaded;
the storage unit is used for storing the resource file to be loaded into a memory;
and the loading unit is used for loading the encrypted and compressed resource file from the memory.
An embodiment of the present invention further provides another resource file loading apparatus, as shown in fig. 11, the apparatus includes:
a configuration file issuing module 1101, configured to issue a target configuration file to a configuration file server;
the encryption module 1103 is configured to encrypt the resource file to be loaded to obtain an encrypted resource file;
a resource file compression module 1105, configured to compress the encrypted resource file to obtain an encrypted and compressed resource file;
the resource file issuing module 1107 is configured to issue the encrypted and compressed resource file to a content distribution server, so that a client downloads the encrypted and compressed resource file to the content distribution server, where the content distribution server is determined by the client according to a configuration file obtained from the configuration file server.
In some embodiments, the apparatus further comprises:
the generating module is used for generating a configuration file based on the configuration file information;
and the configuration file compression module is used for compressing the configuration file to obtain a target configuration file.
In some embodiments, the configuration file issuing module includes:
the release information determining module is used for determining the release information of the configuration file according to the content of the encrypted and compressed resource file and the characteristic information of the area where the client is located, wherein the release information comprises the area and the quantity of the encrypted and compressed resource file;
and the configuration file issuing unit is used for issuing the target configuration file to a corresponding configuration file server based on the issuing information.
In some embodiments, the apparatus further comprises:
and the triggering module is used for responding to the triggering of the instruction with the custom format and sending the encrypted and compressed resource file to the client.
In some embodiments, the configuration file issuing module further includes:
and the configuration file issuing unit is used for issuing the target configuration file to the configuration file server through the encryption channel.
The device and method embodiments in the device embodiment described are based on the same inventive concept.
Further, fig. 12 is a schematic hardware structure diagram of an apparatus for implementing the method provided by the embodiment of the present invention, and the apparatus may participate in forming or including the apparatus provided by the embodiment of the present invention. As shown in fig. 12, the device 10 may include one or more (shown as 102a, 102b, … …, 102 n) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 12 is only an illustration and is not intended to limit the structure of the electronic device. For example, device 10 may also include more or fewer components than shown in FIG. 12, or have a different configuration than shown in FIG. 12.
It should be noted that the one or more processors 102 and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuitry may be a single, stand-alone processing module, or incorporated in whole or in part into any of the other elements in the device 10 (or mobile device). As referred to in the embodiments of the application, the data processing circuit acts as a processor control (e.g. selection of a variable resistance termination path connected to the interface).
The memory 104 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the method described in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, so as to implement the above-mentioned role-based privilege management method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which may be connected to device 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of such networks may include wireless networks provided by the communication provider of the device 10. In one example, the transmission device 106 includes a network adapter (NIC) that can be connected to other network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the device 10 (or mobile device).
The invention provides a system based on resource file loading, which comprises a client, a management end, a configuration file server and a content distribution server;
the management terminal is used for sending the target configuration file to the configuration file server; the system comprises a processor, a storage unit, a data processing unit and a data processing unit, wherein the processor is used for encrypting a resource file to be loaded to obtain an encrypted resource file; the resource file encryption device is used for compressing the encrypted resource file to obtain an encrypted and compressed resource file; the system is used for sending the encrypted and compressed resource file to a content distribution server;
the client is used for acquiring a target configuration file through the configuration file server; for determining a content distribution server based on the target profile; a resource file for downloading the encrypted and compressed resource file through the content distribution server; for loading the encrypted and compressed resource file.
The invention also provides a resource file loading device, which comprises a processor and a memory, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to realize the resource file loading method.
In the embodiments of the present disclosure, the memory may be used to store software programs and modules, and the processor executes various functional applications and data processing by operating the software programs and modules stored in the memory. The memory can mainly comprise a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs needed by functions and the like; the storage data area may store data created according to use of the apparatus, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.
The present invention also provides a computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the resource file loading method as described above.
As can be seen from the foregoing embodiments of the resource file loading method, apparatus, and device provided by the present invention, the present invention provides a resource file loading method, apparatus, and computer readable medium, in which a content distribution server stored in a resource file is determined by a configuration file acquired from a configuration file server, so that an encrypted and compressed resource file stored in the content distribution server can be acquired by the content distribution server, and then the encrypted and compressed resource file is used for loading. The configuration file and the resource file are respectively stored in different servers, so that a client can directly acquire the configuration file and the resource file without waiting for an audit result of the resource file, the resource file is encrypted and compressed, and information related to decompression and decryption is acquired through the configuration file to load the resource file, so that only encrypted messy codes can be acquired even if the resource file is acquired maliciously, and the safety of the resource file is ensured.
The terminal characteristic-based systematic scheme provided by the application comprises a series of processes of encryption, packaging, CDN uploading/downloading, unpacking and decryption, and the safety and performance of the scheme exceed those of similar products. The method is actually applied to application program APP products in some operating systems, and can well meet practical application requirements of services. Compared with the traditional method of opening the information detail page by using the Web mode, the access time consumption is reduced sharply. Meanwhile, the safety of the resource file loading process can be ensured.
It should be noted that: the sequence of the embodiments in this specification is merely for description, and does not represent the advantages or disadvantages of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, system and server embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (10)

1. A resource file loading method is characterized by comprising the following steps:
acquiring a target configuration file through a configuration file server;
determining a content distribution server based on the target profile;
downloading an encrypted and compressed resource file through the content distribution server, wherein the encrypted and compressed resource file is a resource file to be loaded after encryption and compression;
and loading the encrypted and compressed resource file.
2. The method of claim 1, wherein obtaining the target profile via the profile server comprises:
and acquiring the target configuration file in response to the triggering of the cloud instruction.
3. The method of claim 1, wherein determining a content distribution server based on the target profile comprises:
decompressing the target configuration file to obtain a decompressed configuration file;
analyzing the decompressed configuration file to obtain configuration file information, wherein the configuration file information comprises a download address, a decryption key and decompression information of the encrypted and compressed resource file;
and determining a content distribution server according to the download address of the encrypted and compressed resource file.
4. The method of any of claims 1-3, wherein the loading the encrypted compressed resource file comprises:
decompressing the encrypted and compressed resource file to obtain an encrypted resource file;
decrypting the encrypted resource file to obtain a resource file to be loaded;
storing the resource file to be loaded into a memory;
and loading the resource file to be loaded from the memory.
5. The method of claim 1, wherein the generating of the target profile comprises:
generating a configuration file based on the configuration file information;
and compressing the configuration file to obtain a target configuration file.
6. The method of claim 1, wherein prior to obtaining the target profile via the profile server, the method further comprises:
determining the release information of the configuration file according to the content of the encrypted and compressed resource file and the characteristic information of the area where the client is located, wherein the release information comprises the area and the number of the encrypted and compressed resource file release;
determining a corresponding profile server based on the release information;
and sending the target configuration file to the corresponding configuration file server.
7. The method according to any one of claims 1-3 and 5-6, wherein before said downloading of the encrypted compressed resource file by the content distribution server, the method further comprises:
and responding to the triggering of the instruction with the custom format, and receiving the encrypted and compressed resource file by the content distribution server.
8. The method of any one of claims 1-3 and 5-6, wherein the target profile is sent to the profile server via an encrypted channel.
9. An apparatus for loading a resource file, the apparatus comprising:
the target configuration file acquisition module is used for acquiring a target configuration file through a configuration file server;
a first determining module for determining a content distribution server based on the target profile;
the downloading module is used for downloading the encrypted and compressed resource file through the content distribution server, wherein the encrypted and compressed resource file is a resource file to be loaded after encryption and compression;
and the loading module is used for loading the encrypted and compressed resource file.
10. A computer-readable storage medium, having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the resource file loading method according to any one of claims 1 to 8.
CN201910695633.1A 2019-07-30 2019-07-30 Resource file loading method and device and computer readable storage medium Pending CN112306963A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910695633.1A CN112306963A (en) 2019-07-30 2019-07-30 Resource file loading method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910695633.1A CN112306963A (en) 2019-07-30 2019-07-30 Resource file loading method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN112306963A true CN112306963A (en) 2021-02-02

Family

ID=74485107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910695633.1A Pending CN112306963A (en) 2019-07-30 2019-07-30 Resource file loading method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112306963A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434884A (en) * 2021-06-30 2021-09-24 青岛海尔科技有限公司 Encryption method and decryption method for configuration file and related devices
CN114528529A (en) * 2022-02-15 2022-05-24 广州经传多赢投资咨询有限公司 Memory xml file encryption method
CN116680725A (en) * 2023-07-27 2023-09-01 天津市测绘院有限公司 Encryption and decryption method and system for ArcGIS compact map tiles

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107645422A (en) * 2017-11-17 2018-01-30 武汉楚鼎信息技术有限公司 A kind of website static resource update method and system and device
CN108415963A (en) * 2018-02-07 2018-08-17 阿里巴巴集团控股有限公司 A kind of page generation method and device
CN108710500A (en) * 2018-05-23 2018-10-26 北京五八信息技术有限公司 Resource issuing method, update method and device
US20190075453A1 (en) * 2017-09-07 2019-03-07 Samsung Electronics Co., Ltd Method and apparatus for supporting transfer of profile between devices in wireless communication system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190075453A1 (en) * 2017-09-07 2019-03-07 Samsung Electronics Co., Ltd Method and apparatus for supporting transfer of profile between devices in wireless communication system
CN107645422A (en) * 2017-11-17 2018-01-30 武汉楚鼎信息技术有限公司 A kind of website static resource update method and system and device
CN108415963A (en) * 2018-02-07 2018-08-17 阿里巴巴集团控股有限公司 A kind of page generation method and device
CN108710500A (en) * 2018-05-23 2018-10-26 北京五八信息技术有限公司 Resource issuing method, update method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434884A (en) * 2021-06-30 2021-09-24 青岛海尔科技有限公司 Encryption method and decryption method for configuration file and related devices
CN113434884B (en) * 2021-06-30 2023-07-21 青岛海尔科技有限公司 Encryption method, decryption method and related device for configuration file
CN114528529A (en) * 2022-02-15 2022-05-24 广州经传多赢投资咨询有限公司 Memory xml file encryption method
CN116680725A (en) * 2023-07-27 2023-09-01 天津市测绘院有限公司 Encryption and decryption method and system for ArcGIS compact map tiles
CN116680725B (en) * 2023-07-27 2023-10-13 天津市测绘院有限公司 Encryption and decryption method and system for ArcGIS compact map tiles

Similar Documents

Publication Publication Date Title
US10142106B2 (en) System and method for securing sensitive data
CN112306963A (en) Resource file loading method and device and computer readable storage medium
WO2014187255A1 (en) Application packaging device and method
CN109391509A (en) A kind of method, system and the application server of more new application
CN107888656B (en) Calling method and calling device of server-side interface
CN108809960A (en) A kind of file uploads and method for down loading, device, equipment, system and storage medium
US20180097893A1 (en) Cross-device synchronization system for account-level information
CN112052013A (en) Software package generation method and device, storage medium and electronic device
CN111478956A (en) Deployment and preview method and device of small program package
CN109814889B (en) Method and apparatus for updating source code base
CN110022558A (en) The encryption and decryption method and electronic device and storage medium of a kind of upgrade package
CN112416396B (en) Application program updating method and system
CN109462650A (en) Data file downloading method, device, computer equipment and storage medium
CN110753020A (en) Network request processing method and device
CN113312083B (en) Application generation method, device and equipment
Tamboli Build your own IoT platform
EP3506599A1 (en) Method for synchronizing contact information, apparatus, medium, electronic device and system
CN113656713B (en) Network resource processing method, device and system
CN103401931A (en) Method and system for downloading file
CN111181905B (en) File encryption method and device
CN109445816B (en) Guide table processing method and device, storage medium, processor and terminal
CN102135872A (en) Method and device for image configuration in login area
CN103139298A (en) Method for transmitting network data and device
EP2680135B1 (en) Methods for updating applications
CN115756538A (en) Method for software online upgrade

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