Resource processing method and device, server, electronic equipment and medium
By analyzing the parameter information of electronic devices on the server side and generating suitable resource packages, the problem of resource package occupies storage space and affecting download speed in the prior art is solved, and the streamlined processing of resource packages and the improvement of download speed is achieved.
Patent Information
- Application Number
- CN202411516639.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-07
AI Technical Summary
Existing resource processing methods are prone to occupy too much resource storage space on electronic devices and affect resource download speed.
By analyzing the parameter information in the resource package download request sent by the electronic device on the server side, a resource package suitable for the parameters of the electronic device is generated, and a streamlined resource package is distributed to the device to reduce the download of unnecessary resources.
It effectively reduces the use of non-essential resources in the resource package on the storage space of electronic devices, reduces the local storage burden of the equipment, and improves the speed of resource download.
Smart Images

Figure CN119402441A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a resource processing method, device, server, electronic equipment and medium. Background Art
[0002] Blue River Operating System (OS) uses a front-end language as the application ecosystem development language, which inherently has the advantages of being cross-platform and cross-device. Currently, many electronic devices have begun to use Blue River OS as their operating system.
[0003] There are many types of electronic devices, ranging from watches and mobile phones to tablets and TVs. The screens of these electronic devices vary and the adapted resources are also different. When these electronic devices use Blue River OS, a large number of adapted resources will be downloaded to unnecessary devices. For example, the image resources adapted for watches in the system development kit will be downloaded to TVs, mobile phones, tablets and other devices, and vice versa. This creates unnecessary burdens for some electronic devices such as watches that originally have limited resource storage space, and affects the speed of resource downloads. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a resource processing method, device, server, electronic device and medium, which can solve the problem that the existing resource processing method easily occupies too much resource storage space of the electronic device and affects the resource download speed.
[0005] In a first aspect, an embodiment of the present application provides a resource processing method, which is executed by a server, and the method includes:
[0006] Receiving a resource package download request for a first application sent by an electronic device;
[0007] Parsing parameter information of the electronic device from the resource package download request for the first application;
[0008] generating a resource package of the first application according to the parameter information of the electronic device;
[0009] Sending the resource package of the first application to the electronic device.
[0010] In a second aspect, an embodiment of the present application provides another resource processing method, which is executed by an electronic device, and the method includes:
[0011] In response to a user input indicating downloading of a first application, generating a resource package download request for the first application according to parameter information of the electronic device;
[0012] Sending the resource package download request for the first application to a server;
[0013] Receive the resource package of the first application sent by the server.
[0014] In a third aspect, an embodiment of the present application provides a resource processing device, which is provided on a server, and the resource processing device includes:
[0015] A first receiving module, configured to receive a resource package download request for a first application sent by an electronic device;
[0016] A parsing module, used for parsing parameter information of the electronic device from the resource package download request for the first application;
[0017] A first generating module, configured to generate a resource package of the first application according to parameter information of the electronic device;
[0018] The first sending module is used to send the resource package of the first application to the electronic device.
[0019] In a fourth aspect, an embodiment of the present application provides another resource processing device, which is provided in an electronic device, and the resource processing device includes:
[0020] A second generating module, configured to generate a resource package download request for the first application according to parameter information of the electronic device in response to a user input indicating downloading the first application;
[0021] A second sending module, configured to send the resource package download request for the first application to a server;
[0022] The second receiving module is used to receive the resource package of the first application sent by the server.
[0023] In a fifth aspect, an embodiment of the present application provides a server, which includes a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0024] In a sixth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the second aspect are implemented.
[0025] In the seventh aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented, or the steps of the method described in the second aspect are implemented.
[0026] In an eighth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect, or to implement the steps of the method described in the second aspect.
[0027] In a ninth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect, or to implement the steps of the method described in the second aspect.
[0028] In an embodiment of the present application, a server receives a resource package download request for a first application sent by an electronic device; parses parameter information of the electronic device from the resource package download request for the first application; generates a resource package for the first application according to the parameter information of the electronic device; and sends the resource package for the first application to the electronic device. In this way, by parsing the parameter information of the electronic device from the resource package download request for an application sent by the electronic device, an application resource package adapted to the parameter information of the electronic device is generated according to the parameter information of the electronic device, other unnecessary resources are removed, and finally the streamlined application resource package is sent to the electronic device, that is, the electronic device only needs to download the necessary resources adapted to its parameter information, thereby greatly reducing the occupation of the electronic device storage space by some unnecessary resources in the resource package, reducing the local storage burden of the electronic device, and improving the resource download speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a flow chart of a resource processing method on the server side provided in an embodiment of the present application;
[0030] Figure 2 is a flow chart of a resource processing method on an electronic device side provided in an embodiment of the present application;
[0031] Figure 3 It is a schematic diagram of the resource structure of the rpk application package in the Blue River OS provided in the embodiment of the present application;
[0032] Figure 4 is a structural diagram of a resource processing device provided on a server side provided in an embodiment of the present application;
[0033] Figure 5 is a structural diagram of a resource processing device provided on an electronic device side provided in an embodiment of the present application;
[0034] Figure 6 is a structural diagram of a server provided in an embodiment of the present application;
[0035] Figure 7is a structural diagram of an electronic device provided in an embodiment of the present application;
[0036] Figure 8 It is a hardware structure diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0038] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0039] The resource processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0040] See also Figure 1 , Figure 1 The flowchart of the resource processing method provided in the embodiment of the present application is executed by the server, such as Figure 1 As shown, the method comprises the following steps:
[0041] Step 101: Receive a resource package download request for a first application sent by an electronic device.
[0042] The first application mentioned above may generally refer to any application for which a user needs to download a resource package, and the resource package of the application is also an installation package of a certain application software.
[0043] The embodiments of the present application are applicable to the use scenarios of downloading resource packages of cross-platform and cross-device applications, such as the scenario of an electronic device using Blue River OS downloading an rpk package (similar to an Android application package (apk)) to a server. In such scenarios, the rpk package will contain a large number of certain resources adapted to different types of electronic devices, such as picture resources adapted to electronic devices with different screen types such as watches, mobile phones, tablets, and televisions. The structure of the rpk package is as follows: Figure 2 shown.
[0044] In an embodiment of the present application, the complete resource package of the first application may include two parts, such as a first resource package and a second resource package, wherein the second resource package includes at least two types of target resources, and the resources in the first resource package are different from the resources in the second resource package.
[0045] The above-mentioned first resource package can be obtained by packaging the first part of resources in the first application package, and the above-mentioned second resource package is obtained by packaging the second part of resources in the first application package. In specific implementation, the previous method of uniformly packaging all resources in the application package can be changed, and the resources in the application package can be divided into two parts of resources, namely the first part of resources and the second part of resources, and then the two parts of resources are independently packaged to obtain two resource packages. Among them, the second part of resources can be target resources adapted to different types in the application package, such as picture resources adapted to different screen types of various electronic devices; the first part of resources can be common resources including public resources, application configuration resources, etc. when installing application packages on various electronic devices, or it can be said that the first part of resources is the remaining resources except the second part of resources in the application package.
[0046] For example, Figure 2 As shown, the image resources of the rpk package in the frame will be divided into sub-directories according to "resolution, screen shape, screen density" and other categories, that is, including image resources adapted to different screen resolutions, different screen shapes, and different screen densities. The old packaging method is Figure 2 All files are packaged as a whole and signed with the developer's private key. In the embodiment of the present application, a new packaging method is adopted, that is, all files except the image resources in the frame are packaged as the first part of resources and signed with the developer's private key, and the image resources in the frame are separately packaged as the second part of resources and signed with the developer's private key.
[0047] In the embodiment of the present application, the electronic device can download a resource package of a certain application based on a user instruction. Specifically, a resource package download request for a first application can be generated based on parameter information of the electronic device. Specifically, the parameter information of the electronic device can be carried in the resource package download request, and then the resource download request is sent to the server. The parameter information of the electronic device carried therein indicates that the server needs to download resources of the first application that are adapted to the parameter information of the electronic device. The parameter information of the electronic device can be the device information, screen type, supported language type, etc. of the electronic device. Thus, the server receives the resource package download request for the first application sent by the electronic device.
[0048] Step 102: parse the parameter information of the electronic device from the resource package download request for the first application.
[0049] In this step, the server may parse the resource package download request to obtain the parameter information of the electronic device carried therein, thereby streamlining the complete resource package of the first application according to the parameter information of the electronic device.
[0050] Step 103: Generate a resource package of the first application according to the parameter information of the electronic device.
[0051] Specifically, the server can determine the resources required by the electronic device based on the parameter information of the electronic device, and thus simplify the second resource package according to the requirements, that is, extract the resources required by the electronic device from the second resource package after decompressing it, which is equivalent to discarding other unnecessary resources in the second resource package, and finally repack and sign the extracted resources to obtain a simplified third resource package, which only contains resources adapted to the parameter information of the electronic device. Afterwards, the third resource package can be sent to the electronic device together with the first resource package.
[0052] Optionally, the parameter information of the electronic device includes screen information of the electronic device;
[0053] The step 103 comprises:
[0054] Extracting picture resources adapted to the screen information of the electronic device from the resource library stored in the server;
[0055] Generate a resource package of the first application according to the image resource.
[0056] In one embodiment, the parameter information of the electronic device includes screen information of the electronic device, that is, when downloading a resource package of an application, the electronic device can indicate its own screen information to the server to request downloading of image resources in the application resource package that are applicable to its own screen information.
[0057] Accordingly, in this implementation, the second resource package may include image resources adapted to various screen information, such as image resources adapted to mobile phones, image resources adapted to watches, and image resources adapted to tablets, etc., that is, the contents of these image resources are the same, but they are adapted to electronic devices with different screen information. The server may streamline the second resource package based on the screen information of the electronic device, and only extract the image resources adapted to the screen information of the electronic device. It should be noted that the resource library may store complete resource packages for all applications, and the extraction of image resources adapted to the screen information of the electronic device from the resource library stored on the server may be to find the complete resource package of the first application from the resource library stored on the server, and then streamline the second resource package of the first application.
[0058] The screen information includes at least one of resolution, screen shape, and screen density. For example, different types of electronic devices such as mobile phones, watches, tablets, and televisions have different screen resolutions, screen shapes, and screen densities. In order to download only the image resources in the application package that are adapted to its own screen information, the electronic device can carry its own screen information, such as resolution, screen shape, screen density, etc., in the resource download request initiated to the server.
[0059] Based on the screen information of the electronic device, the server can extract image resources that are compatible with the screen information of the electronic device from the second resource package to avoid downloading other incompatible or unnecessary image resources, and then repackage and sign the extracted image resources to form a streamlined third resource package, which together with the common first resource package serves as the resource package of the first application to be sent to the electronic device.
[0060] Exemplarily, the resource download interaction process between the electronic device user and the server is as follows:
[0061] User request to download: When a user uses an RPK application that has not been downloaded or clicks to download an RPK application, the user requests the server to download the RPK application package, referred to as the RPK package. When requesting to download, the user will carry screen information such as "resolution, screen shape, screen density", such as the screen type parameter "1080, round, xhdpi". This is the screen information of the current device, where "1080" indicates the total number of pixels in the horizontal direction of the screen, "round" indicates that this is a round screen, and "xhdpi" indicates that the screen has a high-precision resolution.
[0062] The server returns an rpk package: According to information such as "resolution, screen shape, screen density", it finds the matching image resources, repackages and signs them, and returns a specific rpk package to the electronic device. The first part of the rpk package remains unchanged and is exactly the same as when the developer uploaded it. The second part depends on the device screen information carried in the previous step, which is streamlined and re-signed by the server with the system. The second part only contains the image resources corresponding to the device screen.
[0063] User uses rpk package: After the electronic device downloads, it verifies the developer signature in the first part and the system signature in the second part of the rpk package. If the verification passes, the rpk package is loaded for the user to use. If the verification fails, it will prompt the risk of tampering, refuse to use the rpk package, and report it to the monitoring system for processing.
[0064] Through this implementation, the resource package can be streamlined according to the screen information of the electronic device, so that the electronic device only needs to download image resources that are compatible with its screen information, avoiding downloading too many unnecessary resources to cause resource waste and unnecessary burden on the device resource storage space, and improving the resource download speed.
[0065] Optionally, the parameter information of the electronic device includes an internationalization region identification code string (i18n) for indicating a language supported by the electronic device;
[0066] The step 103 comprises:
[0067] Extracting text resources of a language type that is compatible with the internationalized regional identification code string from a resource library stored in the server;
[0068] Generate a resource package of the first application according to the text resource.
[0069] In another embodiment, the same or similar scheme as the above-mentioned picture resources adapted to different screen information can also be used for the text resources in the application resource package. That is, the parameter information of the electronic device includes an i18n regional identification code string to indicate the supported voices of the current device, that is, the electronic device can indicate the language it supports to the server when downloading an application resource package to request to download the text resources in the application resource package that are applicable to the language it supports, such as downloading only Chinese resources. Accordingly, the second resource package includes text resources adapted to different language types, such as Chinese, English, Japanese, Korean and other languages, that is, the contents of these text resources are the same, but they are in different languages.
[0070] In this implementation, the server can extract text resources that are compatible with the language supported by the electronic device from the second resource package based on the i18n regional identification code string of the electronic device, avoid downloading other incompatible or unnecessary text resources, and then repackage and sign the extracted text resources to form a streamlined third resource package, which together with the common first resource package serves as the resource package of the first application to be sent to the electronic device.
[0071] For example, an application is adapted to multiple languages such as Chinese, Japanese, English, and Korean. However, the current device only supports Chinese and English. In this case, when requesting a download, you can add corresponding parameters indicating support for Chinese and English to avoid downloading unnecessary Japanese and Korean resources. For example, when requesting a download, an i18n regional identification code string will be carried to indicate the supported voices of the current device. For example, if the parameter "zh CN, en US" is carried, it means that the current device only supports Chinese and English. Then, after receiving the request, the server will return an rpk package containing only Chinese and English but not Japanese and Korean characters.
[0072] Through this implementation, the application resource package can be streamlined according to the language types supported by the electronic device, so that the electronic device only needs to download text resources of the language types it supports, avoiding downloading too many unnecessary resources in other languages and causing waste of resources and unnecessary burden on the device resource storage space, thereby improving the resource download speed.
[0073] Step 104: Send the resource package of the first application to the electronic device.
[0074] In this step, the server may send a streamlined resource package of the first application to the electronic device, that is, a resource package including the first resource package and the third resource package.
[0075] The electronic device can then receive the streamlined resource package of the first application sent by the server, thereby completing the download process of the application resource package. Since the second part of the resources in the resource package only contains resources adapted to the parameter information of the electronic device, compared with the method of downloading the original complete resource package, it greatly reduces the occupation of the device storage space by unnecessary resources, reduces the resource storage pressure of the electronic device, and the resource download speed is faster.
[0076] Optionally, the method further comprises:
[0077] Receive the alarm information reported by the electronic device, wherein the alarm information is used to indicate that the resource package of the first application has a risk of tampering, and the alarm information is sent by the electronic device to the server when the resource package of the first application fails to be verified.
[0078] In some embodiments, after downloading the resource package of the first application, the electronic device will verify the signatures of the two parts of the resources separately, that is, verify the signature of the first resource package and the signature of the third resource package respectively; wherein, the first resource package is unchanged relative to the first resource package in the original complete resource package of the first application, and this part of the resource package is signed by the developer's private key when the developer packages it, so the first resource package can be verified using the pre-acquired developer public key; the third resource package is streamlined relative to the second resource package in the original complete resource package of the first application, and is re-signed by the server platform, so the third resource package can be verified using the pre-acquired platform public key.
[0079] If the verification is passed, that is, the first resource package and the third resource package are both verified, the first resource package and the third resource package can be loaded for the user to use.
[0080] If the verification fails, such as any one of the first resource package and the third resource package fails the verification, it means that the current resource package that has not passed the verification may have a tampering risk. Therefore, a tampering risk prompt can be output to refuse to use the current resource package, and an alarm information can be reported to the server, such as a server-side monitoring system, to prompt that the current resource package has a tampering risk.
[0081] In this implementation, by verifying the resource package of the application and reporting an alarm message when the verification fails to indicate the risk of tampering, the use of unsafe application resource packages can be prevented to a great extent, thereby improving the security of application use.
[0082] In summary, the embodiment of the present application provides a new resource processing method. The rpk package uploaded by the developer contains image resources of all device types and text resources in multiple languages, but when the user device requests a download, it will be accompanied by parameter information of the electronic device, such as screen information or supported language information. The rpk package returned by the server only contains image resources or text resources that match the parameter information of the electronic device, that is, the user device only needs to download the image resources or text resources actually needed, thereby reducing the total download volume and local storage space, improving the download speed, reducing storage usage, and improving the user experience.
[0083] In the resource processing method in the embodiment of the present application, the server receives a resource package download request for a first application sent by an electronic device; parses the parameter information of the electronic device from the resource package download request for the first application; generates a resource package for the first application according to the parameter information of the electronic device; and sends the resource package for the first application to the electronic device. In this way, by parsing the parameter information of the electronic device from the resource package download request for an application sent by the electronic device, an application resource package adapted to the parameter information of the electronic device is generated according to the parameter information of the electronic device, and other unnecessary resources are removed, and finally the streamlined application resource package is sent to the electronic device, that is, the electronic device only needs to download the necessary resources adapted to its parameter information, thereby greatly reducing the occupation of the electronic device storage space by some unnecessary resources in the resource package, reducing the local storage burden of the electronic device, and improving the resource download speed.
[0084] See also Figure 3 , Figure 3 The flowchart of the resource processing method provided in the embodiment of the present application is executed by an electronic device, such as Figure 3 As shown, the method comprises the following steps:
[0085] Step 301: In response to a user input indicating downloading a first application, a resource package download request for the first application is generated according to parameter information of the electronic device.
[0086] Step 302: Send the resource package download request for the first application to the server.
[0087] Step 303: Receive the resource package of the first application sent by the server.
[0088] Optionally, the parameter information of the electronic device includes screen information of the electronic device.
[0089] Optionally, the parameter information of the electronic device includes an internationalized region identification code string, which is used to indicate a language supported by the electronic device.
[0090] Optionally, the method further comprises:
[0091] Verifying the signature of the resource package of the first application;
[0092] When the resource package of the first application fails to be verified, an alarm message is sent to the server, wherein the alarm message is used to indicate that there is a risk of tampering with the resource package of the first application.
[0093] It should be noted that the embodiments and optional implementations of the present application are Figure 1The specific implementation of the electronic device side corresponding to the illustrated embodiment can be found in the relevant introduction in the aforementioned embodiment, and will not be described again here to avoid repetition.
[0094] In an embodiment of the present application, in response to a user's input indicating downloading a first application, a resource package download request for the first application is generated according to the parameter information of the electronic device; the resource package download request for the first application is sent to a server; and the resource package of the first application sent by the server is received. In this way, the parameter information of the electronic device is parsed from the resource package download request for a certain application sent by the electronic device, and an application resource package adapted to the parameter information of the electronic device is generated according to the parameter information of the electronic device, and other unnecessary resources are removed, and finally the streamlined application resource package is sent to the electronic device, that is, the electronic device only needs to download the necessary resources adapted to its parameter information, thereby greatly reducing the occupation of the electronic device storage space by some unnecessary resources in the resource package, reducing the local storage burden of the electronic device, and improving the resource download speed.
[0095] The resource processing method provided in the embodiment of the present application can be executed by a resource processing device. In the embodiment of the present application, the resource processing device provided in the embodiment of the present application is described by taking the resource processing method executed by the resource processing device as an example.
[0096] See also Figure 4 , Figure 4 A schematic diagram of the structure of a resource processing device provided in an embodiment of the present application, which is arranged on a server, such as Figure 4 As shown, the resource processing device 400 includes:
[0097] A first receiving module 401 is used to receive a resource package download request for a first application sent by an electronic device;
[0098] The parsing module 402 is used to parse the parameter information of the electronic device from the resource package download request for the first application;
[0099] A first generating module 403, configured to generate a resource package of the first application according to parameter information of the electronic device;
[0100] The first sending module 404 is configured to send a resource package of a first application to the electronic device.
[0101] Optionally, the parameter information of the electronic device includes screen information of the electronic device;
[0102] The first generation module 403 includes:
[0103] A first extraction unit, configured to extract a picture resource adapted to the screen information of the electronic device from a resource library stored in the server;
[0104] The first generating unit is configured to generate a resource package of the first application according to the image resource.
[0105] Optionally, the parameter information of the electronic device includes an internationalized region identification code string, which is used to indicate a language supported by the electronic device;
[0106] The first generation module 403 includes:
[0107] A second extraction unit, configured to extract text resources of a language type that is compatible with the internationalized regional identification code string from a resource library stored in the server;
[0108] The second generating unit is configured to generate a resource package of the first application according to the text resource.
[0109] Optionally, the resource processing device 400 further includes:
[0110] The second receiving module is used to receive the alarm information reported by the electronic device, wherein the alarm information is used to indicate that there is a risk of tampering with the resource package of the first application, and the alarm information is sent by the electronic device to the server when the resource package of the first application fails to be verified.
[0111] The resource processing device 400 provided in the embodiment of the present application can realize Figure 1 The various processes implemented by the method embodiment can achieve the same technical effect, and to avoid repetition, they will not be described here.
[0112] The resource processing device 400 in the embodiment of the present application receives a resource package download request for a first application sent by an electronic device; parses the parameter information of the electronic device from the resource package download request for the first application; generates a resource package for the first application according to the parameter information of the electronic device; and sends the resource package for the first application to the electronic device. In this way, by parsing the parameter information of the electronic device from the resource package download request for an application sent by the electronic device, an application resource package adapted to the parameter information of the electronic device is generated according to the parameter information of the electronic device, other unnecessary resources are removed, and finally the streamlined application resource package is sent to the electronic device, that is, the electronic device only needs to download the necessary resources adapted to its parameter information, thereby greatly reducing the occupation of the electronic device storage space by some unnecessary resources in the resource package, reducing the local storage burden of the electronic device, and improving the resource download speed.
[0113] See also Figure 5 , Figure 5 A schematic diagram of the structure of a resource processing device provided in an embodiment of the present application, which is arranged in an electronic device, such as Figure 5As shown, the resource processing device 500 includes:
[0114] A second generating module 501 is used to generate a resource package download request for the first application according to parameter information of the electronic device in response to a user input indicating downloading the first application;
[0115] A second sending module 502 is used to send the resource package download request for the first application to the server;
[0116] The second receiving module 503 is configured to receive the resource package of the first application sent by the server.
[0117] Optionally, the parameter information of the electronic device includes screen information of the electronic device.
[0118] Optionally, the parameter information of the electronic device includes an internationalized region identification code string, which is used to indicate a language supported by the electronic device.
[0119] Optionally, the resource processing device 500 further includes:
[0120] A verification module, used to verify the signature of the resource package of the first application respectively;
[0121] The third sending module is used to send an alarm message to the server when the resource package of the first application fails to be verified, wherein the alarm message is used to indicate that there is a risk of tampering with the resource package of the first application.
[0122] The resource processing device 500 provided in the embodiment of the present application can realize Figure 2 The various processes implemented by the method embodiment can achieve the same technical effect, and to avoid repetition, they will not be described here.
[0123] The resource processing device 500 in the embodiment of the present application, in response to the input of the user indicating to download the first application, generates a resource package download request for the first application according to the parameter information of the electronic device; sends the resource package download request for the first application to the server; and receives the resource package of the first application sent by the server. In this way, by parsing the parameter information of the electronic device from the resource package download request for a certain application sent by the electronic device, an application resource package adapted to the parameter information of the electronic device is generated according to the parameter information of the electronic device, and other unnecessary resources are removed, and finally the streamlined application resource package is sent to the electronic device, that is, the electronic device only needs to download the necessary resources adapted to its parameter information, thereby greatly reducing the occupation of the electronic device storage space by some unnecessary resources in the resource package, reducing the local storage burden of the electronic device, and improving the resource download speed.
[0124] The resource processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0125] The resource processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0126] The embodiment of the present application also provides a server. Since the principle of solving the problem by the server is similar to the resource processing method in the embodiment of the present application, the implementation of the server can refer to the implementation of the method, and the repeated parts will not be repeated. Figure 6 As shown, the server of the embodiment of the present application includes:
[0127] The processor 600 is used to read the program in the memory 620 and execute the following process:
[0128] Receiving a resource package download request for a first application sent by an electronic device;
[0129] Parsing parameter information of the electronic device from the resource package download request for the first application;
[0130] generating a resource package of the first application according to the parameter information of the electronic device;
[0131] Sending the resource package of the first application to the electronic device.
[0132] Among them, Figure 6In the embodiment of the present invention, the bus architecture may include any number of interconnected buses and bridges, specifically linking various circuits of one or more processors represented by processor 600 and memory represented by memory 620. The bus architecture may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are not further described herein. The bus interface provides an interface. The processor 600 is responsible for managing the bus architecture and general processing, and the memory 620 may store data used by the processor 600 when performing operations.
[0133] Optionally, the parameter information of the electronic device includes screen information of the electronic device;
[0134] The processor 600 is further configured to read the program in the memory 620 and execute the following steps:
[0135] Extracting picture resources adapted to the screen information of the electronic device from the resource library stored in the server;
[0136] Generate a resource package of the first application according to the image resource.
[0137] Optionally, the parameter information of the electronic device includes an internationalized region identification code string, which is used to indicate a language supported by the electronic device;
[0138] The processor 600 is further configured to read the program in the memory 620 and execute the following steps:
[0139] Extracting text resources of a language type that is compatible with the internationalized regional identification code string from a resource library stored in the server;
[0140] Generate a resource package of the first application according to the text resource.
[0141] Optionally, the processor 600 is further configured to read a program in the memory 620 and execute the following steps:
[0142] Receive the alarm information reported by the electronic device, wherein the alarm information is used to indicate that the resource package of the first application has a risk of tampering, and the alarm information is sent by the electronic device to the server when the resource package of the first application fails to be verified.
[0143] The server provided in the embodiment of the present application can execute Figure 1 The implementation principle and technical effect of the method embodiment shown are similar, and this embodiment will not be repeated here.
[0144] Alternatively, if Figure 7As shown, the embodiment of the present application also provides an electronic device 700, including a processor 701 and a memory 702, wherein the memory 702 stores a program or instruction that can be run on the processor 701, and when the program or instruction is executed by the processor 701, an electronic device 700 is implemented. Figure 3 The various steps of the resource processing method embodiment shown in the figure can achieve the same technical effect, and will not be described again here to avoid repetition.
[0145] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0146] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0147] The electronic device 800 includes but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810 and other components.
[0148] Those skilled in the art will appreciate that the electronic device 800 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 810 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 8 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0149] The processor 810 is configured to:
[0150] In response to a user input indicating downloading of a first application, generating a resource package download request for the first application according to parameter information of the electronic device;
[0151] Sending the resource package download request for the first application to a server;
[0152] Receive the resource package of the first application sent by the server.
[0153] Optionally, the parameter information of the electronic device includes screen information of the electronic device.
[0154] Optionally, the parameter information of the electronic device includes an internationalized region identification code string, which is used to indicate a language supported by the electronic device.
[0155] Optionally, the processor 810 is further configured to:
[0156] Verifying the signatures of the resource packages of the first application respectively;
[0157] When the resource package of the first application fails to be verified, an alarm message is sent to the server, wherein the alarm message is used to indicate that there is a risk of tampering with the resource package of the first application.
[0158] It should be understood that in the embodiment of the present application, the input unit 804 may include a graphics processor (Graphics Processing Unit, GPU) 8041 and a microphone 8042, and the graphics processor 8041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 807 includes a touch panel 8071 and at least one of other input devices 8072. The touch panel 8071 is also called a touch screen. The touch panel 8071 may include two parts: a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0159] The memory 809 can be used to store software programs and various data. The memory 809 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 809 may include a volatile memory or a non-volatile memory, or the memory 809 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 809 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0160] The processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 810.
[0161] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned resource processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0162] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0163] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned resource processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0164] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0165] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the resource processing method embodiment described above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0166] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0167] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0168] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A resource processing method, characterized in that: Executed by a server, the method includes: Receiving a resource package download request for a first application sent by an electronic device; Parsing parameter information of the electronic device from the resource package download request for the first application; generating a resource package of the first application according to the parameter information of the electronic device; Sending the resource package of the first application to the electronic device.
2. The method according to claim 1, characterized in that The parameter information of the electronic device includes screen information of the electronic device, and the generating the resource package of the first application according to the parameter information of the electronic device includes: Extracting picture resources adapted to the screen information of the electronic device from the resource library stored in the server; Generate a resource package of the first application according to the image resource.
3. The method according to claim 1, characterized in that The parameter information of the electronic device includes an internationalized region identification code string, which is used to indicate a language supported by the electronic device. The generating of the resource package of the first application according to the parameter information of the electronic device includes: Extracting text resources of a language type that is compatible with the internationalized regional identification code string from a resource library stored in the server; Generate a resource package of the first application according to the text resource.
4. A resource processing method, characterized in that: Executed by an electronic device, the method includes: In response to a user input indicating downloading of a first application, generating a resource package download request for the first application according to parameter information of the electronic device; Sending the resource package download request for the first application to a server; Receive the resource package of the first application sent by the server.
5. The method according to claim 4, characterized in that The parameter information of the electronic device includes screen information of the electronic device; Alternatively, the parameter information of the electronic device includes an internationalized region identification code string for indicating a language supported by the electronic device.
6. A resource processing device, characterized in that: Set on the server, the resource processing device includes: A first receiving module, configured to receive a resource package download request for a first application sent by an electronic device; A parsing module, used for parsing parameter information of the electronic device from the resource package download request for the first application; A first generating module, configured to generate a resource package of the first application according to parameter information of the electronic device; The first sending module is used to send the resource package of the first application to the electronic device.
7. The resource processing device according to claim 6, characterized in that: The parameter information of the electronic device includes screen information of the electronic device; The first generation module comprises: A first extraction unit, configured to extract a picture resource adapted to the screen information of the electronic device from a resource library stored in the server; The first generating unit is configured to generate a resource package of the first application according to the image resource.
8. The resource processing device according to claim 6, characterized in that: The parameter information of the electronic device includes an internationalized region identification code string, which is used to indicate the language supported by the electronic device; The first generation module comprises: A second extraction unit, configured to extract text resources of a language type that is compatible with the internationalized regional identification code string from a resource library stored in the server; The second generating unit is configured to generate a resource package of the first application according to the text resource.
9. A resource processing device, characterized in that: Set in an electronic device, the resource processing device includes: A second generating module, configured to generate a resource package download request for the first application according to parameter information of the electronic device in response to a user input indicating downloading the first application; A second sending module, configured to send the resource package download request for the first application to a server; The second receiving module is used to receive the resource package of the first application sent by the server.
10. The resource processing device according to claim 9, characterized in that: The parameter information of the electronic device includes screen information of the electronic device; Alternatively, the parameter information of the electronic device includes an internationalized region identification code string for indicating a language supported by the electronic device.
11. A server, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the resource processing method according to any one of claims 1 to 3 are implemented.
12. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the resource processing method as claimed in claim 4 or 5 are implemented.
13. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the resource processing method according to any one of claims 1 to 3 are implemented, or the steps of the resource processing method according to claim 4 or 5 are implemented.