A method, apparatus, device, or medium for modifying non-integer attribute information of components.

By using the attributeoverride tool on the OpenPower server to generate binary files, the problem of needing to recompile Pnor for modifying complex attribute information in existing technologies is solved, thus achieving efficient attribute information modification.

CN115543268BActive Publication Date: 2026-03-06INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211193589.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2026-03-06
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

Existing technologies require recompiling pnor when modifying the enumeration, string, and complexType properties of a target in an OpenPower server, resulting in a complex and time-consuming process.

Method used

By modifying the attribute configuration file, using the attributeoverride tool to generate a binary file, and then refreshing it into HBD, the modification of these complex type attributes can be achieved, avoiding the step of recompiling pnor.

Benefits of technology

It simplifies the modification process, saves time, expands the functionality of attributeoverride, and makes the modification of complex type attribute information more efficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115543268B_ABST
    Figure CN115543268B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of component attribute information management technology, specifically providing a method, apparatus, device, and medium for modifying non-integer attribute information of components. The method includes the following steps: identifying the component and attribute information to be modified; generating a configuration file for attribute information by searching for the target component's information; storing the non-integer attribute information into different sets according to attribute type; during the generation of a binary file based on the configuration file, searching for the corresponding attribute ID in the corresponding set according to the attribute category; checking the validity of the attribute values ​​to be modified in the configuration file based on the range of attribute values ​​in the set; generating the binary file when all categories of attribute values ​​are valid; refreshing the data in the binary file to the attribute database to complete the overwriting of the target component's attribute values; restarting the machine and loading the data in the attribute database into virtual memory to make the configuration effective. This method allows modification of attribute values ​​without compiling Pnor, improving efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of component attribute information management technology, specifically to a method, apparatus, device, and medium for modifying non-integer attribute information of components. Background Technology

[0002] Currently, there are three main ways to modify the attributes (which describe the target's properties and can be controlled by modifying the attribute's value) of a target (a physical component or logical element on the server) in an OpenPower server:

[0003] The first method is to directly add the relevant set interface in the code. During the hostboot process (part of the server firmware, which can read and set attributes and initialize hardware during boot), the data in the HBD (hostboot data, part of the firmware that stores target and attribute information) is first loaded into the required memory. The corresponding attribute is found in the virtual memory through the set interface, and then the target value is changed. The limitations of this method are: first, every time an attribute is modified, after adding the code, the pnor (OpenPower firmware) needs to be recompiled and then flashed to the pnor flash (the flash memory that stores the pnor), and the changes take effect after a reboot; second, the attribute modified by this method must have writeable and no-volatile properties, because complexType does not have the writeable property, so it is not possible to change the complexType type attribute by adding setAttr in the code.

[0004] The second method is to directly modify the machine xml file (the file used to record the topology information of the OpenPower server) and change the value of the attribute. This method is very crude, as it modifies the source, but it still has the same errors as the first method. It also requires recompiling PNOR and refreshing PNOR for the changes to take effect.

[0005] The third method involves modification using the `attributeoverride` tool (a tool used to modify attributes without compiling PNOR; defined in this application as an attribute modification tool). The `attributeoverride` tool is generated during the PNOR compilation process. First, the target to be modified, the attribute to be modified, and the target value are specified. `attributeoverride` generates a binary file. After entering petitboot (part of the server firmware, a small system running on the Linux kernel, used for booting the kernel and setting PNOR configuration information), this binary file is passed to petitboot. Other tools then flash the data from this binary file into the HBD of the PNOR flash. Since the data in PNOR is already loaded into memory, it requires a machine reboot to reload and take effect. This tool can modify attributes that are not writable. However, its limitation is that it currently only supports attributes of types `int8_t`, `uint8_t`…`int64_t`, and `uint64_t`. It cannot modify attributes of types `enumeration`, `string`, or `complexType`. However, in actual operation, the execution flow of hostboot can be changed by setting certain attributes. For example, the `PAYLOAD_KIND` attribute determines the payload type during hostboot execution. This attribute is of type `enumeration` and cannot be modified via `attributeoverride`. Its possible values ​​are defined in the machine XML. If changes are made by modifying the code, PNR must be recompiled for the changes to take effect. The `PRIMARY_CAPABILITIES` attribute determines the maximum number of FSI / SCOM instances supported by the target and whether it supports XSCOM or SCOM. Modifying this attribute can only be done by modifying the XML file. Therefore, modifications are quite complex. Summary of the Invention

[0006] To address the shortcomings of existing methods for modifying attributes, this invention improves the functionality of `attributeOverride`, enabling it to modify types such as `enumeration`, `string`, and `complexType`. This is achieved by writing a configuration file to modify attributes, then generating a binary file using `attributeOverride`, and finally flushing it to the HBD (Hardware Buffer Object). This avoids the complex process of modifying code or recompiling PNR by modifying machine XML files, and also addresses the limitation of `attributeOverride` on complex types. This invention provides a method, apparatus, device, and medium for modifying non-integer attribute information of components.

[0007] In a first aspect, the present invention provides a method for modifying non-integer attribute information of a component, comprising the following steps:

[0008] Identify the components and attribute information that need to be modified, find the target component's information, and generate a configuration file for the attribute information.

[0009] Non-integer attribute information is stored in different collections according to the attribute type; the attribute information includes the attribute ID and the range of attribute values.

[0010] During the process of generating binary files from configuration files, the corresponding attribute ID is searched in the corresponding collection based on the attribute category;

[0011] After finding the corresponding attribute ID, the validity of the attribute value that needs to be modified in the configuration file is checked based on the range of attribute values ​​in the set.

[0012] The generated binary file is generated when all category attribute values ​​are valid;

[0013] The data in the binary file is flushed to the attribute database, thus overwriting the attribute values ​​of the target component.

[0014] Restart the machine to load the data from the property database into virtual memory for the configuration to take effect.

[0015] Furthermore, the steps for identifying the components and attribute information that need to be modified, finding the target component's information, and generating the attribute information configuration file include:

[0016] Identify the components and attribute information that need to be modified;

[0017] The system string node string and chip string of the target component are found by locating the topology location attribute in the topology structure file, which together form the component column in the configuration file.

[0018] Determine the attribute ID to be modified, the attribute category, and the modified attribute value to form an attribute column;

[0019] The component columns and attribute columns are mapped to the attribute information in the configuration file.

[0020] Furthermore, the configuration file includes the component to which the attribute information to be modified belongs, as well as the location information in the topology file obtained based on FAPI_NAME, attribute ID, attribute category, and the attribute value to be modified.

[0021] Furthermore, in the process of generating binary files from configuration files, after the step of searching for the corresponding attribute ID in the corresponding set based on the attribute category, the following steps are also included:

[0022] If the corresponding attribute id cannot be found, the configuration file is invalid and an error message will be printed.

[0023] Furthermore, the attribute categories include string type, enumeration type, and struct type;

[0024] After finding the corresponding attribute ID, the steps for checking the validity of the attribute value that needs to be modified in the configuration file based on the range of attribute values ​​in the set include:

[0025] After finding the corresponding attribute ID, confirm whether the string attribute value that needs to be modified in the configuration file is within the string attribute length range;

[0026] If so, confirm whether the attribute value of the enumeration type that needs to be modified in the configuration file is within the range of values ​​for the enumeration type;

[0027] If so, confirm whether the attribute values ​​of the structure type that need to be modified in the configuration file are within the restrictions of the structure type;

[0028] If so, all category attribute values ​​are valid, proceed to the following steps: generate the binary file.

[0029] If any attribute category is invalid, an error message will be displayed and the program will exit.

[0030] Furthermore, the steps to refresh the data in the binary file to the attribute database and complete the overwriting of the target component's attribute values ​​include:

[0031] The generated binary file and refresh tool are copied to petitboot via BMC mounting or network transfer. The refresh tool then flushes the data from the binary file to the attribute database, thus overwriting the attribute values ​​of the target attribute.

[0032] Further steps include identifying the components and attribute information that need to be modified, and generating a configuration file for the attribute information by finding the target component's information.

[0033] During the boot and operation of the OpenPower server, when the firmware reaches the hostboot stage, the hostboot will read the attribute values ​​of the currently configured components.

[0034] Based on the current attribute values, identify the components and attribute information that need to be modified, locate the target component's information, and generate a configuration file for the attribute information.

[0035] Secondly, the present invention also provides a device for modifying non-integer attribute information of components, including a configuration file generation module, a storage execution module, a binary file generation module, a legality verification module, an overwrite execution module, and an effectiveness setting module;

[0036] The configuration file generation module is used to identify the components and attribute information that need to be modified, find the information of the target component, and generate a configuration file for the attribute information.

[0037] The storage execution module is used to store non-integer attribute information into different collections according to the attribute type; the attribute information includes the attribute ID and the range of attribute values;

[0038] The validity verification module is used to look up the corresponding attribute ID in the corresponding set according to the attribute category during the process of generating binary files from the configuration file; after finding the corresponding attribute ID, it checks the validity of the attribute value that needs to be modified in the configuration file according to the range of attribute values ​​in the set; if the corresponding attribute ID is not found, the configuration file is invalid and an error message is printed.

[0039] The binary file generation module is used to generate binary files when all category attribute values ​​are valid.

[0040] The overwrite execution module is used to refresh the data in the binary file to the attribute database, thereby overwriting the attribute values ​​of the target component.

[0041] The activation settings module is used to restart the machine and load the data from the attribute database into virtual memory to make the configuration take effect.

[0042] Furthermore, the configuration file generation module includes a confirmation unit for modifications, a component column generation unit, an attribute column generation unit, and a configuration file generation unit;

[0043] The "To be modified" confirmation unit is used to clarify the components and attribute information that need to be modified.

[0044] The component column generation unit is used to find the system string node string and chip string of the target component through the topology location attribute in the topology structure file, which together form the component column in the configuration file.

[0045] The attribute column generation unit is used to determine the attribute ID to be modified, the attribute category, and the modified attribute value to form the attribute column;

[0046] The configuration file generation unit is used to pass the configuration file containing the corresponding component columns and attribute columns. The configuration file includes the component to which the attribute information to be modified belongs, as well as the location information in the topology file obtained according to FAPI_NAME, the attribute ID, the attribute category, and the attribute value to be modified.

[0047] Furthermore, the attribute categories include string type, enumeration type, and struct type;

[0048] The validity verification module is used to find the corresponding attribute ID and confirm whether the string attribute value to be modified in the configuration file is within the string attribute length range; if so, it confirms whether the enumeration attribute value to be modified in the configuration file is within the enumeration type value range; if so, it confirms whether the structure attribute value to be modified in the configuration file is within the structure type limit range; if so, it determines that all category attribute values ​​are valid and triggers the binary file generation module; if any attribute category is invalid, it reports an error and exits.

[0049] Furthermore, the overwrite execution module is used to copy the generated binary file and refresh tool to petitboot via BMC mounting or network transmission. The refresh tool then refreshes the data in the binary file to the attribute database, thus overwriting the attribute values ​​of the target attribute.

[0050] Furthermore, during the boot and operation of the OpenPower server, when the firmware reaches the hostboot stage, the configuration file generation module reads the currently set attribute values ​​of the components; based on the current attribute values, it identifies the components and attribute information that need to be modified, finds the information of the target components, and generates a configuration file with attribute information.

[0051] Thirdly, the present invention also provides an electronic device, the electronic device comprising:

[0052] At least one processor; and,

[0053] A memory communicatively connected to the at least one processor; wherein,

[0054] The memory stores computer program instructions executable by at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform a method for modifying non-integer attribute information of a component as described in the first aspect.

[0055] Fourthly, the present invention also provides a non-transitory computer-readable storage medium that stores computer instructions that cause the computer to execute the method for modifying non-integer attribute information of components as described in the first aspect.

[0056] As can be seen from the above technical solutions, the present invention has the following advantages: it can modify the attribute values ​​of complex types of components without modifying the code and topology files, avoiding the need to recompile Pnor, which would have taken a lot of time, and it also expands the functionality of the attribute modification tool, saving time.

[0057] Furthermore, the design principle of this invention is reliable, the structure is simple, and it has a very wide range of application prospects.

[0058] Therefore, it is evident that the present invention has outstanding substantive features and significant progress compared with the prior art, and the beneficial effects of its implementation are also obvious. Attached Figure Description

[0059] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0060] Figure 1 This is a schematic flowchart of a method according to an embodiment of the present invention.

[0061] Figure 2 This is a schematic block diagram of an apparatus according to an embodiment of the present invention. Detailed Implementation

[0062] To address the shortcomings of existing methods for modifying attributes, this invention improves the functionality of `attributeOverride`, enabling modification of types such as `enumeration`, `string`, and `complexType`. This is achieved by writing a configuration file to modify attributes, then generating a binary file using `attributeOverride`, and finally updating it to the HBD. This avoids the complex process of modifying code or recompiling PNR by modifying the machine XML file, and also addresses the limitation of `attributeOverride` in changing complex types. This invention proposes a method for modifying attributes of types other than `int_tuint_t` using `attributeOverride`. It allows modification of the value of complex type attributes without modifying code or the machine XML file, avoiding the time-consuming recompilation of PNR, and expanding the functionality of `attributeOverride`, thus saving time. To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort should fall within the scope of protection of this invention.

[0063] It should be noted that target refers to the physical components or logical elements on the server.

[0064] attribute: Describes the attribute information of the target. The target can be controlled by modifying the value of the attribute.

[0065] targetType: A collection containing all attributes of a given target;

[0066] hostboot: Part of the server firmware, which can read and set attributes and initialize hardware during the boot process;

[0067] petitboot: Part of the server firmware, a small system running on the Linux kernel. It can be used to boot the kernel and also to set Pnor configuration information.

[0068] HBD: hostboot data, a part of the firmware that stores target and attribute information;

[0069] simpleType: attribute type, int8_t, uint8_t...int64, uint64_t, enumeration, string, etc.;

[0070] enumeration: a type of simpleType of attribute, an enumeration type. The value of attribute can only be read and set from the range of values ​​of enumeration;

[0071] machine xml file: A file used to record the topology information of the OpenPower server;

[0072] pnor: OpenPower firmware;

[0073] pnor flash: Flash memory that stores pnor;

[0074] FAPI_NAME: An attribute of the target that records the system topology location of this target; attributeoverride: A tool used to modify attributes without compiling pnor.

[0075] like Figure 1 As shown, this embodiment of the invention provides a method for modifying non-integer attribute information of a component, comprising the following steps:

[0076] Step 1: Identify the components and attribute information that need to be modified, and generate a configuration file for the attribute information by finding the target component's information;

[0077] Step 2: Store non-integer attribute information into different collections according to the attribute type; attribute information includes attribute ID and the range of attribute values;

[0078] Step 3: During the process of generating the binary file based on the configuration file, the corresponding attribute ID is searched in the corresponding collection according to the attribute category;

[0079] Step 4: After finding the corresponding attribute ID, check the validity of the attribute value that needs to be modified in the configuration file based on the range of attribute values ​​in the set;

[0080] Step 5: When all category attribute values ​​are valid, the generated binary file is displayed.

[0081] Step 6: Refresh the data in the binary file to the attribute database to complete the overwriting of the target component's attribute values;

[0082] Step 7: Restart the machine and load the data from the property database into virtual memory to make the configuration take effect.

[0083] In some embodiments, the steps in step 1, such as identifying the components and attribute information that need to be modified, searching for information about the target components, and generating a configuration file for the attribute information, include:

[0084] Step 11: Identify the components and attribute information that need to be modified;

[0085] Step 12: Locate the system string, node string, and chip string of the target component through the topology location attribute in the topology structure file to form the component column in the configuration file;

[0086] Step 13: Determine the attribute ID to be modified, the attribute category, and the modified attribute value to form the attribute column;

[0087] Step 14: Pass the corresponding component columns and attribute columns to the attribute information configuration file.

[0088] The method for quickly changing the value of a non-integer attribute in this application clearly defines the target and attribute to be modified. The system string, node string, and chip string of the target are found through the FAPI_NAME attribute in the machine xml and form the target line in the configuration file. Then, the attribute ID, attribute type, and modified value to be modified are determined and form the attribute line. The configuration file for passing in the attribute is composed of the target line and the attribute line.

[0089] The configuration file includes the component to which the attribute information to be modified belongs, as well as the location information in the topology file obtained based on FAPI_NAME, the attribute ID, the attribute category, and the attribute value to be modified.

[0090] During the compilation of pnor and generation of attributeoverride, non-integer attributes are stored in different collections through script files. The collection of string type attributes stores the string type attribute ID and the length limit of the value. The collection of enumeration type attributes stores the enumeration attribute ID and the range of possible values. The collection of complexType type attributes stores the complexType structure and the type of each member.

[0091] When generating a binary file from a configuration file using attributeoverride, it first searches for the corresponding attribute ID in the set based on the attribute type. If the attribute ID is not found, the configuration file is invalid, and an error message is printed before exiting attributeoverride.

[0092] After finding the corresponding attribute ID, based on the restrictions on attributes in the collection, the validity of the value that needs to be modified in the configuration file is checked. The length range of string type attributes must be within the limit range. If it exceeds the maximum length limit, an error is reported and the process exits. The value of enumeration type attributes must be within the range of values ​​in the collection. If it exceeds this range, an error is reported and the process exits. For complexType attributes, the value of each member, whether it is an integer, string, or enumeration type, should meet the limit range in the collection. If any one of them is incorrect, an error is reported and the process exits.

[0093] In some embodiments, the step of refreshing the data in the binary file to the attribute database to complete the overwriting of the target component attribute values ​​includes:

[0094] The generated binary file and refresh tool are copied to petitboot via BMC mounting or network transfer. The refresh tool then flushes the data from the binary file to the attribute database, thus overwriting the attribute values ​​of the target attribute.

[0095] After rebooting the machine, during the hostboot phase, the data in the HBD is loaded into virtual memory. At this point, the data in the HBD is the overwritten data. For example, the payload type is determined based on PAYLOAD_KIND; such attributes previously required code or XML file modifications to overwrite. This method can significantly improve efficiency.

[0096] In practical applications, during the boot and operation of an OpenPower server, when the firmware reaches the hostboot stage, the hostboot reads the values ​​of certain currently configured attributes to determine the next program step and hardware settings, thereby controlling the hardware's operating status. For example, it can control the actual number of CPU cores in operation and the type of workload. Attribute overrides can modify attributes that do not have the writable property, as well as non-integer attributes. Based on the configuration file, a binary file is generated. After the server boots up, the contents of this binary file are flashed into the HBD (Host Boot Record). Upon reboot, the boot process will then proceed according to the newly configured attributes.

[0097] In this application, the term specifically refers to the value of a non-integer attribute, such as string, enumeration, or complexType, where complexType is a structure type. During compilation, a data set is generated for each optional range of non-integer values. When generating a binary file using an attribute, the compiler searches for the attribute ID to be modified in the corresponding data set. If the attribute is found in the set, the binary file is generated normally; otherwise, an error is reported and the process exits.

[0098] The attribute is generated by a script during the compilation of Pnor and used when generating binary files using attributeoverride. Each collection contains constraints on the value of the corresponding type, and the value set for each attribute must meet the constraints in the collection for the binary file to be generated correctly. The method in this application is actually a modified version of the attributeoverride tool. This tool is generated during the compilation of Pnor and can be copied out for independent use without waiting for the next recompilation of Pnor.

[0099] The configuration file contains the target to which the attribute to be modified belongs, its position in the topology obtained from FAPI_NAME, the attribute's ID, type, and the value to be modified. Each target can modify multiple attributes, and each configuration file can contain multiple targets.

[0100] The data in the configuration file is saved as binary data and can be directly flashed into HBD. The minimum size of each binary file is 4K. If the actual data is less than 4K, it is padded to 4K with 0xff.

[0101] like Figure 2 As shown, this embodiment of the invention also provides a device for modifying non-integer attribute information of components, including a configuration file generation module, a storage execution module, a binary file generation module, a legality verification module, an overwrite execution module, and an effectiveness setting module;

[0102] The configuration file generation module is used to identify the components and attribute information that need to be modified, find the information of the target component, and generate a configuration file for the attribute information.

[0103] The storage execution module is used to store non-integer attribute information into different collections according to the attribute type; the attribute information includes the attribute ID and the range of attribute values;

[0104] The validity verification module is used to look up the corresponding attribute ID in the corresponding set according to the attribute category during the process of generating binary files from the configuration file; after finding the corresponding attribute ID, it checks the validity of the attribute value that needs to be modified in the configuration file according to the range of attribute values ​​in the set; if the corresponding attribute ID is not found, the configuration file is invalid and an error message is printed.

[0105] The binary file generation module is used to generate binary files when all category attribute values ​​are valid.

[0106] The overwrite execution module is used to refresh the data in the binary file to the attribute database, thereby overwriting the attribute values ​​of the target component.

[0107] The activation settings module is used to restart the machine and load the data from the attribute database into virtual memory to make the configuration take effect.

[0108] In some embodiments, the configuration file generation module includes a modification confirmation unit, a component column generation unit, an attribute column generation unit, and a configuration file generation unit;

[0109] The "To be modified" confirmation unit is used to clarify the components and attribute information that need to be modified.

[0110] The component column generation unit is used to find the system string node string and chip string of the target component through the topology location attribute in the topology structure file, which together form the component column in the configuration file.

[0111] The attribute column generation unit is used to determine the attribute ID to be modified, the attribute category, and the modified attribute value to form the attribute column;

[0112] The configuration file generation unit is used to pass the configuration file containing the corresponding component columns and attribute columns. The configuration file includes the component to which the attribute information to be modified belongs, as well as the location information in the topology file obtained according to FAPI_NAME, the attribute ID, the attribute category, and the attribute value to be modified.

[0113] In some embodiments, the attribute categories include string type, enumeration type, and structure type;

[0114] The validity verification module is used to find the corresponding attribute ID and confirm whether the string attribute value to be modified in the configuration file is within the string attribute length range; if so, it confirms whether the enumeration attribute value to be modified in the configuration file is within the enumeration type value range; if so, it confirms whether the structure attribute value to be modified in the configuration file is within the structure type limit range; if so, it determines that all category attribute values ​​are valid and triggers the binary file generation module; if any attribute category is invalid, it reports an error and exits.

[0115] The overwrite execution module is used to copy the generated binary file and refresh tool to petitboot via BMC mounting or network transmission. The refresh tool then refreshes the data in the binary file to the attribute database, thus overwriting the attribute values ​​of the target attribute.

[0116] The configuration file generation module reads the currently set attribute values ​​of components when the firmware reaches hostboot during the OpenPower server boot process. Based on the current attribute values, it identifies the components and attribute information that need to be modified, finds the target component information, and generates a configuration file for the attribute information.

[0117] This invention also provides an electronic device, comprising: a processor, a communication interface, a memory, and a bus, wherein the processor, communication interface, and memory communicate with each other via the bus. The bus can be used for information transmission between the electronic device and sensors. The processor can call logical instructions in the memory to execute the following method: Step 1: Confirm the components and attribute information to be modified, and generate a configuration file for attribute information by searching for the target component information; Step 2: Store non-integer attribute information into different sets according to attribute type; the attribute information includes attribute ID and the range of attribute values; Step 3: During the process of generating a binary file according to the configuration file, search for the corresponding attribute ID in the corresponding set according to the attribute category; Step 4: After finding the corresponding attribute ID, check the validity of the attribute value to be modified in the configuration file according to the range of attribute values ​​in the set; Step 5: When all categories of attribute values ​​are valid, generate the binary file; Step 6: Refresh the data in the binary file to the attribute database to complete the overwriting of the target component attribute values; Step 7: Restart the machine and load the data in the attribute database into virtual memory to make the configuration effective.

[0118] In some embodiments, the processor can invoke logical instructions in memory to execute the following method: Step 11: Identify the components and attribute information that need to be modified; Step 12: Find the system string node string and chip string of the target component through the topology location attribute in the topology structure file to form the component column in the configuration file; Step 13: Determine the attribute ID, attribute category and modified attribute value that need to be modified to form the attribute column; Step 14: Pass the component column and attribute column to the configuration file of attribute information.

[0119] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium 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 the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0120] This invention provides a non-transitory computer-readable storage medium storing computer instructions that cause a computer to execute the method provided in the above-described method embodiments. For example, the method includes: Step 1: Identifying the components and attribute information to be modified, and generating a configuration file for attribute information by searching for the target component's information; Step 2: Storing non-integer attribute information into different sets according to attribute type; the attribute information includes attribute ID and the range of attribute values; Step 3: During the process of generating a binary file based on the configuration file, searching for the corresponding attribute ID in the corresponding set according to the attribute category; Step 4: After finding the corresponding attribute ID, checking the validity of the attribute values ​​to be modified in the configuration file based on the range of attribute values ​​in the set; Step 5: Generating a binary file when all categories of attribute values ​​are valid; Step 6: Refreshing the data in the binary file to the attribute database to complete the overwriting of the target component's attribute values; Step 7: Restarting the machine and loading the data in the attribute database into virtual memory to make the configuration effective.

[0121] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the invention should also be covered within the protection scope of the invention. Therefore, the protection scope of the invention should be determined by the scope of the claims.

Claims

1. A method of modifying non-integer attribute information of an element, characterized by, The method comprises the following steps: Confirming the element and attribute information to be modified, and searching for the information of the target element to generate a configuration file of attribute information; specifically comprising: determining the element and attribute information to be modified; searching for the system string node string and chip string of the target element in the element column in the configuration file through the topological position attribute in the topological structure file; determining the attribute id to be modified, the attribute category, and the modified attribute value to form the attribute column; and corresponding the element column and the attribute column to the configuration file of attribute information; Storing the attribute information of non-integer type into different sets according to the attribute type; the attribute information comprises the attribute id and the attribute value range; In the process of generating the binary file according to the configuration file, searching for the corresponding attribute id in the corresponding set according to the attribute category; After searching for the corresponding attribute id, detecting the legality of the attribute value to be modified in the configuration file according to the attribute value range in the set; When all the attribute values of the categories are legal, generating the binary file; Refreshing the data in the binary file to the attribute database to complete the coverage of the attribute value of the target element; Restarting the machine, loading the data in the attribute database to the virtual memory to make the configuration effective.

2. The method of modifying non-integral attribute information of an element according to claim 1, characterized in that, The configuration file comprises the element to which the attribute information to be modified belongs, the position information in the topological structure file obtained according to FAPI_NAME, the attribute id, the attribute category, and the attribute value to be modified.

3. The method of claim 2, wherein the attribute information is modified in a non-integer type. In the process of generating the binary file according to the configuration file, after the step of searching for the corresponding attribute id according to the attribute category in the corresponding set, the process further comprises: If the corresponding attribute id cannot be found, the configuration file is invalid, and error information is printed.

4. The method of claim 3, wherein the attribute information is modified in a non-integer type. The attribute category comprises a string type, an enumeration type, and a structure type; After searching for the corresponding attribute id, the step of detecting the legality of the attribute value to be modified in the configuration file according to the attribute value range in the set comprises: After searching for the corresponding attribute id, confirming whether the attribute value of the string type to be modified in the configuration file is within the attribute length range of the string type; If yes, confirming whether the attribute value of the enumeration type to be modified in the configuration file is within the value range of the enumeration type; If yes, confirming whether the attribute value of the structure type to be modified in the configuration file is within the limit range of the structure type; If yes, all the attribute values of the categories are legal, and the step of generating the binary file is executed; When any attribute category is illegal, the error is exited.

5. The method of claim 4, wherein the attribute information is modified in a non-integer type. The step of refreshing the data in the binary file to the attribute database to complete the coverage of the attribute value of the target element comprises: Copying the generated binary file and the refreshing tool to petitboot through the mounting mode of BMC or the network transmission mode, brushing the data in the binary file to the attribute database through the refreshing tool, and completing the coverage of the attribute value of the target attribute.

6. The method of modifying non-integral attribute information of an element according to claim 5, characterized in that, The step of confirming the element and attribute information to be modified, and searching for the information of the target element to generate a configuration file of attribute information comprises: During the running process of the openpower server, when the firmware runs to hostboot, the hostboot reads the attribute value of the currently set element; According to the current attribute value, the element and attribute information to be modified are confirmed, and a configuration file of attribute information of the target element is searched.

7. An apparatus for modifying non-integer attribute information of an element, characterized by comprising: The configuration file generation module, the storage execution module, the binary file generation module, the legality verification module, the overlay execution module, and the validity setting module are included. The configuration file generation module is configured to confirm the element and attribute information to be modified, and search for a configuration file of attribute information of the target element. The storage execution module is configured to store non-integer attribute information according to attribute types in different sets. The legality verification module is configured to search for corresponding attribute ids in the corresponding sets according to attribute categories during generation of the binary file according to the configuration file. The binary file generation module is configured to generate a binary file when all attribute values of all categories are legal. The overlay execution module is configured to refresh data in the binary file to an attribute database to complete overlay of attribute values of the target element. The validity setting module is configured to restart the machine, load data in the attribute database to virtual memory, and make the configuration valid. The configuration file generation module includes a to-be-modified confirmation unit, an element column generation unit, an attribute column generation unit, and a configuration file generation unit. The to-be-modified confirmation unit is configured to explicitly confirm the element and attribute information to be modified. The element column generation unit is configured to search for a system string node string and a chip string of the target element in the configuration file through a topological position attribute in a topological structure file. The attribute column generation unit is configured to determine attribute ids to be modified, attribute categories, and modified attribute values to form an attribute column. The configuration file generation unit is configured to correspondingly transmit the element column and the attribute column to the attribute information configuration file.

8. An electronic device, comprising: The electronic device includes: at least one processor; and a memory connected with the at least one processor in communication; wherein The memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor to enable the at least one processor to execute the element non-integer attribute information modification method according to any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium, comprising: The non-transitory computer readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the element non-integer attribute information modification method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for packaging and reuse of page module

    CN106528913A

  • Intelligent proofreading method and system for digital design of power plant

    CN107330212A