Attribute value determination method and apparatus, non-volatile readable storage medium, and electronic device
By adding target attributes to the attribute layer and gradually reading sub-attribute values, the compatibility monitoring problems caused by equipment differences between different manufacturers are solved, compatible monitoring of device types and efficient utilization of resources are achieved, and user experience and storage efficiency are improved.
Patent Information
- Application Number
- PCT/CN2024/095815
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-06
- Filing Date
- 2024-05-28
- Publication Date
- 2025-01-09
AI Technical Summary
There are differences in equipment produced by different manufacturers, which makes it impossible to monitor the same equipment types produced by different manufacturers, resulting in sensor information occupying a large amount of memory and hard disk space, and the user experience is poor.
By adding target attributes to the attribute layer of data processing, setting the target attribute corresponding to the sensor type, and reading the attribute value of the sub-attribute in sequence until the attribute value of a sub-attribute is read, and determining that it is the attribute value of the target attribute. This enables compatible reading of sensor attribute information and reduces unnecessary memory and hard disk space.
It realizes effective compatible monitoring of the same equipment types produced by different manufacturers, reduces unnecessary space occupied by sensor information in reading, and improves user experience and storage resource utilization.
Smart Images

Figure CN2024095815_09012025_PF_FP_ABST
Abstract
Description
Method and device for determining attribute value, non-volatile readable storage medium, and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on July 6, 2023, with application number 202310823998.4 and application name “Method and device for determining attribute values, storage medium and electronic device”, all contents of which are incorporated by reference into this application. Technical Field
[0003] Embodiments of the present application relate to the field of computers, and in particular, to a method and device for determining an attribute value, a non-volatile readable storage medium, and an electronic device. Background Art
[0004] An important function of the BMC (Baseboard Management Controller) is to access connected devices through the I2C (Inter-Integrated Circuit) bus, obtain device status, and dynamically monitor the device's operating status. A device contains multiple sensors, which store the data they sense in its registers. The BMC can determine the device's status by reading and writing registers in the device through the I2C bus. The BMC sometimes monitors the values of more than one sensor in a device, for example, simultaneously monitoring the device's MCU (Micro-controller Unit) temperature and memory temperature. Multiple companies may produce a single device, and the monitoring methods for devices produced by different companies can even vary significantly. For example, while GPUs produced by NVIDIA and domestically produced GPUs are both GPUs (Graphic Processing Units), their monitoring methods differ significantly. The MCU temperature and memory temperature of NVIDIA's GPUs are independent of each other, so to reduce coupling between sensors, the MCU temperature monitoring and memory monitoring are separated. However, the MCU temperature and memory temperature of domestically produced GPUs are not independent of each other, requiring a large number of identical operations to read the temperature. To reduce code redundancy and maintain their inherent connection, the MCU temperature and memory temperature monitoring must be combined. Consequently, a large amount of sensor information needs to be stored, which takes up a large amount of memory and hard disk space, leading to a significant waste of memory and hard disk space.
[0005] In addition, first of all, either a type 1 device or a type 2 device can be plugged into the same position on the motherboard. It is impossible to plug both types of devices at the same time. Therefore, the sensor value of one type of device must not be read at the same time, which will cause trouble for users. Users will think that the failure to read the value means that the device is faulty, which will increase the workload of after-sales staff and do not maximize the user experience.
[0006] In related technologies, due to the differences in equipment produced by different manufacturers, it is impossible to perform compatible monitoring on the same type of equipment produced by different manufacturers, and no effective solution has been proposed yet.
[0007] Summary of the Invention
[0008] The embodiments of the present application provide a method and device for determining attribute values, a non-volatile readable storage medium, and an electronic device to at least solve the problem in the attribute value determination method in the related art that due to differences in devices produced by different manufacturers, the same type of devices produced by different manufacturers cannot be monitored for compatibility.
[0009] According to a first aspect, a method for determining an attribute value is provided, comprising: in a case where sensors of the same sensor type exist in N devices of the same device type, setting a target attribute corresponding to the sensor type, wherein the sensors of the same sensor type are set to collect attribute values of the same type, the attribute value of the target attribute is used to represent the attribute value of the same type collected by the sensor, the target attribute is a parent attribute of N sub-attributes, the attribute value of each of the N sub-attributes is used to represent the attribute value of the same type collected by the sensor in a corresponding one of the N devices, where N is a positive integer greater than or equal to 2; in a case where the attribute value of the target attribute needs to be read, reading the attribute value of each of the N sub-attributes in sequence until the attribute value of one of the N sub-attributes is read or the N sub-attributes are traversed; in a case where the attribute value of one of the N sub-attributes is read, determining the attribute value of the read one sub-attribute as the attribute value of the target attribute.
[0010] According to a second aspect, a device for determining an attribute value is provided, comprising: a first setting module, configured to set a target attribute corresponding to the sensor type when sensors of the same sensor type exist in N devices of the same device type, wherein the sensors of the same sensor type are configured to collect attribute values of the same type, the attribute value of the target attribute is used to represent the attribute value of the same type collected by the sensor, the target attribute is a parent attribute of N sub-attributes, the attribute value of each of the N sub-attributes is used to represent the attribute value of the same type collected by the sensor in a corresponding one of the N devices, where N is a positive integer greater than or equal to 2; a reading module, configured to read the attribute value of each of the N sub-attributes in sequence when it is necessary to read the attribute value of the target attribute until the attribute value of one of the N sub-attributes is read or the N sub-attributes are traversed; a determination module, configured to determine the attribute value of the read one of the N sub-attributes as the attribute value of the target attribute when the attribute value of the target attribute is read.
[0011] According to a third aspect, a non-volatile readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0012] According to a fourth aspect, an electronic device is further provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0013] Through the embodiment of the present application, a target attribute is added to the attribute layer of data processing, which is used to set the target attribute corresponding to the sensor type when there are sensors of the same sensor type in N devices of the same device type, wherein the sensors of the same sensor type are set to collect attribute values of the same type, and the attribute value of the target attribute is used to represent the attribute value of the same type collected by the sensor, and the target attribute is the parent attribute of N sub-attributes, and the attribute value of each sub-attribute in the N sub-attributes is used to represent the attribute value of the same type collected by the sensor in a corresponding device in the N devices, where N is a positive integer greater than or equal to 2; when it is necessary to read When taking the attribute value of the target attribute, the attribute value of each sub-attribute in N sub-attributes is read in sequence until the attribute value of one sub-attribute in the N sub-attributes is read or the N sub-attributes are traversed; when the attribute value of one sub-attribute in the N sub-attributes is read, the attribute value of the read sub-attribute is determined as the attribute value of the target attribute. In this way, the problem of the attribute value determination method in the related art that due to the differences in devices produced by different manufacturers, the same device type produced by different manufacturers cannot be compatible monitored is solved. By setting the target attribute, multiple devices of the same device type can correspond to only one sub-attribute. Thus, while achieving compatible reading of sensor attribute information, the unnecessary memory and hard disk space occupied by redundant sensor information in reading is reduced, avoiding the waste of storage resources, and achieving the technical effect of effective compatible monitoring of the same device type produced by different manufacturers, thereby solving the problem of the attribute value determination method in the related art that due to the differences in devices produced by different manufacturers, the same device type produced by different manufacturers cannot be compatible monitored. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] FIG1 is a schematic diagram of the architecture of an optional attribute value determination method system provided in an embodiment of the present application;
[0015] FIG2 is a schematic structural diagram of an optional electronic device provided in an embodiment of the present application;
[0016] FIG3 is a flow chart of an optional method for determining an attribute value according to an embodiment of the present application;
[0017] FIG4 is a schematic diagram of a flow chart of an optional BMC monitoring device according to an embodiment of the present application;
[0018] FIG5 is a flowchart of an optional sub-type-based sensor attribute access hardware monitor to obtain sensor values and store them in an attribute table according to an embodiment of the present application;
[0019] FIG6 is a flowchart of an optional method of reading attributes of a parent type from attributes of a child type according to an embodiment of the present application;
[0020] FIG7 is a structural block diagram of an optional device for determining an attribute value according to an embodiment of the present application;
[0021] FIG8 is a structural block diagram of a computer system of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] The embodiments of the present application provide a method and apparatus for determining an attribute value, a non-volatile readable storage medium, and an electronic device, which can quickly and accurately locate an abnormal autonomous domain. The following describes an exemplary application of the electronic device provided by the embodiments of the present application. The electronic device provided by the embodiments of the present application can be implemented as various types of terminal devices such as a motherboard, a laptop computer, a tablet computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device), and can also be implemented as a server or other type of processing device. The following describes an exemplary application when the device is implemented as a motherboard.
[0025] According to one aspect of an embodiment of the present application, a method for determining an attribute value is provided. Optionally, in this embodiment, the above-mentioned method for determining an attribute value can be applied to a method system for determining an attribute value as shown in FIG1 . As shown in FIG1 , the method system 100 for determining an attribute value may include: a hardware monitor unit 101, an attribute layer unit 102, and a sensor layer unit 103. In order to implement an application of a method for determining an attribute value, the hardware monitor unit 101 includes multiple hardware monitors (exemplarily showing a hardware monitor corresponding to sensor 1 in subtype 1, a hardware monitor corresponding to sensor 2 in subtype 1, and a hardware monitor corresponding to sensors 1 and 2 in subtype 2). The above-mentioned hardware monitor can access the subtype 1 device and subtype 2 device connected thereto based on an I2C bus including a synchronous clock line and a data line, wherein subtype 1 refers to a GPU produced by NVIDIA, subtype 2 refers to a domestically produced GPU, sensor 1 refers to the MCU temperature, and sensor 2 refers to the memory temperature. Then, the operating status of the subtype device is dynamically monitored by obtaining the status of the different subtype devices. The attribute value determination method system 100 may connect to a data display device via a network. The network may include, but is not limited to, at least one of the following: a wired network and a wireless network. The wired network may include, but is not limited to, at least one of the following: a wide area network, a metropolitan area network, and a local area network. The wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity) and Bluetooth.
[0026] The sensor layer unit 103 can be configured to obtain filter values corresponding to attribute values from the attribute table for display to the target object and store relevant information of various sensors, such as the sensor type. The attribute layer unit 102 is configured to process the sensor values read by the hardware monitor unit 101 from sensors in different sub-type devices to obtain filter values for storage in the attribute value table. For example, if the attribute layer unit reads the sensor values of a sensor of the same sub-type ten times in a row, the sensor values can be sorted from small to large or from large to small, and the three largest and three smallest values are removed. The average of the four middle values is then taken to obtain the final sensor value corresponding to the sub-type sensor. It should be noted that the processed data is called the filter value. In the attribute layer unit, the sensor information collected by multiple hardware monitors is processed to obtain a corresponding attribute table. In addition, based on the attribute table, the correspondence between the pre-divided subtypes and parent types can be used to determine the attribute information of the parent type sensor on the basis of the attribute table. Then, by monitoring the attribute information of the parent type sensor, multiple subtype sensors belonging to the same parent type can be monitored. Therefore, by adding parent type attributes corresponding to sensor attributes, when the subtype devices under the parent type are devices produced by different manufacturers, compatible reading of sensor attribute information can also be achieved, thereby reducing unnecessary memory and hard disk space occupied by redundant sensor information, avoiding waste of storage resources, and achieving the technical effect of compatible monitoring of different subtype devices, thereby solving the problem of the attribute value determination method in the related technology that due to the differences in subtype devices produced by different manufacturers, it is impossible to compatible monitor subtype devices with the same functions from different manufacturers.
[0027] Optionally, in this embodiment, the above-mentioned method for determining the attribute value can be performed by an electronic device as shown in Figure 2. As shown in Figure 2, the electronic device 200 may include the hardware monitor in the above-mentioned hardware monitor unit 101, and the electronic device 200 includes: at least one processor 201, at least one network interface 202, a bus system 203 and a memory 204. The various components in the electronic device 200 are coupled together through the bus system 203. It can be understood that the bus system 203 is configured to achieve connection and communication between these components. In addition to the data bus, the bus system 203 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are labeled as bus system 203 in Figure 2 (equivalent to the I2C bus in the above-mentioned embodiment).
[0028] The processor 201 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0029] The memory 204 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 204 may optionally include one or more storage devices that are physically remote from the processor 201.
[0030] The memory 204 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 204 described in the embodiments of the present application is intended to include any suitable type of memory.
[0031] In some embodiments, the memory 204 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.
[0032] Operating system 2041, including system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, which are used to implement various basic services and process hardware-based tasks;
[0033] The network communication module 2402 is configured to reach other computing devices via one or more (wired or wireless) network interfaces 202. Exemplary network interfaces 202 include Bluetooth, Wi-Fi, and USB.
[0034] The attribute table 2043 includes an attribute name, an attribute value, and an attribute status. The attribute name is used to indicate the sub-type device from which the attribute belongs to the sensor attribute, and the attribute value is used to indicate the real-time size of the acquired data. For example, if the MCU temperature needs to be acquired, the corresponding attribute value is the temperature value. The attribute status is used to indicate whether the attribute name and attribute value are valid in the table. For example, when the attribute status indicates invalid, it means that the data was not successfully read from the corresponding sub-type device, indicating that the sub-type device is not plugged in or the hardware is faulty, etc., then the real-time value of the attribute value is represented by 0, and the status is represented by an abnormal state, and stored in the attribute table.
[0035] When monitoring sub-type devices from different manufacturers through the BMC, assume there are two sub-types: Sub-type 1 represents NVIDIA GPUs, Sub-type 2 represents Chinese GPUs, Sensor 1 represents MCU temperature, and Sensor 2 represents memory temperature. Because the monitoring methods for Sub-type 1 and Sub-type 2 differ significantly, they cannot be combined into a single hardware monitor for hardware access. Related technologies often establish separate hardware monitors for each sub-type of device, each with its own attributes and sensor values. In actual use, only one subtype of device can be plugged into the same position on the motherboard, and only one of subtype 1 and subtype 2 can be plugged in. For example, if you plug in a GPU produced by NVIDIA, you cannot plug in a domestic GPU. Therefore, no matter which device is plugged in at the sensor layer, there will always be another device that cannot display its value because it is not plugged in. However, users do not consider this too much. Users always assume that a sensor that does not display a value is not plugged in or that the sensor is faulty. This is not only detrimental to user experience, but also causes a lot of trouble for after-sales personnel. Moreover, the number of sensors that the BMC can monitor simultaneously is limited. Each additional sensor needs to save the corresponding sensor information. Because each sensor requires a large amount of information to be saved, it will take up a lot of memory and hard disk space, which will also lead to a lot of waste of memory and hard disk space.
[0036] To this end, a parent type attribute can be added between the attributes of the sensor in subtype 1 and the attributes of the sensor in subtype 2 through the subtype device compatibility method. The parent type attribute first reads the sensor attribute value from the attribute of the sensor in subtype 1. If the reading is successful, the attribute of the sensor in subtype 1 is used as the attribute of the sensor in the parent type device. If the reading fails, the attribute of the sensor in subtype 2 is read again. If the reading is successful, the attribute of the sensor in subtype 2 is used as the attribute of the sensor in the parent type device. If the reading still fails, it means that the parent type device is not plugged in the hardware, and the sensor attribute value of the parent type device is empty; after the parent type attribute value is processed, the filtered value is passed to the parent type sensor to be displayed to the user.
[0037] According to an embodiment of the present application, a parent type attribute (equivalent to the target attribute in the above embodiment) is added to the attribute layer of data processing. After determining the subtype attribute (equivalent to the attribute value collected by the sensor in the above embodiment) of a subtype device (equivalent to any one of the N devices of the same device type in the above embodiment), the parent type first reads data from the attribute of the first subtype device according to the correspondence between the parent type and the subtype. If the reading fails, the parent type reads data from the attribute of the second subtype device. Thus, the parent type attribute is filled with the attribute of the subtype device. In this way, no matter how many subtypes there are, only one parent type sensor attribute can be mapped. Thus, by adding the parent type attribute corresponding to the sensor attribute, even when the subtype devices under the parent type are manufactured by different manufacturers, compatible reading of sensor attribute information can be achieved. This reduces unnecessary memory and hard disk space occupied by redundant sensor information, avoids waste of storage resources, and provides the technical effect of compatible monitoring of different subtype devices. This solves the problem of the attribute value determination method in the related art that due to the differences between subtype devices produced by different manufacturers, it is impossible to monitor subtype devices with the same functions from different manufacturers.
[0038] Optionally, the above-mentioned attribute value determination method may be executed solely by the sensor layer unit 103, or may be executed jointly by the sensor layer unit 103 and the hardware monitor in the hardware monitor unit 101, or may be executed by other processing devices other than the sensor layer unit 103 and the hardware monitor unit 101. As an optional implementation, taking the attribute value determination method of this embodiment executed by the sensor layer unit 103 as an example, as shown in FIG3 , the process of the attribute value determination method may include the following steps:
[0039] In step S302, when sensors of the same sensor type exist in N devices of the same device type, a target attribute corresponding to the sensor type is set, wherein the sensors of the same sensor type are set to collect attribute values of the same type, and the attribute value of the target attribute is used to represent the attribute values of the same type collected by the sensor. The target attribute is a parent attribute of N sub-attributes, and the attribute value of each of the N sub-attributes is used to represent the attribute value of the same type collected by the sensor in a corresponding one of the N devices, where N is a positive integer greater than or equal to 2.
[0040] In step S304, when the attribute value of the target attribute needs to be read, the attribute value of each of the N sub-attributes is read in sequence until the attribute value of one of the N sub-attributes is read or the N sub-attributes are traversed;
[0041] In step S306, when the attribute value of one sub-attribute among the N sub-attributes is read, the attribute value of the read sub-attribute is determined as the attribute value of the target attribute.
[0042] Through the above steps, a target attribute is added to the attribute layer of data processing, which is used to set the target attribute corresponding to the sensor type when there are sensors of the same sensor type in N devices of the same device type. Sensors of the same sensor type are set to collect attribute values of the same type. The attribute value of the target attribute is used to represent the attribute value of the same type collected by the sensor. The target attribute is the parent attribute of N sub-attributes. The attribute value of each sub-attribute in the N sub-attributes is used to represent the attribute value of the same type collected by the sensor in a corresponding device in the N devices. N is a positive integer greater than or equal to 2. When it is necessary to read In the case of the attribute value of the target attribute, the attribute value of each sub-attribute in N sub-attributes is read in sequence until the attribute value of one sub-attribute in the N sub-attributes is read or the N sub-attributes are traversed; in the case of reading the attribute value of one sub-attribute in the N sub-attributes, the attribute value of the read sub-attribute is determined as the attribute value of the target attribute. In this way, the problem of the attribute value determination method in the related art that due to the differences in devices produced by different manufacturers, the same device type produced by different manufacturers cannot be compatible monitored is solved. By setting the target attribute, multiple devices of the same device type can correspond to only one sub-attribute. Thus, while achieving compatible reading of sensor attribute information, the unnecessary memory and hard disk space occupied by redundant sensor information in reading is reduced, avoiding the waste of storage resources, and achieving the technical effect of effective compatible monitoring of the same device type produced by different manufacturers, thereby solving the problem of the attribute value determination method in the related art that due to the differences in devices produced by different manufacturers, the same device type produced by different manufacturers cannot be compatible monitored.
[0043] In an exemplary embodiment, after setting the target attribute corresponding to the sensor type, the above method also includes: performing a read operation on the registers corresponding to the sensors in the N devices through N hardware monitors, wherein the N hardware monitors have a one-to-one correspondence with the N sub-attributes, and the registers are set to store attribute values of the same type collected by the sensors; when M hardware monitors among the N hardware monitors read attribute values of the same type from the registers corresponding to the sensors in the M devices among the N devices, the attribute values read by the M hardware monitors are written as attribute values of the M sub-attributes into a preset attribute table, wherein M is a positive integer greater than or equal to 1 and less than or equal to N, and the attribute table is used to record the attribute value of each sub-attribute in the N sub-attributes, and the M hardware monitors have a one-to-one correspondence with the M sub-attributes.
[0044] In some embodiments, the hardware monitor layer is responsible for processing business logic operations and accessing different sensors in the device through the I2C bus to read the attribute values collected by the corresponding sensors from the registers of devices of the same device type produced by different manufacturers. The attribute layer is responsible for reading the attribute values of the sensors read in the hardware monitor and placing them in the attribute table, and also stores a lot of sensor-related information, such as the type of sensor.
[0045] Through the embodiments of the present application, the attribute values collected by sensors of the same sensor type in devices of the same device type produced by different manufacturers can be read through a hardware monitor, and the attribute values and other information corresponding to the attribute values can be stored in a preset attribute table, thereby realizing convenient processing of the attribute values.
[0046] In an exemplary embodiment, after performing a read operation on registers corresponding to sensors in N devices through N hardware monitors, the above method also includes: when M is less than N, setting the attribute values of NM sub-attributes other than M sub-attributes among the N sub-attributes recorded in the attribute table to preset target characters, wherein the target character is used to indicate that the attribute value of the sub-attribute has not been read.
[0047] In an exemplary embodiment, the attribute values read by M hardware monitors are written into a preset attribute table as the attribute values of M sub-attributes, including: writing the attribute value read by the i-th hardware monitor among the M hardware monitors as the attribute value of the i-th sub-attribute among the M sub-attributes into the attribute table through the following steps, wherein i is a positive integer greater than or equal to 1 and less than or equal to M: when the i-th hardware monitor reads the i-th group of attribute values from the register corresponding to the sensor in the i-th device among the M devices, determining the i-th attribute value to be written based on the i-th group of attribute values, wherein the i-th group of attribute values includes one or more attribute values of the same type collected by the sensor in the i-th device; and determining the attribute value of the i-th sub-attribute recorded in the attribute table to be equal to the i-th attribute value.
[0048] In an exemplary embodiment, the i-th attribute value to be written is determined based on the i-th group of attribute values, including: when the i-th group of attribute values includes one attribute value, determining one attribute value as the i-th attribute value; and / or when the i-th group of attribute values includes multiple attribute values, determining the average value of the i-th group of attribute values as the i-th attribute value, or determining the average value of some attribute values in the i-th group of attribute values as the i-th attribute value, wherein the partial attribute value is the attribute value obtained by removing the first P attribute values and / or the last Q attribute values arranged from largest to smallest in the i-th group of attribute values, and P and Q are both positive integers greater than or equal to 1.
[0049] In an exemplary embodiment, the attribute values of NM sub-attributes other than M sub-attributes among the N sub-attributes recorded in the attribute table are set to preset target characters, including: setting the attribute values of the NM sub-attributes in the attribute table to 0, and setting the attribute status of the NM sub-attributes in the attribute table to an abnormal state, wherein the abnormal state is used to indicate that the NM devices corresponding to the NM sub-attributes are not installed or have a hardware failure, and the NM devices include devices other than M devices among the N devices; when the attribute values read by M hardware monitors are written into the preset attribute table as the attribute values of the M sub-attributes, the method also includes: setting the attribute status of the M sub-attributes in the attribute table to a normal state, wherein the normal state is used to indicate that the M devices corresponding to the M sub-attributes are in a working state.
[0050] Through this embodiment, in the case of a reading failure, the attribute value of the corresponding sensor attribute is set to 0, and the sensor with abnormal reading is marked without affecting the normal reading process and attribute table filling.
[0051] In an exemplary embodiment, the attribute value of each of the N sub-attributes is read in sequence until the attribute value of one of the N sub-attributes is read or the N sub-attributes are traversed, including: reading the attribute value of each of the N sub-attributes in sequence according to a preset order in the attribute table until the attribute value of one of the N sub-attributes is read or the N sub-attributes are traversed.
[0052] Through this embodiment, after the attribute table is filled with the attribute values of sensors collected by different devices, multiple sub-attributes in the target attribute are determined by reading the attribute values collected by the corresponding sensors in the attribute table, and the attribute values corresponding to each sub-attribute are determined, and then the numerical filling of the sub-attributes in the target attribute is quickly completed. Based on the reading of the real-time attribute values corresponding to each type of sensor, the attribute content of the target attribute can be generated, so that the sensor information that needs to be displayed is greatly reduced, saving the memory resources corresponding to the display interface.
[0053] In an exemplary embodiment, the attribute value of each sub-attribute of N sub-attributes is read sequentially in a preset order in the attribute table until the attribute value of one sub-attribute among the N sub-attributes is read or the N sub-attributes are traversed, including: when N is 2, reading the attribute value of the first sub-attribute among the N sub-attributes in the attribute table; when the attribute value of one sub-attribute among the N sub-attributes is read, determining the attribute value of the read sub-attribute as the attribute value of the target attribute, including: when the attribute value of the first sub-attribute is read, determining the attribute value of the read first sub-attribute as the attribute value of the target attribute.
[0054] In an exemplary embodiment, the attribute value of each sub-attribute of N sub-attributes is read sequentially in a preset order in the attribute table until the attribute value of one sub-attribute among the N sub-attributes is read or the N sub-attributes are traversed, including: if the attribute value of the first sub-attribute is not read, the attribute value of the second sub-attribute among the N sub-attributes is read in the attribute table; if the attribute value of one sub-attribute among the N sub-attributes is read, the attribute value of the read sub-attribute is determined as the attribute value of the target attribute, including: if the attribute value of the second sub-attribute is read, the attribute value of the read second sub-attribute is determined as the attribute value of the target attribute.
[0055] In an exemplary embodiment, when reading the attribute value of the first sub-attribute among N sub-attributes in the attribute table, the method further includes: when a reading result obtained by reading the attribute value of the first sub-attribute includes a value within a preset value range, determining the value included in the reading result as the attribute value of the read first sub-attribute; or when a reading result obtained by reading the attribute value of the first sub-attribute includes a value within a preset value range and the attribute status of the first sub-attribute also included in the reading result is a normal state, determining the value included in the reading result as the attribute value of the read first sub-attribute, wherein the normal state is used to indicate that the device corresponding to the first sub-attribute is in a working state.
[0056] For example, there are two devices with device types of GPU produced by two different manufacturers, and each GPU device has sensor types of memory temperature sensor and MCU temperature sensor. When these two GPU devices are installed on the motherboard, since only devices from the same manufacturer can be installed on the motherboard, in order to be compatible with devices from different manufacturers, the temperature value collected by the memory temperature sensor of the GPU device installed on the motherboard (equivalent to the attribute value in the above embodiment) and the temperature value collected by the MCU temperature sensor are displayed compatibly, and the temperature values collected by the two temperature sensors are displayed through the device target attributes. When a target attribute is added to the attribute layer, the target attribute first reads the attribute value from the attribute values collected by all sensors in the first device. If the reading is successful, the attribute value collected by the sensor in the first device is used as the attribute value of the sub-attribute corresponding to the sensor type of the sensor in the target attribute. If the reading fails, the attribute value is read from the attribute values collected by all sensors in the second device. If the reading is successful, the attribute value collected by the sensor in the second device is used as the attribute value of the sub-attribute corresponding to the sensor type of the sensor in the target attribute. If the reading still fails, it means that the device of the target attribute is not plugged in the hardware, that is, the GPU device is not installed on the motherboard, and the attribute value of the sub-attribute of the target attribute is empty. It should be noted that after the attribute value of the target attribute is processed, the filtered value is transmitted to the sensor corresponding to the target attribute for display to the user.
[0057] Through the embodiments of the present application, the attribute values of the sub-attributes of the target attribute are filled by gradually reading the sensor data of the first device among N devices of the same device type, and in the event of a reading failure, the sensor data of the second device of the same device type as the first device is read, thereby ensuring that the target attribute has the corresponding attribute value regardless of whether the first device or the second device is installed in the mainboard or device terminal, so that the display will not fail when displayed to the target object, thereby improving the user experience of the target object.
[0058] In an exemplary embodiment, when reading the attribute value of the first sub-attribute among N sub-attributes in the attribute table, the above method also includes: when the reading result obtained by reading the attribute value of the first sub-attribute includes a numerical value that is not within a preset value range, determining that the attribute value of the first sub-attribute is not read; or when the reading result obtained by reading the attribute value of the first sub-attribute includes a numerical value that is not within the preset value range, and the attribute status of the first sub-attribute also included in the reading result is an abnormal state, determining the numerical value included in the reading result as the attribute value of the read first sub-attribute, wherein the abnormal state is used to indicate that the device corresponding to the first sub-attribute is not installed or there is a hardware failure.
[0059] Through the embodiments of the present application, by determining the numerical range corresponding to the reading result, it is determined whether the reading of the current sub-attribute is normal, and the attribute status of different sub-attributes is determined according to the numerical value, so that the current sub-attribute can be read quickly, and the installation status of devices of the same device type on the main board or terminal device can also be determined according to the read attribute status, thereby improving the user experience of the target object.
[0060] In an exemplary embodiment, when sensors of the same sensor type exist in N devices of the same device type, after setting the target attribute corresponding to the sensor type, the method further includes: determining the reading logic of at least two sensors in the j-th device among the N devices, wherein j is a positive integer greater than or equal to 1 and less than or equal to N; when the reading logic indicates that the at least two sensors do not allow independent access, setting the same hardware monitor for the at least two sensors in the j-th device, wherein the same hardware monitor is set to perform a read operation on registers corresponding to the at least two sensors in the j-th device, and the registers are set to store attribute values of the same type collected by the sensors; when the reading logic indicates that the at least two sensors allow independent access, setting a different hardware monitor for each of the at least two sensors in the j-th device, wherein different hardware monitors are set to perform a read operation on registers corresponding to different sensors in the at least two sensors in the j-th device.
[0061] According to the embodiment of the present application, independent hardware monitors are provided for different types of sub-type devices, thereby ensuring that sensor properties can be quickly acquired through the hardware monitor.
[0062] In an exemplary embodiment, after setting the same hardware monitor for at least two sensors in the j-th device, the method further includes:
[0063] A first monitoring logic is configured for the same hardware monitor, wherein the first monitoring logic is used to instruct to simultaneously read attribute values collected by at least two sensors in the jth device according to sub-attributes corresponding to at least two sensors.
[0064] In an exemplary embodiment, after setting a different hardware monitor for each of at least two sensors in the j-th device, the above method also includes: configuring a second monitoring logic for different hardware monitors, wherein the second monitoring logic is used to indicate the attribute values collected by at least two sensors in the j-th device in sequence according to a preset order.
[0065] It is understandable that after setting up a different hardware monitor for each sensor, in order to ensure the efficiency of the hardware monitor in reading data from the sensor, it is also necessary to determine the monitoring logic corresponding to different hardware monitors. Then, when using the set hardware monitor to read the attribute values collected by different sensors, the reading efficiency is greatly improved, and the processing efficiency of the attribute value data is improved.
[0066] In an exemplary embodiment, after configuring the second monitoring logic for different hardware monitors, the above method also includes: when there is a hardware monitor among different hardware monitors that cannot establish a communication connection with a corresponding sensor among at least two sensors, identifying the corresponding sensor as an abnormal sensor; when the number of abnormal sensors among at least two sensors is greater than a preset number, determining that the j-th device is not installed.
[0067] It is understandable that when multiple sensors of the same device cannot be obtained using the controller, it means that the device has a hardware abnormality or the device is not installed on the target device. At this time, you can also choose whether to issue an alarm to the target object based on the preset reporting logic, prompting the target object to perform an installation inspection or maintenance inspection on the device.
[0068] In an exemplary embodiment, after determining the attribute value of a read sub-attribute as the attribute value of the target attribute, the method further includes: displaying an identifier of the same type and the attribute value of the target attribute in the target display interface.
[0069] In an exemplary embodiment, the same type of identification and attribute value of the target attribute are displayed in the target display interface, including: when the same type is used to represent the temperature of the target device and the attribute value of the target attribute is used to represent the temperature value of the target device, the temperature of the target device is displayed as a temperature value in the target display interface.
[0070] It should be noted that the target display interface includes the corresponding identifiers of the same type and the attribute values of the target attributes, but does not include the device identifier, thereby avoiding the problem that the attribute values of some unread target attributes cannot be displayed normally due to the display device identifier.
[0071] In an exemplary embodiment, before setting the target attribute corresponding to the sensor type, the method further includes: obtaining input reading conditions for N devices, and determining a sensor type that meets the reading bar requirements among different sensor types of each sensor in the N devices; when the number of sensor types that meet the reading bar requirements is greater than a preset number, allowing the corresponding target attribute value to be set for the sensor type.
[0072] In an exemplary embodiment, the above method also includes: sending a prompt message to the target object when the number of sensor types that meet the reading bar requirements is less than or equal to a preset number; receiving a setting instruction for the target object's feedback on the prompt message; and using the setting instruction to adjust the number of sensor types for which attribute values need to be displayed.
[0073] In order to better understand the technical solutions of the embodiments of the present application and the optional embodiments, the process of the above-mentioned attribute value determination method is explained below with reference to examples, but it is not used to limit the technical solutions of the embodiments of the present application.
[0074] It should be noted that in order to better understand the technical solutions in the embodiments of the present application, the relevant technical terms are first explained:
[0075] BMC (Baseboard Management Controller) is a management controller unique to servers that can automatically monitor the server's operating status and make adjustments based on the current status.
[0076] I2C (Inter-Integrated Circuit) is a bidirectional synchronous serial bus that can connect multiple devices, divided into master and slave devices. The bus consists of two lines: SDA (Serial Data Line), which is used to transfer data between the master and slave devices; and SCL (Serial Clock Line), which is used to synchronize the time between the master and slave devices.
[0077] As an optional implementation, a key function of the BMC is to access connected devices via the I2C bus, obtain device status, and dynamically monitor the device's operating status. A device contains multiple sensors that store their sensed data in its registers. The BMC can determine the device's status by reading and writing to these registers via the I2C bus. The BMC sometimes monitors the values of more than one sensor in a device, for example, simultaneously monitoring both the MCU and memory temperatures. A single device may be manufactured by multiple companies, and the monitoring methods used by these companies can vary significantly. For example, while both NVIDIA and domestic GPUs are GPUs, their monitoring methods differ significantly. The MCU and memory temperatures of NVIDIA GPUs are independent. To reduce coupling between sensors, MCU and memory temperature monitoring is separated. However, for domestic GPUs, the MCU and memory temperatures are not independent, requiring numerous identical operations to read the temperatures. To reduce code redundancy and maintain their inherent connection, the MCU and memory temperature monitoring must be combined.
[0078] Optionally, FIG4 is a flow diagram of an optional BMC monitoring device according to an embodiment of the present application. As shown in FIG4, for ease of understanding, subtype 1 in FIG4 refers to a GPU produced by NVIDIA, subtype 2 refers to a domestically produced GPU, sensor 1 refers to the MCU temperature, and sensor 2 refers to the memory temperature. The hardware monitor layer is responsible for processing business logic operations and accessing the hardware device through the I2C bus to read the corresponding sensor value from its register. The attribute layer is responsible for reading the sensor value read from the hardware monitor and putting it into the attribute table after a certain processing (for example, reading ten times in a row, removing the three maximum values, the three minimum values, and taking the average of the four middle values. The processed data is called the filtered value). The sensor layer is responsible for reading the filtered value of the data from the attribute table and presenting it to the user. It also stores a lot of sensor-related information, such as the type of sensor. Since the monitoring methods of subtype 1 and subtype 2 are quite different, they cannot be put into a hardware monitor to implement hardware access. Therefore, an independent hardware monitor is often set up for each subtype of device as shown in FIG4, and its attributes and sensor values are also independent of each other. In actual use, only one subtype of device can be plugged into the same position on the motherboard, and only one of subtype 1 and subtype 2 can be plugged in. For example, if you plug in a GPU produced by NVIDIA, you cannot plug in a domestic GPU. Therefore, no matter which device is plugged in at the sensor layer, there will always be another device that cannot display its value because it is not plugged in. However, for users, they don’t think so much. Users always assume that a sensor that does not display a value is not plugged in or the sensor is faulty. This is not only not conducive to user usage and experience, but also brings a lot of trouble to after-sales personnel. In addition, the number of sensors that the BMC can monitor simultaneously is limited. Each additional sensor needs to save sensor information. Because each sensor requires a large amount of information to be saved, it will take up a lot of memory and hard disk space, which will also lead to a lot of memory and hard disk space being wasted.
[0079] In order to avoid the above-mentioned problem of being unable to effectively monitor GPUs produced by different manufacturers and save memory resources.
[0080] In an exemplary embodiment, an optional embodiment of the present application provides a compatibility method for devices monitored by a BMC. This compatibility method adds an attribute and uses the attribute to first read the attribute value of a subtype 1 device. If the read is successful, the value of subtype 1 is used as the sensor value, and the attribute value of subtype 2 devices is no longer read. If the read of subtype 1 fails, the attribute value of subtype 2 devices is read. Optionally, an example of a parent type with two subtypes, each subtype monitoring two sensors, and the acquisition methods of these two subtype sensors differ significantly is used to illustrate the present application embodiment. It should be noted that in actual applications, there may be more than two subtypes, or each subtype may monitor more than two sensors. This is flexibly determined based on the actual application scenario, and this application does not impose too many restrictions on this.
[0081] Alternatively, using a compatible method based on the above example, the process would be as follows:
[0082] Step 1: Add a parent type attribute between the attributes of the sensor in subtype 1 and the attributes of the sensor in subtype 2.
[0083] Step 2: First, read the sensor attribute value from the sensor attribute of subtype 1 through the parent type attribute. If the reading is successful, the attribute of the sensor in subtype 1 is used as the attribute of the sensor in the parent type device. If the reading fails, read the attribute of the sensor in subtype 2. If the reading is successful, the attribute of the sensor in subtype 2 is used as the attribute of the sensor in the parent type device. If the reading still fails, it means that the parent type device is not plugged in and the sensor attribute value of the parent type device is empty.
[0084] Step 3: After the attribute value of the parent type is processed, the filtered value is passed to the parent type sensor and displayed to the user.
[0085] Optionally, FIG5 is a flowchart of an optional sub-type-based sensor attribute access hardware monitor to obtain sensor values and store them in an attribute table according to an embodiment of the present application; the flowchart includes the following steps:
[0086] Step S402: "Sensor 1 properties in subtype 1" calls "Hardware monitor corresponding to sensor 1 in subtype 1" to process business logic operations (e.g., determine whether the hardware device is in place) and access the hardware device through the I2C bus to obtain the value of the sensor in the device;
[0087] Step S404: determine whether the access is successful;
[0088] Step S406: If the access is successful, the real-time value of the sensor is stored in the attribute table, the attribute state is stored as the normal state, and some data processing is performed. Optionally, the data processing can perform the following: remove the three maximum values and the three minimum values of the values read for the first ten times, average the four middle values, and obtain a filtered value, which is used as the attribute value of the subtype corresponding to the parent type.
[0089] Step S408: "Sensor 2 properties in subtype 1" calls "Sensor 2 hardware monitor in subtype 1" to process business logic operations (e.g., determine whether the hardware device is in place) and access the hardware device through the I2C bus to obtain the value of the sensor in the device;
[0090] Step S410: Determine whether the access is successful;
[0091] Step S412: If the access is successful, the real-time value of the sensor is stored in the attribute table, the attribute state is stored as a normal state, and some data processing is performed.
[0092] Step S414, "the hardware monitor corresponding to sensors 1 and 2 in subtype 2" accesses the hardware to read the sensor values;
[0093] Step S416: Determine whether the access is successful;
[0094] Step S418: If the access is successful, the real-time value of the sensor is stored in the attribute table, and the attribute state is stored as a normal state.
[0095] In step S420, the attribute values and attribute states of "attributes of sensor 1 in subtype 2" and "attributes of sensor 2 in subtype 2" are read from the attribute table temporarily stored in the aforementioned hardware monitor according to the attribute names, and data processing is performed;
[0096] It should be noted that because sensors 1 and 2 in subtype 2 are dependent and correlated, they must be built into a hardware monitor. After processing the business logic operations in the hardware monitor, the real-time values of sensor 1 and sensor 2 are read from the device register at one time.
[0097] Step S422: If the access fails, the real-time value of the sensor is represented by 0, the state is represented by an abnormal state, and stored in the attribute table;
[0098] It should be noted that, in the above steps S402 to S406 of obtaining the “attributes of sensor 1 in subtype 1”, steps S408 to S412 of obtaining the “attributes of sensor 2 in subtype 1”, and steps S414 to S420 of obtaining the “attributes of sensor 1 in subtype 2” and the “attributes of sensor 2 in subtype 2”, the three acquisition methods are executed concurrently, the steps in the process are executed in sequence, and the above three processes all execute step S422 after failure.
[0099] Optionally, FIG6 is a flowchart of an optional method of reading a parent type attribute from a child type attribute according to an embodiment of the present application; the flowchart includes the following steps:
[0100] Step S502, "parent type sensor 1 attributes" first reads the sensor 1 attributes in the subtype 1 from the attribute table;
[0101] Step S504: determine whether the read attribute status is normal;
[0102] Step S506: If it is in a normal state, the attribute value is used as the attribute value of the parent type. The "parent type sensor 1 attribute" uses the value of the sensor attribute in the child type 1 as its attribute value, and the attribute state is normal.
[0103] It should be noted that because only one subtype of device can be inserted into the same position on the motherboard, if subtype 1 is inserted, subtype 2 cannot be inserted. Therefore, if the attribute value of subtype 1 is read, it indicates that subtype 1 is inserted, that is, subtype 2 is not inserted, and the process ends.
[0104] Step S508: If the status is not normal, indicating that no device of subtype 1 is inserted, then continue to read the sensor 1 attributes in subtype 2; that is, the "parent type sensor 1 attributes" continues to read the sensor 1 attributes in subtype 2 from the attribute table;
[0105] Step S510: determine whether the read attribute status is normal;
[0106] Step S512: If it is in a normal state, the attribute value is used as the attribute value of the parent type; that is, the "parent type sensor 1 attribute" uses the value of the sensor attribute in the subtype 2 as its attribute value, and the attribute state is normal.
[0107] Step S514: If it is not a normal state, indicating that no device of subtype 2 is inserted, the attribute value of "parent type sensor 1 attribute" is set to 0, and the state is an abnormal state, which can be expressed as ERROR.
[0108] In addition, for other parent type attributes, the process of steps S502 to S514 may be executed in a loop, for example, determining the “parent type sensor 2 attribute” and so on.
[0109] After the above steps, whether a device of subtype 1 or subtype 2 is plugged in, there is only one parent type attribute. Then "Sensor 1" and "Sensor 2" read the sensor filter values from the parent type's sensor 1 attribute and the parent type's sensor 2 attribute respectively and display them to the user.
[0110] It should be noted that the above processes are illustrated with two subtypes, and each subtype monitors two sensors, but in reality it is not limited to two subtypes, and each subtype is not limited to monitoring only two sensors. As long as the conditions of this application are met, it can be implemented in accordance with this application.
[0111] In summary, through the above embodiment, a parent type attribute is added to the attribute layer. The parent type first reads from the attribute of subtype 1. If the reading fails, it reads from the attribute of subtype 2. After reading, it is transmitted to the sensor corresponding to the parent type for the user to view. With this method, no matter how many subtypes there are, there is only one sensor corresponding to each of them, which reduces the unnecessary memory and hard disk space occupied by redundant sensors and avoids waste. Because only one device can be inserted into the same position at the same time, if each subtype device corresponds to a sensor, the unplugged subtype device will always be unreadable, which will cause trouble for the user. In this method, all subtypes correspond to a parent type sensor, which avoids the problem of the subtype sensor value not being able to be read due to the unplugged devices of other subtypes, avoids causing trouble for the user, avoids the increase in the workload of after-sales staff, and is more logical. In addition, this method is simple to operate and easy to implement.
[0112] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.
[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a non-volatile readable storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or hardware monitor, etc.) to execute the method of each embodiment of the present application.
[0114] According to another aspect of the embodiments of the present application, a device for determining an attribute value is also provided, which is configured to implement the method for determining the attribute value provided in the above-mentioned embodiments, and will not be repeated hereafter. As used below, the term "module" may be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
[0115] FIG7 is a structural block diagram of a device for determining an attribute value according to an embodiment of the present application. As shown in FIG7 , the device includes:
[0116] A first setting module 602 is configured to set a target attribute corresponding to the sensor type when sensors of the same sensor type exist in N devices of the same device type, wherein the sensors of the same sensor type are configured to collect attribute values of the same type, the attribute value of the target attribute is used to represent the attribute value of the same type collected by the sensor, the target attribute is a parent attribute of N sub-attributes, and the attribute value of each of the N sub-attributes is used to represent the attribute value of the same type collected by the sensor in a corresponding one of the N devices, where N is a positive integer greater than or equal to 2;
[0117] The reading module 604 is configured to read the attribute value of each of the N sub-attributes in sequence when it is necessary to read the attribute value of the target attribute until the attribute value of one of the N sub-attributes is read or the N sub-attributes are traversed;
[0118] The determining module 606 is configured to, when an attribute value of one sub-attribute among the N sub-attributes is read, determine the attribute value of the read sub-attribute as the attribute value of the target attribute.
[0119] It should be noted that the first setting module 602 in this embodiment can be set to execute the above step S302, the reading module 604 in this embodiment can be set to execute the above step S304, and the determining module 606 in this embodiment can be set to execute the above step S306.
[0120] Through the embodiment provided by the present application, a target attribute is added to the attribute layer of data processing, which is used to set the target attribute corresponding to the sensor type when there are sensors of the same sensor type in N devices of the same device type, wherein the sensors of the same sensor type are set to collect attribute values of the same type, and the attribute value of the target attribute is used to represent the attribute value of the same type collected by the sensor, and the target attribute is the parent attribute of N sub-attributes, and the attribute value of each sub-attribute in the N sub-attributes is used to represent the attribute value of the same type collected by the sensor in a corresponding device in the N devices, where N is a positive integer greater than or equal to 2; when it is needed To read the attribute value of the target attribute, the attribute value of each sub-attribute in N sub-attributes is read in sequence until the attribute value of one sub-attribute in the N sub-attributes is read or the N sub-attributes are traversed; when the attribute value of one sub-attribute in the N sub-attributes is read, the attribute value of the read sub-attribute is determined as the attribute value of the target attribute. In this way, the problem of the attribute value determination method in the related art that due to the differences in devices produced by different manufacturers, the same device type produced by different manufacturers cannot be compatible monitored is solved. By setting the target attribute, multiple devices of the same device type can correspond to only one sub-attribute. Thus, while achieving compatible reading of sensor attribute information, the unnecessary memory and hard disk space occupied by redundant sensor information in reading is reduced, avoiding the waste of storage resources, and achieving the technical effect of effectively compatible monitoring of the same device type produced by different manufacturers, thereby solving the problem of the attribute value determination method in the related art that due to the differences in devices produced by different manufacturers, the same device type produced by different manufacturers cannot be compatible monitored.
[0121] In an exemplary embodiment, the above-mentioned device also includes: a writing module, which is configured to perform a read operation on the registers corresponding to the sensors in N devices through N hardware monitors after setting the target attribute corresponding to the sensor type, wherein the N hardware monitors have a one-to-one correspondence with the N sub-attributes, and the registers are configured to store attribute values of the same type collected by the sensors; when M hardware monitors among the N hardware monitors read attribute values of the same type from the registers corresponding to the sensors in M devices among the N devices, the attribute values read by the M hardware monitors are written as attribute values of the M sub-attributes into a preset attribute table, wherein M is a positive integer greater than or equal to 1 and less than or equal to N, and the attribute table is used to record the attribute value of each sub-attribute in the N sub-attributes, and the M hardware monitors have a one-to-one correspondence with the M sub-attributes.
[0122] In some embodiments, the hardware monitor layer is responsible for processing business logic operations and accessing different sensors in the device through the I2C bus to read the attribute values collected by the corresponding sensors from the registers of devices of the same device type produced by different manufacturers. The attribute layer is responsible for reading the attribute values of the sensors read in the hardware monitor and placing them in the attribute table, and also stores a lot of sensor-related information, such as the type of sensor.
[0123] Through the embodiments of the present application, the attribute values collected by sensors of the same sensor type in devices of the same device type produced by different manufacturers can be read through a hardware monitor, and the attribute values and other information corresponding to the attribute values can be stored in a preset attribute table, thereby realizing convenient processing of the attribute values.
[0124] In an exemplary embodiment, the above-mentioned writing module is also configured to, after performing a read operation on the registers corresponding to the sensors in N devices through N hardware monitors, set the attribute values of NM sub-attributes other than M sub-attributes among the N sub-attributes recorded in the attribute table to preset target characters when M is less than N, wherein the target character is used to indicate that the attribute value of the sub-attribute has not been read.
[0125] In an exemplary embodiment, the above-mentioned writing module is also configured to write the attribute value read by the i-th hardware monitor among the M hardware monitors as the attribute value of the i-th sub-attribute among the M sub-attributes into the attribute table through the following steps, wherein i is a positive integer greater than or equal to 1 and less than or equal to M: when the i-th hardware monitor reads the i-th group of attribute values from the register corresponding to the sensor in the i-th device among the M devices, determine the i-th attribute value to be written based on the i-th group of attribute values, wherein the i-th group of attribute values includes one or more attribute values of the same type collected by the sensor in the i-th device; and determine the attribute value of the i-th sub-attribute recorded in the attribute table to be equal to the i-th attribute value.
[0126] In an exemplary embodiment, the above-mentioned writing module is further configured to determine an attribute value as the i-th attribute value when the i-th group of attribute values includes an attribute value; and / or determine the average value of the i-th group of attribute values as the i-th attribute value when the i-th group of attribute values includes multiple attribute values, or determine the average value of some attribute values in the i-th group of attribute values as the i-th attribute value, wherein the partial attribute value is the attribute value obtained by removing the first P attribute values and / or the last Q attribute values arranged from large to small in the i-th group of attribute values, and P and Q are both positive integers greater than or equal to 1.
[0127] In an exemplary embodiment, the above-mentioned writing module is also configured to set the attribute values of NM sub-attributes in the attribute table to 0, and set the attribute status of the NM sub-attributes in the attribute table to an abnormal state, wherein the abnormal state is used to indicate that the NM devices corresponding to the NM sub-attributes are not installed or have a hardware failure, and the NM devices include devices other than M devices in the N devices; when the attribute values read by M hardware monitors are written as the attribute values of the M sub-attributes into the preset attribute table, the method also includes: setting the attribute status of the M sub-attributes in the attribute table to a normal state, wherein the normal state is used to indicate that the M devices corresponding to the M sub-attributes are in a working state.
[0128] Through this embodiment, in the case of a reading failure, the attribute value of the corresponding sensor attribute is set to 0, and the sensor with abnormal reading is marked without affecting the normal reading process and attribute table filling.
[0129] In an exemplary embodiment, the reading module is further configured to read the attribute value of each of the N sub-attributes in the attribute table in sequence according to a preset order until the attribute value of one of the N sub-attributes is read or all the N sub-attributes are traversed.
[0130] Through this embodiment, after the attribute table is filled with the attribute values of sensors collected by different devices, multiple sub-attributes in the target attribute are determined by reading the attribute values collected by the corresponding sensors in the attribute table, and the attribute values corresponding to each sub-attribute are determined, and then the numerical filling of the sub-attributes in the target attribute is quickly completed. Based on the reading of the real-time attribute values corresponding to each type of sensor, the attribute content of the target attribute can be generated, so that the sensor information that needs to be displayed is greatly reduced, saving the memory resources corresponding to the display interface.
[0131] In an exemplary embodiment, the above-mentioned determination module is further configured to read the attribute value of the first sub-attribute among the N sub-attributes in the attribute table when N is 2; and when the attribute value of one sub-attribute among the N sub-attributes is read, determine the read attribute value of the sub-attribute as the attribute value of the target attribute, including: when the attribute value of the first sub-attribute is read, determine the read attribute value of the first sub-attribute as the attribute value of the target attribute.
[0132] In an exemplary embodiment, the above-mentioned reading module is further configured to read the attribute value of the second sub-attribute among the N sub-attributes in the attribute table when the attribute value of the first sub-attribute is not read; and to determine the attribute value of the read sub-attribute as the attribute value of the target attribute when the attribute value of one sub-attribute among the N sub-attributes is read, including: when the attribute value of the second sub-attribute is read, determining the attribute value of the read second sub-attribute as the attribute value of the target attribute.
[0133] In an exemplary embodiment, the above-mentioned reading module is further configured to, when a reading result obtained by reading the attribute value of the first sub-attribute includes a value within a preset value range, determine the value included in the reading result as the attribute value of the first sub-attribute read; or, when a reading result obtained by reading the attribute value of the first sub-attribute includes a value within a preset value range and the attribute state of the first sub-attribute also included in the reading result is a normal state, determine the value included in the reading result as the attribute value of the first sub-attribute read, wherein the normal state is used to indicate that the device corresponding to the first sub-attribute is in a working state.
[0134] For example, there are two devices with device types of GPU produced by two different manufacturers, and each GPU device has sensor types of memory temperature sensor and MCU temperature sensor. When these two GPU devices are installed on the motherboard, since only devices from the same manufacturer can be installed on the motherboard, in order to be compatible with devices from different manufacturers, the temperature value collected by the memory temperature sensor of the GPU device installed on the motherboard (equivalent to the attribute value in the above embodiment) and the temperature value collected by the MCU temperature sensor are displayed compatibly, and the temperature values collected by the two temperature sensors are displayed through the device target attributes. When a target attribute is added to the attribute layer, the target attribute first reads the attribute value from the attribute values collected by all sensors in the first device. If the reading is successful, the attribute value collected by the sensor in the first device is used as the attribute value of the sub-attribute corresponding to the sensor type of the sensor in the target attribute. If the reading fails, the attribute value is read from the attribute values collected by all sensors in the second device. If the reading is successful, the attribute value collected by the sensor in the second device is used as the attribute value of the sub-attribute corresponding to the sensor type of the sensor in the target attribute. If the reading still fails, it means that the device of the target attribute is not plugged in the hardware, that is, the GPU device is not installed on the motherboard, and the attribute value of the sub-attribute of the target attribute is empty. It should be noted that after the attribute value of the target attribute is processed, the filtered value is transmitted to the sensor corresponding to the target attribute for display to the user.
[0135] Through the embodiments of the present application, the attribute values of the sub-attributes of the target attribute are filled by gradually reading the sensor data of the first device among N devices of the same device type, and in the event of a reading failure, the sensor data of the second device of the same device type as the first device is read, thereby ensuring that the target attribute has the corresponding attribute value regardless of whether the first device or the second device is installed in the mainboard or device terminal, so that the display will not fail when displayed to the target object, thereby improving the user experience of the target object.
[0136] In an exemplary embodiment, the reading module further includes: a status unit configured to, when reading the attribute value of a first sub-attribute among N sub-attributes in an attribute table, determine that the attribute value of the first sub-attribute is not read, and when a reading result obtained by reading the attribute value of the first sub-attribute includes a value that is not within a preset value range; or, when a reading result obtained by reading the attribute value of the first sub-attribute includes a value that is not within a preset value range and the attribute status of the first sub-attribute included in the reading result is an abnormal state, determine the value included in the reading result as the attribute value of the first sub-attribute that is read, wherein the abnormal state is used to indicate that the device corresponding to the first sub-attribute is not installed or has a hardware failure.
[0137] Through the embodiments of the present application, by determining the numerical range corresponding to the reading result, it is determined whether the reading of the current sub-attribute is normal, and the attribute status of different sub-attributes is determined according to the numerical value, so that the current sub-attribute can be read quickly, and the installation status of devices of the same device type on the main board or terminal device can also be determined according to the read attribute status, thereby improving the user experience of the target object.
[0138] In an exemplary embodiment, the apparatus further includes: a second setting module configured to, when sensors of the same sensor type exist in N devices of the same device type, after setting the target attribute corresponding to the sensor type, the method further includes: determining the reading logic of at least two sensors in the j-th device among the N devices, wherein j is a positive integer greater than or equal to 1 and less than or equal to N; when the reading logic indicates that the at least two sensors do not allow independent access, setting the same hardware monitor for the at least two sensors in the j-th device, wherein the same hardware monitor is configured to perform a read operation on registers corresponding to the at least two sensors in the j-th device, and the registers are configured to store attribute values of the same type collected by the sensors; when the reading logic indicates that the at least two sensors allow independent access, setting a different hardware monitor for each of the at least two sensors in the j-th device, wherein different hardware monitors are configured to perform a read operation on registers corresponding to different sensors in the at least two sensors in the j-th device.
[0139] According to the embodiment of the present application, independent hardware monitors are provided for different types of sub-type devices, thereby ensuring that sensor properties can be quickly acquired through the hardware monitor.
[0140] In an exemplary embodiment, the above-mentioned second setting module further includes: a first configuration unit, which is configured to configure a first monitoring logic for the same hardware monitor after setting the same hardware monitor for at least two sensors in the j-th device, wherein the first monitoring logic is used to instruct to simultaneously read the attribute values collected by at least two sensors according to the sub-attributes corresponding to the at least two sensors in the j-th device.
[0141] In an exemplary embodiment, the above-mentioned second setting module also includes: a second configuration unit, which is configured to configure a second monitoring logic for different hardware monitors after setting a different hardware monitor for each of the at least two sensors in the j-th device, wherein the second monitoring logic is used to indicate the attribute values collected by the at least two sensors in the j-th device in sequence according to a preset order.
[0142] It is understandable that after setting up a different hardware monitor for each sensor, in order to ensure the efficiency of the hardware monitor in reading data from the sensor, it is also necessary to determine the monitoring logic corresponding to different hardware monitors. Then, when using the set hardware monitor to read the attribute values collected by different sensors, the reading efficiency is greatly improved, and the processing efficiency of the attribute value data is improved.
[0143] In an exemplary embodiment, the above-mentioned second setting module also includes: an identification unit, which is configured to, after configuring the second monitoring logic for different hardware monitors, identify the corresponding sensor as an abnormal sensor when there is a hardware monitor in the different hardware monitors that cannot establish a communication connection with the corresponding sensor in at least two sensors; the above-mentioned second setting module also includes: a determination unit, which is configured to determine that the j-th device is not installed when the number of abnormal sensors in at least two sensors is greater than a preset number.
[0144] It is understandable that when multiple sensors of the same device cannot be obtained using the controller, it means that the device has a hardware abnormality or the device is not installed on the target device. At this time, you can also choose whether to issue an alarm to the target object based on the preset reporting logic, prompting the target object to perform an installation inspection or maintenance inspection on the device.
[0145] In an exemplary embodiment, the apparatus further includes: a display module configured to display the same type of identifier and the attribute value of the target attribute in the target display interface after determining the attribute value of a read sub-attribute as the attribute value of the target attribute.
[0146] In an exemplary embodiment, the display module is further configured to display the temperature of the target device as a temperature value in the target display interface when the same type is used to represent the temperature of the target device and the attribute value of the target attribute is used to represent the temperature value of the target device.
[0147] It should be noted that the target display interface includes the corresponding identifiers of the same type and the attribute values of the target attributes, but does not include the device identifier, thereby avoiding the problem that the attribute values of some unread target attributes cannot be displayed normally due to the display device identifier.
[0148] In an exemplary embodiment, the above-mentioned device also includes: a requirement module, which is configured to obtain input reading conditions for N devices before setting the target attribute corresponding to the sensor type, and determine the sensor type that meets the reading bar requirements among the different sensor types of each sensor in the N devices; when the number of sensor types that meet the reading bar requirements is greater than a preset number, it is allowed to set the corresponding target attribute value for the sensor type.
[0149] In an exemplary embodiment, the requirement module further includes: an adjustment unit, configured to send a prompt message to the target object when the number of sensor types that meet the reading bar requirements is less than or equal to a preset number; receive setting instructions for feedback from the target object regarding the prompt message; and use the setting instructions to adjust the number of sensor types for which attribute values need to be displayed.
[0150] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0151] According to another aspect of the embodiments of the present application, a non-volatile readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when running.
[0152] In an exemplary embodiment, the non-volatile readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0153] According to one aspect of the present application, a computer program product is provided, comprising a computer program / instruction containing program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 809 and / or installed from a removable medium 811. When the computer program is executed by the central processing unit 801, the various functions provided in the embodiments of the present application are performed. The serial numbers of the embodiments of the present application are for descriptive purposes only and do not represent the merits of the embodiments.
[0154] Fig. 8 schematically shows a computer system structure block diagram for realizing the electronic equipment of embodiment of the present application.As shown in Figure 8, computer system 800 includes central processing unit 801 (Central Processing Unit, CPU), which can perform various appropriate actions and processes according to the program stored in read-only memory 802 (Read-Only Memory, ROM) or the program loaded into random access memory 803 (Random Access Memory, RAM) from storage part 808. In random access memory 803, various programs and data required for system operation are also stored. Central processing unit 801, read-only memory 802 and random access memory 803 are connected to each other through bus 804. Input / output interface 805 (Input / Output interface, i.e., I / O interface) is also connected to bus 804.
[0155] The following components are connected to the input / output interface 805: an input section 806 including a keyboard, a mouse, and the like; an output section 807 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 808 including a hard disk; and a communication section 809 including a network interface card such as a local area network card or a modem. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 810 as needed, so that a computer program read therefrom can be installed into the storage section 808 as needed.
[0156] In particular, according to an embodiment of the present application, the processes described in the various method flow charts can be implemented as computer software programs. For example, an embodiment of the present application includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the methods shown in the flow charts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809 and / or installed from a removable medium 811. When the computer program is executed by the central processing unit 801, the various functions defined in the system of the present application are performed.
[0157] It should be noted that the computer system 800 of the electronic device shown in FIG8 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0158] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments.
[0159] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the input / output resource pool, and the input / output device is connected to the input / output resource pool.
[0160] For optional examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementations, and this embodiment will not be described in detail here.
[0161] Obviously, those skilled in the art should understand that the various modules or steps of the above-mentioned embodiments of the present application can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented using program codes executable by the computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present application are not limited to any specific combination of hardware and software.
[0162] The above are merely optional embodiments of the present application and are not intended to limit the embodiments of the present application. For those skilled in the art, the embodiments of the present application may be modified and varied in various ways. Any modifications, equivalent replacements, improvements, etc. made within the principles of the embodiments of the present application shall be included in the scope of protection of the embodiments of the present application.
Claims
1. A method for determining an attribute value, characterized in that: include: In the case that N devices of the same device type all have sensors of the same sensor type, a target attribute corresponding to the sensor type is set, wherein the sensors of the same sensor type are set to collect attribute values of the same type, the attribute value of the target attribute is used to represent the attribute value of the same type collected by the sensor, the target attribute is a parent attribute of N sub-attributes, the attribute value of each of the N sub-attributes is used to represent the attribute value of the same type collected by the sensor in a corresponding one of the N devices, and N is a positive integer greater than or equal to 2; When the attribute value of the target attribute needs to be read, the attribute value of each of the N sub-attributes is read in sequence until the attribute value of one of the N sub-attributes is read or the N sub-attributes are traversed; When the attribute value of one sub-attribute among the N sub-attributes is read, the attribute value of the sub-attribute is determined as the attribute value of the target attribute.
2. The method according to claim 1, characterized in that After setting the target attribute corresponding to the sensor type, the method further includes: Performing a read operation on registers corresponding to the sensors in the N devices through N hardware monitors, wherein the N hardware monitors have a one-to-one correspondence with the N sub-attributes, and the registers are configured to store the attribute values of the same type collected by the sensors; In the case where M of the N hardware monitors read the same type of attribute values from the registers corresponding to the sensors in M of the N devices, the attribute values read by the M hardware monitors are written into a preset attribute table as attribute values of M sub-attributes, wherein M is a positive integer greater than or equal to 1 and less than or equal to N, and the attribute table is used to record the attribute value of each of the N sub-attributes, and the M hardware monitors have a one-to-one correspondence with the M sub-attributes.
3. The method according to claim 2, characterized in that After performing a read operation on registers corresponding to the sensors in the N devices through the N hardware monitors, the method further includes: When M is less than N, the attribute values of NM sub-attributes other than the M sub-attributes among the N sub-attributes recorded in the attribute table are set as preset target characters, wherein the target characters are used to indicate that the attribute value of the sub-attribute is not read.
4. The method according to claim 2, characterized in that: The step of writing the attribute values read by the M hardware monitors into a preset attribute table as attribute values of M sub-attributes includes: The attribute value read by the i-th hardware monitor among the M hardware monitors is written into the attribute table as the attribute value of the i-th sub-attribute among the M sub-attributes by the following steps, wherein i is a positive integer greater than or equal to 1 and less than or equal to M: In a case where the i-th hardware monitor reads an i-th group of attribute values from a register corresponding to the sensor in the i-th device among the M devices, determining an i-th attribute value to be written according to the i-th group of attribute values, wherein the i-th group of attribute values includes one or more attribute values of the same type collected by the sensor in the i-th device; The attribute value of the i-th sub-attribute recorded in the attribute table is determined to be equal to the i-th attribute value.
5. The method according to claim 4, characterized in that The step of determining the i-th attribute value to be written according to the i-th group of attribute values includes: In the case where the i-th group of attribute values includes one attribute value, determining the one attribute value as the i-th attribute value; and / or In the case where the i-th group of attribute values includes multiple attribute values, the average value of the i-th group of attribute values is determined as the i-th attribute value, or the average value of some attribute values in the i-th group of attribute values is determined as the i-th attribute value, wherein the partial attribute value is the attribute value obtained by removing the first P attribute values and / or the last Q attribute values arranged from large to small in the i-th group of attribute values, and P and Q are both positive integers greater than or equal to 1.
6. The method according to claim 3, characterized in that The setting the attribute values of NM sub-attributes other than the M sub-attributes among the N sub-attributes recorded in the attribute table to preset target characters includes: setting the attribute values of the NM sub-attributes in the attribute table to 0, and setting the attribute states of the NM sub-attributes in the attribute table to abnormal states, wherein the abnormal state is used to indicate that NM devices corresponding to the NM sub-attributes are not installed or have hardware failures, and the NM devices include devices other than the M devices among the N devices; In the case where the attribute values read by the M hardware monitors are written into the preset attribute table as the attribute values of the M sub-attributes The method further includes: setting the attribute status of the M sub-attributes in the attribute table to a normal status, wherein the normal status is used to indicate that the M devices corresponding to the M sub-attributes are in a working status.
7. The method according to claim 2, characterized in that The step of sequentially reading the attribute value of each of the N sub-attributes until the attribute value of one of the N sub-attributes is read or the N sub-attributes are traversed completely includes: The attribute value of each of the N sub-attributes is read in sequence in the attribute table according to a preset order until the attribute value of one of the N sub-attributes is read or the N sub-attributes are traversed.
8. The method according to claim 7, characterized in that The method further comprises: reading the attribute value of each of the N sub-attributes in the attribute table in a preset order, until the attribute value of one of the N sub-attributes is read or the N sub-attributes are traversed, including: when N is 2, reading the attribute value of the first sub-attribute in the N sub-attributes in the attribute table; In a case where an attribute value of one sub-attribute among the N sub-attributes is read, determining the attribute value of the sub-attribute read as the attribute value of the target attribute includes: in a case where the attribute value of the first sub-attribute is read, determining the attribute value of the first sub-attribute read as the attribute value of the target attribute.
9. The method according to claim 8, characterized in that The method further comprises: reading the attribute value of each of the N sub-attributes in the attribute table in a preset order until the attribute value of one of the N sub-attributes is read or the N sub-attributes are traversed, including: if the attribute value of the first sub-attribute is not read, reading the attribute value of a second sub-attribute in the N sub-attributes in the attribute table; In a case where an attribute value of one of the N sub-attributes is read, determining the attribute value of the one sub-attribute read as the attribute value of the target attribute includes: in a case where the attribute value of the second sub-attribute is read, determining the attribute value of the second sub-attribute read as the attribute value of the target attribute.
10. The method according to claim 8, characterized in that In the case of reading the attribute value of the first sub-attribute among the N sub-attributes in the attribute table, the method further includes: When a result obtained by reading the attribute value of the first sub-attribute includes a value within a preset value range, determining the value included in the reading result as the attribute value of the first sub-attribute that is read; or In a case where a reading result obtained by reading the attribute value of the first sub-attribute includes a value within a preset value range, and the attribute state of the first sub-attribute also included in the reading result is a normal state, the value included in the reading result is determined as the read attribute value of the first sub-attribute, wherein the normal state is used to indicate that a device corresponding to the first sub-attribute is in a working state.
11. The method according to claim 9, characterized in that In the case of reading the attribute value of the first sub-attribute among the N sub-attributes in the attribute table, the method further includes: If the result of reading the attribute value of the first sub-attribute includes a value that is not within a preset value range, determining that the attribute value of the first sub-attribute is not read; or In a case where a reading result obtained by reading the attribute value of the first sub-attribute includes a value that is not within a preset value range, and the attribute state of the first sub-attribute also included in the reading result is an abnormal state, the value included in the reading result is determined as the read attribute value of the first sub-attribute, wherein the abnormal state is used to indicate that a device corresponding to the first sub-attribute is not installed or has a hardware failure.
12. The method according to claim 1, characterized in that In the case that all N devices of the same device type have sensors of the same sensor type, after setting the target attribute corresponding to the sensor type, the method further includes: Determine a reading logic of at least two sensors in a j-th device among the N devices, where j is a positive integer greater than or equal to 1 and less than or equal to N; When the read logic indicates that the at least two sensors do not allow independent access, a same hardware monitor is set for the at least two sensors in the j-th device, wherein the same hardware monitor is configured to perform a read operation on registers corresponding to the at least two sensors in the j-th device, and the registers are configured to store the attribute values of the same type collected by the sensors; In the case where the read logic indicates that the at least two sensors allow independent access, a different hardware monitor is set for each of the at least two sensors in the j-th device, wherein the different hardware monitor is set to The registers corresponding to different sensors of the at least two sensors in the device perform a read operation.
13. The method according to claim 12, characterized in that After setting the same hardware monitor for the at least two sensors in the j-th device, the method further includes: A first monitoring logic is configured for the same hardware monitor, wherein the first monitoring logic is used to instruct to simultaneously read the attribute values collected by the at least two sensors in the jth device according to the sub-attributes corresponding to the at least two sensors.
14. The method according to claim 12, characterized in that After setting a different hardware monitor for each of the at least two sensors in the j-th device, the method further includes: A second monitoring logic is configured for the different hardware monitors, wherein the second monitoring logic is used to indicate the attribute values collected by the at least two sensors in the j-th device in sequence according to a preset order.
15. The method according to claim 14, characterized in that After configuring the second monitoring logic for the different hardware monitors, the method further includes: In the case that a hardware monitor among the different hardware monitors cannot establish a communication connection with the corresponding sensor among the at least two sensors, marking the corresponding sensor as an abnormal sensor; In a case where the number of the abnormal sensors among the at least two sensors is greater than a preset number, it is determined that the j-th device is not installed.
16. The method according to any one of claims 1 to 15, characterized in that After determining the read attribute value of the one sub-attribute as the attribute value of the target attribute, the method further includes: The identifier of the same type and the attribute value of the target attribute are displayed in a target display interface.
17. The method according to claim 16, characterized in that The displaying the identifier of the same type and the attribute value of the target attribute in the target display interface includes: In a case where the same type is used to represent the temperature of the target device, and the attribute value of the target attribute is used to represent the temperature value of the target device, the temperature of the target device is displayed as the temperature value in the target display interface.
18. A device for determining an attribute value, characterized in that: include: A first setting module is configured to set a target attribute corresponding to the sensor type when there are sensors of the same sensor type in N devices of the same device type, wherein the sensors of the same sensor type are configured to collect attribute values of the same type, the attribute value of the target attribute is used to represent the attribute value of the same type collected by the sensor, the target attribute is a parent attribute of N sub-attributes, the attribute value of each of the N sub-attributes is used to represent the attribute value of the same type collected by the sensor in a corresponding one of the N devices, and N is a positive integer greater than or equal to 2; a reading module, configured to read the attribute value of each of the N sub-attributes in sequence when it is necessary to read the attribute value of the target attribute, until the attribute value of one of the N sub-attributes is read or the N sub-attributes are traversed; The determination module is configured to, when an attribute value of one sub-attribute among the N sub-attributes is read, determine the attribute value of the sub-attribute as the attribute value of the target attribute.
19. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 17 when executed by a processor.
20. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 17 are implemented.
Citation Information
Patent Citations
Data processing method and device for multi-sensor fusion and multi-sensor fusion method
CN109655825A
Data management system, data management method, and recording medium on which data management program is recorded
CN113934365A
Sensor data storage method, device and equipment and storage medium
CN114356226A
Attribute value determination method and device, storage medium and electronic equipment
CN116560586A
Sensor-Based Systems and Methods for Monitoring Temperature Sensitive Products
US20180003572A1