A label data retention method, device, apparatus and storage medium

By monitoring the environment variables and data bus of the open-source baseboard management controller, the target tag data is determined and synchronized, solving the problem of data loss after the server is set to factory settings and realizing the persistent retention of tag data.

CN115729726BActive Publication Date: 2026-05-29INSPUR BUSINESS MACHINE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR BUSINESS MACHINE CO LTD
Filing Date
2022-11-22
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

After the server is restored to factory settings, modified data such as files, configurations and logs in the BMC will be deleted, and existing technology cannot effectively retain certain data that needs to be retained.

Method used

By monitoring the environment variables and data bus of the open-source baseboard management controller, it determines whether to perform a factory reset operation, and if necessary, synchronizes the target tag data from the environment variables to the data bus for persistent retention.

Benefits of technology

After factory reset, the target tag data is effectively protected and retained, preventing other programs from erroneously operating and updating it, thus achieving persistent storage of tag data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115729726B_ABST
    Figure CN115729726B_ABST
Patent Text Reader

Abstract

The application discloses a label data reservation method and device, equipment and storage medium, and relates to the field of data storage, and comprises the following steps: monitoring whether an updated target label attribute value in a target environment variable exists in a preset data bus after a open source baseboard management controller is restarted; if not, determining that a factory setting recovery operation for the preset data bus has been performed, and acquiring the updated target label attribute value in the target environment variable; re-adding the updated target label attribute value to the preset data bus, so that the open source baseboard management controller reads the updated target label attribute value in the preset data bus after starting, to complete reservation of the updated target label attribute value. In this way, the updated target label attribute value can be acquired from the target environment variable after the factory setting is recovered, to complete reservation of the updated target label attribute value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data storage, and in particular to a method, apparatus, device, and storage medium for retaining tag data. Background Technology

[0002] With the continuous advancement of cloud and virtualization technologies, there is a growing need for server support, making server management a significant challenge. Based on customer needs and current market research, factory reset functionality is an essential feature in server management. Furthermore, after triggering a factory reset, all modified data, including files, configurations, and logs, in the Baseboard Management Controller (BMC) are deleted to preserve the BMC's initial state upon startup. However, it may be necessary to retain some modified data after triggering a factory reset, but current technology does not yet offer a way to achieve this. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a tag data retention method, apparatus, device, and storage medium that can protect the data of a target tag by reading and writing environment variables after a factory reset, preventing other programs from erroneously operating on and updating the data of the target tag, thereby achieving persistent retention of tag data. The specific solution is as follows:

[0004] Firstly, this application discloses a method for retaining tag data, including:

[0005] When the open-source baseboard management controller restarts, it monitors whether the updated target tag attribute value in the target environment variable exists in the preset data bus; the updated target tag attribute value in the target environment variable is the value that the preset data bus has pre-synchronized to the target environment variable.

[0006] If it does not exist, it is determined that a factory reset operation for the preset data bus has been performed, and the updated target tag attribute value in the target environment variable is obtained;

[0007] The updated target tag attribute value is re-added to the preset data bus so that the open-source baseboard management controller can read the updated target tag attribute value from the preset data bus after startup, thereby completing the retention of the updated target tag attribute value.

[0008] Optionally, before monitoring whether the updated target tag attribute value in the target environment variables exists in the preset data bus after the open-source baseboard management controller restarts, the method further includes:

[0009] Receive a tag attribute value update instruction, and update the target tag attribute value according to the tag attribute value update instruction to obtain the updated target tag attribute value; the target tag attribute value is the attribute value of the user's liquid asset tag;

[0010] The updated target tag attribute values ​​are synchronously updated to the preset data bus.

[0011] Optionally, before synchronizing the updated target tag attribute values ​​in the preset data bus to the target environment variables, the method further includes:

[0012] The first data monitoring result is determined by monitoring whether the target tag attribute value in the preset data bus is updated by a preset monitoring component.

[0013] Based on the first data monitoring result, determine whether to synchronously update the updated target tag attribute value to the target environment variable.

[0014] Optionally, determining whether to synchronize the updated target tag attribute value to the target environment variable based on the first data monitoring result includes:

[0015] If the first data monitoring result indicates that the target tag attribute value in the preset data bus has been updated, a data acquisition script is triggered to obtain the updated target tag attribute value and synchronize the updated target tag attribute value to the target environment variable.

[0016] Optionally, the step of monitoring whether the updated target tag attribute value in the target environment variables exists in the preset data bus after the open-source baseboard management controller restarts includes:

[0017] When the open-source baseboard management controller restarts, it monitors whether the updated target tag attribute value in the target environment variable exists in the preset data bus through the preset monitoring component to obtain a second data monitoring result, and determines whether a factory reset operation for the preset data bus has been performed based on the second data monitoring result.

[0018] Optionally, after monitoring whether the updated target tag attribute value in the target environment variables exists in the preset data bus after the open-source baseboard management controller restarts, the method further includes:

[0019] If the second data monitoring result indicates that the updated target tag attribute value exists in the preset data bus, then it is determined that the factory reset operation for the preset data bus has not yet been performed.

[0020] Optionally, the step of re-adding the updated target tag attribute value to the preset data bus so that the open-source baseboard management controller can read the updated target tag attribute value from the preset data bus after startup, thereby completing the retention of the updated target tag attribute value, includes:

[0021] Add the updated target tag attribute value to the preset data bus after the factory reset operation;

[0022] After the open-source baseboard management controller is started, it reads the updated target tag attribute value from the preset data bus that has undergone the factory reset operation, and adds the updated target tag attribute value to the preset network protocol to complete the retention of the updated target tag attribute value.

[0023] Secondly, this application discloses a tag data retention device, comprising:

[0024] The data monitoring module is used to monitor whether the updated target tag attribute value in the target environment variable exists in the preset data bus after the open source baseboard management controller is restarted;

[0025] The data acquisition module is used to determine, when it does not exist, that a factory reset operation has been performed on the preset data bus, and to acquire the updated target tag attribute value in the target environment variable;

[0026] The data retention module is used to re-add the updated target tag attribute value to the preset data bus so that the open-source baseboard management controller can read the updated target tag attribute value in the preset data bus after startup, thereby completing the retention of the updated target tag attribute value.

[0027] Thirdly, this application discloses an electronic device, comprising:

[0028] Memory, used to store computer programs;

[0029] A processor for executing the computer program to implement the aforementioned disclosed tag data retention method.

[0030] Fourthly, this application discloses a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the aforementioned disclosed tag data retention method.

[0031] In this application, after the open-source circuit board management controller restarts, it first monitors whether the updated target tag attribute value in the target environment variable exists in the preset data bus. The updated target tag attribute value in the target environment variable is a value pre-synchronized to the target environment variable by the preset data bus. Then, if the updated target tag attribute value does not exist in the preset data bus, it is determined that a factory reset operation for the preset data bus has been performed, and the updated target tag attribute value in the target environment variable is obtained. Finally, the updated target tag attribute value is added back to the preset data bus so that the open-source circuit board management controller can read the updated target tag attribute value in the preset data bus after startup, thus completing the retention of the updated target tag attribute value. Therefore, in this application, after determining that a factory reset operation has been performed, the data in the open-source circuit board management controller is deleted, but the data in the environment variable is not deleted. The updated target tag attribute value synchronized to the data bus through the target environment variable can be read after the open-source circuit board management controller starts up, thus completing the retention of the updated target tag attribute value. In this way, by reading and writing environment variables, the data of the target tag is protected to prevent other programs from erroneously operating on and updating the data of the target tag, thereby achieving persistent retention of the tag data. Attached Figure Description

[0032] 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, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0033] Figure 1 This application provides a flowchart of a tag data retention method;

[0034] Figure 2 A flowchart illustrating a specific tag data retention method provided in this application;

[0035] Figure 3 A flowchart illustrating a specific tag data retention method provided in this application;

[0036] Figure 4 A schematic diagram of a tag data retention method device provided in this application;

[0037] Figure 5 This application provides a structural diagram of an electronic device. Detailed Implementation

[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0039] After triggering a factory reset, all modified data in the BMC, including files, configurations, and logs, will be deleted to preserve the BMC's initial state upon first startup. However, it may be necessary to retain some modified data after triggering a factory reset, but there is currently no technical way to achieve this.

[0040] To overcome the aforementioned technical problems, this application provides a tag data retention method that can protect the data of the target tag by reading and writing environment variables after restoring factory settings, thereby preventing other programs from erroneously operating on and updating the data of the target tag, and achieving persistent retention of the tag data.

[0041] See Figure 1 As shown in the figure, an embodiment of the present invention discloses a tag data retention method, including:

[0042] Step S11: After the open-source baseboard management controller restarts, it monitors whether the updated target tag attribute value in the target environment variable exists in the preset data bus; the updated target tag attribute value in the target environment variable is the value that the preset data bus has pre-synchronized to the target environment variable.

[0043] In this embodiment, after the open-source baseboard management controller restarts, it monitors whether the updated target tag attribute value in the target environment variable exists in the preset data bus. That is, after the open-source baseboard management controller restarts, it can determine whether a factory reset operation has been performed by monitoring whether the updated target tag attribute value exists in the preset Dbus (Daemon Bus, message bus system). It should be noted that the updated target tag attribute value in the target environment variable is a value that the preset data bus has pre-synchronized to the target environment variable. That is, before the open-source baseboard management controller restarts, the preset data bus needs to first synchronize the updated target tag attribute value to the Uboot (Universal Boot Loader) environment variable.

[0044] Step S12: If it does not exist, then determine that a factory reset operation for the preset data bus has been performed, and obtain the updated target tag attribute value in the target environment variable.

[0045] In this embodiment, if the target tag does not exist, it is determined that a factory reset operation for the preset data bus has been performed, and the updated target tag attribute value in the target environment variable is obtained. That is, if the updated target tag attribute value does not exist in the preset data bus, it indicates that the factory reset operation has been performed, and the updated target tag attribute value in the preset data bus has been cleared. It should be noted that after the factory reset operation is performed, the data in the open source board management controller will be deleted, but the data in the Uboot environment variable will not be deleted. The updated target tag attribute value that was synchronized in advance in the Uboot environment variable can be read.

[0046] Step S13: Add the updated target tag attribute value back to the preset data bus so that the open source baseboard management controller can read the updated target tag attribute value in the preset data bus after startup, thereby completing the retention of the updated target tag attribute value.

[0047] In this embodiment, the updated target tag attribute value is re-added to the preset data bus so that the open-source circuit board management controller can read the updated target tag attribute value from the preset data bus after startup, thus retaining the updated target tag attribute value. After confirming that a factory reset operation has been performed, the updated target tag attribute value read from the Uboot environment variable is re-added to the preset data bus. After restarting, the open-source circuit board management controller can read the updated target tag attribute value re-added to the preset data bus via the Uboot environment variable. In this way, after the open-source circuit board management controller starts up, it can read the updated target tag attribute value synchronized to the data bus via the target environment variable, thus completing the persistent retention of the updated target tag attribute value.

[0048] In this application, after the open-source circuit board management controller restarts, it first monitors whether the updated target tag attribute value in the target environment variable exists in the preset data bus. The updated target tag attribute value in the target environment variable is a value pre-synchronized to the target environment variable by the preset data bus. Then, if the updated target tag attribute value does not exist in the preset data bus, it is determined that a factory reset operation for the preset data bus has been performed, and the updated target tag attribute value in the target environment variable is obtained. Finally, the updated target tag attribute value is added back to the preset data bus so that the open-source circuit board management controller can read the updated target tag attribute value in the preset data bus after startup, thus completing the retention of the updated target tag attribute value. Therefore, in this application, after determining that a factory reset operation has been performed, the data in the open-source circuit board management controller is deleted, but the data in the environment variable is not deleted. The updated target tag attribute value synchronized to the data bus through the target environment variable can be read after the open-source circuit board management controller starts up, thus completing the retention of the updated target tag attribute value. In this way, by reading and writing environment variables, the data of the target tag is protected to prevent other programs from erroneously operating on and updating the data of the target tag, thereby achieving persistent retention of the tag data.

[0049] As can be seen from the previous embodiment, in this application, the open-source baseboard controller needs to monitor whether there are updated target tag attribute values ​​in the preset data bus after restarting. Furthermore, the updated target tag attribute values ​​need to be synchronized to the preset data bus in advance before being updated to the Uboot environment variables. Therefore, this embodiment describes in detail the steps of synchronizing the updated target tag attribute values ​​to the preset data bus in advance and then updating the Uboot environment variables. See [link to relevant documentation]. Figure 2 As shown in the figure, an embodiment of the present invention discloses a tag data retention method, including:

[0050] Step S21: Receive a tag attribute value update instruction, and update the target tag attribute value according to the tag attribute value update instruction to obtain the updated target tag attribute value; the target tag attribute value is the attribute value of the user's liquid asset tag.

[0051] In this embodiment, a tag attribute value update instruction is received, and the target tag attribute value is updated according to the tag attribute value update instruction to obtain the updated target tag attribute value. That is, when the user updates the target tag attribute value through in-band or out-of-band methods, the tag attribute value update instruction is generated. After the preset instruction receiving interface receives the tag attribute value update instruction, it can update the target tag attribute value according to the tag attribute value update instruction to obtain the updated target tag attribute value. It should be noted that the target tag attribute value can be various types of tag attribute values, but in this application, the target tag attribute value is the attribute value of the user's liquid asset tag. It should be further noted that after the target tag attribute value is updated through the tag attribute value update instruction and the updated target tag attribute value is obtained, the updated target tag attribute value is synchronously updated to the preset data bus.

[0052] Step S22: Monitor whether the target tag attribute value in the preset data bus has been updated by the preset monitoring component to determine the first data monitoring result.

[0053] In this embodiment, a preset monitoring component monitors whether the target tag attribute value in the preset data bus has been updated to determine the first data monitoring result. That is, when the open-source baseboard management controller detects that the target tag attribute value has been updated in an in-band or out-of-band manner, it will immediately start the monitoring service. It should be noted that the monitoring service can be of various types, but the monitoring service in this application is a systemd monitoring service. After the systemd monitoring service is started, the preset systemd monitoring component can monitor whether the target tag attribute value in the preset data bus has been updated, and then the first data monitoring result is determined based on the monitoring result of the systemd monitoring component.

[0054] Step S23: Determine whether to synchronize the updated target tag attribute value to the target environment variable based on the first data monitoring result.

[0055] In this embodiment, the decision to synchronize the updated target tag attribute value to the target environment variable is determined based on the first data monitoring result. Specifically, if the first data monitoring result indicates that the target tag attribute value in the preset data bus has been updated, a data acquisition script is triggered to acquire the updated target tag attribute value and synchronize it to the Uboot environment variable. It should be noted that if the first data monitoring result indicates that the target tag attribute value in the preset data bus has not been updated, the step of acquiring the updated target tag attribute value through the data acquisition script and synchronizing it to the Uboot environment variable is not triggered.

[0056] Therefore, in this embodiment, a tag attribute value update instruction is first received, and the target tag attribute value is updated according to the instruction to obtain the updated target tag attribute value. The target tag attribute value is the attribute value of the user's mobile asset tag. The updated target tag attribute value is then synchronously updated to the preset data bus. A preset monitoring component then monitors whether the target tag attribute value in the preset data bus has been updated to determine a first data monitoring result. Finally, based on the first data monitoring result, it is determined whether the updated target tag attribute value should be synchronously updated to the target environment variable. In this way, when the target tag attribute value is updated, it can be synchronously updated to the preset data bus and then updated to the Uboot environment variable via the preset data bus, thereby protecting the updated target tag attribute value.

[0057] As described in the previous embodiment, after a restart, the open-source baseboard controller in this application needs to monitor whether an updated target tag attribute value exists in the preset data bus to determine whether a factory reset operation has been performed, and whether to read the updated target tag attribute value in the preset data bus. Therefore, this embodiment describes in detail the steps for determining whether a factory reset operation has been performed by monitoring whether an updated target tag attribute value exists in the preset data bus, and whether to read the updated target tag attribute value in the preset data bus. (See [link to previous embodiment]) Figure 3 As shown in the figure, an embodiment of the present invention discloses a tag data retention method, including:

[0058] Step S31: After the open-source baseboard management controller restarts, it monitors whether the updated target tag attribute value in the target environment variable exists in the preset data bus through the preset monitoring component to obtain the second data monitoring result, and determines whether the factory setting recovery operation for the preset data bus has been performed based on the second data monitoring result.

[0059] In this embodiment, when the open source baseboard management controller restarts, it monitors whether the updated target tag attribute value in the target environment variable exists in the preset data bus through the preset monitoring component to obtain the second data monitoring result. That is, when the open source baseboard management controller restarts, it will monitor whether the updated target tag attribute value in the Uboot environment variable exists in the preset data bus through the systemd monitoring component to determine the monitoring result, and then determine the second data monitoring result based on the monitoring result.

[0060] It should be noted that after the open-source baseboard management controller restarts and monitors whether the updated target tag attribute value in the target environment variable exists in the preset data bus, the process further includes: if the second data monitoring result indicates that the updated target tag attribute value exists in the preset data bus, then it is determined that the factory reset operation for the preset data bus has not yet been performed. That is, if the factory reset operation has been performed, the data in the data bus will be cleared. Therefore, if the second data monitoring result indicates that the updated target tag attribute value still exists in the preset data bus, it means that the factory reset operation has not been performed, and the step of obtaining the updated target tag attribute value in the target environment variable is not triggered.

[0061] Step S32: If it does not exist, then determine that a factory reset operation for the preset data bus has been performed, and obtain the updated target tag attribute value in the target environment variable.

[0062] Step S33: Add the updated target tag attribute value to the preset data bus that has undergone the factory reset operation.

[0063] In this embodiment, the updated target tag attribute value is added to the preset data bus after the factory reset operation, that is, the updated target tag attribute value in the obtained Uboot environment variable is re-added to the preset data bus after the factory reset operation, so that the open source board controller can read the updated target tag attribute value.

[0064] Step S34: After the open-source baseboard management controller is started, it reads the updated target tag attribute value from the preset data bus that has undergone the factory reset operation, and adds the updated target tag attribute value to the preset network protocol to complete the retention of the updated target tag attribute value.

[0065] In this embodiment, after the open-source baseboard management controller starts up, it reads the updated target tag attribute value from the preset data bus that has undergone the factory reset operation, and adds the updated target tag attribute value to the preset network protocol to complete the retention of the updated target tag attribute value. That is, after the open-source baseboard management controller starts up, it can read the updated target tag attribute value added to the preset data bus through the Uboot environment variable, and then add the updated target tag attribute value to the web to achieve persistent retention of the updated target tag attribute value after the factory reset.

[0066] It should be noted that for more specific processing procedures regarding step S32 above, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0067] Therefore, in this embodiment, after the open-source baseboard management controller restarts, it first monitors whether the updated target tag attribute value in the target environment variable exists in the preset data bus through a preset monitoring component to obtain a second data monitoring result. Based on the second data monitoring result, it determines whether a factory reset operation for the preset data bus has been performed. When the second data monitoring result indicates that the updated target tag attribute value no longer exists in the preset data bus, it is determined that a factory reset operation for the preset data bus has been performed, and the updated target tag attribute value in the target environment variable is obtained. Then, the updated target tag attribute value is added to the preset data bus after the factory reset operation. Finally, after the open-source baseboard management controller starts up, it reads the updated target tag attribute value from the preset data bus after the factory reset operation and adds the updated target tag attribute value to the preset network protocol to complete the retention of the updated target tag attribute value. In this way, after performing a factory reset operation, the updated target tag attribute value can be persistently retained by reading the updated target tag attribute value added to the preset data bus through the Uboot environment variable.

[0068] See Figure 4 As shown, an embodiment of the present invention discloses a tag data retention device, comprising:

[0069] Data monitoring module 11 is used to monitor whether the updated target tag attribute value in the target environment variable exists in the preset data bus after the open source baseboard management controller is restarted;

[0070] The data acquisition module 12 is used to determine, when it does not exist, that a factory reset operation for the preset data bus has been performed, and to acquire the updated target tag attribute value in the target environment variable;

[0071] The data retention module 13 is used to re-add the updated target tag attribute value to the preset data bus so that the open source baseboard management controller can read the updated target tag attribute value in the preset data bus after startup, so as to complete the retention of the updated target tag attribute value.

[0072] Therefore, this application first monitors whether the updated target tag attribute value in the target environment variable exists in the preset data bus after the open-source board management controller restarts. The updated target tag attribute value in the target environment variable is a value pre-synchronized to the target environment variable by the preset data bus. Then, when the updated target tag attribute value does not exist in the preset data bus, it is determined that a factory reset operation for the preset data bus has been performed, and the updated target tag attribute value in the target environment variable is obtained. Finally, the updated target tag attribute value is added back to the preset data bus so that the open-source board management controller can read the updated target tag attribute value in the preset data bus after startup, thus retaining the updated target tag attribute value. Thus, in this application, after determining that a factory reset operation has been performed, the data in the open-source board management controller is deleted, but the data in the environment variable is not deleted. The updated target tag attribute value synchronized to the data bus through the target environment variable can be read after the open-source board management controller starts up, thus retaining the updated target tag attribute value. In this way, by reading and writing environment variables, the data of the target tag is protected to prevent other programs from erroneously operating on and updating the data of the target tag, thereby achieving persistent retention of the tag data.

[0073] In some embodiments, the data monitoring module 11 may further include:

[0074] The data update submodule is used to receive a tag attribute value update instruction and update the target tag attribute value according to the tag attribute value update instruction to obtain the updated target tag attribute value; the target tag attribute value is the attribute value of the user's liquid asset tag;

[0075] The first synchronous update submodule is used to synchronously update the updated target tag attribute value to the preset data bus.

[0076] In some embodiments, the data monitoring module 11 may further include:

[0077] The first monitoring submodule is used to monitor whether the target tag attribute value in the preset data bus has been updated through a preset monitoring component, so as to determine the first data monitoring result.

[0078] The second synchronization update submodule is used to determine whether to synchronize the updated target tag attribute value to the target environment variable based on the first data monitoring result.

[0079] In some embodiments, the second synchronization update submodule may specifically include:

[0080] The data synchronization unit is used to trigger a data acquisition script when the first data monitoring result indicates that the target tag attribute value in the preset data bus has been updated, so as to acquire the updated target tag attribute value through the data acquisition script and synchronize the updated target tag attribute value to the target environment variable.

[0081] In some embodiments, the data monitoring module 11 may specifically include:

[0082] The first operation result determination unit is used to monitor, through the preset monitoring component, whether the updated target tag attribute value in the target environment variable exists in the preset data bus after the open source baseboard management controller is restarted, to obtain a second data monitoring result, and to determine whether a factory reset operation for the preset data bus has been performed based on the second data monitoring result.

[0083] In some embodiments, the data acquisition module 12 may further include:

[0084] The second operation result determination unit determines that the factory reset operation for the preset data bus has not yet been performed if the second data monitoring result indicates that the updated target tag attribute value exists in the preset data bus.

[0085] In some embodiments, the data retention module 13 may further include:

[0086] A data adding unit is used to add the updated target tag attribute value to the preset data bus after the factory reset operation;

[0087] The data retention unit is used to read the updated target tag attribute value from the preset data bus that has undergone the factory reset operation after the open source baseboard management controller has been started, and add the updated target tag attribute value to the preset network protocol to complete the retention of the updated target tag attribute value.

[0088] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0089] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the tag data retention method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0090] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0091] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0092] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the tag data retention method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0093] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed tag data retention method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0094] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0095] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software 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.

[0096] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0097] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0098] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods 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 method for retaining tag data, characterized in that, include: After the open-source baseboard management controller restarts, it monitors whether the updated target tag attribute value in the target environment variables exists in the preset data bus. The updated target label attribute value in the target environment variable is a value that is pre-synchronized to the target environment variable by the preset data bus; If it does not exist, it is determined that a factory reset operation for the preset data bus has been performed, and the updated target tag attribute value in the target environment variable is obtained; The updated target tag attribute value is re-added to the preset data bus so that the open-source baseboard management controller can read the updated target tag attribute value from the preset data bus after startup, thereby completing the retention of the updated target tag attribute value.

2. The tag data retention method according to claim 1, characterized in that, Before monitoring whether the updated target tag attribute value in the target environment variables exists in the preset data bus after the open-source baseboard management controller restarts, the process also includes: Receive a tag attribute value update instruction, and update the target tag attribute value according to the tag attribute value update instruction to obtain the updated target tag attribute value; the target tag attribute value is the attribute value of the user's liquid asset tag; The updated target tag attribute values ​​are synchronously updated to the preset data bus.

3. The tag data retention method according to claim 2, characterized in that, Before synchronizing the updated target tag attribute values ​​in the preset data bus to the target environment variables, the process also includes: The first data monitoring result is determined by monitoring whether the target tag attribute value in the preset data bus is updated by a preset monitoring component. Based on the first data monitoring result, determine whether to synchronously update the updated target tag attribute value to the target environment variable.

4. The tag data retention method according to claim 3, characterized in that, The step of determining whether to synchronize the updated target tag attribute value to the target environment variable based on the first data monitoring result includes: If the first data monitoring result indicates that the target tag attribute value in the preset data bus has been updated, a data acquisition script is triggered to obtain the updated target tag attribute value and synchronize the updated target tag attribute value to the target environment variable.

5. The tag data retention method according to claim 3, characterized in that, The step of monitoring whether the updated target tag attribute value in the target environment variables exists in the preset data bus after the open-source baseboard management controller restarts includes: When the open-source baseboard management controller restarts, it monitors whether the updated target tag attribute value in the target environment variable exists in the preset data bus through the preset monitoring component to obtain a second data monitoring result, and determines whether a factory reset operation for the preset data bus has been performed based on the second data monitoring result.

6. The tag data retention method according to claim 5, characterized in that, After the open-source baseboard management controller restarts and monitors whether the updated target tag attribute value in the target environment variables exists in the preset data bus, the process further includes: If the second data monitoring result indicates that the updated target tag attribute value exists in the preset data bus, then it is determined that the factory reset operation for the preset data bus has not yet been performed.

7. The tag data retention method according to any one of claims 1 to 6, characterized in that, The step of re-adding the updated target tag attribute value to the preset data bus so that the open-source baseboard management controller can read the updated target tag attribute value from the preset data bus after startup, thereby completing the retention of the updated target tag attribute value, includes: Add the updated target tag attribute value to the preset data bus after the factory reset operation; Once the open-source baseboard management controller has started up, it reads the updated target tag attribute value from the preset data bus that has undergone the factory reset operation, and adds the updated target tag attribute value to the preset network protocol to complete the retention of the updated target tag attribute value.

8. A tag data retention device, characterized in that, include: The data monitoring module is used to monitor whether the updated target tag attribute value in the target environment variable exists in the preset data bus after the open source baseboard management controller is restarted; The data acquisition module is used to determine, when it does not exist, that a factory reset operation has been performed on the preset data bus, and to acquire the updated target tag attribute value in the target environment variable; The data retention module is used to re-add the updated target tag attribute value to the preset data bus so that the open-source baseboard management controller can read the updated target tag attribute value in the preset data bus after startup, thereby completing the retention of the updated target tag attribute value.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the tag data retention method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the tag data retention method as described in any one of claims 1 to 7.