Resource configuration method and device, electronic equipment and computer readable storage medium

By obtaining and combining the weights of multiple dimension attributes in the device, forming a priority ranking level, the problems of low efficiency and insufficient flexibility of resource allocation in the existing technology are solved, and more refined and flexible resource allocation is achieved.

CN120144246APending Publication Date: 2025-06-13SHENZHEN TCL NEW-TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510162685.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The prior art is inefficient when facing the needs of multiple resource customization of equipment, and usually requires a lot of manpower and material resources, and the flexibility and precision are insufficient.

Method used

By obtaining the weights of each attribute in multiple dimensions, combining these attributes to form multiple levels, each level includes an attribute in one dimension, determining the priority of the level according to the weight, retrieving resources from high to low according to the priority, obtaining the priority returned target resources and configuring them.

Benefits of technology

It realizes a more refined and flexible allocation of resources, improves the efficiency and accuracy of resource allocation, and can flexibly adjust target resources according to changes in attribute weights.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144246A_ABST
    Figure CN120144246A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a resource configuration method and device, electronic equipment and a computer readable storage medium. The method comprises the steps that the weight of each attribute in multiple dimensions is acquired; the resources corresponding to the attributes in the same dimension are different; respectively combining the attributes in the plurality of dimensions to obtain a plurality of hierarchies; each hierarchy comprises one attribute in each dimension; determining the priority of the plurality of levels according to the weight of each attribute included in the plurality of levels; according to the sequence of the priorities of the plurality of levels from high to low, retrieving resources corresponding to each attribute included in the plurality of levels to obtain a preferentially returned target resource; and performing configuration according to the target resource. Therefore, according to the scheme, the resources can be configured more finely and flexibly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technologies, and in particular, to a resource configuration method, apparatus, electronic device, and computer-readable storage medium. Background Art

[0002] Devices of the same project may be configured with different resources. In the face of multiple resource customization requirements of the devices, related technologies configure multiple customized resources through multiple compilations, but this method is inefficient and usually requires a large amount of manpower and material resources.

[0003] Original Equipment Manufacturers (OEMs) store multiple customized resources in a customized partition in order to improve efficiency and reduce costs, and configure multiple customized resources by indexing the multiple customized resources in the customized partition, but the flexibility and fineness of this method are insufficient. Summary of the Invention

[0004] The embodiments of the present application provide a resource configuration method, apparatus, electronic device, and computer-readable storage medium, which can configure resources more finely and flexibly.

[0005] In a first aspect, the embodiments of the present application provide a resource configuration method, including:

[0006] Obtain the weights of each attribute in multiple dimensions; the resources corresponding to each attribute in the same dimension are different;

[0007] Combine the attributes in the multiple dimensions respectively to obtain multiple levels; each level includes: one attribute in each dimension;

[0008] Determine the priorities of the multiple levels according to the weights of the attributes included in the multiple levels;

[0009] Retrieve the resources corresponding to each attribute included in the multiple levels in the order from high to low of the priorities of the multiple levels to obtain the target resources to be preferentially returned;

[0010] Configure according to the target resources.

[0011] In one of the embodiments, the obtaining the weights of each attribute in multiple dimensions includes:

[0012] Obtain the basic weights of each attribute in the multiple dimensions; the basic weights of each attribute in the same dimension are the same;

[0013] Determine a target attribute from the attributes;

[0014] Obtain the weight offset of the target attribute;

[0015] Determine the weight of the target attribute as the sum of the weight offset of the target attribute and the base weight;

[0016] Determine the base weight of other attributes in the attributes except the target attribute as the weight of the other attributes.

[0017] In one embodiment, the obtaining the base weight of each attribute in the multiple dimensions includes:

[0018] Determine the multiple dimensions;

[0019] Determine the base weight of the dimension according to the coverage range of the dimension;

[0020] Determine the base weight of each attribute in the dimension as the base weight of the dimension.

[0021] In one embodiment, the determining the target attribute from the attributes includes:

[0022] Obtain a product identifier; the product identifier is bound to the target attribute;

[0023] Determine the target attribute according to the product identifier.

[0024] In one embodiment, the determining the target attribute from the attributes includes:

[0025] Obtain the attribute selected by the user;

[0026] Determine the attribute selected by the user as the target attribute.

[0027] In one embodiment, the method further includes:

[0028] Obtain the resources corresponding to each attribute in the multiple dimensions;

[0029] Store the resources under the attribute directory of the attribute corresponding to the resources;

[0030] The retrieving the resources corresponding to each attribute included in the multiple levels includes:

[0031] Retrieve the resources corresponding to each attribute under the attribute directory of each attribute included in the level.

[0032] In one embodiment, the determining the priority of the multiple levels according to the weights of each attribute included in the multiple levels includes:

[0033] Determine the weight of each level as the sum of the weights of each attribute included in each level;

[0034] Determine the priority of the level according to the weight of the level.

[0035] In a second aspect, an embodiment of the present application provides a resource allocation device, including:

[0036] An acquisition module, configured to acquire the weights of each attribute in multiple dimensions; resources corresponding to each attribute in the same dimension are different;

[0037] A combination module, configured to combine the attributes in the multiple dimensions respectively to obtain multiple levels; each level includes: one attribute in each dimension;

[0038] A determination module, configured to determine the priorities of the multiple levels according to the weights of the attributes included in the multiple levels;

[0039] A retrieval module, configured to retrieve the resources corresponding to the attributes included in the multiple levels in descending order of the priorities of the multiple levels to obtain target resources to be preferentially returned;

[0040] A configuration module, configured to perform configuration according to the target resources.

[0041] In one embodiment, the acquisition module includes:

[0042] A basic weight acquisition unit, configured to acquire the basic weights of each attribute in the multiple dimensions; the basic weights of each attribute in the same dimension are the same;

[0043] A target attribute determination unit, configured to determine a target attribute from the attributes;

[0044] An offset acquisition unit, configured to acquire the weight offset of the target attribute;

[0045] A first weight determination unit, configured to determine the sum of the weight offset of the target attribute and the basic weight as the weight of the target attribute;

[0046] A second weight determination unit, configured to determine the basic weights of the other attributes except the target attribute in the attributes as the weights of the other attributes.

[0047] In one embodiment, the basic weight acquisition unit includes:

[0048] A dimension determination subunit, configured to determine the multiple dimensions;

[0049] A first basic weight determination subunit, configured to determine the basic weight of the dimension according to the coverage range of the dimension;

[0050] A second basic weight determination subunit, configured to determine the basic weight of the dimension as the basic weights of the respective attributes in the dimension.

[0051] In one embodiment, the target attribute determination unit includes:

[0052] An identification acquisition subunit, configured to acquire a product identification; the product identification is bound to the target attribute;

[0053] A first target attribute determination subunit, configured to determine the target attribute according to the product identification.

[0054] In one embodiment, the target attribute determination unit includes:

[0055] A selected attribute acquisition subunit, configured to acquire an attribute selected by a user;

[0056] A second target attribute determination subunit, configured to determine the attribute selected by the user as the target attribute.

[0057] In one embodiment, the apparatus further includes:

[0058] A resource acquisition module, configured to acquire resources corresponding to the respective attributes in the multiple dimensions;

[0059] A storage module, configured to store the resources under the attribute directory of the attribute corresponding to the resources;

[0060] The retrieval module includes:

[0061] A directory retrieval unit, configured to retrieve resources corresponding to the respective attributes under the attribute directories of the respective attributes included in the hierarchy.

[0062] In one embodiment, the determination module includes:

[0063] A hierarchy weight determination unit, configured to determine the sum of the weights of the respective attributes included in each hierarchy as the weight of the hierarchy;

[0064] A hierarchy priority determination unit, configured to determine the priority of the hierarchy according to the weight of the hierarchy.

[0065] In a third aspect, an embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps in the above resource configuration method are implemented.

[0066] Fourthly, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above resource configuration method are implemented.

[0067] Fifthly, an embodiment of the present application further provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various optional implementation manners described in the embodiments of the present application.

[0068] In summary, in the embodiments of the present application, the resources corresponding to each attribute in the same dimension are different, and each level includes one attribute in each dimension. Therefore, multiple levels correspond to different combination ways of each resource, realizing a resource combination way with attribute granularity. Compared with the resource combination way with partition granularity in the related art, it has the advantage of being more refined; according to the weights of each attribute, the priority of the levels can be determined, and the resources corresponding to the levels are retrieved in the order from high to low priority to obtain the target resources to be preferentially returned, and the configuration is performed according to the target resources. When the weights of the attributes are different, the target resources to be preferentially returned are also different. Therefore, by changing the weights of the attributes, flexible configuration of different target resources can be realized. In summary, resources can be configured more finely and flexibly. Description of the Drawings

[0069] In order to more clearly illustrate the technical solutions in the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those skilled in the art, without creative efforts, other drawings can be obtained according to these drawings.

[0070] Figure 1 It is a schematic diagram of the steps of the resource configuration method provided by an embodiment of the present application;

[0071] Figure 2 It is a flowchart of the resource configuration method provided by an embodiment of the present application;

[0072] Figure 3 It is a schematic structural diagram of the resource configuration device provided by an embodiment of the present application;

[0073] Figure 4 It is a schematic structural diagram of the electronic device provided by an embodiment of the present application. Detailed Embodiments

[0074] The technical solutions in the present application will be clearly and completely described below with reference to the accompanying drawings in the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts fall within the protection scope of the present invention.

[0075] In one embodiment, as Figure 1 shown, a resource allocation method is provided. Although the logical order is shown in the step schematic diagram, in some cases, the steps shown or described can be executed in an order different from that shown in the accompanying drawings. Specifically, the resource allocation method can be applied to an electronic device, where the electronic device can include, but is not limited to, one or more of a television, a smart phone, a tablet computer, a portable computer, a desktop computer, and a vehicle-mounted computer.

[0076] The following will be described in detail respectively. It should be noted that the description order of the following embodiments does not limit the priority order of the embodiments.

[0077] According to Figure 1 the resource allocation method shown, the method at least includes steps S110 to S150, which are introduced in detail as follows:

[0078] In step S110, the weights of the respective attributes in multiple dimensions are obtained; the resources corresponding to the respective attributes in the same dimension are different.

[0079] It may be in the pre-research stage of the electronic device to sort out the attributes that may cause resource allocation differences, resulting in multiple dimensions. One dimension corresponds to one type of attribute, and the multiple attributes included in one dimension each correspond to different resources. The resources may be the resources required for configuring the electronic device, such as wallpaper resources, font resources, and / or startup music resources, etc.

[0080] For example, there may be a country dimension, and the attributes included in the country dimension may be the United Kingdom, the United States, and France; the wallpaper resource corresponding to the United Kingdom may be a green wallpaper, the wallpaper resource corresponding to the United States may be a red wallpaper, and the wallpaper resource corresponding to France may be a blue wallpaper. When the attributes applied in the electronic device are different, the wallpaper of the electronic device may also be different.

[0081] The multiple dimensions may include, but are not limited to: country dimension, movement dimension, model dimension, and / or region dimension.

[0082] The weight of an attribute is equal to the sum of the basic weight of the attribute and the weight offset of the attribute. The basic weights of the respective attributes in the same dimension are the same, and the basic weight of the respective attributes in the same dimension is the basic weight of that dimension. The basic weight of a dimension can be determined according to the coverage range of the dimension.

[0083] In one embodiment, the coverage of a dimension may refer to the number of resources affected by the attributes in that dimension. For example, the wallpaper resources and startup music resources corresponding to different attributes in the country dimension may be different, while the font resources corresponding to different attributes in the movement dimension may be different; since the attributes in the country dimension correspond to two resources, and the movement dimension corresponds to one resource, the basic weight of the country dimension may be higher than the basic weight of the movement dimension.

[0084] In another embodiment, the coverage of a dimension may refer to the configuration range of an electronic device affected by the attributes in that dimension. For example, the startup music resources corresponding to different attributes in the country dimension may be different, while the font resources corresponding to different attributes in the movement dimension may be different; since the startup music resources are only applied during startup and correspond to the startup configuration of the electronic device, and the font resources are applied in multiple interfaces where the electronic device needs to display text and correspond to the configurations of multiple interfaces of the electronic device, the configuration range of the font resources is greater than the configuration range of the startup music resources, so the basic weight of the movement dimension may be higher than the basic weight of the country dimension.

[0085] The weight offset of an attribute can characterize whether the attribute is a target attribute. When the attribute is a target attribute, the weight offset of the attribute can be a preset value greater than zero; when the attribute is not a target attribute, the weight offset of the attribute can be 0, or it can be considered that the attribute does not have a weight offset. The target attributes can include the attributes selected by the user and / or the attributes bound to the product identifier.

[0086] In step S120, the attributes in the multiple dimensions are combined respectively to obtain multiple levels; each level includes: one attribute in each dimension.

[0087] Each time, one attribute is taken out from each dimension, and the one attribute taken out from each of the multiple dimensions is combined to obtain a level. By traversing the multiple attributes in the multiple dimensions, multiple different levels are obtained.

[0088] For example, there are three dimensions A, B, and C, where dimension A includes attributes A1 and A2, dimension B includes attributes B1 and B2, and dimension C includes attributes C1 and C2. Then 8 different levels can be obtained, and the attributes included in each of the 8 levels are respectively: (Level 1: A1, B1, C1) (Level 2: A1, B1, C2) (Level 3: A1, B2, C1) (Level 4: A1, B2, C2) (Level 5: A2, B1, C1) (Level 6: A2, B1, C2) (Level 7: A2, B2, C1) and (Level 8: A2, B2, C2).

[0089] In step S130, according to the weights of the respective attributes included in the multiple levels, determine the priorities of the multiple levels.

[0090] The priority of a level is proportional to the sum of the weights of the respective attributes included in the level. The higher the sum of the weights of the respective attributes included in the level, the higher the priority of the level.

[0091] In one implementation, the determining the priorities of the multiple levels according to the weights of the respective attributes included in the multiple levels may include: determining the sum of the weights of the respective attributes included in each level as the weight of the level; and determining the priority of the level according to the weight of the level.

[0092] Determine the sum of the weights of the respective attributes included in a level as the weight of the level. Determine the priority of the level according to the weight of the level. The weight of the level is proportional to the priority of the level. The higher the weight of the level, the higher the priority of the level.

[0093] Optionally, the weight of a level can be determined according to the following formula:

[0094]

[0095] where f(x) represents the weight of the level, n represents the number of attributes included in the level, x i represents the i-th attribute included in the level, i = 1, 2,..., n; offset i represents the weight offset of the i-th attribute included in the level. The weight offset of the target attribute can be 0.1, and the weight offsets of the other attributes that are not the target attribute can be 0.

[0096] Continuing with the example above, if the weight of attribute A1 is 0.1, the weight of attribute A2 is 0.2, the weight of attribute B1 is 0.2, the weight of attribute B2 is 0.3, the weight of attribute C1 is 0.3, and the weight of attribute C2 is 0.2, then the weights of the 8 levels described above are: (Level 1: A1, B1, C1: 0.6) (Level 2: A1, B1, C2: 0.5) (Level 3: A1, B2, C1: 0.7) (Level 4: A1, B2, C2: 0.6) (Level 5: A2, B1, C1: 0.7) (Level 6: A2, B1, C2: 0.6) (Level 7: A2, B2, C1: 0.8) and (Level 8: A2, B2, C2: 0.7).

[0097] Then, sorting the 8 levels in descending order of priority can be: Level 7 > Level 3 = Level 5 = Level 8 > Level 1 = Level 4 = Level 6 > Level 2.

[0098] In this way, the priority of the levels is determined by the weights of the attributes. When the weights of the attributes change, the priority of the levels also changes, so that it is possible to change the target resources of the configuration by adjusting the weights of the attributes, thereby achieving flexible resource customization.

[0099] In step S140, according to the order of the priorities of the multiple levels from high to low, retrieve the resources corresponding to each attribute included in the multiple levels, and obtain the target resources to be preferentially returned.

[0100] According to the order of the priorities of the multiple levels from high to low, retrieve the resources corresponding to each attribute included in the multiple levels in sequence until the target resources to be preferentially returned are obtained, and then stop the retrieval.

[0101] For example, if there are a first level, a second level, and a third level, the first level includes a first attribute and a second attribute, the second level includes a first attribute and a third attribute, and the third level includes a second attribute and a third attribute, where the first level has the highest priority, the second level has the second highest priority, and the third level has the lowest priority, then first retrieve according to the first attribute and the second attribute included in the first level; if the first resource is retrieved according to the first attribute and no resource is retrieved according to the second attribute, then retrieve according to the first attribute and the third attribute included in the second level. If the first resource is retrieved according to the first attribute and the third resource is retrieved according to the third attribute, then the first resource and the third resource are preferentially returned as the target resources, and the retrieval of the resources corresponding to the third level is stopped.

[0102] In step S150, configure according to the target resources.

[0103] Configure the electronic device according to the target resources preferentially returned. For example, if the target resource is the target startup music resource, then the target startup music resource can be inserted into the startup configuration to achieve playing the target startup music when the electronic device starts up.

[0104] Adopting the technical solution of the embodiment of the present application, the resources corresponding to each attribute in the same dimension are different, and each level includes one attribute in each dimension. Therefore, the multiple levels correspond to different combination ways of each resource, realizing a resource combination way with attribute granularity. Compared with the resource combination way with partition granularity in the related art, it has the advantage of being more refined; the priority of the levels can be determined according to the weights of each attribute, retrieve the resources corresponding to the levels according to the order of the priorities from high to low, obtain the target resources to be preferentially returned, and configure according to the target resources. When the weights of the attributes are different, the target resources preferentially returned are also different. Therefore, different target resources can be flexibly configured by changing the weights of the attributes. In summary, the resources can be configured more finely and flexibly.

[0105] Based on the above technical solution, as an embodiment, the method may further include: obtaining resources corresponding to each attribute in the multiple dimensions; storing the resources under the attribute directory of the attribute corresponding to the resources. Retrieving the resources corresponding to each attribute included in the multiple levels may include: retrieving the resources corresponding to each attribute under the attribute directory of each attribute included in the level.

[0106] Resources corresponding to each attribute can be obtained in advance and stored under the attribute directory of the attribute corresponding to the resources. For example, one of the attributes included in the country dimension is the UK, and the wallpaper resource corresponding to the UK is the green wallpaper, then the green wallpaper can be stored under the directory of the UK attribute, and the storage path of the green wallpaper can be: / ConfigDir / country / UK.

[0107] When retrieving the resources corresponding to each attribute included in the multiple levels, the resources corresponding to each attribute can be retrieved under the attribute directory of each attribute to obtain the target resources to be preferentially returned.

[0108] Adopting the technical solution of the embodiment of the present application, storing the source in advance under the attribute directory of the attribute corresponding to the resources, then when retrieving the resources, it can be directly retrieved from the corresponding attribute directory, which can improve the retrieval efficiency.

[0109] Based on the above technical solution, as an embodiment, obtaining the weights of each attribute in the multiple dimensions may include: obtaining the basic weights of each attribute in the multiple dimensions; the basic weights of each attribute in the same dimension are the same; determining the target attribute from the attributes; obtaining the weight offset of the target attribute; determining the sum of the weight offset of the target attribute and the basic weight as the weight of the target attribute; determining the basic weight of the other attributes except the target attribute in the attributes as the weight of the other attributes.

[0110] The basic weights of each attribute in the same dimension are the same, and the basic weights of each attribute in the same dimension are the basic weight of the dimension. The basic weights of each attribute in the dimension can be obtained by obtaining the basic weight of the dimension.

[0111] In an embodiment, obtaining the basic weights of each attribute in the multiple dimensions may include: determining the multiple dimensions; determining the basic weight of the dimension according to the coverage range of the dimension; determining the basic weight of the dimension as the basic weight of each attribute in the dimension.

[0112] Sort out the attributes that may cause differences in resource allocation to obtain multiple dimensions. One dimension corresponds to one type of attribute, and the resources corresponding to the multiple attributes included in one dimension are different. The resources can be the resources required for configuring the electronic device, such as wallpaper resources, font resources, and / or startup music resources, etc.

[0113] Determine the coverage range of the dimension, and determine the basic weight of the dimension according to the coverage range of the dimension. The basic weight of the dimension is proportional to the coverage range of the dimension. In one embodiment, the coverage range of the dimension may refer to the number of resources affected by the attributes in the dimension. For example, the wallpaper resources and startup music resources corresponding to different attributes in the country dimension may be different, while the font resources corresponding to different attributes in the movement dimension may be different; since the attributes in the country dimension correspond to two resources, and the movement dimension corresponds to one resource, the basic weight of the country dimension can be higher than the basic weight of the movement dimension.

[0114] In another embodiment, the coverage range of the dimension may refer to the configuration range of the electronic device affected by the attributes in the dimension. For example, the startup music resources corresponding to different attributes in the country dimension may be different, while the font resources corresponding to different attributes in the movement dimension may be different; since the startup music resources are only applied when starting up, corresponding to the startup configuration of the electronic device, and the font resources are applied in multiple interfaces where the electronic device needs to display text, corresponding to the configuration of multiple interfaces of the electronic device, so the configuration range of the font resources is greater than the configuration range of the startup music resources, then the basic weight of the movement dimension can be higher than the basic weight of the country dimension.

[0115] After determining the basic weight of the dimension, the basic weight of the dimension can be directly determined as the basic weight of the attributes included in the dimension. For example, if the basic weight of the country dimension is 0.1, then the basic weights of the UK attribute, US attribute, and French attribute included in the country dimension are all 0.1.

[0116] In this way, the basic weight of the dimension can be determined according to the coverage range of the dimension, and then the basic weight of each attribute included in the dimension can be determined according to the basic weight of the dimension, so as to determine the weights of each attribute according to the basic weight of the attribute subsequently.

[0117] Among the multiple attributes of multiple dimensions, there is a target attribute, and the weight offset of the target attribute is a value greater than zero. Determine the target attribute from the multiple attributes, and obtain the weight offset of the target attribute.

[0118] In one embodiment, the weight offsets of each target attribute can be the same, all being a preset value, for example, they can all be 0.1.

[0119] In another embodiment, when the target attribute is determined by the product identifier, the target attribute may have a first weight offset. When the target attribute is an attribute selected by the user, the target attribute may have a second weight offset. The weight offset of the target attribute may be determined based on the first weight offset and the second weight offset.

[0120] For example, when the target attribute is only determined by the product identifier, the target attribute may have a first weight offset of 0.1. When the target attribute is an attribute selected by the user, the target attribute may have a second weight offset of 0.1. When the target attribute is both determined by the product identifier and an attribute selected by the user, the weight offset of the target attribute may be the sum of the first weight offset of 0.1 and the second weight offset of 0.1, which is 0.2.

[0121] The sum of the base weight and the weight offset of the target attribute is determined as the weight of the target attribute. The weight offsets of other attributes except the target attribute among multiple attributes may be regarded as 0, or regarded as non-existent. Therefore, the base weights of other attributes except the target attribute among multiple attributes can be directly determined as the weights.

[0122] By adopting the technical solution of the embodiment of the present application, a weight offset is given to the target attribute, so that the weight of the target attribute is greater than the weights of other attributes that are not the target attribute in the same dimension. Thus, when the attributes in other dimensions included in the hierarchy are the same, the priority of the hierarchy including the target attribute is higher than the priority of the hierarchy including the non-target attribute, so that the resources corresponding to the target attribute are returned preferentially.

[0123] Based on the above technical solution, as an embodiment, determining the target attribute from the attributes may include: obtaining a product identifier; the product identifier is bound to the target attribute; and determining the target attribute according to the product identifier.

[0124] In the definition stage of the electronic device, a product identifier (ID) is set for the electronic device. The product identifier is bound to the target attribute in the dimension, and the binding relationship between the product identifier and the target attribute is maintained in the product configuration table. The product configuration table supports modification and addition. When compiling and integrating, the product configuration table can be packaged into a customized partition. The file type of the product configuration table can be set according to actual needs, and can be file types such as xml, json, or txt.

[0125] When it is necessary to determine the target attribute, the product identifier can be obtained, and the product configuration table can be queried according to the product identifier, so as to determine the target attribute.

[0126] By adopting the technical solution of the embodiment of the present application, the target attribute can be determined through the product identifier. Therefore, for electronic devices with the same initial configuration, different target attributes can be determined by setting different product identifiers, thereby affecting the priorities at each level, obtaining different target resources, and realizing the customization of different target resources. In this way, on the one hand, the reuse of resources can be achieved, and on the other hand, the customization of different target resources can be flexibly realized by modifying the product identifier.

[0127] Based on the above technical solution, as an embodiment, determining the target attribute from the attributes may include: obtaining the attribute selected by the user; determining the attribute selected by the user as the target attribute.

[0128] When the user is using the electronic device, different settings may be switched. According to the switching behavior of the user, the attribute selected by the user can be determined. The attribute selected by the user is determined as the target attribute.

[0129] For example, the country attribute of the electronic device is defaulted to the United Kingdom. During the use of the electronic device by the user, the country can be switched from the United Kingdom to the United States through the setting function. Then, the United States attribute can be determined as the target attribute in the country dimension, and the weight of the United States attribute can be modified, thereby modifying the weights of each level including the United States attribute.

[0130] According to the modified weights of each level, the priorities of each level are re-determined. In the order from high to low of the priorities of the multiple levels re-determined, the resources corresponding to each attribute included in the multiple levels are retrieved to obtain the target resources to be preferentially returned; configuration is performed according to the target resources.

[0131] By adopting the technical solution of the embodiment of the present application, according to the attribute selected by the user, the target attribute can be determined, and after the weight of the target attribute is modified, the priorities of each level are affected, different target resources are obtained, and thus configuration is performed according to the newly obtained target resources. In this way, each target resource can be quickly applied.

[0132] Figure 2It is a schematic flowchart of a resource allocation method provided by an embodiment of the present application. In step S210, a resource management service is started. The resource management service can be started when the device is powered on or after the user modifies the settings. In step S220, the target attribute weight is adjusted according to the product identifier. In step S230, the target attribute weight is adjusted according to the user selection. When the attribute is the target attribute, the weight of the attribute is the sum of the base weight and the weight offset. Therefore, when determining the target attribute according to the product identifier and / or according to the user selection, it is necessary to adjust the weight of the target attribute according to the weight offset. In step S240, the hierarchical weight and priority are calculated. Traverse the multiple attributes in multiple dimensions to obtain multiple different levels, and determine the sum of the weights of each attribute included in each level as the weight of the level; determine the priority of the level according to the weight of the level. In step S250, the target resources are indexed according to the priority. Retrieve the resources corresponding to each attribute included in the multiple levels in the order of the priorities of the multiple levels from high to low to obtain the target resources to be preferentially returned. In step S260, configuration is performed according to the target resources. Configure the electronic device according to the target resources preferentially returned.

[0133] Adopting the technical solution of the embodiment of the present application, the resources corresponding to each attribute in the same dimension are different, and each level includes one attribute in each dimension. Therefore, multiple levels correspond to different combination methods of each resource, realizing a resource combination method with attribute granularity. Compared with the resource combination method with partition granularity in the related art, it has the advantage of being more refined; the priority of the level can be determined according to the weights of each attribute, retrieve the resources corresponding to the level in the order of the priority from high to low to obtain the target resources to be preferentially returned, and configure according to the target resources. When the weights of the attributes are different, the target resources to be preferentially returned are also different. Therefore, different target resources can be flexibly configured by changing the weights of the attributes. In summary, resources can be allocated more finely and flexibly.

[0134] To facilitate better implementation of the resource allocation method of the present application, the present application also provides a resource allocation device based on the above resource allocation method. The meanings of the nouns are the same as those in the above resource allocation method, and the specific implementation details can refer to the description in the method embodiment.

[0135] Please refer to Figure 3 , Figure 3 It is a schematic structural diagram of the resource allocation device provided by the embodiment of the present application, where the resource allocation device includes:

[0136] An acquisition module 301, configured to acquire the weights of each attribute in multiple dimensions; the resources corresponding to each attribute in the same dimension are different;

[0137] The combination module 302 is used to combine the attributes in the multiple dimensions respectively to obtain multiple levels; each of the levels includes: one attribute in each of the dimensions;

[0138] The determination module 303 is used to determine the priorities of the multiple levels according to the weights of the respective attributes included in the multiple levels;

[0139] The retrieval module 304 is used to retrieve the resources corresponding to the respective attributes included in the multiple levels in the order from high to low of the priorities of the multiple levels to obtain the target resources to be preferentially returned;

[0140] The configuration module 305 is used to perform configuration according to the target resources.

[0141] In one embodiment, the acquisition module 301 includes:

[0142] The basic weight acquisition unit is used to acquire the basic weights of the respective attributes in the multiple dimensions; the basic weights of the respective attributes in the same dimension are the same;

[0143] The target attribute determination unit is used to determine the target attribute from the attributes;

[0144] The offset acquisition unit is used to acquire the weight offset of the target attribute;

[0145] The first weight determination unit is used to determine the sum of the weight offset and the basic weight of the target attribute as the weight of the target attribute;

[0146] The second weight determination unit is used to determine the basic weights of the other attributes except the target attribute in the attributes as the weights of the other attributes.

[0147] In one embodiment, the basic weight acquisition unit includes:

[0148] The dimension determination subunit is used to determine the multiple dimensions;

[0149] The first basic weight determination subunit is used to determine the basic weight of the dimension according to the coverage range of the dimension;

[0150] The second basic weight determination subunit is used to determine the basic weight of the dimension as the basic weights of the respective attributes in the dimension.

[0151] In one embodiment, the target attribute determination unit includes:

[0152] The identification acquisition subunit is used to acquire the product identification; the product identification is bound to the target attribute;

[0153] The first target attribute determination subunit is configured to determine the target attribute according to the product identifier.

[0154] In one embodiment, the target attribute determination unit includes:

[0155] The selected attribute acquisition subunit is configured to acquire the attributes selected by the user;

[0156] The second target attribute determination subunit is configured to determine the attributes selected by the user as the target attributes.

[0157] In one embodiment, the apparatus further includes:

[0158] The resource acquisition module is configured to acquire the resources corresponding to the respective attributes in the multiple dimensions;

[0159] The storage module is configured to store the resources in the attribute directory corresponding to the attributes of the resources;

[0160] The retrieval module 304 includes:

[0161] The directory retrieval unit is configured to retrieve the resources corresponding to the respective attributes in the attribute directories of the respective attributes included in the hierarchy.

[0162] In one embodiment, the determination module 303 includes:

[0163] The hierarchy weight determination unit is configured to determine the sum of the weights of the respective attributes included in each hierarchy as the weight of the hierarchy;

[0164] The hierarchy priority determination unit is configured to determine the priority of the hierarchy according to the weight of the hierarchy.

[0165] By adopting the technical solution of the embodiment of the present application, the resources corresponding to the respective attributes in the same dimension are different, and each hierarchy includes one attribute in each dimension. Therefore, multiple hierarchies correspond to different combination modes of the respective resources, realizing a resource combination mode with attribute granularity. Compared with the resource combination mode with partition granularity in the related art, it has the advantage of being more refined; the priority of the hierarchy can be determined according to the weights of the respective attributes, and the resources corresponding to the hierarchy are retrieved in the order from high to low according to the priority to obtain the target resources to be preferentially returned, and the configuration is performed according to the target resources. When the weights of the attributes are different, the target resources to be preferentially returned are also different. Therefore, flexible configuration of different target resources can be achieved by changing the weights of the attributes. In summary, the resources can be configured more precisely and flexibly.

[0166] For the specific limitations of the resource allocation device, reference may be made to the limitations of the resource allocation method in the foregoing text, which will not be elaborated herein. Each module in the above resource allocation device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.

[0167] In addition, this application also provides an electronic device, as Figure 4 shown, which shows a schematic structural diagram of the electronic device involved in this application. Specifically:

[0168] The electronic device may include a processor 401 with one or more processing cores and a memory 402 with one or more computer-readable storage media and other components. Those skilled in the art can understand that Figure 4 the structural diagram of the electronic device shown in

[0169] does not constitute a limitation on the electronic device, and it may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Among them:

[0170] The processor 401 is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and lines. By running or executing the software programs and / or modules stored in the memory 402, and by calling the data stored in the memory 402, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above modem processor may not be integrated into the processor 401 either.

[0171] In one embodiment, the electronic device further includes a power supply 403 for powering each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, a recharge system, a power device debugging circuit, a power converter or inverter, and a power status indicator.

[0172] In one embodiment, the electronic device may further include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0173] Although not shown, the electronic device may further include a display unit, etc., which will not be elaborated here. Specifically, in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, so as to implement the steps in any of the resource configuration methods provided in the embodiments of the present application.

[0174] Those skilled in the art can understand that Figure 4 the structure shown in

[0175] is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0176] In one embodiment, an electronic device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the method described in any embodiment of the present application is implemented.

[0177] In some embodiments, a computer program product is further proposed, including a computer program or instruction, and when the computer program or instruction is executed by the processor, the method described in any embodiment of the present application is implemented.

[0178] For the specific implementation of the above operations, reference can be made to the previous embodiments, which will not be elaborated here.

[0179] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or by controlling relevant hardware through instructions. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0180] For this reason, the present application provides a computer-readable storage medium on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any of the resource configuration methods provided by the present application.

[0181] For the specific implementation of each of the above operations, reference may be made to the previous embodiments and will not be elaborated herein.

[0182] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.

[0183] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the resource configuration methods provided by the present application, the beneficial effects achievable by any of the resource configuration methods provided by the present application can be realized. For details, reference may be made to the previous embodiments and will not be elaborated herein.

[0184] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the element.

[0185] The above has introduced in detail a resource configuration method, device, electronic device and computer-readable storage medium provided by the present application. Specific examples are used in this article to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A resource configuration method, characterized in that: include: Get the weights of each attribute in multiple dimensions; Different attributes in the same dimension correspond to different resources; Combining the attributes in the multiple dimensions respectively to obtain multiple levels; Each of the levels includes: an attribute in each of the dimensions; Determining priorities of the multiple levels according to weights of the respective attributes included in the multiple levels; According to the priority order of the multiple levels from high to low, resources corresponding to the attributes included in the multiple levels are retrieved to obtain the target resources returned with priority; Configuration is performed according to the target resource.

2. The method according to claim 1, characterized in that: The obtaining of the weights of the attributes in the multiple dimensions includes: Obtaining basic weights of the attributes in the multiple dimensions; the basic weights of the attributes in the same dimension are the same; determining a target attribute from among the attributes; Obtaining a weight offset of the target attribute; Determine the sum of the weight offset and the base weight of the target attribute as the weight of the target attribute; The basic weights of the other attributes among the attributes except the target attribute are determined as the weights of the other attributes.

3. The method according to claim 2, characterized in that The obtaining of the basic weights of the attributes in the multiple dimensions includes: determining the plurality of dimensions; Determining the basic weight of the dimension according to the coverage of the dimension; The basic weight of the dimension is determined as the basic weight of each attribute in the dimension.

4. The method according to claim 2, characterized in that: The determining the target attribute from the attributes comprises: Obtaining a product identifier; the product identifier is bound to the target attribute; The target attribute is determined according to the product identification.

5. The method according to claim 2, characterized in that: The determining the target attribute from the attributes comprises: Get the attributes selected by the user; The attribute selected by the user is determined as the target attribute.

6. The method according to claim 1, characterized in that The method further comprises: Obtain resources corresponding to each attribute in the multiple dimensions; Storing the resource in the attribute directory of the attribute corresponding to the resource; The retrieving resources corresponding to the attributes included in the multiple levels includes: Under the attribute directory of each attribute included in the hierarchy, resources corresponding to each attribute are retrieved.

7. The method according to claim 1, characterized in that The determining the priorities of the multiple levels according to the weights of the attributes included in the multiple levels includes: Determine the sum of the weights of the attributes included in each of the levels as the weight of the level; According to the weights of the levels, the priorities of the levels are determined.

8. A resource allocation device, characterized in that: include: An acquisition module is used to obtain the weights of each attribute in multiple dimensions; Different attributes in the same dimension correspond to different resources; A combination module, used for combining the attributes in the multiple dimensions respectively to obtain multiple levels; Each of the levels includes: an attribute in each of the dimensions; A determination module, configured to determine the priorities of the multiple levels according to the weights of the respective attributes included in the multiple levels; A retrieval module, used to retrieve resources corresponding to the attributes included in the multiple levels in descending order of priority of the multiple levels, and obtain the target resources returned with priority; A configuration module is used to perform configuration according to the target resource.

9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the resource configuration method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the resource configuration method according to any one of claims 1 to 7 are implemented.