Equipment address adding method and system
By matching the current monitoring value of the equipment monitoring indicator and the preset device address configuration set, the target device address is automatically determined, which solves the problem of low efficiency in the existing technology of equipment address addition, and realizes a more efficient and accurate equipment monitoring indicator addition process.
Patent Information
- Application Number
- CN202510348848.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-06-24
AI Technical Summary
In the prior art, the addition of IoT device monitoring indicators requires the user to manually enter detailed information such as device address, monitoring indicator name, address type, etc., which leads to the inaccurateness of the device protocol or the communication address defined by the protocol being inaccurate, and it takes a long time to try to configure, resulting in low efficiency in adding device addresses.
By obtaining the current monitoring value of the device monitoring indicator, matching it with the preset device address configuration set, determining the target device address that matches the current monitoring value of the device monitoring indicator, and directly determining the target device address as the device address to be added, the user does not need to manually enter the device address or protocol information.
Reduces operational complexity and error probability. Even if the user does not understand the device protocol, he can find the correct address through matching, reduces his dependence on the protocol, and significantly improves the ease of use, accuracy and efficiency of adding monitoring indicators for IoT devices.
Smart Images

Figure CN120201002A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of Internet of Things technology, and particularly relates to a method and system for adding device addresses. Background Art
[0002] In order to achieve remote device monitoring, it is usually necessary to add Internet of Things device monitoring metrics in a monitoring platform. In the prior art, the addition of Internet of Things device monitoring metrics usually requires a user to manually input detailed information such as a device address, a monitoring metric name, an address type (such as 8-bit, 16-bit, signed, unsigned, etc.). However, in the case where the user is not familiar with the device protocol or the communication address defined by the protocol is inaccurate, the device address cannot be accurately added at one time, and it takes a long time to try to configure, resulting in low efficiency in adding the device address. Summary of the Invention
[0003] Embodiments of this application provide a method and system for adding a device address, which can improve the efficiency of adding a device address.
[0004] In a first aspect, embodiments of this application provide a method for adding a device address, including:
[0005] Obtaining a current monitored value of a device monitoring metric;
[0006] Matching the current monitored value with a preset device address configuration set to determine a target device address that matches the current monitored value of the device monitoring metric;
[0007] Determining the target device address as the device address to be added.
[0008] In a possible implementation manner of the first aspect, the method further includes:
[0009] Parsing the obtained device data to obtain an address key-value pair;
[0010] Performing numerical conversion calculation on the address key-value pair to generate the device address configuration set.
[0011] In a possible implementation manner of the first aspect, the address key-value pair includes a device address and a first metric value corresponding to the device address;
[0012] The performing numerical conversion calculation on the address key-value pair to generate the device address configuration set includes:
[0013] Grouping the device addresses to obtain at least one address grouping result; wherein each address grouping result corresponds to a second metric value, and the second metric value includes the first metric value;
[0014] Perform numerical conversion calculations on the second index values corresponding to each address grouping result to generate the device address configuration set.
[0015] In a possible implementation manner of the first aspect, the performing numerical conversion calculations on the second index values corresponding to each address grouping result to generate the device address configuration set includes:
[0016] Perform a conversion operation on the second index value based on the data type of the second index value to generate a third index value;
[0017] Adjust the scaling factor of the third index value to generate a fourth index value;
[0018] Adjust the decimal places of the fourth index value to generate a fifth index value;
[0019] Use each fifth index value and the address grouping result corresponding to each fifth index value as the device address configuration set.
[0020] In a possible implementation manner of the first aspect, before the matching the current monitoring value with the preset device address configuration set, it further includes:
[0021] Obtain the number of input addresses;
[0022] Filter the address grouping results based on the number of input addresses to obtain the filtered address grouping results.
[0023] In a possible implementation manner of the first aspect, the determining the target device address as the device address to be added includes:
[0024] Obtain the user's confirmation operation on the target device address;
[0025] Use the confirmed target device address as the device address to be added.
[0026] In a second aspect, an embodiment of the present application provides a device address adding system, including:
[0027] An acquisition module, configured to acquire the current monitoring value of the device monitoring index;
[0028] A matching module, configured to match the current monitoring value with a preset device address configuration set to determine a target device address that matches the current monitoring value of the device monitoring index;
[0029] A determination module, configured to determine the target device address as the device address to be added.
[0030] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the device address adding method described in any one of the above first aspects is implemented.
[0031] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the device address adding method described in any one of the above first aspects is implemented.
[0032] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer device, the computer device is enabled to execute the device address adding method described in any one of the above first aspects.
[0033] In the embodiment of the present application, the current monitoring value of the device monitoring index is obtained, and the current monitoring value is matched with a preset device address configuration set, so as to determine a target device address that matches the current monitoring value of the device monitoring index. The target device address is directly determined as the device address to be added. The user does not need to manually input the device address or protocol information, and only needs to provide the current monitoring value, which reduces the operation complexity and error probability. Even if the user does not understand the device protocol, the correct address can be found through matching, reducing the dependence on the protocol. It significantly improves the ease of use, accuracy, and efficiency of adding device monitoring indexes in the Internet of Things.
[0034] It can be understood that the beneficial effects of the above second aspect to fifth aspect can refer to the relevant descriptions in the above first aspect, and will not be repeated here. Description of the Drawings
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0036] Figure 1 It is a schematic flowchart of the device address adding method provided by an embodiment of the present application;
[0037] Figure 2 It is a schematic flowchart of the device address adding method provided by another embodiment of the present application;
[0038] Figure 3 It is a schematic structural diagram of the device address adding system provided by an embodiment of the present application;
[0039] Figure 4 It is a schematic structural diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0040] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system architectures and technologies are presented in order to thoroughly understand the embodiments of the present application. However, those skilled in the art should understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0041] It should be understood that when used in the specification of the present application and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0042] It should also be understood that the term "and / or" used in the specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0043] As used in the specification of the present application and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" according to the context. Similarly, the phrase "if determined" or "if detecting [the described condition or event]" can be interpreted as meaning "once determined", "in response to determining", "once detecting [the described condition or event]", or "in response to detecting [the described condition or event]" according to the context.
[0044] In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.
[0045] The reference to "one embodiment" or "some embodiments" etc. described in the specification of the present application means that a specific feature, structure, or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in another way.
[0046] The addition of monitoring metrics for Internet of Things devices usually requires users to manually input detailed information such as device addresses, monitoring metric names, address types (such as 8-bit, 16-bit, signed, unsigned, etc.), number of decimal places to retain, and endianness. Among them, the above information is user-defined and added. Although it is flexible, users need to be very familiar with the device protocol. Otherwise, they cannot accurately add device addresses. In addition, when some old devices do not have relevant address protocols, it is also necessary to guess relevant information (such as the relationship between addresses) based on past experience, which easily leads to the failure to successfully add device addresses.
[0047] Among them, the relationship between the addresses mentioned above is explained as follows: Devices such as sensors or electricity meters may belong to the same manufacturer, but there are multiple different device models. Different device models may result in different internal addresses. When there is only the device address table of one of the device models, if it is necessary to configure the monitoring variables of another device on the cloud platform page, it may not be configured successfully, and data chaos may occur. The metric value of a certain monitoring metric is calculated based on the collected values of two addresses. There may be a situation where the actual address in the device is offset or the address table in the operation manual is incorrect, resulting in the real-time value corresponding to the monitoring metric configured according to the manual address table not corresponding to the value actually displayed on the device.
[0048] Due to address mismatch or error, it may cause the monitoring system to receive incorrect data, affecting the accuracy of monitoring.
[0049] Figure 1 The schematic flowchart of the device address addition method provided by an embodiment of the present application is shown.
[0050] S101, obtain the current monitored value of the device monitoring metric.
[0051] Among them, the device monitoring metric refers to the key parameters used to measure and monitor the operating state, performance, or function of the device.
[0052] The types and specific contents of device monitoring metrics vary depending on the device type and application scenario. The following are some common examples of device monitoring metrics:
[0053] Industrial device monitoring metrics, including but not limited to: temperature, pressure, energy consumption, etc.;
[0054] Network device monitoring metrics, including but not limited to: CPU utilization rate, memory usage rate, network bandwidth utilization rate, etc.
[0055] Among them, the current monitored value refers to the actual operating parameter or status value of the device at a specific moment.
[0056] S102. Match the current monitoring value with a preset device address configuration set to determine a target device address that matches the current monitoring value of the device monitoring metric.
[0057] Among them, the preset device address configuration set is a set containing multiple device addresses and their corresponding monitoring metrics (including the metric values of the monitoring metrics).
[0058] In the embodiment of the present application, the current monitoring value X is matched with the metric values (Y1, Y2, Y3... YN) of the monitoring metrics in the device address configuration set, so as to determine the metric value (such as Y3) in the device address configuration set that matches the current monitoring value. After determining the matching metric value (such as Y3), determine the device address that matches the metric value (such as Y3), and use it as the target device address.
[0059] S103. Determine the target device address as the device address to be added.
[0060] In the embodiment of the present application, the target device address determined through the matching process is determined as the device address to be added, so as to include it in the monitoring system for subsequent management.
[0061] Among them, the device monitoring metric information to be added includes but is not limited to: device address, data type, scaling factor, number of decimal places to be retained, etc.
[0062] In the embodiment of the present application, the current monitoring value of the device monitoring metric is obtained, and the current monitoring value is matched with the preset device address configuration set, so as to determine the target device address that matches the current monitoring value of the device monitoring metric. The target device address is directly determined as the device address to be added. The user does not need to manually input the device address or protocol information, and only needs to provide the current monitoring value, which reduces the operation complexity and error probability. Even if the user does not understand the device protocol, the correct address can be found through matching, reducing the dependence on the protocol. Significantly improves the usability, accuracy, and efficiency of adding device monitoring metrics in the Internet of Things.
[0063] In an optional embodiment, the generation process of the above preset device address configuration set includes:
[0064] Step a1. Parse the obtained device data to obtain an address key-value pair.
[0065] Step a2. Perform numerical conversion calculation on the address key-value pair to generate the device address configuration set.
[0066] In the embodiment of the present application, the obtained device data may exist in binary, ASCII, or other formats, and needs to be parsed and converted into a readable key-value pair form.
[0067] Suppose the obtained device data is:
[0068] JSON
[0069] {"10":1,"11":2,"12":3}
[0070] After parsing, a set of key-value pairs is obtained:
[0071] The value of address 10 is 1;
[0072] The value of address 11 is 2;
[0073] The value of address 12 is 3.
[0074] After that, numerical conversion calculations are performed on the values in the address key-value pairs to generate a device address configuration set.
[0075] Among them, the numerical conversion calculations include but are not limited to the following operations, which can be set according to actual needs:
[0076] Data type conversion: Convert the original data into a suitable format (such as converting from a 16-bit integer to a floating point number).
[0077] Scaling factor adjustment: Scale the data according to the device protocol or actual needs (such as multiplying or dividing by a certain coefficient).
[0078] Decimal place processing: Retain an appropriate number of decimal places according to the monitoring requirements.
[0079] Unit conversion: Convert the data from one unit to another unit (such as converting from Celsius to Fahrenheit).
[0080] Optionally, the address key-value pair includes a device address and a first metric value corresponding to the device address. Then, the step a2 of performing numerical conversion calculations on the address key-value pair to generate the device address configuration set includes:
[0081] Step a21, group the device addresses to obtain at least one address grouping result; among them, each address grouping result corresponds to a second metric value, and the second metric value includes the first metric value.
[0082] Among them, the second metric value including the first metric value can be understood as including the first metric value and the set of the first metric value. In this application, the device addresses are grouped to obtain all possible address combinations (i.e., the above address grouping results), each group contains one or more device addresses, and is assigned a unique identifier or name. As above:
[0083] After parsing, a set of key-value pairs is obtained:
[0084] The value of address 10 is 1;
[0085] The value of Address 11 is 2;
[0086] The value of Address 12 is 3.
[0087] Group Addresses 10, 11, and 12, and the resulting address grouping is as follows:
[0088] Single address combinations: 10, 11, 12;
[0089] Combined address combinations: 10 + 11, 10 + 12, 11 + 12, 10 + 11 + 12.
[0090] In addition to the above combined address combinations, there may also be 11 + 10, 12 + 11, etc. The order of the two addresses is also considered when combining addresses.
[0091] When obtaining the address grouping results, each address grouping result corresponds to a second index value. Among them, for the single address combinations in the address grouping results, the second index value is the same as the first index value. For the combined address combinations in the address grouping results, the second index value is the set of the values of each address in the combined address combination. For ease of understanding, examples are given below.
[0092] As mentioned above, group Addresses 10, 11, and 12. After obtaining the address grouping results, the second index value corresponding to each address grouping result is as follows:
[0093] Address 10: The value is 1;
[0094] Address 11: The value is 2;
[0095] Address 12: The value is 3;
[0096] Address 10 + Address 11: The value is 1 and 2;
[0097] Address 10 + Address 12: The value is 1 and 3;
[0098] Address 11 + Address 12: The value is 2 and 3;
[0099] Address 10 + Address 11 + Address 12: The value is 1, 2, 3.
[0100] Step a22, perform numerical conversion calculations on the second index value corresponding to each address grouping result to generate the device address configuration set.
[0101] In the embodiment of the present application, a conversion operation is performed on the second index value based on the data type of the second index value to generate a third index value; a scaling factor adjustment is performed on the third index value to generate a fourth index value; a decimal place adjustment is performed on the fourth index value to generate a fifth index value; each fifth index value and the corresponding address grouping result are used as the device address configuration set.
[0102] Among them, the data type includes but is not limited to: 8-bit unsigned integer (uint8), 8-bit signed integer (int8), 16-bit unsigned integer (uint16), 16-bit signed integer (int16), 32-bit unsigned integer (uint32), 32-bit signed integer (int32), etc.
[0103] Among them, for the address grouping result "Address 10: Value is 1", it is a single address, which is 2 bytes, that is, 16 bits. For the address grouping result "Address 11: Value is 2", it is also a single address value, which is 2 bytes, that is, 16 bits. For the address grouping result "Address 10 + Address 11: Values are 1 and 2", it is a double address, one address is 2 bytes, and the double address is 32 bits.
[0104] In the present application, the calculation method for generating the third index value by performing a conversion operation on the second index value based on the data type of the second index value is shown in Table 1:
[0105]
[0106]
[0107] Table 1
[0108] Among them, for the address grouping result "Address 10: Value is 1", because it is a single address, which is 2 bytes, that is, 16 bits. So the operation can be as follows: According to the calculation rule of [taking the high bit of 8-bit unsigned integer], the calculation formula is (num >> 8), and the operation result is 0; according to the calculation rule of [taking the low bit of 8-bit unsigned integer], the calculation formula is (num && 255), and the operation result is 1; according to the calculation rule of [16-bit unsigned integer], the calculation formula is (num), that is, itself, and the operation result is 1.
[0109] For the address grouping result "address 10 + address 11: value 1 and 2", because it is a double address, one address is 2 bytes, and the double address is 32 bits. So the calculation can be as follows: according to the calculation rules of [32-bit unsigned integer], the calculation formula is (num1*65536+num2), that is, 1*65536+2=65538, and the calculation result is 65538; according to the calculation rules of [32-bit signed integer], the calculation formula is (num1*65536+num2 itself when <2147483>648), and the calculation result is 65538.
[0110] Afterwards, the third indicator value is scaled by 0.1, 0.01 and 0.001 to generate a fourth indicator value. For example, the value of "address 11: value is 2" is scaled by 0.2, 0.02 and 0.002. Then, the fourth indicator value is adjusted to the decimal place to generate the fifth indicator value. For example, 0.2, 0.02 and 0.002 are adjusted to the decimal place, and 3 decimal places are retained. Then, the fifth indicator value is 0.2, 0.02 and 0.002. If the fourth indicator value is 0.21, 0.021 and 0.0021, and 3 decimal places are retained, then the fifth indicator value is 0.21, 0.021 and 0.002. The decimal places can be rounded according to actual needs.
[0111] As described above, each address grouping result includes one or more device addresses and is assigned a unique identifier or name. Then the indicator values obtained based on data type conversion, scaling adjustment, and decimal adjustment will also include identifiers or names. After obtaining the fifth indicator value, the fifth indicator value and the address grouping result corresponding to the fifth indicator value are used as the device address configuration set.
[0112] For ease of understanding, an example is given here to group the device addresses to obtain all possible address combinations 10 and corresponding values 1 (including identifier q01). After parsing, a set of key-value pairs is obtained: the value of address 10 is 1 (including identifier q01). Then, 1 is converted into a data type to obtain a third indicator value (including the mapping relationship between address 10, third indicator value and identifier q01). Then, the third indicator value is scaled to obtain a fourth indicator value (including the mapping relationship between address 10, fourth indicator value and identifier q01). Then, the fifth indicator value is adjusted to the decimal place to obtain the fifth indicator value (including the mapping relationship between address 10, fifth indicator value and identifier q01). The fifth indicator value and the address grouping result corresponding to the fifth indicator value (address 10) are used as the device address configuration set.
[0113] In an optional embodiment, the method further includes:
[0114] Step b1, obtaining the number of input addresses.
[0115] In an embodiment of the present application, while obtaining the current monitoring value of the device monitoring index, the number of input addresses is also obtained. The number of addresses is the number of device addresses involved in a specific monitoring scenario.
[0116] Step b2: Screen the address grouping result based on the number of input addresses to obtain a screened address grouping result.
[0117] In an embodiment of the present application, the number of input addresses is compared with the number of independent addresses included in the address grouping result, and the address grouping result that is the same as the number of input addresses is retained to obtain a screened address grouping result.
[0118] For example, if the number of input addresses is 2, for the address grouping result mentioned above, the following screened address grouping result is obtained:
[0119] Address 10 + Address 11: The value is 1 + 2 = 3;
[0120] Address 10 + Address 12: The value is 1 + 3 = 4;
[0121] Address 11 + Address 12: The value is 2 + 3 = 5.
[0122] In an embodiment of the present application, according to the number of addresses input by the user, all possible address grouping results are screened, excluding the address grouping results that contain too many or too few addresses, and only the grouping results that contain a specific number of addresses are selected to ensure that the screened address grouping result precisely matches the monitoring requirements of the user. Through screening, the monitoring configuration can be optimized, unnecessary data processing can be avoided, and the data processing burden can be reduced: reducing unnecessary address grouping results can reduce the data processing burden and improve the response speed and processing capacity.
[0123] In an optional embodiment, an operation for the user to confirm the target device address is obtained, and the confirmed target device address is used as the device address to be added.
[0124] In an embodiment of the present application, assume that the value of Address 10 + Address 11 is 3; the value of Address 10 + Address 12 is 4; the value of Address 11 + Address 12 is 5; and the value of Address 10 + Address 11 + Address 12 is 3. Let the current monitored value of the input device monitoring index (temperature) be 3. Through the above matching process, the target device addresses matching the current monitored value of 3 are determined to be "Address 10 + Address 11" and "Address 10 + Address 11 + Address 12". The above two target device addresses are fed back to the user for confirmation operations, which can be achieved through a graphical user interface. The user can view each target device address and select to confirm or cancel. Among them, if the user finds that the matching address is incorrect, the user can also choose to modify the address. If the user confirms an address, mark the address as the device address to be added. If the user modifies an address, update the address information according to the user's input. If the user cancels an address, it will not be added to the monitoring system. Suppose the user confirms "Address 10 + Address 11", then "Address 10 + Address 11" is used as the device address to be added.
[0125] Optionally, if the target device address is a single address, the target device address can be directly used as the device address to be added, or the target device address can be displayed to the user for confirmation.
[0126] In an embodiment of the present application, through user confirmation, errors that may occur in the automatic matching process can be reduced, and the accuracy of monitoring data can be improved. Once all target device addresses are confirmed and updated by the user, start monitoring these addresses, collect data, and perform any preset monitoring tasks.
[0127] In an alternative embodiment, as Figure 2 shown, it is a schematic flowchart of a device address adding method provided by an embodiment of the present application. The device address adding method is applied to a device address adding system. The device address adding system includes: a device end, a communication module end, a cloud platform, an application system backend, and an application system frontend. Specifically:
[0128] Step c1, the communication module actively requests or polls the device end to collect data on the device monitoring or operating status.
[0129] Step c2, the device end (such as an electric meter, a frequency converter, a Programmable Logic Controller (PLC)) collects data and sends the data to the communication module end.
[0130] Step c3, the communication module end publishes the data to the cloud platform through the MQTT protocol.
[0131] Among them, the communication module is the bridge for data transmission between the device side and the cloud platform in the Internet of Things. Its main functions include: data acquisition, data transmission, protocol conversion, etc.
[0132] Among them, the core of the MQTT protocol is to achieve efficient and reliable communication between the device side and the cloud platform.
[0133] In this application, the electricity meter has collected the following data: {"10":1, "11":2, "12":3}. In the above data, "10", "11", and "12" are addresses, and the following numbers are the corresponding values. The collected data needs to be encapsulated into a format suitable for MQTT transmission. Usually, the data will be encapsulated into JSON format because JSON format is lightweight and easy to parse. When the communication module establishes a connection with the MQTT broker, the communication module publishes the encapsulated data to the cloud platform through the MQTT protocol.
[0134] Step c4, after the cloud platform receives the data, it forwards the data subscribed by the application system. Among them, the forwarding is to the backend of the application system.
[0135] Step c5, after the application system receives the data forwarded by the cloud platform, it performs operations such as parsing and numerical conversion calculation described above, obtains the device address configuration set, and stores it in the backend of the application system.
[0136] Step c6, in response to the user's input, the front end of the application system obtains the current monitoring value of the device monitoring index (which may also include the number of addresses, etc.), and sends it to the backend of the application system.
[0137] Step c7, the backend of the application system matches the current monitoring value with the preset device address configuration set, determines the target device address that matches the current monitoring value of the device monitoring index, and feeds back the target device address to the front end of the application system.
[0138] Step c8, in response to the user's confirmation operation, the front end of the application system determines the device address to be added, adds the device address to be added, and enters the remote monitoring process.
[0139] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0140] Corresponding to the device address adding method described in the above embodiments, Figure 3 The structural block diagram of the device address adding system provided by the embodiments of the present application is shown. For the sake of convenience of description, only the parts related to the embodiments of the present application are shown.
[0141] Refer to Figure 3, the device address adding system includes:
[0142] An acquisition module, configured to acquire a current monitoring value of a device monitoring metric;
[0143] A matching module, configured to match the current monitoring value with a preset device address configuration set to determine a target device address that matches the current monitoring value of the device monitoring metric;
[0144] A determination module, configured to determine the target device address as a device address to be added.
[0145] In a possible implementation, the device address adding system further includes:
[0146] A generation module, configured to parse acquired device data to obtain address key-value pairs; perform numerical conversion calculations on the address key-value pairs to generate the device address configuration set.
[0147] In a possible implementation, the address key-value pairs include a device address and a first metric value corresponding to the device address; the generation module is further configured to:
[0148] Group the device addresses to obtain at least one address grouping result; wherein each address grouping result corresponds to a second metric value, and the second metric value includes the first metric value;
[0149] Perform numerical conversion calculations on the second metric values corresponding to each address grouping result to generate the device address configuration set.
[0150] In a possible implementation, the generation module is further configured to:
[0151] Perform a conversion operation on the second metric value based on the data type of the second metric value to generate a third metric value;
[0152] Adjust the scaling factor of the third metric value to generate a fourth metric value;
[0153] Adjust the decimal places of the fourth metric value to generate a fifth metric value;
[0154] Use each fifth metric value and the address grouping result corresponding to each fifth metric value as the device address configuration set.
[0155] In a possible implementation, the device address adding system further includes:
[0156] A screening module, configured to obtain the number of input addresses; screen the address grouping results based on the number of input addresses to obtain screened address grouping results.
[0157] In a possible implementation, the determining module is configured to:
[0158] Obtain a confirmation operation of the user on the target device address;
[0159] Use the confirmed target device address as the device address to be added.
[0160] It should be noted that for the information interaction, execution process, etc. among the above modules, since they are based on the same concept as the method embodiments of the present application, for their specific functions and the technical effects brought, reference can be specifically made to the method embodiment part, and details are not elaborated here.
[0161] Those skilled in the art can clearly understand that for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of the present application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and are not elaborated here.
[0162] An embodiment of the present application further provides a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor. When the processor executes the computer program, the steps in any of the above method embodiments are implemented.
[0163] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above method embodiments can be implemented.
[0164] An embodiment of the present application provides a computer program product. When the computer program product runs on a computer device, the computer device is caused to implement the steps in the above method embodiments when executed.
[0165] Figure 3 It is a schematic structural diagram of a computer device provided in an embodiment of the present application. As Figure 4 shown, the computer device in this embodiment includes: at least one processor 20( Figure 4(only one is shown), a memory 21, and a computer program 22 stored in the memory 21 and executable on the at least one processor 20. When the processor 20 executes the computer program 22, the steps in the embodiments of any of the above device address adding methods are implemented.
[0166] The computer device may include, but is not limited to, a processor 20 and a memory 21. Those skilled in the art can understand that Figure 4 merely an example of a computer device, which does not constitute a limitation on the computer device. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.
[0167] The so-called processor 20 may be a central processing unit (CPU), and the processor 20 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0168] In some embodiments, the memory 21 may be an internal storage unit of the computer device, such as the hard disk or memory of the computer device. In other embodiments, the memory 21 may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the memory 21 may also include both the internal storage unit and the external storage device of the computer device. The memory 21 is used to store an operating system, application programs, a boot loader, data, and other programs, such as the program code of the computer program. The memory 21 may also be used to temporarily store data that has been output or will be output.
[0169] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of this application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the device / computer equipment, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a portable hard disk, a magnetic disk, or an optical disc, etc. In some jurisdictions, according to legislation and patent practice, the computer-readable medium cannot be an electrical carrier signal and a telecommunication signal.
[0170] In the above embodiments, the descriptions of the various embodiments have their own focuses. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0171] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0172] In the embodiments provided in this application, it should be understood that the disclosed device / computer equipment and method can be implemented in other ways. For example, the device / computer equipment embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical, or other form.
[0173] The unit described as a separating component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed over multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0174] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included within the protection scope of the present application.
Claims
1. A method for adding a device address, characterized in that: include: Get the current monitoring value of the device monitoring indicator; Matching the current monitoring value with a preset device address configuration set to determine a target device address that matches the current monitoring value of the device monitoring indicator; The target device address is determined as the address of the device to be added.
2. The device address adding method according to claim 1, characterized in that: The method further comprises: Parse the acquired device data to obtain address key-value pairs; Performing numerical conversion calculation on the address key-value pair to generate the device address configuration set.
3. The device address adding method according to claim 2, characterized in that: The address key-value pair includes a device address and a first indicator value corresponding to the device address; The performing numerical conversion calculation on the address key-value pair to generate the device address configuration set includes: Grouping the device addresses to obtain at least one address grouping result; wherein each address grouping result corresponds to a second index value, and the second index value includes the first index value; A numerical conversion calculation is performed on the second indicator value corresponding to each address grouping result to generate the device address configuration set.
4. The device address adding method according to claim 3, characterized in that: The performing numerical conversion calculation on the second indicator value corresponding to each address grouping result to generate the device address configuration set includes: Performing a conversion operation on the second indicator value based on the data type of the second indicator value to generate a third indicator value; Adjusting the scaling factor of the third indicator value to generate a fourth indicator value; Performing decimal adjustment on the fourth index value to generate a fifth index value; Each fifth index value and the address grouping result corresponding to each fifth index value are used as the device address configuration set.
5. The device address adding method according to any one of claims 1 to 4, characterized in that: The matching of the current monitoring value with a preset device address configuration set also includes: Get the number of input addresses; The address grouping result is screened based on the number of input addresses to obtain a screened address grouping result.
6. The method for adding a device address according to any one of claims 1 to 4, characterized in that: The step of determining the target device address as the address of the device to be added includes: Obtaining a user's confirmation operation on the target device address; The confirmed target device address is used as the device address to be added.
7. A device address adding system, characterized in that: include: The acquisition module is used to obtain the current monitoring value of the equipment monitoring indicator; A matching module, used to match the current monitoring value with a preset device address configuration set to determine a target device address that matches the current monitoring value of the device monitoring indicator; The determination module is used to determine the target device address as the address of the device to be added.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that When the computer program product is executed on a computer device, the computer device is caused to execute the method according to any one of claims 1 to 6.