Product information configuration method and related devices
By adjusting the data structure through identifier hierarchical mapping files, the problem of wasted storage and bandwidth resources in OTA upgrades of electronic devices is solved, and redundant information is reduced and product information is customized in compliance with regulations is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2023-07-20
- Publication Date
- 2026-05-05
AI Technical Summary
Existing technologies for OTA upgrades of electronic devices suffer from problems such as high storage resource consumption and redundant information, especially when multiple identifiers have the same subset of complete product information, leading to wasted traffic resources and compliance risks.
By establishing an identifier hierarchical mapping file, adjusting the data structure to achieve structured mapping, determining the target resource data and its priority, and configuring it, redundant information is reduced.
It effectively reduces product information redundancy, simplifies the customization of product information for multiple regions/operators, saves storage and traffic resources, and complies with legal and regulatory requirements.
Smart Images

Figure CN116881302B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic equipment technology, specifically to a product information configuration method and related apparatus. Background Technology
[0002] When electronic devices are upgraded using Over-the-Air (OTA) technology, product information for each market region and / or operator can generally be compiled using a flashing package, or product information for a region and / or operator can be loaded from a partition based on the identifier written during the manufacturing of the electronic device.
[0003] However, in general, storing the version of the flashing package requires a lot of storage resources. Furthermore, when loading regional and / or carrier product information from the partition based on the identifier, there is a lot of redundant information when multiple identifiers have the same subset of complete product information. Users need to consume a lot of data resources when upgrading via OTA. Summary of the Invention
[0004] This application provides a product information configuration method and related apparatus, which simplifies the customization of product information for electronic devices across multiple regions / operators while removing redundant product information.
[0005] In a first aspect, embodiments of this application provide a product information configuration method, applied to an electronic device, the method comprising:
[0006] Determine the identifier and identifier hierarchy mapping file corresponding to the electronic device, wherein the identifier hierarchy mapping file is adapted to the electronic device;
[0007] According to the identifier hierarchical mapping file, the first data structure is adjusted to obtain the target data structure, wherein the first data structure is established when the electronic device is powered on;
[0008] Search the structured data in the target data structure to obtain a target list, wherein the target list includes target resource data that matches the identifier and the target priority corresponding to the target resource data;
[0009] Based on the target priority corresponding to the target resource data, the target resource data is configured to obtain the product information corresponding to the electronic device.
[0010] Secondly, embodiments of this application provide a product information configuration device, which is applied to an electronic device. The device includes: a determining unit, an adjusting unit, a searching unit, and a configuring unit, wherein...
[0011] The determining unit is used to determine the identifier and the identifier hierarchical mapping file corresponding to the electronic device, wherein the identifier hierarchical mapping file is adapted to the electronic device;
[0012] The adjustment unit is used to adjust the first data structure according to the identifier hierarchical mapping file to obtain the target data structure, wherein the first data structure is established when the electronic device is powered on;
[0013] The search unit is used to search for structured data in the target data structure to obtain a target list, wherein the target list includes target resource data that matches the identifier and the target priority corresponding to the target resource data;
[0014] The configuration unit is used to configure the target resource data according to the target priority corresponding to the target resource data, so as to obtain the product information corresponding to the electronic device.
[0015] Thirdly, embodiments of this application provide an electronic device, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for performing steps in any method of the first aspect of this application.
[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program for electronic data interchange, wherein the computer program causes a computer to perform some or all of the steps described in any method of the first aspect of this application.
[0017] Fifthly, embodiments of this application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in any method of the first aspect of this application. The computer program product may be a software installation package.
[0018] As can be seen, in this embodiment, the identifier and identifier hierarchy mapping file corresponding to the electronic device can be determined, wherein the identifier hierarchy mapping file is adapted to the electronic device; according to the identifier hierarchy mapping file, the first data structure is adjusted to obtain the target data structure, wherein the first data structure is established when the electronic device is powered on; the structured data in the target data structure is searched to obtain the target list, wherein the target list includes target resource data matching the identifier and the target priority corresponding to the target resource data; according to the target priority corresponding to the target resource data, the target resource data is configured to obtain the product information corresponding to the electronic device. Thus, the hierarchy and grouping of identifiers can be mapped through the data structure, transforming the simple linear mapping relationship of identifiers into a structured mapping relationship, which helps reduce redundancy in product information; at the same time, resource data can be filtered and configured, removing redundant product information and simplifying the customization of multi-region / operator product information for electronic devices. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of a data structure for an identifier provided in an embodiment of this application;
[0021] Figure 2A This is a flowchart illustrating a product information configuration method provided in an embodiment of this application;
[0022] Figure 2B This is a schematic diagram of a target data structure provided in an embodiment of this application;
[0023] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0024] Figure 4A This is a functional unit block diagram of a product information configuration device provided in an embodiment of this application;
[0025] Figure 4B This is a block diagram of the functional units of a product information configuration device provided in an embodiment of this application. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0027] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0028] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0029] The electronic device can be a portable electronic device that also includes other functions such as a personal digital assistant and / or music player, such as a mobile phone, tablet computer, terminal device, wearable electronic device with wireless communication capabilities (such as a smartwatch, smart glasses), in-vehicle device, etc. Exemplary embodiments of the portable electronic device include, but are not limited to, portable electronic devices running iOS, Android, Microsoft systems, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer. It should also be understood that in some other embodiments, the aforementioned electronic device may not be a portable electronic device, but a desktop computer.
[0030] The following describes the technologies or information used in this application.
[0031] 1. Android's PropertyService is responsible for managing the property information of electronic devices (such as terminal devices), such as terminal authentication information and configuration information.
[0032] 2. A complete product information set (ProductInfoSet) is formed by distributing product information across various partitions of the system (e.g., system partition, vendor partition, product partition, original equipment manufacturer (ODM) partition, original equipment manufacturer (OEM) partition, etc.). Each entry is in key-value format, and the set of all unique keys constitutes the complete product information set.
[0033] 3. Complete Product Information Subset (ProductInfoSubSet): A subset of the complete product information set, generally referring to the unique key set of all key-value entries under a directory within a partition, represented by a directory.
[0034] When upgrading electronic devices via Over-the-Air (OTA) technology, two common approaches are available: Approach 1) Compiling different product information for each market region and / or operator using a custom firmware package; Approach 2) Packing all product information for all market regions / operators of the electronic device into a custom firmware package during compilation. Each electronic device is written with an identifier during manufacturing, and after the electronic device is powered on, the Property Service loads the corresponding region and / or operator's product information from the partition based on the identifier.
[0035] The following problems exist with the two solutions mentioned above:
[0036] 1) Regarding Option 1, each region / carrier of an electronic device has a flashing package. Generally, the flashing package of an electronic device is about 5-10GB. The version storage requires a lot of storage resources, and the user's OTA upgrade requires a lot of traffic resources.
[0037] 2) Regarding Scheme 2, when loading regional and / or carrier product information from the partition based on the Identifier, a one-to-one mapping is used, with one Identifier corresponding to a complete set of product information. For multiple Identifiers with the same subset of complete product information, there is a large amount of redundant information. At the same time, when the Property Service loads the above product information, it overwrites the loading according to the partition priority defined by the device. The priority is fixed and cannot be dynamically adjusted. In addition, all the product information of the electronic device's listed regions and / or carriers is in a single flashing package, which can be any region and / or carrier version. In some cases, there are compliance risks, which may violate the laws and regulations of some regions.
[0038] To address the aforementioned issues, this application proposes a product information configuration method and related apparatus, which will be described in detail below.
[0039] Please see Figure 1 , Figure 1 This is a schematic diagram of the data structure of an identifier provided in this application.
[0040] For example, in this application, we take an identifier as an example, such as identifier A. This identifier can be grouped into multiple levels through its corresponding identifier hierarchical grouping mapping file, establishing a structure like... Figure 1 The data structure shown.
[0041] The data structure described above can be divided into multiple levels, as shown in the figure. It can include three levels: Level 1: Large region; Level 2: Country and / or region; Level 3: Operator.
[0042] For each of the above levels, multiple identifier groups can be formed. For example, at level one, large regions can be divided into multiple identifier groups such as Europe and Southeast Asia, and identifiers can be assigned to them. For example, Europe is A1, Southeast Asia is B1, and the Americas is C1. At level two, the European region can be divided into multiple identifier groups such as Germany and France, and an identifier can be assigned to each group. For example, Germany in the European region can be A2-1, and France can be A2-2. At level three, operators can be divided. For example, for Germany, there can be operator 1, operator 2, and operator 3, and identifiers can be assigned to them. For example, operator 1 is A3-1, operator 2 is A3-2, and operator 3 is A3-3. In this way, a data structure can be obtained.
[0043] In the data structure described above, each of the three levels corresponds to an identifier group; any identifier group will be associated with one or more product information subsets (ProductInfoSubSet).
[0044] The data structure described above can also be other multi-branch trees; there is a mapping relationship between each level.
[0045] Each level and / or its corresponding subset of product information has a priority; for example, if the priority is the level of the current identifier group, then for the above data structure, the priority of level 1 is higher than that of level 2 and level 3, and the priority of level 2 is higher than that of level 3; in this data structure, the subset of product information can inherit the priority of its corresponding level.
[0046] It should be noted that the above priorities can also be customized according to needs and can be dynamically set; specific details are not limited here. For example, if some areas are configured not to publicly disclose the identifier groups corresponding to the second-level hierarchy, then the priority of the second-level hierarchy can be set to be higher than that of the first-level hierarchy.
[0047] Each electronic device can have its own data structure and identifier. Electronic devices can add custom mapping levels to the default structured mapping, meaning they can customize and add levels.
[0048] The aforementioned levels and their corresponding identifier groups have a mapping relationship; the product information and other resource information included in the product information subset associated with each level are isolated from each other; and for the same level, the product information associated with any two identifier groups will not be effective at the same time.
[0049] It should be noted that in this application, "multiple" can refer to two or more, which will not be elaborated further; the above figure only uses one identifier to illustrate, and structured data has been generated in this data structure, namely the European region, the Southeast Asian region, etc., which are not specifically limited here.
[0050] In some examples, the data structure corresponding to the identifier shown in the figure can be a first data structure established based on the initial identifier hierarchical mapping file of the electronic device; or it can be a second data structure generated after merging the current identifier hierarchical mapping file of the electronic device into the first data structure.
[0051] Please see Figure 2A , Figure 2A This is a flowchart illustrating a product information configuration method provided in an embodiment of this application, applied to an electronic device. As shown in the figure, the product information configuration method includes the following operations.
[0052] S201. Determine the identifier and identifier hierarchy mapping file corresponding to the electronic device, wherein the identifier hierarchy mapping file is adapted to the electronic device.
[0053] The aforementioned identifier corresponds to the electronic device and can be a region and / or operator identifier; for example, the identifier can be 00010111, 11110000, etc., and the specifics are not specified here.
[0054] The electronic device can read the above identifier from the init process, which is a step in the system startup process of the electronic device; the above identifier can be obtained by parsing the init.rc file.
[0055] The aforementioned identifier hierarchy mapping file can be used to characterize the hierarchical configuration of the electronic device in the structured mapping, the corresponding identifier groups, the product information subsets corresponding to the identifier groups, and the priorities corresponding to the hierarchical and / or identifier groups and / or product information subsets, etc.
[0056] The aforementioned identifier hierarchy mapping file can be a customized identifier hierarchy mapping file adapted to the current device; it can be the system default or determined by the backend server.
[0057] Among them, the electronic device can load the identifier hierarchical grouping mapping file configured by the current electronic device from the first specific directory. This identifier hierarchical grouping mapping file can be set in the background and obtained by the electronic device when it is powered on or during OTA upgrade.
[0058] S202. According to the identifier hierarchical mapping file, the first data structure is adjusted to obtain the target data structure, wherein the first data structure is established when the electronic device is powered on.
[0059] The first data structure mentioned above can be obtained when the electronic device is powered on, based on the default initial identifier hierarchical mapping file. This default initial identifier hierarchical mapping file can be the factory configuration and can be adapted to multiple types of electronic devices or to multiple operators or regions.
[0060] The target data structure mentioned above may differ from the first data structure, specifically in their respective hierarchical and grouping structures. However, they may be identical in terms of their mapping relationship, meaning that the data structures are established in the same way.
[0061] S203. Search the structured data in the target data structure to obtain a target list, wherein the target list includes target resource data that matches the identifier and the target priority corresponding to the target resource data.
[0062] Among them, such as Figure 1 As shown, the aforementioned structured data can refer to multiple levels in the data structure that have mapping relationships, identifier groups corresponding to each level, subsets of product information corresponding to identifier groups, and so on.
[0063] The target resource data that matches the identifier and the target priority corresponding to the target resource data are obtained by searching and comparing them layer by layer in the target data structure.
[0064] S204. Configure the target resource data according to the target priority corresponding to the target resource data to obtain the product information corresponding to the electronic device.
[0065] The aforementioned product information may refer to product information in the corresponding market region and / or operator. This product information may include at least one of the following: product name, model name, marketing name, device code, network access code, network parameters, channel information, chip information, certification information, mandatory regulatory information, etc., without limitation.
[0066] The product information is stored in the attribute service, which is used to provide product information query services to system services or applications.
[0067] As can be seen, the product information configuration method described in this application can determine the identifier and identifier hierarchy mapping file corresponding to the electronic device, wherein the identifier hierarchy mapping file is adapted to the electronic device; adjust the first data structure according to the identifier hierarchy mapping file to obtain a target data structure, wherein the first data structure is established when the electronic device is powered on; search the structured data in the target data structure to obtain a target list, wherein the target list includes target resource data matching the identifier and the target priority corresponding to the target resource data; configure the target resource data according to the target priority corresponding to the target resource data to obtain the product information corresponding to the electronic device. In this way, the hierarchy and grouping of identifiers can be mapped through the data structure, transforming the simple linear mapping relationship of identifiers into a structured mapping relationship, which helps reduce redundancy in product information; at the same time, resource data can be filtered and configured, removing redundant product information and simplifying the customization of multi-region / operator product information for electronic devices.
[0068] In one possible example, before determining the identifier hierarchy mapping file corresponding to the identifier, the above method may further include the following steps: in response to a power-on command, determining the identifier and saving the identifier; reading the initial identifier hierarchy mapping file; and establishing the first data structure based on the initial identifier hierarchy mapping file.
[0069] In one possible example, the first data structure includes multiple first levels, each first level corresponds to a first identifier group, each first identifier group is associated with first resource data, the first resource data includes at least one first product information subset, the first product information subsets are data isolated from each other, and each first identifier group and / or associated first resource data corresponds to a first priority.
[0070] The aforementioned initial identifier hierarchy mapping file can be identified as a factory-set identifier hierarchy mapping file adapted to multiple regions / multiple operators. It can be used to represent the default first level, the corresponding first identifier group, the first resource data, the first priority, etc.
[0071] In a specific implementation, a first data structure can be established based on the multiple first levels represented by the initial identifier hierarchical mapping text, the first identifier group corresponding to any first level, the first resource data corresponding to the first product information subset corresponding to the first identifier group, and the corresponding first priority, etc.
[0072] For example, the first data structure can be as follows Figure 1 As shown, it is compatible with multiple regions including Europe, Southeast Asia, and the Americas.
[0073] The aforementioned initial identifier hierarchical mapping file can be read from a second specific directory, which may be the factory default directory, different from the aforementioned first specific directory.
[0074] As can be seen in this example, the electronic device can read the default initial identifier hierarchy mapping file and establish a data structure based on the initial identifier mapping file, that is, establish a structured mapping relationship between hierarchy and identifier grouping, as well as between resource data and priority. Based on the establishment of the above mapping relationship, it is beneficial to transform the simple linear mapping relationship of identifiers into a structured mapping relationship.
[0075] In one possible example, adjusting the first data structure according to the identifier hierarchy mapping file to obtain the target data structure may include the following steps: determining the resource data associated with the identifier group indicated by the identifier hierarchy mapping file, and the hierarchy; comparing the hierarchy with the plurality of first levels to determine whether a new hierarchy needs to be added to the first data structure; if a new hierarchy needs to be added to the first data structure, merging the hierarchy into the plurality of first levels of the first data structure, and merging the resource data into the corresponding hierarchy to obtain a second data structure, wherein the second data structure includes a plurality of second levels, each second level corresponds to a second identifier group, each second identifier group is associated with second resource data, and each second identifier group and / or associated resource data... The second resource data corresponds to one first priority; the priorities corresponding to the resource data associated with the identifier group are compared with the multiple first priorities corresponding to the multiple first resource data to determine whether it is necessary to adjust the first priority corresponding to any first resource data in the second data structure; if it is necessary to adjust the first priority corresponding to any first resource data in the second data structure, the priorities corresponding to the resource data associated with the identifier group are merged into the multiple first priorities to obtain multiple second priorities, and the target data structure is obtained, wherein each second resource data corresponds to a second priority, the target data structure includes the multiple second levels, each second level corresponds to a second identifier group, and each second identifier group is associated with the second resource data.
[0076] The aforementioned identifier grouping mapping file is used to represent multiple levels, the identifier groups associated with each level, the product information subsets corresponding to each identifier group, the resource data corresponding to the product information subsets, and so on.
[0077] The second data structure inherits the first resource data from the first data structure.
[0078] In this application, because the product information is different, the resource data corresponding to different levels is also different; therefore, after determining the identifier hierarchical mapping file, it is necessary to adjust the first data structure.
[0079] The newly added tiers can be customized based on the region or operator where the electronic device is located, or they can be tiers that meet the laws, regulations, and policies of the region, along with their corresponding resource data and priorities.
[0080] For example, if the laws and regulations of the region restrict the first identifier group or level, its corresponding priority can be increased, that is, the resource data associated with the first identifier group can be increased.
[0081] The second data structure is obtained by adjusting the hierarchy in the first data structure. The second data structure can inherit the structural mapping relationship in the first data structure, as well as the first resource data.
[0082] Among them, after adding a new level, resource data can be added to the first resource data to obtain the second resource data corresponding to the second data structure.
[0083] Specifically, the priority of resource data associated with identifier groups is merged into multiple first priorities. That is, for first identifier groups and identifier groups of the same type, if the first priority of the first identifier group is higher than the priority of the identifier group, the first priority is replaced with the priority of the resource data; conversely, if the first priority of the first identifier group is lower than the priority of the identifier group, the priority of the resource data is replaced with the priority of the first priority.
[0084] Optionally, if it is not necessary to add a new level in the first data structure, it can be further determined whether it is necessary to adjust the first priority corresponding to any first resource data in the first data structure; if it is necessary to adjust the first priority corresponding to any first resource data in the first data structure, then the priorities corresponding to the resource data associated with the identifier group are merged into multiple first priorities to obtain multiple second priorities, and the target data structure is obtained. Because no level is adjusted, the target data structure includes multiple first levels, each first level corresponds to a first identifier group, each first identifier group is associated with first resource data, and each first identifier group includes at least one subset of product information, with at least one subset of product information corresponding to the first resource data associated with its corresponding first identifier group.
[0085] Optionally, if it is not necessary to add a new level in the first data structure and it is not necessary to adjust the first priority corresponding to any first resource data in the first data structure, then it is not necessary to adjust the first data structure and use the first data structure as the target data structure. In specific implementation, since the electronic device can correctly identify the region and operator after it is powered on, this situation is almost non-existent.
[0086] Optionally, if a new level needs to be added to the first data structure, the level is merged into the plurality of first levels of the first data structure, and the resource data is merged into the corresponding level to obtain a second data structure; further, it can be determined whether the first priority corresponding to any first resource data in the second data structure needs to be adjusted; if the first priority corresponding to any first resource data in the second data structure does not need to be adjusted, the second data structure is used as the target data structure. Since the second data structure only adds a level, the priority remains unchanged, and it can inherit the priority relationship of the first data structure.
[0087] For example, if a new level needs to be added to the first data structure, and the first priority of the first identifier group association does not need to be adjusted, if Figure 1 This is a schematic diagram of the first data structure. Figure 1 On the basis of, such as Figure 2B The diagram shows a target data structure. For the next level below the first level A1 (European region), the second level A2-1 (Germany), and the third level A3-1 (operator 1), a new cell can be added as the fourth level. This can include cell 1 (identified as A4-1) and cell 2 (identified as A4-2), and their corresponding resource data can be merged into this data structure to obtain the target data structure.
[0088] As can be seen in this example, the simple linear mapping relationship of the current identifier can be transformed into a structured mapping relationship through the identifier hierarchical mapping file corresponding to the current electronic device. This helps to reduce product information redundancy. At the same time, considering the version of some regions / operators or the laws and regulations of some regions, the hierarchy and priority can be dynamically adjusted so that the electronic device can be used normally within the specified scope.
[0089] In one possible example, configuring the target resource data according to the target priority corresponding to the target resource data to obtain the product information corresponding to the electronic device may include the following steps: sorting the target resource data according to the target priority corresponding to the target resource data; during the sorting process, replacing the target resource data with the target resource data with the target priority that is higher with the target priority that is lower, to obtain the product information.
[0090] The target priority mentioned above can be dynamically set according to the priority after adjusting the first data structure in the above embodiments. For example, it can be the first priority mentioned above, or it can be the second priority after adjusting the first priority; the specifics are not limited here.
[0091] The target resource data mentioned above can be dynamically set after adjusting the first data structure according to the above embodiments. For example, it can be the first resource data mentioned above, or it can be the second resource data after merging resource data; the specifics are not limited here.
[0092] As can be seen in this example, the target resource data matching the identifier of the electronic device can be sorted according to the target priority. During the sorting process, the target resource data with higher priority is overwritten or replaced with the target resource data with lower priority to obtain the final product information. This product information is redundant compared to the product information corresponding to the first data structure. Furthermore, it can be customized and simplifies the customization of product information for electronic devices in multiple regions and / or by operators.
[0093] In one possible example, the structured data includes: a plurality of second levels having a structured mapping relationship and a group of second identifiers corresponding to each second level; the step of searching the structured data in the target data structure to obtain a target list may include the following steps: searching the plurality of second identifier groups corresponding to the plurality of second levels in the target data structure to obtain target identifier groups that match the identifiers; determining the target resource data corresponding to the target identifier groups; and generating the target list based on the target identifier groups and the corresponding target resource data.
[0094] Among them, target identifiers that match the identifiers can be grouped by searching hierarchically or by keywords according to the structural mapping relationship of the target data structure.
[0095] The target identifier group can be dynamically set according to the target data structure after adjusting the first data structure in the above embodiments. For example, it can be the first identifier group or the second identifier group after adjusting the first identifier group; the specifics are not limited here.
[0096] It should be noted that the method or strategy for searching structured data in the target data structure can be set by the user or by the system default, including but not limited to the method described in this application.
[0097] As can be seen, in this example, the electronic device can search for target identifier groups that match the identifiers based on the structural mapping relationship of the target data structure, which helps to reduce search time and improve search efficiency. Furthermore, it can also locate the target identifier groups based on the structural mapping relationship, obtain the associated target resource data and its corresponding target priority, and save them to a target list, which helps to reduce product information redundancy.
[0098] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. As shown in the figure, the electronic device includes a processor, a memory, a communication interface, and one or more programs applied to the electronic device. The one or more programs are stored in the memory and are configured to be executed by the processor according to the following instructions:
[0099] Determine the identifier and identifier hierarchy mapping file corresponding to the electronic device, wherein the identifier hierarchy mapping file is adapted to the electronic device;
[0100] According to the identifier hierarchical mapping file, the first data structure is adjusted to obtain the target data structure, wherein the first data structure is established when the electronic device is powered on;
[0101] Search the structured data in the target data structure to obtain a target list, wherein the target list includes target resource data that matches the identifier and the target priority corresponding to the target resource data;
[0102] Based on the target priority corresponding to the target resource data, the target resource data is configured to obtain the product information corresponding to the electronic device.
[0103] As can be seen, the electronic device described in this embodiment can determine the identifier and identifier hierarchy mapping file corresponding to the electronic device, wherein the identifier hierarchy mapping file is adapted to the electronic device; according to the identifier hierarchy mapping file, the first data structure is adjusted to obtain the target data structure, wherein the first data structure is established when the electronic device is powered on; the structured data in the target data structure is searched to obtain the target list, wherein the target list includes target resource data matching the identifier and the target priority corresponding to the target resource data; according to the target priority corresponding to the target resource data, the target resource data is configured to obtain the product information corresponding to the electronic device. In this way, the hierarchy and grouping of identifiers can be mapped through the data structure, transforming the simple linear mapping relationship of identifiers into a structured mapping relationship, which helps to reduce the redundancy of product information; at the same time, resource data can be filtered and configured, removing redundant product information and simplifying the customization of multi-region / operator product information of electronic devices.
[0104] In one possible example, before determining the identifier hierarchy mapping file corresponding to the identifier, the above procedure further includes instructions for performing the following steps:
[0105] In response to the power-on command, the identifier is determined and the identifier is saved;
[0106] Read the initial identifier hierarchy mapping file;
[0107] The first data structure is established based on the initial identifier hierarchical mapping file.
[0108] In one possible example, the first data structure includes multiple first levels, each first level corresponds to a first identifier group, each first identifier group is associated with first resource data, the first resource data includes at least one first product information subset, the first product information subsets are data isolated from each other, and each first identifier group and / or associated first resource data corresponds to a first priority.
[0109] In one possible example, regarding the adjustment of the first data structure according to the hierarchical mapping file of the identifier to obtain the target data structure, the above procedure includes instructions for performing the following steps:
[0110] Determine the resource data associated with the identifier groups indicated by the identifier hierarchy mapping file, as well as the hierarchy;
[0111] Compare the level with the plurality of first levels to determine whether a new level needs to be added to the first data structure;
[0112] If a new level needs to be added to the first data structure, the level is merged into the plurality of first levels of the first data structure, and the resource data is merged into the corresponding level to obtain a second data structure. The second data structure includes a plurality of second levels, each second level corresponds to a second identifier group, each second identifier group is associated with second resource data, and each second identifier group and / or associated second resource data corresponds to a first priority.
[0113] Compare the priority of the resource data associated with the identifier group with the multiple first priorities corresponding to the multiple first resource data to determine whether it is necessary to adjust the first priority corresponding to any first resource data in the second data structure.
[0114] If it is necessary to adjust the first priority corresponding to any of the first resource data in the second data structure, then merge the priority corresponding to the resource data associated with the identifier group into the plurality of first priorities to obtain a plurality of second priorities, and obtain the target data structure, wherein each of the second resource data corresponds to the second priority, the target data structure includes the plurality of second levels, each of the second levels corresponds to a second identifier group, and each of the second identifier groups is associated with the second resource data.
[0115] In one possible example, regarding the step of configuring the target resource data according to the target priority corresponding to the target resource data to obtain product information corresponding to the electronic device, the above procedure includes instructions for performing the following steps:
[0116] The target resource data is sorted according to the target priority corresponding to the target resource data;
[0117] During the sorting process, target resource data with higher target priority is replaced with target resource data with lower target priority to obtain the product information.
[0118] In one possible example, the structured data includes: the plurality of second levels having a structured mapping relationship and a group of second identifiers corresponding to each second level; in terms of configuring the target resource data according to the target priority corresponding to the target resource data to obtain product information corresponding to the electronic device, the above procedure includes instructions for performing the following steps:
[0119] Search for multiple second identifier groups corresponding to the multiple second levels in the target data structure to obtain target identifier groups that match the identifiers;
[0120] Determine the target resource data corresponding to the target identifier group;
[0121] The target list is generated based on the target identifier group and the corresponding target resource data.
[0122] In one possible example, the product information is stored in an attribute service, which is used to provide product information query services to system services or applications.
[0123] The above primarily describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, the electronic device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0124] This application embodiment can divide the electronic device into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0125] When dividing each function into modules according to its corresponding function. Figure 4A A schematic diagram of a product information configuration device is shown, such as Figure 4A As shown, the device is applied to an electronic device. The product information configuration device 400 may include: a determining unit 401, an adjusting unit 402, a searching unit 403, and a configuration unit 404, wherein...
[0126] The determining unit 401 is used to determine the identifier and the identifier hierarchical mapping file corresponding to the electronic device, wherein the identifier hierarchical mapping file is adapted to the electronic device;
[0127] The adjustment unit 402 is used to adjust the first data structure according to the identifier hierarchical mapping file to obtain the target data structure, wherein the first data structure is established when the electronic device is powered on;
[0128] The search unit 403 is used to search for structured data in the target data structure to obtain a target list, wherein the target list includes target resource data that matches the identifier and the target priority corresponding to the target resource data;
[0129] The configuration unit 404 is used to configure the target resource data according to the target priority corresponding to the target resource data to obtain the product information corresponding to the electronic device.
[0130] As can be seen, the product information configuration device provided in this application embodiment can determine the identifier and identifier hierarchical mapping file corresponding to the electronic device, wherein the identifier hierarchical mapping file is adapted to the electronic device; adjust the first data structure according to the identifier hierarchical mapping file to obtain a target data structure, wherein the first data structure is established when the electronic device is powered on; search the structured data in the target data structure to obtain a target list, wherein the target list includes target resource data matching the identifier and target priority corresponding to the target resource data; configure the target resource data according to the target priority corresponding to the target resource data to obtain the product information corresponding to the electronic device. Thus, the hierarchical and grouped mapping of identifiers can be performed through the data structure, transforming the simple linear mapping relationship of identifiers into a structured mapping relationship, which helps reduce redundancy in product information; at the same time, resource data can be filtered and configured, removing redundant product information and simplifying the customization of multi-region / operator product information for electronic devices.
[0131] In one possible example, such as Figure 4B The image shown is a schematic diagram of a product information configuration device. Figure 4A Based on this, the product information configuration device 400 may include: a setup unit 405, which, before determining the identifier hierarchy mapping file corresponding to the identifier, is used to:
[0132] In response to the power-on command, the identifier is determined and the identifier is saved;
[0133] Read the initial identifier hierarchy mapping file;
[0134] The first data structure is established based on the initial identifier hierarchical mapping file.
[0135] In one possible example, regarding the adjustment of the first data structure according to the identifier hierarchical mapping file to obtain the target data structure, the aforementioned adjustment unit 402 is specifically used for:
[0136] Determine the resource data associated with the identifier groups indicated by the identifier hierarchy mapping file, as well as the hierarchy;
[0137] Compare the level with the plurality of first levels to determine whether a new level needs to be added to the first data structure;
[0138] If a new level needs to be added to the first data structure, the level is merged into the plurality of first levels of the first data structure, and the resource data is merged into the corresponding level to obtain a second data structure. The second data structure includes a plurality of second levels, each second level corresponds to a second identifier group, each second identifier group is associated with second resource data, and each second identifier group and / or associated second resource data corresponds to a first priority.
[0139] Compare the priority of the resource data associated with the identifier group with the multiple first priorities corresponding to the multiple first resource data to determine whether it is necessary to adjust the first priority corresponding to any first resource data in the second data structure.
[0140] If it is necessary to adjust the first priority corresponding to any of the first resource data in the second data structure, then merge the priority corresponding to the resource data associated with the identifier group into the plurality of first priorities to obtain a plurality of second priorities, and obtain the target data structure, wherein each of the second resource data corresponds to the second priority, the target data structure includes the plurality of second levels, each of the second levels corresponds to a second identifier group, and each of the second identifier groups is associated with the second resource data.
[0141] In one possible example, regarding the configuration of the target resource data according to the target priority corresponding to the target resource data to obtain the product information corresponding to the electronic device, the configuration unit 404 is specifically used for:
[0142] The target resource data is sorted according to the target priority corresponding to the target resource data;
[0143] During the sorting process, target resource data with higher target priority is replaced with target resource data with lower target priority to obtain the product information.
[0144] In one possible example, the structured data includes: the plurality of second levels having a structured mapping relationship and a group of second identifiers corresponding to each second level; in terms of configuring the target resource data according to the target priority corresponding to the target resource data to obtain the product information corresponding to the electronic device, the search unit 403 is specifically used for:
[0145] Search for multiple second identifier groups corresponding to the multiple second levels in the target data structure to obtain target identifier groups that match the identifiers;
[0146] Determine the target resource data corresponding to the target identifier group;
[0147] The target list is generated based on the target identifier group and the corresponding target resource data.
[0148] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0149] The electronic device provided in this embodiment is used to execute the above-described product information configuration method, and therefore can achieve the same effect as the above-described implementation method.
[0150] When using integrated units, the electronic device may include a processing module, a storage module, and a communication module. The processing module can be used to control and manage the actions of the electronic device; for example, it can support the electronic device in executing the steps performed by the determining unit 401, adjusting unit 402, searching unit 403, configuring unit 404, and establishing unit 405. The storage module can support the electronic device in executing stored program code and data. The communication module can support communication between the electronic device and other devices.
[0151] The processing module can be a processor or a controller. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.
[0152] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes an electronic device.
[0153] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may include an electronic device.
[0154] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0155] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0156] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0157] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0158] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0159] If the integrated units described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0160] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk, etc.
[0161] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A product information configuration method, applied to electronic devices, characterized in that, include: Determine the identifier and identifier hierarchy mapping file corresponding to the electronic device, wherein the identifier hierarchy mapping file is adapted to the electronic device; According to the identifier hierarchical mapping file, the first data structure is adjusted to obtain the target data structure, wherein the first data structure is established when the electronic device is powered on, and the first data structure is established according to the default initial identifier hierarchical mapping file; Search the structured data in the target data structure to obtain a target list, wherein the target list includes target resource data that matches the identifier and the target priority corresponding to the target resource data; Based on the target priority corresponding to the target resource data, the target resource data is configured to obtain the product information corresponding to the electronic device.
2. The method according to claim 1, characterized in that, Before determining the identifier hierarchy mapping file corresponding to the identifier, the method further includes: In response to the power-on command, the identifier is determined and the identifier is saved; Read the initial identifier hierarchical mapping file; The first data structure is established based on the initial identifier hierarchical mapping file.
3. The method according to claim 2, characterized in that, The first data structure includes multiple first levels, each first level corresponds to a first identifier group, each first identifier group is associated with first resource data, the first resource data includes at least one first product information subset, the first product information subsets are data isolated from each other, and each first identifier group and / or associated first resource data corresponds to a first priority.
4. The method according to claim 3, characterized in that, The step of adjusting the first data structure according to the identifier hierarchical mapping file to obtain the target data structure includes: Determine the resource data associated with the identifier groups indicated by the identifier hierarchy mapping file, as well as the hierarchy; Compare the level with the plurality of first levels to determine whether a new level needs to be added to the first data structure; If a new level needs to be added to the first data structure, the level is merged into the plurality of first levels of the first data structure, and the resource data is merged into the corresponding level to obtain a second data structure. The second data structure includes a plurality of second levels, each second level corresponds to a second identifier group, each second identifier group is associated with second resource data, and each second identifier group and / or associated second resource data corresponds to a first priority. Compare the priority of the resource data associated with the identifier group with the multiple first priorities corresponding to the multiple first resource data to determine whether it is necessary to adjust the first priority corresponding to any first resource data in the second data structure. If it is necessary to adjust the first priority corresponding to any of the first resource data in the second data structure, then merge the priority corresponding to the resource data associated with the identifier group into the plurality of first priorities to obtain a plurality of second priorities, and obtain the target data structure, wherein each of the second resource data corresponds to the second priority, the target data structure includes the plurality of second levels, each of the second levels corresponds to a second identifier group, and each of the second identifier groups is associated with the second resource data.
5. The method according to claim 1 or 4, characterized in that, The step of configuring the target resource data according to the target priority corresponding to the target resource data to obtain the product information corresponding to the electronic device includes: The target resource data is sorted according to the target priority corresponding to the target resource data; During the sorting process, target resource data with higher target priority is replaced with target resource data with lower target priority to obtain the product information.
6. The method according to claim 4, characterized in that, The structured data includes: the plurality of second levels having a structured mapping relationship and the second identifier group corresponding to each second level; the search for structured data in the target data structure to obtain a target list includes: Search for multiple second identifier groups corresponding to the multiple second levels in the target data structure to obtain target identifier groups that match the identifiers; Determine the target resource data corresponding to the target identifier group; The target list is generated based on the target identifier group and the corresponding target resource data.
7. The method according to claim 5, characterized in that, The product information is stored in the attribute service, which is used to provide product information query services to system services or applications.
8. A product information configuration device, characterized in that, The device is applied to an electronic device, and the device includes: a determining unit, an adjusting unit, a searching unit, and a configuring unit, wherein... The determining unit is used to determine the identifier and the identifier hierarchical mapping file corresponding to the electronic device, wherein the identifier hierarchical mapping file is adapted to the electronic device; The adjustment unit is used to adjust the first data structure according to the identifier hierarchical mapping file to obtain the target data structure, wherein the first data structure is established when the electronic device is powered on, and the first data structure is established according to the default initial identifier hierarchical mapping file; The search unit is used to search for structured data in the target data structure to obtain a target list, wherein the target list includes target resource data that matches the identifier and the target priority corresponding to the target resource data; The configuration unit is used to configure the target resource data according to the target priority corresponding to the target resource data, so as to obtain the product information corresponding to the electronic device.
9. An electronic device, characterized in that, The method includes a processor, a memory, a communication interface, and one or more programs, said one or more programs being stored in the memory and configured to be executed by the processor, said programs including instructions for performing the steps of the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, A computer program for storing electronic data interchange, wherein the computer program causes a computer to perform the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Method and system for targeted content placement
CN102027500A
Method and system for hierarchically storing data
CN103605728A