Resource file construction method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202211114820.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-14
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2042-09-14
AI Technical Summary
[0003]将该资源文件构建为低版本的资源文件的情况下,导致高性能的终端无法发挥终端本身的性能,而将该资源文件构建为高版本的资源文件的情况下,又导致低性能的终端无法稳定运行该资源文件
[0011] In this embodiment of the application, the server can obtain multiple first feature information of the terminal, filter target feature information among the multiple first feature information, find a first plugin corresponding to the function according to the target feature information, and build a resource file through the found first plugin, so that the resource file built by the server can match the terminal performance, ensure that the terminal runs the resource file stably, and give full play to the full performance of the terminal, thereby improving the running effect of the resource file.
Smart Images

Figure CN115454485B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of communication technology, and specifically relates to a resource file construction method, apparatus, electronic device and storage medium. Background Technology
[0002] In related technologies, the construction of resource files includes two methods: front-end construction and server construction. Neither front-end construction nor server construction can output only one version of the resource file.
[0003] Building this resource file as an older version prevents high-performance terminals from fully utilizing their capabilities, while building it as a newer version causes low-performance terminals to experience instability. Therefore, regardless of whether the resource file is built by the front-end or the server, there is a mismatch issue between some terminals and the resource file. Summary of the Invention
[0004] The purpose of this application is to provide a resource file construction method, apparatus, electronic device, and storage medium, which enables the resource file constructed by the server to match the performance of the terminal, ensures the stable operation of the resource file by the terminal, and maximizes the full performance of the terminal, thereby improving the running effect of the resource file.
[0005] In a first aspect, embodiments of this application provide a resource file construction method, comprising: upon receiving a first request from a terminal, acquiring multiple first feature information of the terminal; filtering target feature information from the multiple first feature information; determining a first plugin based on the target feature information, wherein the target feature information corresponds to at least one first plugin; and constructing a resource file based on the first plugin.
[0006] Secondly, embodiments of this application provide a resource file construction apparatus, comprising: an acquisition module, configured to acquire multiple first feature information of a terminal upon receiving a first request from a terminal; a filtering module, configured to filter target feature information among the multiple first feature information; a determination module, configured to determine a first plugin based on the target feature information, wherein the target feature information corresponds to at least one first plugin; and a construction module, configured to construct a resource file based on the first plugin.
[0007] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores a program or instructions that can run on the processor, and when the program or instructions are executed by the processor, they implement the steps of the method as described in the first aspect.
[0008] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method as described in the first aspect.
[0009] Fifthly, embodiments of this application provide a chip including a processor and a communication interface coupled to the processor, the processor being used to run programs or instructions to implement the steps of the method as described in the first aspect.
[0010] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method as described in the first aspect.
[0011] In this embodiment of the application, the server can obtain multiple first feature information of the terminal, filter target feature information among the multiple first feature information, find a first plugin corresponding to the function according to the target feature information, and build a resource file through the found first plugin, so that the resource file built by the server can match the terminal performance, ensure that the terminal runs the resource file stably, and give full play to the full performance of the terminal, thereby improving the running effect of the resource file.
[0012] In this embodiment, when the terminal is a low-version terminal, the resource file built by the server matches the low-version terminal, ensuring that the low-version terminal can run the resource file normally. When the terminal is a terminal compatible with the new features, the resource file issued by the server matches the terminal compatible with the new features, ensuring that the terminal compatible with the new features runs the high-version resource file, making full use of the new features and improving performance and loading speed. Attached Figure Description
[0013] Figure 1 A flowchart illustrating the resource file construction method provided in an embodiment of this application is shown;
[0014] Figure 2 A schematic block diagram of the resource file construction apparatus provided in an embodiment of this application is shown;
[0015] Figure 3 A structural block diagram of an electronic device according to an embodiment of this application is shown;
[0016] Figure 4 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0018] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0019] The following is in conjunction with the appendix Figures 1 to 4 The resource file construction method, resource file construction apparatus, electronic device and storage medium provided in this application will be described in detail through specific embodiments and application scenarios.
[0020] Some embodiments of this application provide a method for constructing resource files. Figure 1 A flowchart illustrating the resource file construction method provided in an embodiment of this application is shown. Figure 1 As shown, the resource file construction methods include:
[0021] Step 102: Upon receiving the first request from the terminal, obtain multiple first feature information of the terminal;
[0022] In this embodiment, the first request is a request sent by the terminal to obtain resource files, and the first feature information is feature information obtained by the server based on the first request sent by the terminal. There are multiple first feature information pieces, which represent all the feature information of the terminal that can be collected, such as network features, rendering engine features, and logic engine features.
[0023] Step 104: Filter the target feature information from multiple first feature information;
[0024] Step 106: Determine the first plugin based on the target feature information, wherein the target feature information corresponds to at least one first plugin;
[0025] In this embodiment, before constructing the resource file, it is necessary to locate the first plugin corresponding to the first feature information. Since there are many first feature information entries, it is necessary to filter out the more significant ones, i.e., the target feature information. Then, the first plugin in the server's plugin library is searched based on the target feature information, thereby ensuring the accuracy of the found first plugin and further guaranteeing the compatibility between the resource file constructed based on the first plugin and the terminal.
[0026] The target feature information is the relatively significant feature information among multiple first feature information. It should be noted that since multiple first feature information is all the feature information of this terminal, it is necessary to filter out the significant target feature information among multiple first feature information to facilitate the subsequent construction of resource files based on the target feature information.
[0027] It should be noted that the target feature information is the feature information that accounts for a relatively high proportion among the first feature information of the same type. Each first feature information corresponds to at least one first plugin in the plugin library. Therefore, the corresponding first plugin can be found based on the target feature information.
[0028] Step 108: Build resource files based on the first plugin.
[0029] In this embodiment, when a terminal needs to request a resource file, it sends a first request to the server. Upon receiving the first request, the server determines multiple first characteristic information of the terminal based on the request, locates a corresponding first plugin based on significant target characteristic information among these first characteristic information, and constructs the requested resource file based on the first plugin. Since the first plugin is determined based on the target characteristic information in the terminal's first characteristic information, it ensures that the resource file constructed based on the first plugin matches the terminal. After the resource file is constructed, it is sent back to the terminal that sent the first request, enabling the terminal to stably run the resource file.
[0030] It should be noted that this resource file construction method can construct different resource files based on the target feature information from multiple different first feature information corresponding to different terminals. When the terminal's software or hardware is updated, the server can recreate a new resource file based on the terminal's target feature information, ensuring that the new resource file matches the terminal version, thus achieving automatic version updates without manual maintenance.
[0031] The server collects the first feature information of the terminal and standardizes the first feature information into feature T. The number of first feature information is at least one.
[0032] The acquisition of first feature information includes second feature information of the acquisition terminal. The frequency of occurrence of the second feature information within a preset time period is counted, and the first feature information is output based on the frequency of occurrence and the second feature information. The second feature information includes browser type information, browser version information, network information, and rendering engine information, etc. The first feature information includes the feature value of the second feature information, the frequency of occurrence within the preset time period, and the feature type.
[0033] In the process of obtaining the second feature information, the system first obtains the string content of the user's browser on the terminal through system properties, and then parses this string content to obtain the terminal feature information and network information from the first feature information. The terminal feature information includes terminal type information, terminal version information, rendering engine information, operating system information, etc. The network information includes the terminal's network status, such as 2G network, 3G network, 4G network, 5G network, and Wi-Fi network.
[0034] After obtaining the second feature information, the different second feature information pieces are statistically analyzed, and the frequency of occurrence of each different second feature information within a preset time interval is counted. Specifically, the second feature information is browser information, and the preset time interval is the past week. The access frequency of different browser versions is recorded by accumulation, resulting in a standard data structure <feature type, feature value, feature occurrence frequency>. For example, feature information can be represented as <terminal, browser>. n (T[Z] n ), N n >, where Z represents the terminal type, N n This represents the number of times the content appears within a preset time interval, according to the browser. n This represents browser characteristics.
[0035] After acquiring multiple first feature information, a salient feature analysis is performed on the acquired first feature information. The proportion of a certain first feature information among similar features is calculated, and the first feature information is judged to be a salient feature based on the feature proportion. If it is a salient feature, it is determined to be the target feature information, and the corresponding first plugin is found accordingly. A resource file is then constructed based on the first plugin. In this embodiment, the server can acquire multiple first feature information of the terminal, filter the target feature information among the multiple first feature information, find the first plugin corresponding to the function based on the target feature information, and construct a resource file through the found first plugin. This ensures that the resource file constructed by the server can match the terminal performance, guaranteeing that the terminal runs the resource file stably while giving full play to the terminal's performance and improving the running effect of the resource file.
[0036] In this embodiment, when the terminal is a low-version terminal, the resource file built by the server matches the low-version terminal, ensuring that the low-version terminal can run the resource file normally. When the terminal is a terminal compatible with the new features, the resource file issued by the server matches the terminal compatible with the new features, ensuring that the terminal compatible with the new features runs the high-version resource file, making full use of the new features and improving performance and loading speed.
[0037] In some embodiments of this application, filtering target feature information from multiple first feature information includes: determining multiple feature sets based on feature type and multiple first feature information, each feature set including at least one first feature information; obtaining the feature proportion of each first feature information in the feature set; determining the first feature information whose feature proportion is greater than the proportion threshold as target feature information; wherein the feature type includes any one of the following: network information type, rendering engine type, logic engine type.
[0038] In this embodiment, the network information class includes network information used by the terminal, such as 2G network, 3G network, 4G network, WIFI, etc. The rendering engine class includes the types of rendering engines used by the terminal. The logic engine class includes the types of logic engines used by the terminal.
[0039] In this embodiment, the feature type is set to include at least one of network information, rendering engine, and logic engine, which improves the precision of the accuracy of classifying multiple first feature information. In this embodiment, the target feature information is the feature information with a higher proportion among the first feature information of the same type.
[0040] In the process of filtering target feature information, multiple first feature information are classified based on feature type to obtain multiple feature sets. Each feature set corresponds to a feature type, and each feature set includes at least one first feature information.
[0041] The proportion of each first feature in each feature set is obtained. If the proportion is greater than a preset proportion, the first feature is determined to be a relatively significant feature within that feature type. For example, the preset proportion can be selected as 10%.
[0042] In some possible implementations, the function for determining the feature percentage is as follows:
[0043]
[0044] Where T represents the feature, N k The number of times a feature appears within a preset time interval is represented by G, which is a set constant of feature types, k is a feature variable among features of the same feature type, and N% is a preset percentage.
[0045] The result set obtained by the above judgment function includes:<k,G> =<1, Z>, <2, W>, <3, Z>..., the first feature information corresponding to the above result set is the target feature information.
[0046] In some possible implementations, where each feature set includes multiple target feature information, a corresponding first plugin is searched in the plugin library for each target feature.
[0047] In some other possible implementations, if each feature set includes multiple target feature information, then a corresponding first plugin is searched in the plugin library based on the target feature with the largest proportion.
[0048] In this embodiment, by classifying multiple first features according to feature type, multiple feature sets containing first feature information of the same feature type can be obtained. Target feature information with a higher feature proportion is then selected from these feature sets. This ensures that the target feature information accurately reflects the corresponding features of the terminal, further improving the matching accuracy between the found first plugin and the terminal.
[0049] In some embodiments of this application, constructing a resource file based on a first plugin includes: when there are multiple first plugins, constructing multiple plugin groups, each plugin group including at least one first plugin, and the first plugins in each plugin group corresponding to the same resource type; and configuring each first plugin in each plugin group into a preset template in a preset order to obtain a resource file.
[0050] It should be noted that the resource file includes plugins of multiple different resource types. To ensure the stability and accuracy of the built resources, during the build process, different first plugins are inserted into the preset template in sequence according to the resource type to generate the resource file.
[0051] Resource types are associated with target feature information, and the resource type of the first plugin to be searched can be determined based on the target feature information.
[0052] Specifically, during the construction of resource files, the first plugin corresponding to different resource types is located, and a mapping table is generated, as shown in Table 1:
[0053] Table 1
[0054] T_A Plugin A, Plugin B, Plugin C T_B Plugin B, Plugin C …… ……
[0055] After generating the mapping table, the first plugins in the mapping table are inserted into the preset templates in a preset order to generate resource files. First, all the first plugins of resource type T_A are inserted into the preset templates in sequence, then all the first plugins of resource type T_B are inserted into the preset templates in sequence, and so on, until all the first plugins in the entire mapping table are inserted into the preset templates, thus completing the construction of the resource files.
[0056] In this embodiment, by sequentially inserting first plugins of different resource types into a preset template to generate corresponding resource files, the resource files are guaranteed to include all first plugins, and the efficiency of building resource files is also improved.
[0057] In some embodiments of this application, the resource type includes any of the following: logic execution class, page display class, static resource class, and binary file class.
[0058] In this embodiment of the application, by defining the resource type as any one of logic execution class, page display class, static resource class, and binary file class, the precision of the type classification of the first plugin is improved, and the accuracy of the constructed resource file is improved.
[0059] In some embodiments of this application, after constructing the resource file based on the first plugin, the method further includes: establishing a mapping relationship between the resource file and the first feature information; and storing the resource file according to the mapping relationship.
[0060] In this embodiment, after constructing the resource file, a mapping relationship is established between the resource file and the first feature information, and the resource file is stored in the server's resource file library. When the server receives the same first feature information again, it can locate the corresponding resource file based on the mapping relationship and send the resource file to the terminal that sent the same first feature information.
[0061] In this embodiment, after constructing a resource file based on the terminal's first plugin, the server can store the resource file. Upon receiving the first feature information again, the server can directly send the corresponding resource file to the terminal, achieving resource file reuse and further improving the efficiency of determining the corresponding resource file based on the first feature information.
[0062] The resource file construction method provided in this application can be executed by a resource file construction device. This application uses the example of a resource file construction device executing the resource file construction method to illustrate the resource file construction device provided in this application.
[0063] In some embodiments of this application, a resource file construction apparatus is provided. Figure 2 A schematic block diagram of the resource file construction apparatus 200 provided in an embodiment of this application is shown, such as... Figure 2 As shown, the resource file building apparatus 200 includes:
[0064] The acquisition module 202 is used to acquire multiple first feature information of the terminal upon receiving a first request from the terminal.
[0065] The filtering module 204 is used to filter target feature information from multiple first feature information;
[0066] The determining module 206 is used to determine the first plugin based on the target feature information, wherein the target feature information corresponds to at least one first plugin;
[0067] Module 208 is used to build resource files based on the first plugin.
[0068] In this embodiment of the application, the server can obtain multiple first feature information of the terminal, filter target feature information among the multiple first feature information, find a first plugin corresponding to the function according to the target feature information, and build a resource file through the found first plugin, so that the resource file built by the server can match the terminal performance, ensure that the terminal runs the resource file stably, and give full play to the full performance of the terminal, thereby improving the running effect of the resource file.
[0069] In this embodiment, when the terminal is a low-version terminal, the resource file built by the server matches the low-version terminal, ensuring that the low-version terminal can run the resource file normally. When the terminal is a terminal compatible with the new features, the resource file issued by the server matches the terminal compatible with the new features, ensuring that the terminal compatible with the new features runs the high-version resource file, making full use of the new features and improving performance and loading speed.
[0070] In some embodiments of this application, the determining module 206 is used to determine multiple feature sets based on feature type and multiple first feature information, wherein each feature set includes at least one first feature information;
[0071] The acquisition module 202 is used to acquire the feature proportion of each first feature information in each feature set in the feature set;
[0072] The determination module 206 is used to determine the first feature information whose feature proportion is greater than the proportion threshold as the target feature information;
[0073] The feature types include any of the following: network information type, rendering engine type, and logic engine type.
[0074] In this embodiment, the feature type is set to include at least one of network information, rendering engine, and logic engine, improving the precision of the classification accuracy of multiple first feature information. In this embodiment, by classifying multiple first features according to feature type, multiple feature sets containing first feature information of the same feature type can be obtained. Target feature information with a higher feature proportion can be filtered within this feature set. This ensures that the target feature information accurately reflects the corresponding features of the terminal, further improving the matching accuracy between the found first plugin and the terminal.
[0075] In some embodiments of this application, the determining module 206 is used to determine multiple plugin groups when there are multiple first plugins, each plugin group including at least one first plugin, and the first plugins in each plugin group correspond to the same resource type.
[0076] The resource file building device 200 also includes:
[0077] The configuration module is used to configure each first plugin in each plugin group into a preset template in a preset order to obtain resource files.
[0078] In this embodiment, by sequentially inserting first plugins of different resource types into a preset template to generate corresponding resource files, the resource files are guaranteed to include all first plugins, and the efficiency of building resource files is also improved.
[0079] In some embodiments of this application, the resource type includes any of the following: logic execution class, page display class, static resource class, and binary file class.
[0080] In this embodiment of the application, by defining the resource type as any one of logic execution class, page display class, static resource class, and binary file class, the precision of the type classification of the first plugin is improved, and the accuracy of the constructed resource file is improved.
[0081] In some embodiments of this application, the resource file construction apparatus 200 further includes:
[0082] A module is established to create a mapping relationship between resource files and the first feature information;
[0083] The storage module is used to store resource files according to the mapping relationship.
[0084] In this embodiment, after constructing a resource file based on the terminal's first plugin, the server can store the resource file. Upon receiving the first feature information again, the server can directly send the corresponding resource file to the terminal, achieving resource file reuse and further improving the efficiency of determining the corresponding resource file based on the first feature information.
[0085] The resource file construction device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the scope of the device.
[0086] The resource file building apparatus in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.
[0087] The resource file construction apparatus provided in this application embodiment can implement all the processes implemented in the above method embodiments, and will not be described again here to avoid repetition.
[0088] Optionally, embodiments of this application also provide an electronic device, which includes the resource file building apparatus as described in any of the above embodiments, and thus has all the beneficial effects of the resource file building apparatus in any of the embodiments, which will not be elaborated further here.
[0089] Optionally, embodiments of this application also provide an electronic device. Figure 3 A structural block diagram of an electronic device according to an embodiment of this application is shown, such as... Figure 3 As shown, the electronic device 300 includes a processor 302, a memory 303, and a program or instructions stored in the memory 303 and executable on the processor 302. When the program or instructions are executed by the processor 302, they implement the various processes of the above-described resource file construction method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0090] It should be noted that the electronic devices in the embodiments of this application include the aforementioned mobile electronic devices and non-mobile electronic devices.
[0091] Figure 4 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0092] The electronic device 400 includes, but is not limited to, components such as: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, and processor 410.
[0093] Those skilled in the art will understand that the electronic device 400 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 410 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0094] The processor 410 is used to acquire multiple first feature information of the terminal upon receiving a first request from the terminal.
[0095] Processor 410 is used to filter target feature information from multiple first feature information;
[0096] The processor 410 is used to determine a first plug-in based on the target feature information, wherein the target feature information corresponds to at least one first plug-in;
[0097] Processor 410 is used to build resource files based on the first plugin.
[0098] In this embodiment of the application, the server can obtain multiple first feature information of the terminal, filter target feature information among the multiple first feature information, find a first plugin corresponding to the function according to the target feature information, and build a resource file through the found first plugin, so that the resource file built by the server can match the terminal performance, ensure that the terminal runs the resource file stably, and give full play to the full performance of the terminal, thereby improving the running effect of the resource file.
[0099] In this embodiment, when the terminal is a low-version terminal, the resource file built by the server matches the low-version terminal, ensuring that the low-version terminal can run the resource file normally. When the terminal is a terminal compatible with the new features, the resource file issued by the server matches the terminal compatible with the new features, ensuring that the terminal compatible with the new features runs the high-version resource file, making full use of the new features and improving performance and loading speed.
[0100] Furthermore, the processor 410 is configured to determine multiple feature sets based on feature type and multiple first feature information, each feature set including at least one first feature information;
[0101] Processor 410 is used to obtain the feature proportion of each first feature information in each feature set in the feature set;
[0102] Processor 410 is used to determine the first feature information whose feature proportion is greater than the proportion threshold as the target feature information;
[0103] The feature types include any of the following: network information type, rendering engine type, and logic engine type.
[0104] In this embodiment, by classifying multiple first features according to feature type, multiple feature sets containing first feature information of the same feature type can be obtained. Target feature information with a higher feature proportion is then selected from these feature sets. This ensures that the target feature information accurately reflects the corresponding features of the terminal, further improving the matching accuracy between the found first plugin and the terminal.
[0105] Furthermore, the processor 410, when there are multiple first plugins, determines multiple plugin groups, each plugin group including at least one first plugin, and the first plugins in each plugin group correspond to the same resource type;
[0106] Processor 410 is used to configure each first plugin in each plugin group into a preset template in a preset order to obtain resource files.
[0107] In this embodiment, by sequentially inserting first plugins of different resource types into a preset template to generate corresponding resource files, the resource files are guaranteed to include all first plugins, and the efficiency of building resource files is also improved.
[0108] Furthermore, the resource type includes any of the following: logic execution class, page display class, static resource class, binary file class.
[0109] In this embodiment of the application, by defining the resource type as any one of logic execution class, page display class, static resource class, and binary file class, the precision of the type classification of the first plugin is improved, and the accuracy of the constructed resource file is improved.
[0110] Furthermore, the processor 410 is used to establish a mapping relationship between the resource file and the first feature information;
[0111] Processor 410 is used to store resource files according to the mapping relationship.
[0112] In this embodiment, after constructing a resource file based on the terminal's first plugin, the server can store the resource file. Upon receiving the first feature information again, the server can directly send the corresponding resource file to the terminal, achieving resource file reuse and further improving the efficiency of determining the corresponding resource file based on the first feature information.
[0113] It should be understood that, in this embodiment, the input unit 404 may include a graphics processing unit (GPU) 4041 and a microphone 4042. The GPU 4041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 406 may include a display panel 4061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 407 includes at least one of a touch panel 4071 and other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0114] The memory 409 can be used to store software programs and various data. The memory 409 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 409 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 409 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.
[0115] Processor 410 may include one or more processing units; optionally, processor 410 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 410.
[0116] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0117] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0118] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-described resource file construction method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0119] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0120] This application provides a computer program product that is stored in a storage medium and executed by at least one processor to implement the various processes of the resource file construction method embodiment described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0121] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0122] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0123] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A resource file construction method, characterized by, include: Upon receiving a first request from the terminal, multiple first characteristic information of the terminal is obtained; Based on the feature type, multiple feature sets are determined according to the multiple first feature information, each feature set including at least one first feature information, wherein the feature type includes any one of the following: network information type, rendering engine type, and logic engine type; Obtain the feature proportion of each of the first feature information in each of the feature sets in the feature set; The first feature information whose feature proportion is greater than the proportion threshold is determined as the target feature information; Based on the target feature information, a first plugin is determined, wherein the target feature information corresponds to at least one first plugin; The resource file is built based on the first plugin.
2. The resource file construction method of claim 1, wherein, The process of building resource files based on the first plugin includes: When there are multiple first plugins, multiple plugin groups are determined, each plugin group includes at least one first plugin, and the first plugins in each plugin group correspond to the same resource type; According to a preset order, each of the first plugins in each plugin group is sequentially configured into a preset template to obtain the resource file.
3. The resource file construction method of claim 2, wherein, The resource type includes any of the following: Logic execution class, page display class, static resource class, binary file class.
4. The resource file construction method according to any one of claims 1 to 3, characterized in that, After constructing the resource file based on the first plugin, the process also includes: Establish a mapping relationship between the resource file and the first feature information; The resource files are stored according to the mapping relationship.
5. A resource file construction apparatus characterized by comprising: include: The acquisition module is used to acquire multiple first feature information of the terminal upon receiving a first request from the terminal. The filtering module is used to filter target feature information from the plurality of first feature information; The determining module is used to determine a first plugin based on the target feature information, wherein the target feature information corresponds to at least one first plugin; The build module is used to build resource files based on the first plugin; The determining module is used to determine multiple feature sets based on feature type and according to the multiple first feature information, wherein each feature set includes at least one first feature information; The acquisition module is used to acquire the feature proportion of each first feature information in each feature set in the feature set. The determining module is used to determine the first feature information whose feature proportion is greater than the proportion threshold as the target feature information; Among them, the feature type Includes any of the following: network information, rendering engine, or logic engine.
6. The resource file construction apparatus according to claim 5, characterized in that, The determining module is used to determine multiple plugin groups when there are multiple first plugins, each plugin group includes at least one first plugin, and the first plugins in each plugin group correspond to the same resource type; The resource file construction apparatus further includes: The configuration module is used to configure each of the first plugins in each of the plugin groups into a preset template in a preset order to obtain the resource file.
7. The resource file construction apparatus of claim 6, wherein The resource type includes any of the following: Logic execution class, page display class, static resource class, binary file class.
8. The resource file construction apparatus according to any one of claims 5 to 7, characterized by, Further comprising: The establishment module is used for establishing the mapping relationship between the resource file and the first feature information; The storage module is used for storing the resource file according to the mapping relationship.
9. An electronic device, comprising: Comprising: A processor and a memory, the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the resource file construction method in any one of claims 1 to 4.
10. A readable storage medium, on which a program or instructions are stored, characterized in that, The programs or instructions are executed by the processor to implement the steps of the resource file construction method in any one of claims 1 to 4.
Citation Information
Patent Citations
Method and apparatus for information publishing processing
CN101505461A
Advertisement processing method and device
CN103458397A