Device configuration method, device, electronic device and storage medium
The device configuration method simplifies the addition of new functions in IoT devices by generating a parameter configuration interface based on protocol messages, reducing development time and costs, and ensuring efficient operation.
Patent Information
- Application Number
- CN202411120903.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-14
AI Technical Summary
Existing equipment parameter configuration capabilities are limited, requiring extensive work including demand analysis, design, interaction, front-end development, and testing, leading to high investment costs and slow development cycles when adding new device functions, preventing quick application of these functions.
A device configuration method that involves obtaining a protocol message corresponding to a target device function, parsing it to obtain function parameters, generating a parameter configuration interface with display controls, and sending configuration results to the device to control its operation, thereby eliminating complex development and testing work.
This method allows for quick and robust implementation of new device functions by simplifying the configuration process, reducing development time and costs, and ensuring efficient operation of IoT devices.
Smart Images

Figure CN118659966B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent Internet of Things technology, and in particular to a device configuration method, apparatus, electronic device and storage medium. Background Art
[0002] During the project implementation, the equipment parameters need to be configured before the service goes online to ensure that the equipment provides the correct service. However, the existing equipment parameter configuration capabilities are necessarily limited. When adding a new type of equipment function to the equipment, a new type of equipment parameter configuration capability needs to be added to configure the function parameters of the new equipment function, thereby ensuring that the equipment can correctly run the new equipment function.
[0003] In the related art, when adding a new type of device parameter configuration capability, a series of work including demand analysis, design, interaction, front-end development, back-end development, and testing is required. The investment cost is high, the development cycle is slow, and the new device parameter configuration capability cannot be expanded quickly. As a result, the functional parameters of the newly added device functions cannot be configured, resulting in the inability to quickly apply the new device functions. Summary of the invention
[0004] The present application provides a device configuration method, apparatus, electronic device and storage medium for generating a parameter configuration interface according to a protocol message corresponding to a target device function, so as to facilitate staff to configure function parameters and facilitate the target device to quickly apply the target device function.
[0005] A first aspect of an embodiment of the present application provides a device configuration method, including: obtaining a protocol message corresponding to a target device function; parsing the protocol message to obtain function parameters corresponding to the target device function; generating a parameter configuration interface according to the function parameters corresponding to the target device function; the parameter configuration interface includes a display control corresponding to each function parameter; in response to a configuration operation on one or more display controls on the parameter configuration interface, obtaining a parameter configuration result corresponding to the function parameter; and sending the parameter configuration result to the target device so that the target device controls the operation of the target device function based on the parameter configuration result.
[0006] The device configuration method provided in the embodiment of the present application only needs to obtain and parse the protocol message corresponding to the target device function when the device parameter configuration capability is needed, and the parameter configuration interface can be generated according to the function parameters corresponding to the target device function, which is convenient for the staff to configure the function parameters, that is, the parameter configuration of the target device function can be performed, and the device parameter configuration capability corresponding to the target device function is obtained. When the user configures the target device function of the target device, the display control of each function parameter can be configured based on the parameter configuration interface, and the parameter configuration result can be obtained to control the operation of the target device function in the target device, and complicated development and testing work can be eliminated, which can greatly shorten the application efficiency of the target device function and ensure that the target device function can be implemented quickly and robustly.
[0007] In combination with the first implementation method of the first aspect, a parameter configuration interface is generated according to the function parameters corresponding to the target device function, including: determining the parameter information of each function parameter according to the function parameters and protocol rule information corresponding to the target device function, the parameter information including the data type of the function parameter; the protocol rule information is used to indicate the correspondence between the function parameter and the parameter information; based on the data type of the function parameter and the correspondence between the preset data type and the control type, determining the display control corresponding to each function parameter; and generating the parameter configuration interface based on the display control corresponding to each function parameter.
[0008] In combination with the second implementation method of the first aspect, parsing the protocol message to obtain the functional parameters corresponding to the device function includes: identifying the message format of the protocol message; the message format of the protocol message includes the standard protocol message format in the protocol standard platform or the output message format of the target device; parsing the protocol message based on the message format of the protocol message to obtain the functional parameters corresponding to the target device function; wherein, in the case that the message format of the protocol message is the standard protocol message format in the protocol standard platform, the method also includes: after parsing the protocol message, obtaining the annotation information corresponding to the functional parameters; generating the protocol rule information corresponding to the functional parameters based on the annotation information corresponding to the functional parameters.
[0009] In combination with the third implementation method of the first aspect, the parameter configuration result includes the configuration result corresponding to the target function parameter; the configuration result includes one of the following: parameter value, parameter range, parameter status, the target function parameter is a function parameter corresponding to one or more display controls configured based on the parameter configuration interface; sending the parameter configuration result to the target device includes: modifying the protocol message according to the configuration result corresponding to each target function parameter to obtain the target protocol message; sending the target protocol message to the target device.
[0010] In combination with the fourth implementation method of the first aspect, the parameter configuration result is sent to the target device, including: generating a function parameter configuration template corresponding to the function of the target device based on the parameter configuration result; generating a device configuration interface in response to an operation using the target function parameter configuration template, the device configuration interface including selection controls corresponding to multiple devices; in response to a selection operation on the selection control, determining one or more target devices corresponding to the selected operation; and sending the parameter configuration result in the target function parameter configuration template to the target device.
[0011] In combination with the fifth implementation manner of the first aspect, the method also includes: in response to an operation using a target function parameter configuration template, displaying a target parameter configuration interface corresponding to the target function parameter configuration template; in response to a configuration operation based on a control displayed on the target parameter configuration interface, obtaining a target parameter configuration result corresponding to the function parameter; in response to a confirmation operation based on the target parameter configuration interface, generating a device configuration interface, the device configuration interface including selection controls corresponding to multiple devices; in response to a selection operation on the selection control, determining one or more target devices corresponding to the selected operation; and sending the target parameter configuration result to the target device.
[0012] In combination with the sixth implementation manner of the first aspect, the method also includes: obtaining an output message of a target device function sent by the target device; the output message includes the correspondence between a parameter identifier of the output parameter and an actual parameter value; determining parameter information of each output parameter according to the output message and the protocol rule information; the parameter information of the output parameter includes a parameter identifier, an actual parameter value and a parameter standard of the output parameter; the protocol rule information is used to indicate the correspondence between the function parameter and the parameter standard; generating an output display interface based on the parameter identifier and the actual parameter value of the output parameter; the display methods of the first output parameter and the second output parameter in the output display interface are different, the first output parameter is an output parameter whose actual parameter value does not meet the corresponding parameter standard, and the second output parameter is an output parameter whose actual parameter value meets the corresponding parameter standard.
[0013] The second aspect of an embodiment of the present application provides a device configuration apparatus, including: an acquisition module, used to acquire a protocol message corresponding to a target device function; a parsing module, used to parse the protocol message to obtain function parameters corresponding to the target device function; a generation module, used to generate a parameter configuration interface according to the function parameters corresponding to the target device function; the parameter configuration interface includes a display control corresponding to each function parameter; the acquisition module is also used to obtain a parameter configuration result corresponding to the function parameter in response to a configuration operation on one or more display controls on the parameter configuration interface; and a sending module, used to send the parameter configuration result to the target device, so that the target device controls the operation of the target device function based on the parameter configuration result.
[0014] A third aspect of an embodiment of the present application provides an electronic device, comprising: one or more processors; one or more memories; wherein the one or more memories are used to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the device configuration method provided by the first aspect and its possible implementation methods.
[0015] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed on a computer, the computer executes the device configuration method provided by the first aspect and its possible implementation methods.
[0016] A fifth aspect of an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the device configuration method provided in the first aspect and its possible implementation methods.
[0017] Among them, the beneficial effects described in the second to fifth aspects can refer to the beneficial effect analysis of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.
[0019] Figure 1 A schematic diagram of the structure of a device configuration system provided in an embodiment of the present application;
[0020] Figure 2 A method flow of a device configuration method provided in an embodiment of the present application Figure 1 ;
[0021] Figure 3 A schematic diagram of a parameter configuration interface provided in an embodiment of the present application;
[0022] Figure 4 A method flow of a device configuration method provided in an embodiment of the present application Figure 2 ;
[0023] Figure 5 A method flow of a device configuration method provided in an embodiment of the present application Figure 3 ;
[0024] Figure 6 A schematic diagram of a device configuration interface provided in an embodiment of the present application;
[0025] Figure 7A method flow of a device configuration method provided in an embodiment of the present application Figure 4 ;
[0026] Figure 8 A schematic diagram of an output display interface provided in an embodiment of the present application;
[0027] Fig. 9 A schematic diagram of a message editing interface provided in an embodiment of the present application;
[0028] Fig.10 A schematic diagram of the structure of a device configuration apparatus provided in an embodiment of the present application;
[0029] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0031] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0032] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "connected" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances. In addition, when describing a pipeline, the "connected" and "connection" used in this application have the meaning of conduction. The specific meaning needs to be understood in conjunction with the context.
[0033] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0034] Before explaining the embodiments of the present application in detail, some terms involved in the embodiments of the present application are first explained.
[0035] During the project implementation process, it is crucial to ensure that the equipment is correctly configured with parameters before the business goes online. This step is directly related to whether the equipment can provide stable and efficient services as expected, as well as the stability and security of the entire system. The existing equipment parameter configuration capabilities are designed based on specific functions and requirements, so their capabilities are necessarily limited. When a new type of device function is added to the device, in order to ensure that this new function can run correctly, it is necessary to add a new type of device parameter configuration capability accordingly, so that the staff can configure the function parameters of the newly added device function, and then ensure that the device can run the new device function correctly.
[0036] In the related art, when adding a new type of device parameter configuration capability, a series of work including demand analysis, design, interaction, front-end development, back-end development, and testing is required. The investment cost is high, the development cycle is slow, and the new device parameter configuration capability cannot be expanded quickly. As a result, the functional parameters of the newly added device functions cannot be configured, resulting in the inability to quickly apply the new device functions.
[0037] Based on this, the embodiment of the present application provides a device configuration method, when it is necessary to add the device parameter configuration capability of the target device function, obtain the protocol message corresponding to the target device function, obtain the function parameter corresponding to the target device function by parsing the protocol message, and then generate a parameter configuration interface with display controls corresponding to each function parameter based on the function parameters corresponding to the target device function, so that the staff can configure multiple function parameters based on the parameter configuration interface. Then, after receiving the configuration operation for one or more display controls in the parameter configuration interface, obtain the parameter configuration result corresponding to the function parameter, and send the parameter configuration result to the target device, so that the target device controls the operation of the target device function based on the parameter configuration result.
[0038] It can be seen that the device configuration method provided in the embodiment of the present application only needs to obtain and parse the protocol message corresponding to the target device function when the device parameter configuration capability is needed, and the parameter configuration interface can be generated according to the function parameters corresponding to the target device function, which is convenient for the staff to configure the function parameters, that is, the parameter configuration of the target device function can be performed, and the device parameter configuration capability corresponding to the target device function is obtained. When the user configures the target device function of the target device, the display control of each function parameter can be configured based on the parameter configuration interface, and the parameter configuration result can be obtained to control the operation of the target device function in the target device, and complicated development and testing work can be eliminated, which can greatly shorten the application efficiency of the target device function.
[0039] The device configuration method provided in the embodiment of the present application can be applied to Figure 1 In the device configuration system shown, see Figure 1 , the device configuration system 10 may include: a configuration device 11 and an IoT device 12.
[0040] The IoT devices 12 refer to various devices connected to the Internet of Things (IoT), which achieve connection and data exchange with the Internet through technologies such as sensors, processors, and communication modules. The IoT devices 12 can be sensor devices, actuator devices, smart home devices, smart health devices, etc. Figure 1 The server and collection device shown are not limited in this embodiment of the present application.
[0041] The configuration device 11 is connected to the IoT device 12 in a wired or wireless manner for configuring and managing the IoT device.
[0042] In some embodiments, Figure 1 As shown, the configuration device 11 includes: a message parsing module 111, a parameter management module 112, a message translation module 113, a message rendering module 114, a message transceiver module 115, a device access module 116, a message assembly module 117, a parameter sending module 118 and a parameter detection module 119.
[0043] The message parsing module 111 is used to parse the message data, convert it from the original byte stream or data frame into structured data that can be understood and processed by the system or application, and obtain parameter information (also called metadata) corresponding to each functional parameter in the message. It usually includes identifying the type, version, length, checksum and other information of the message, and extracting the payload (i.e., the actual transmitted data) in the message.
[0044] The parameter management module 112 is used to manage parameter information corresponding to the function parameters parsed by the message parsing module 111 .
[0045] The message translation module 113 is used to determine the display control corresponding to each function parameter according to the parameter information corresponding to the function parameter, and send it to the message rendering module 114 to display the content, structure or status of each function parameter through a graphical user interface (GUI).
[0046] The message transceiver module 115 is responsible for the sending and receiving functions of messages. It may include network communication, protocol processing, data encryption and decryption functions to ensure that messages can be safely and reliably transmitted between different systems or devices.
[0047] The device access module 116 is responsible for connecting the IoT device to the configuration device 11, and realizing communication and data exchange between the IoT device 12 and the configuration device 11. This module may include functions such as device identification, device configuration, and device connection management to ensure that the device can be normally connected and work with the system.
[0048] The message assembly module 117 is used to combine multiple data fragments or information into a complete message. This is very useful when performing data encapsulation or constructing complex messages, and can ensure the integrity and consistency of the message data.
[0049] The parameter delivery module 118 is used to deliver the parameters (such as control parameters, configuration parameters, etc.) set by the system or user to the target device. This helps to achieve remote configuration and control of the device and ensure that the device can operate in the expected manner.
[0050] The parameter detection module 119 is used to monitor and detect the status and changes of key parameters in the system. This may include the operating status of the equipment, performance indicators, fault information, etc. By detecting the changes in parameters in real time, the module can promptly discover potential problems or anomalies and take appropriate measures to deal with them to ensure the stable operation of the system.
[0051] It should be understood that the configuration device 11 in the embodiment of the present application can be a personal computer (PC), a laptop computer, a mobile device, a tablet computer, a laptop computer and other electronic devices, and the embodiment of the present application does not limit the specific form of the configuration device 11. Alternatively, the configuration device 11 can also be a single server, or a server cluster composed of multiple servers. In some implementations, the server cluster can be a distributed cluster server. The embodiment of the present application does not impose any restrictions on this.
[0052] It should be pointed out that Figure 1 The structure shown does not constitute a limitation on the device configuration system. In other embodiments, the system may include fewer or more components than shown in the figure, or a combination of certain components, or a different arrangement of components. The embodiments of the present application do not impose any limitations on this.
[0053] It should be understood that the device configuration method provided in the embodiment of the present application can be applied to Figure 1 The configuration device 11 in the device configuration system shown. Please refer to Figure 2 The device configuration method provided in the embodiment of the present application includes the following steps:
[0054] S201. Obtain a protocol message corresponding to a function of a target device.
[0055] Different devices need to communicate through protocol messages to coordinate their respective working states and ensure the smooth operation of the system as a whole. That is, the configuration device needs to control and manage the operation of the IoT devices through protocol messages. These protocol messages need to contain instructions or information for configuring or adjusting the functional parameters of the IoT devices.
[0056] When the staff uses the configuration device to configure the parameters of the target device function, they need to first obtain the protocol message corresponding to the target device function, so as to obtain the function parameters to be configured, and then configure the function parameters.
[0057] It should be noted that the embodiments of the present application do not specifically limit the method for obtaining protocol messages. As a feasible implementation method, the protocol message corresponding to the target device function can be obtained from the protocol standard platform or other places that manage the protocol standard; as another feasible implementation method, the protocol message corresponding to the target device function can be obtained from the device that runs the target device function. The embodiments of the present application do not limit this.
[0058] S202: parse the protocol message to obtain function parameters corresponding to the function of the target device.
[0059] The protocol message corresponding to the target device function usually contains a series of fixed and variable fields. These fields together constitute the structure of the message and carry the information required for transmission. After obtaining the protocol message, it is necessary to analyze and extract the message content in detail to obtain which fields or data segments contain the required functional parameters, and then obtain the functional parameters corresponding to the target device function.
[0060] S203: Generate a parameter configuration interface according to the function parameters corresponding to the target device function.
[0061] Among them, the parameter configuration interface includes display controls corresponding to each functional parameter.
[0062] After all function parameters for configuring the target device function are obtained, a parameter configuration interface with display controls corresponding to each function parameter can be generated, so that the staff can configure each function parameter based on the parameter configuration interface.
[0063] It should be understood that in some embodiments, a function parameter may include multiple function parameters. In this case, the parameter configuration interface may include a display control corresponding to each sub-function parameter, so that the staff can configure each sub-function parameter. The embodiments of the present application do not limit this.
[0064] For example, see Figure 3The PTZ guard control function parameters may include three function parameters: enable, time and action. Meanwhile, the action includes three function parameters: action type, guard ID and event type. The parameter configuration interface thus generated may include display controls corresponding to each function parameter.
[0065] S204: In response to a configuration operation on one or more display controls on the parameter configuration interface, obtain parameter configuration results corresponding to the function parameters.
[0066] When the staff configures the function parameters in the parameter configuration interface, they need to modify the parameter values or parameter contents corresponding to the function parameters based on the display controls in the parameter configuration interface, and complete the configuration operation of one or more display controls to obtain the parameter configuration results for each function parameter.
[0067] S205: Send the parameter configuration result to the target device, so that the target device controls the operation of the target device function based on the parameter configuration result.
[0068] It can be understood that the target device is an IoT device with target device functions, which requires the use of parameter configuration results to control the operation of the target device functions. In actual applications, the staff can determine the IoT device that needs to be configured as the target device according to needs.
[0069] After completing the operations on the parameter configuration interface, the obtained parameter configuration results need to be assembled into a data structure suitable for sending to the target device. This data structure is usually an object or array, which contains all the function parameters that need to be configured and their corresponding values.
[0070] The configuration device then sends the configuration results to the target device or the intermediate server through the network protocol agreed upon with the target device, and the intermediate server then forwards it to the target device. After receiving the parameter configuration results, the target device will update its internal state or control the operation of its functions based on these data.
[0071] As a feasible implementation method, the parameter configuration result includes the configuration result corresponding to the target function parameter; the configuration result includes one of the following: parameter value, parameter range, parameter status. Among them, the target function parameter is the function parameter corresponding to one or more display controls configured based on the parameter configuration interface.
[0072] It is understandable that the configuration result usually contains a series of specific information related to the function parameters. Different function parameters have different data types and formats, and thus their corresponding configuration results are different. For example, when configuring the target temperature of a temperature controller, the configuration result can be a parameter value, that is, the specific temperature value set; some function parameters operate within a range interval, and the corresponding configuration result can be a parameter range (parameter interval or set), which may be a specific value range (such as 10°C to 30°C), or an enumeration type (such as "on", "off", "automatic", etc.); the parameter state describes the state or condition of a certain function parameter, such as "enable", "disable", etc.
[0073] After the staff configures the target function parameters based on the parameter configuration interface, the target function parameters have corresponding configuration results, and the target function parameters need to be sent to the target device so that the target device needs to operate based on the configured function parameters. The configuration device and the target device interact based on messages, so S205 can be specifically implemented as follows: modify the protocol message according to the configuration result corresponding to each target function parameter to obtain the target protocol message; send the target protocol message to the target device.
[0074] That is to say, if the staff changes the value of a data field when configuring the function parameters, it is necessary to update the field corresponding to this function parameter in the protocol message, and then send the updated target protocol message to the target device.
[0075] It can be seen that the device configuration method provided in the embodiment of the present application only needs to obtain and parse the protocol message corresponding to the target device function when the device parameter configuration capability is needed, and the parameter configuration interface can be generated according to the function parameters corresponding to the target device function, which is convenient for the staff to configure the function parameters, that is, the parameter configuration of the target device function can be performed, and the device parameter configuration capability corresponding to the target device function is obtained. When the user configures the target device function of the target device, the display control of each function parameter can be configured based on the parameter configuration interface, and the parameter configuration result can be obtained to control the operation of the target device function in the target device, and complicated development and testing work can be eliminated, which can greatly shorten the application efficiency of the target device function and ensure that the target device function can be implemented quickly and robustly.
[0076] In some embodiments, since the function of the device access module in the configuration device is to access and manage the device, the message transceiver module needs to connect with the device access module when sending the target protocol message to the target device, so that the device access module sends the target protocol message to the corresponding target device.
[0077] As a feasible implementation method, the message transceiver module needs to determine the metadata information of the target protocol message and obtain the message header (also called the metadata part or the routing information part), which contains some metadata information, such as the identifier of the target device (such as device ID, IP address, Media Access Control Address (MAC) address, etc.), message type (such as request, response, event notification, etc.), priority, timestamp, etc. This information is used by the device access module to confirm which device the message should be sent to and how to process the message.
[0078] Then the message transceiver module sends the message header and the target protocol message to the device access module, and the device access module determines to which device the target protocol message should be sent according to the message header.
[0079] In some embodiments, protocol messages are the carriers of information exchange in the network and are information flows organized in an agreed format. Messages of different formats need to follow different rules and methods when parsing. Therefore, when parsing protocol messages, it is necessary to parse them according to the message format of the protocol messages.
[0080] As a feasible implementation method, S202 can be specifically implemented as follows:
[0081] S11. Identify the message format of the protocol message.
[0082] The message format of the protocol message includes a standard protocol message format in a protocol standard platform or an output message format of a target device.
[0083] It is understandable that when the configuration device needs to configure the target device function of the target device, since the configuration device does not know which function parameters are required for the operation of the target device function, it is necessary to obtain the standard protocol message corresponding to the target device function from the protocol standard platform.
[0084] When the target device function of the target device is operating normally, the configuration device can interact with the target device to obtain the output message of the target device function, and then parse it as a protocol message and generate a parameter configuration interface to facilitate the staff to configure the parameters of the target device function through the parameter configuration interface.
[0085] That is to say, the protocol message in the embodiment of the present application can be a standard protocol message or an output message of the target device. Since the message formats of the two messages are different, the specific type of the protocol message can be determined by identifying the message format of the protocol message.
[0086] S12. Parse the protocol message based on the message format of the protocol message to obtain function parameters corresponding to the function of the target device.
[0087] Since the message formats of messages are different, the positions of the fields used to represent functional parameters in the messages are also different. Therefore, it is necessary to parse the protocol message based on the message format of the protocol message to obtain the functional parameters corresponding to the target device function.
[0088] As a feasible implementation manner, when the message format of the protocol message is the standard protocol message format in the protocol standard platform, the method further includes: after parsing the protocol message, obtaining the annotation information corresponding to the functional parameter; generating the protocol rule information corresponding to the functional parameter based on the annotation information corresponding to the functional parameter.
[0089] When parsing the standard protocol message in the protocol standard platform, the annotation information corresponding to the functional parameter can be obtained synchronously, and then stored as the protocol rule information corresponding to the functional parameter for subsequent use.
[0090] When the message format of the protocol message is the standard protocol message format in the protocol standard platform, the protocol message may be nested in various private or standard IoT access protocols such as Internet Server Application Programming Interface (ISAPI), Over-The-Air Programming (OTAP), Redfish, etc. To facilitate developers and users to better understand the content and meaning of the message, the message in the protocol standard platform has corresponding annotation information for explaining and interpreting the fields, parameters, or structures in the message.
[0091] Taking the functional parameter enabled as an example, its corresponding annotation is [ro, req, bool, enable]. Among them, ro indicates that the functional attribute of enabled is read-only, req indicates that the service attribute of enabled is a mandatory option, bool indicates the data type of enabled, and enable is the Chinese name of enabled.
[0092] Exemplarily, please refer to Table 1. The SSH parameter message may include the following information:
[0093] It can be seen that the annotation information in the protocol message can explain each field in the message, which may include the name, type, length, value range, default value of the field, as well as the role and meaning of the field in the message. It can also explain the parameters in the message, indicating the meaning, usage, and possible value range of the parameters, etc.
[0094] It can be understood that the standard protocol messages in the standard protocol platform can also adopt different formats, such as JavaScript Object Notation (JSON format), Extensible Markup Language (XML) format, Initialization File (INI) format, and Configuration File (Config, CONF) format, etc. Different formats have different fields where the annotation information is located. For example, the above SSH parameter message is in XML format, and its annotation information is before the start tag <element name> and the end tag < / element name> of the element. The content between these two tags constitutes the content of the element, including the annotation information and the element value of the element. The annotation information in JSON format includes single-line comments ( / / ) and multi-line comments ( / *... * / ). Therefore, when parsing the protocol message, the field position of the annotation information can be identified according to the specific format of the message, and then the annotation information in the message can be obtained.
[0095] The solution provided in this embodiment parses the protocol message according to the message format of the protocol message. It can not only normally parse the message to obtain the parameter information of the corresponding function parameter, but also generate the protocol rule information corresponding to the function parameter according to the annotation information in the protocol message and save it when the protocol message is a standard protocol message, which is convenient for subsequent constraint of the function parameter based on the protocol rule information.
[0096] In some embodiments, since the data types (integers, floating-point numbers, strings, booleans, enums, etc.), ranges, default values, and possible limiting conditions of each function parameter are different, if the same display control is set for each function parameter, there may be a problem that the configured content does not match the actual parameter content when the staff configures the parameters. Therefore, it is necessary to select a suitable control according to the data type of the function parameter. For example, for integers and floating-point numbers, a numeric input box can be used; for strings, a text box can be used; for booleans, a checkbox can be used; for enum types, a dropdown menu or a radio button group can be used.
[0097] As a feasible implementation method, please refer to Figure 4 , S203 can be specifically implemented as:
[0098] S401. Determine the parameter information of each function parameter according to the function parameter corresponding to the target device function and the protocol rule information.
[0099] Among them, the parameter information includes the data type of the function parameter; the protocol rule information is used to indicate the correspondence between the function parameter and the parameter information.
[0100] It is understandable that protocol rule information refers to a series of rules and agreements that both parties must follow during network communication or service. These rules define various aspects of communication, including data format, transmission method, control flow, etc., to ensure smooth communication. Protocol rule information can be obtained by parsing standard protocol messages, or it can be set by staff according to the nature of functional parameters, and this application does not limit this.
[0101] The protocol rule information can indicate the correspondence between the function parameters and the parameter information in an explicit or implicit manner. The correspondence between the function parameters and the parameter information ensures that the data can be transmitted and processed according to the predetermined rules and formats, thereby achieving effective communication between the configuration device and the target device.
[0102] As a feasible implementation method, the protocol rule information may define specific data fields to store function parameters and parameter information. These fields have fixed positions and formats in the communication message so that the receiver can accurately identify and process them.
[0103] As another feasible implementation, in some cases, the protocol rule information may embed the function parameters and parameter information into the control information by encoding, and the control information is sent and received during the communication process to implement a specific control function.
[0104] As another feasible implementation, the protocol rule information may also indicate the correspondence between the function parameters and the parameter information through context and timing constraints. For example, the sending of a control command may depend on the reception and processing results of the previous command, or the sending of a data packet may need to be performed within a specific time window.
[0105] Therefore, after obtaining the function parameters corresponding to the target device function, the data type corresponding to the function parameters can be determined according to the correspondence between the function parameters and parameter information indicated in the protocol rule information, so as to facilitate the configuration device to process the function parameters according to the data type of the function parameters.
[0106] S402: Determine a display control corresponding to each function parameter based on the data type of the function parameter and the correspondence between the preset data type and the control type.
[0107] It is understandable that, since the functional parameters of different data types require different display methods, the corresponding relationship between the data type and the control type may be pre-stored in the configuration device.
[0108] It should be understood that in practical applications, the correspondence between data types and control types can be determined according to specific usage requirements. Exemplarily, as a feasible implementation method, for a function parameter whose data type is a string (String), a static text (used to display read-only text information) or a text box (used to edit text information, supporting user input and modification) can be used as a display control; for a function parameter whose data type is an integer (Integer) or a floating point number (Float / Double), a numeric input box (specially used to enter numbers, supporting numeric keyboards and range limits, a slider (selecting a numeric value by sliding within a certain range) or a stepper (adjusting the value by clicking an increase or decrease button) can be used as a display control; for a function parameter whose data type is an enumeration (Enum) or a string array (String Array), a drop-down list (Dropdown / ComboBox), a check box (Checkbox), or a radio button group (selecting an option from multiple options) can be used as a display control; for a function parameter whose data type is a date (Date), time (Time) or date and time (DateTime), a date selector, a time selector, or a date and time selector can be used as a display control. The embodiments of the present application do not limit this.
[0109] S403: Generate a parameter configuration interface based on the display control corresponding to each functional parameter.
[0110] After obtaining the display controls corresponding to each functional parameter, the display controls can be assembled according to all functional parameters corresponding to the target device function to generate a parameter configuration interface to facilitate the staff to configure multiple functional parameters.
[0111] As a feasible implementation method, the protocol rule information also includes the parameter standards (parameter range, etc.) corresponding to the function parameters, and then the input verification mechanism is designed when generating the parameter configuration interface to ensure that the data entered by the user meets the parameter standards corresponding to the function parameters. If it does not meet the requirements, clear error prompts and help information are provided to guide users to enter data correctly.
[0112] For example, please refer to Figure 3 , when the PTZ guard control function parameters include three function parameters: enable, time and action, and the action includes three function parameters: action type, guard ID and event type, the generated parameter configuration interface includes display controls corresponding to each function parameter. Figure 3As shown, the display control corresponding to the enablement may be a toggle button, and the user may select the enabled parameter state by clicking the toggle button; the display controls for the time and the watch ID may be a sliding number selector and an input box, and the user may set the time by sliding the number selector, or by entering the corresponding time into the input box; the display controls for the action type and time type may be a drop-down list box, and the user may select one from multiple options as an action type or a time type by clicking the arrow button in the drop-down list box.
[0113] Optional, such as Figure 3 As shown, the parameter configuration interface may also include buttons for generating a configuration template and applying a configuration scheme. After configuring the parameters, the user may select the Generate Configuration Template button to save the parameters as a configuration template for subsequent use; or after configuring the parameters, the user may select the Apply Configuration Scheme button to directly send the parameters to the target device, so that the target device runs based on the parameters configured by the user. The embodiments of the present application do not impose any restrictions on this.
[0114] It can be seen that the solution provided in this embodiment determines the corresponding display control based on the data type of the function parameter when generating the parameter configuration interface, so that the user can intuitively understand the meaning and type of each function parameter, and it is convenient for the user to directly adjust the function parameter through the graphical interface. At the same time, the automatic generation of controls that match the data type can greatly reduce the workload of developers to manually write interface codes, and the same controls can be reused in different places, further improving development efficiency.
[0115] In some embodiments, there may be a large number of target devices to be configured in the device configuration system. If there is no unified configuration template, it is necessary to configure the function parameters for each target device. The multiple configuration processes are not only cumbersome, but the configuration results may not be consistent. Therefore, for devices with the same device functions, a unified configuration template can be used for configuration to ensure that the configuration of all devices or systems follows the same standards and specifications, thereby improving the overall consistency and standardization level.
[0116] As a possible implementation, see Figure 5 , S205 can be specifically implemented as follows:
[0117] S501: Generate a function parameter configuration template corresponding to the target device function based on the parameter configuration result.
[0118] After obtaining the parameter configuration result configured by the staff based on the parameter configuration interface, a function parameter configuration template corresponding to the target device function can be generated based on the parameter configuration result and saved to facilitate subsequent staff to configure the target device function.
[0119] It is understandable that the function parameter configuration template may include display controls corresponding to each function parameter of the target device function, so that the staff can determine the parameter content (parameter value or parameter range, etc.) of each function parameter based on the display controls. For example, the template corresponding to the video recording function may include display controls corresponding to function parameters such as video resolution, frame rate, and encoding format; the template corresponding to the device operation function may include display controls corresponding to function parameters such as CPU frequency, memory size, and interface type.
[0120] Exemplarily, the parameter configuration interface may include a control for generating a configuration template. After the user configures the parameters in the parameter configuration interface, the user may select the control for generating a configuration template. In this way, the configuration device may save the user-configured parameters as a configuration template for subsequent use.
[0121] S502: In response to an operation of configuring a template using target function parameters, a device configuration interface is generated.
[0122] Among them, the device configuration interface includes selection controls corresponding to multiple devices.
[0123] It can be understood that the configuration device may include multiple function parameter configuration templates, each function parameter configuration template can correspond to a device function. When performing configuration, the staff can determine the target function parameter configuration template corresponding to the device function to be configured from multiple function parameter configuration templates, and generate a device configuration interface for the staff to select the target device to be configured.
[0124] As a feasible implementation method, multiple devices can be classified according to device type, device location, etc. in the device configuration interface, and a selection control can be set for a type of device or devices in a geographical location to facilitate staff to select target devices in batches.
[0125] For example, see Figure 6 The device configuration interface may include a waiting area and a selected device area, which are used to display unselected devices with target device functions and selected target devices, respectively. Each device corresponds to a selection control and a one-click selection control. After selecting the corresponding selection control, the staff can select the corresponding device as the target device.
[0126] S503: In response to a selection operation on a selection control, determine one or more target devices corresponding to the selection operation.
[0127] The staff selects the selection control based on the device configuration interface, and the configuration device uses the device corresponding to the selection control selected by the staff as the target device.
[0128] S504: Send the parameter configuration result in the target function parameter configuration template to the target device.
[0129] After the staff determines the target device, the parameter configuration result in the target function parameter configuration template can be sent to the target device, so that the target device controls the operation of the target device function based on the parameter configuration result.
[0130] It should be understood that in some embodiments, Figure 6 As shown, the device configuration interface may include controls corresponding to sending configuration and starting inspection. After selecting the target device, the staff can select the control for sending configuration to send the parameter configuration result to the target device. Alternatively, after selecting the target device, the staff can select the control for starting inspection to configure the device to inspect only the target device selected by the staff to avoid failure of the target device.
[0131] It can be seen that the device configuration method provided in this embodiment generates a function parameter configuration template corresponding to the function of the target device after obtaining the parameter configuration result, so that the staff can send the parameter configuration result to multiple target devices in batches, ensuring that the configuration of all target devices follows the same standards and specifications, and improving the overall consistency and standardization level. In addition, the staff can quickly update or modify the configuration of multiple target devices by modifying the template without having to perform manual operations one by one, which can save the labor intensity of the staff.
[0132] In some embodiments, some function parameter configuration templates may be stored in the configuration device, or the configuration device may obtain some function parameter configuration templates from a server or other configuration devices. When the staff configures the target device, they can directly configure it based on the pre-set function parameter configuration template without generating the configuration template by obtaining the protocol message.
[0133] Based on this, as a feasible implementation method, please refer to Figure 7 , the device configuration method provided in the embodiment of the present application also includes:
[0134] S701. In response to an operation of using a target function parameter configuration template, display a target parameter configuration interface corresponding to the target function parameter configuration template.
[0135] The target function parameter configuration template includes the function parameters required for the corresponding device function, but the parameter values corresponding to the function parameters may not meet the needs of the staff's current configuration. Therefore, when the staff uses the target function parameter configuration template, it is necessary to display the target parameter configuration interface corresponding to the target function parameter configuration template to facilitate the staff to configure the parameter values corresponding to the function parameters.
[0136] S702: In response to a configuration operation based on a display control on a target parameter configuration interface, a target parameter configuration result corresponding to a function parameter is obtained.
[0137] S703: In response to a confirmation operation based on the target parameter configuration interface, generate a device configuration interface.
[0138] Among them, the device configuration interface includes selection controls corresponding to multiple devices.
[0139] After the staff has configured the function parameters in the target parameter configuration interface, they can perform a confirmation operation and then configure the device to generate a device configuration interface, so that the staff can determine the device on which the target parameter configuration result needs to be executed.
[0140] S704: In response to a selection operation on a selection control, determine one or more target devices corresponding to the selection operation.
[0141] As a feasible implementation method, multiple devices can be classified according to device type, device location, etc. in the device configuration interface, and a selection control can be set for a type of device or devices in a geographical location to facilitate staff to select target devices in batches.
[0142] S705: Send the target parameter configuration result to the target device.
[0143] After the staff determines the target device, the target parameter configuration result can be sent to the target device, so that the target device controls the operation of the corresponding device function based on the target parameter configuration result.
[0144] It can be seen that in the device configuration method provided in this embodiment, when the staff is configuring the parameters of the device function, they select the corresponding function parameter configuration template, and quickly update or modify the configuration of multiple target devices by modifying the template without having to perform manual operations one by one, which can facilitate the staff to configure the parameters.
[0145] In some embodiments, IoT devices may have some problems during operation, such as looseness, wear, overheating, abnormal vibration, etc. The safe operation of IoT devices is directly related to the life safety of production personnel and the property safety of the enterprise. Therefore, the operating status of the device can be judged by obtaining the operating parameters of the IoT device, so that measures can be taken to repair it before the failure occurs, avoiding equipment downtime or production interruption caused by sudden failure.
[0146] Based on this, as a feasible implementation method, the device configuration method provided in the embodiment of the present application also includes:
[0147] S21. Obtain an output message of a target device function sent by the target device.
[0148] The output message includes the corresponding relationship between the parameter identifier of the output parameter and the actual parameter value.
[0149] For example, please refer to the following output message:
[0150] {
[0151] "ports": [
[0152] { "ID": 1,
[0153] "enabled": true,
[0154] "connectStatus": "connected",
[0155] "usePower": 0.000,
[0156] "maxPower": 0.000,
[0157] "portName": "test",
[0158] "POEProtocolType": "AF",
[0159] "deviceClass": "encodeDevice",
[0160] "cableDistanceType": "short"};
[0161] ],
[0162] "totalPower": 0.000;
[0163] }.
[0164] It can be seen that the output message usually includes the correspondence between the parameter identifier of the output parameter and the actual parameter value, such as the output parameter ID, the corresponding actual parameter value is 1; the output parameter enabled, the corresponding actual parameter value is true...
[0165] S22. Determine parameter information of each output parameter according to the output message and protocol rule information.
[0166] The parameter information of the output parameter includes the parameter identifier of the output parameter, the actual parameter value and the corresponding parameter standard; the protocol rule information is used to indicate the corresponding relationship between the function parameter and the parameter standard.
[0167] S23. Generate an output display interface based on the parameter identifier and actual parameter value of the output parameter.
[0168] Among them, the display methods of the first output parameter and the second output parameter in the output display interface are different. The first output parameter is an output parameter whose actual parameter value does not meet the corresponding parameter standard, and the second output parameter is an output parameter whose actual parameter value meets the corresponding parameter standard. The parameter information includes the parameter standard of the function parameter.
[0169] As a feasible implementation method, the output message of the target device function sent by the target device can be obtained once at a preset time interval to complete the inspection of the target device and avoid the target device function of the target device from failing to operate normally.
[0170] It is understandable that there are some problems with output parameters whose actual parameter values do not meet the corresponding parameter standards, which may cause abnormal phenomena in the target device. Therefore, different display methods are needed to display output parameters whose actual parameter values meet the corresponding parameter standards and output parameters whose actual parameter values do not meet the corresponding parameter standards, so that the staff can pay more attention to the first output parameter, and then adjust the functional parameters of the target device based on the first output parameter to avoid malfunction of the target device.
[0171] For example, see Figure 8 The output display interface can display the parameter details of the output parameters in the output message, such as Figure 8 As shown, the output parameters may include: enabled status, server address, port number, time interval and backup service time. The actual parameters of the server address in the output parameters are different from the parameter standard, so they are displayed in a different way from other parameters to facilitate staff to review.
[0172] It should be understood that Figure 8 The second display method is shown as framed and bold for exemplary purposes only. In actual applications, different display methods may be different display colors, or different display logos, etc. This application does not limit this.
[0173] In some embodiments, the device configuration method provided in the embodiments of the present application can also allow staff to manually modify the fields in the protocol message after obtaining the protocol message corresponding to the function of the target device to obtain the target protocol message, and then send the target protocol message to the target device.
[0174] As a feasible implementation method, the configuration device in the embodiment of the present application can also provide a message editing interface, and the user can manually modify the fields in the protocol message based on the message editing interface to obtain the target protocol message.
[0175] As a feasible implementation method, after obtaining the target protocol message, a device configuration interface can be generated to facilitate the staff to determine the target device. As another feasible implementation method, the staff can modify the destination address in the target protocol message, modify it to the destination address of the target device, and then send it to the target device through the message transceiver module. The embodiment of the present application does not limit the specific method of sending the target protocol message to the target device.
[0176] In some embodiments, for a target device function, the output parameters in the output message of the target device are the functional parameters required for the target device to operate. Therefore, when configuring the target device function of the target device, the staff can first obtain the output message of the target device by calling the get (GET) method, and then modify the actual parameter value of the output parameter in the output message, and then send the modified message to the target device by calling the update (PUT) method, so that the target device controls the operation of the target device function based on the modified message.
[0177] For example, see Fig. 9 The message editing interface can include controls corresponding to the GET method and the PUT method (get and update). In this way, when editing a message, you can select different controls to execute different methods. Fig. 9 The message editing interface may also include a display control for a Uniform Resource Locator (URL). URL is a standard address format used to locate and access information on a target device. When the GET method is called to obtain the output message of the device, the message address in the URL display control is obtained.
[0178] Please continue reading Fig. 9 , the message editing interface can include display controls corresponding to the output message and the configuration message. When the output message of the target device is obtained by calling the GET method, the output message can be displayed in the display control of the output message. When the staff needs to configure, they can copy the output message from the display control of the output message to the display control corresponding to the configuration message, modify the message in the display control corresponding to the configuration message, and then call the PUT method to send the configured message to the target device.
[0179] The present application also provides a device configuration apparatus, see Fig.10 The device configuration apparatus 100 includes: an acquisition module 101, a parsing module 102, a generation module 103 and a sending module 104.
[0180] Among them, the acquisition module 101 is used to acquire the protocol message corresponding to the target device function; the parsing module 102 is used to parse the protocol message to obtain the function parameters corresponding to the target device function; the generation module 103 is used to generate a parameter configuration interface according to the function parameters corresponding to the target device function; the parameter configuration interface includes a display control corresponding to each function parameter; the acquisition module 101 is also used to obtain the parameter configuration result corresponding to the function parameter in response to the configuration operation of one or more display controls on the parameter configuration interface; the sending module 104 is used to send the parameter configuration result to the target device, so that the target device controls the operation of the target device function based on the parameter configuration result.
[0181] As a feasible implementation method, the generation module 103 is specifically used to determine the parameter information of each function parameter according to the function parameters and protocol rule information corresponding to the target device function, the parameter information including the data type of the function parameter; the protocol rule information is used to indicate the correspondence between the function parameter and the parameter information; based on the data type of the function parameter and the correspondence between the preset data type and the control type, determine the display control corresponding to each function parameter; generate a parameter configuration interface based on the display control corresponding to each function parameter.
[0182] As a feasible implementation method, the parsing module 102 is specifically used to identify the message format of the protocol message; the message format of the protocol message includes the standard protocol message format in the protocol standard platform or the output message format of the target device; the protocol message is parsed based on the message format of the protocol message to obtain the functional parameters corresponding to the function of the target device.
[0183] Among them, when the message format of the protocol message is the standard protocol message format in the protocol standard platform, the acquisition module 101 is also used to: after parsing the protocol message, obtain the annotation information corresponding to the function parameters; generate the protocol rule information corresponding to the function parameters based on the annotation information corresponding to the function parameters.
[0184] As a feasible implementation method, the parameter configuration result includes the configuration result corresponding to the target function parameter; the configuration result includes one of the following: parameter value, parameter range, parameter status, the target function parameter is the function parameter corresponding to one or more display controls configured based on the parameter configuration interface; the sending module 104 is specifically used to modify the protocol message according to the configuration result corresponding to each target function parameter to obtain the target protocol message; and send the target protocol message to the target device.
[0185] As a feasible implementation method, the sending module 104 is specifically used to generate a function parameter configuration template corresponding to the target device function based on the parameter configuration result; in response to an operation using the target function parameter configuration template, generate a device configuration interface, the device configuration interface includes selection controls corresponding to multiple devices; in response to a selection operation on the selection control, determine one or more target devices corresponding to the selected operation; and send the parameter configuration result in the target function parameter configuration template to the target device.
[0186] As a feasible implementation method, the equipment configuration device also includes a display module, which is used to display a target parameter configuration interface corresponding to the target function parameter configuration template in response to an operation using the target function parameter configuration template; the acquisition module is also used to obtain the target parameter configuration result corresponding to the function parameter in response to a configuration operation based on the display control on the target parameter configuration interface; the generation module is also used to generate a device configuration interface in response to a confirmation operation based on the target parameter configuration interface, and the device configuration interface includes selection controls corresponding to multiple devices; the equipment configuration device also includes a determination module, which is used to determine one or more target devices corresponding to the selected operation in response to a selection operation on the selection control; the sending module is also used to send the target parameter configuration result to the target device.
[0187] As a feasible implementation method, the acquisition module is also used to obtain the output message of the target device function sent by the target device; the output message includes the correspondence between the parameter identifier of the output parameter and the actual parameter value; the device configuration device also includes a determination module, which is used to determine the parameter information of each output parameter according to the output message and the protocol rule information; the parameter information of the output parameter includes the parameter identifier, actual parameter value and parameter standard of the output parameter; the protocol rule information is used to indicate the correspondence between the function parameter and the parameter standard; the generation module is also used to generate an output display interface based on the parameter identifier and the actual parameter value of the output parameter; the display method of the first output parameter and the second output parameter in the output display interface is different, the first output parameter is an output parameter whose actual parameter value does not meet the corresponding parameter standard, and the second output parameter is an output parameter whose actual parameter value meets the corresponding parameter standard.
[0188] The present application also provides an electronic device. Fig.11 The electronic device 201 includes: one or more memories 121, one or more processors 122, a communication bus 123 and a communication interface 124. The processor 122 is connected to the memory 121 via the communication bus 123; the one or more memories 121 are used to store computer program codes, and the computer program codes include computer instructions; when the one or more processors 122 execute the computer instructions, the electronic device 201 executes the device configuration method provided in the above embodiment.
[0189] Optionally, the memory 121 may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc., and the embodiments of the present application do not impose any restrictions on this.
[0190] The processor 122 may be a central processing unit (CPU), a general-purpose processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof, and the embodiments of the present application do not impose any limitation on this.
[0191] The communication bus 123 may be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus. The communication bus 123 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Just one thick line is used, but it does not mean that there is only one bus or one type of communication bus.
[0192] The communication interface 124 uses any transceiver or other device for communicating with other devices or communication networks, such as control systems, radio access networks (RAN), wireless local area networks (WLAN), etc.
[0193] The embodiments of the present application also provide a computer program product including one or more instructions, where the one or more instructions are stored in a memory of a computer device and executed by a processor to complete the various processes of the above embodiments.
[0194] An embodiment of the present application also provides a computer-readable storage medium, which includes computer-executable instructions. When the computer-executable instructions are executed on a computer, the computer executes the device configuration method provided in the above embodiment.
[0195] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0196] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0197] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0198] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0199] If 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 readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a device (which may be a single-chip microcomputer, etc.) or a processor to execute all or part of the steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks or optical disks.
[0200] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A device configuration method, characterized in that: include: Acquire a protocol message corresponding to the function of the target device; the protocol message is a standard protocol message corresponding to the function of the target device obtained from a standard protocol platform; Parsing the protocol message, identifying the field position of the annotation information in the protocol message according to the specific format of the protocol message, obtaining the function parameters corresponding to the function of the target device and the annotation information corresponding to the function parameters, and generating the protocol rule information corresponding to the function parameters based on the annotation information corresponding to the function parameters; The annotation information is used to describe and explain the fields, parameters or structures in the protocol message; Determine parameter information of each function parameter according to the function parameter and protocol rule information corresponding to the function of the target device, wherein the parameter information includes a data type of the function parameter; The protocol rule information is used to indicate the correspondence between the function parameters and the parameter information; Determine a display control corresponding to each of the function parameters based on the data type of the function parameter and the correspondence between the preset data type and the control type; Generate a parameter configuration interface based on the display control corresponding to each of the functional parameters; the parameter configuration interface includes a display control corresponding to each of the functional parameters; In response to a configuration operation on one or more of the display controls on the parameter configuration interface, obtaining a parameter configuration result corresponding to the function parameter; Generate a function parameter configuration template corresponding to the target device function based on the parameter configuration result; In response to an operation using the function parameter configuration template, a device configuration interface is generated, the device configuration interface including selection controls corresponding to a plurality of devices; the plurality of devices are classified according to device type and / or device location in the device configuration interface, and a selection control is set corresponding to devices of the same device type or devices in the same geographical location, so that the staff can select target devices in batches; In response to a selection operation on a selection control, one or more target devices corresponding to the selection operation are determined, and the parameter configuration result is sent to the target device, so that the target device controls the operation of the target device function based on the parameter configuration result.
2. The method according to claim 1, characterized in that The parameter configuration result includes a configuration result corresponding to a target function parameter; the configuration result includes one of the following: a parameter value, a parameter range, and a parameter state, and the target function parameter is a function parameter corresponding to one or more display controls configured based on the parameter configuration interface; The step of sending the parameter configuration result to the target device includes: Modify the protocol message according to the configuration result corresponding to each of the target function parameters to obtain a target protocol message; The target protocol message is sent to the target device.
3. The method according to claim 1, characterized in that The method further comprises: In response to an operation of using the target function parameter configuration template, displaying a target parameter configuration interface corresponding to the target function parameter configuration template; In response to a configuration operation of the display control on the target parameter configuration interface, obtaining a target parameter configuration result corresponding to the function parameter; In response to a confirmation operation based on the target parameter configuration interface, generating a device configuration interface, the device configuration interface including selection controls corresponding to a plurality of devices; In response to a selection operation on the selection control, determining one or more target devices corresponding to the selection operation; The target parameter configuration result is sent to the target device.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Acquire an output message of the target device function sent by the target device; the output message includes a correspondence between a parameter identifier of an output parameter and an actual parameter value; Determine the parameter information of each of the output parameters according to the output message and the protocol rule information; the parameter information of the output parameter includes the parameter identifier, the actual parameter value and the parameter standard of the output parameter; the protocol rule information is used to indicate the corresponding relationship between the function parameter and the parameter standard; An output display interface is generated based on the parameter identifier and the actual parameter value of the output parameter; the first output parameter and the second output parameter in the output display interface are displayed differently, the first output parameter is an output parameter whose actual parameter value does not meet the corresponding parameter standard, and the second output parameter is an output parameter whose actual parameter value meets the corresponding parameter standard.
5. A device configuration apparatus, characterized in that: include: An acquisition module, used to acquire a protocol message corresponding to a target device function; the protocol message is a standard protocol message corresponding to the target device function acquired from a standard protocol platform; a parsing module, configured to parse the protocol message, identify the field position of the annotation information in the protocol message according to the specific format of the protocol message, obtain the function parameters corresponding to the function of the target device and the annotation information corresponding to the function parameters, and generate the protocol rule information corresponding to the function parameters based on the annotation information corresponding to the function parameters; The annotation information is used to describe and explain the fields, parameters or structures in the protocol message; A generating module, configured to determine parameter information of each function parameter according to the function parameter and protocol rule information corresponding to the function of the target device, wherein the parameter information includes a data type of the function parameter; The protocol rule information is used to indicate the correspondence between the function parameters and the parameter information; Based on the data type of the function parameter and the correspondence between the preset data type and the control type, determine the display control corresponding to each function parameter; generate a parameter configuration interface based on the display control corresponding to each function parameter; the parameter configuration interface includes the display control corresponding to each function parameter; The acquisition module is further used to acquire the parameter configuration result corresponding to the function parameter in response to the configuration operation of one or more display controls based on the parameter configuration interface; A sending module, used for generating a function parameter configuration template corresponding to the function of the target device based on the parameter configuration result; In response to an operation using the function parameter configuration template, a device configuration interface is generated, the device configuration interface including selection controls corresponding to a plurality of devices; the plurality of devices are classified according to device type and / or device location in the device configuration interface, and a selection control is set corresponding to devices of the same device type or devices in the same geographical location, so that the staff can select target devices in batches; In response to a selection operation on a selection control, one or more target devices corresponding to the selection operation are determined, and the parameter configuration result is sent to the target device, so that the target device controls the operation of the target device function based on the parameter configuration result.
6. An electronic device, characterized in that: include: one or more processors; one or more memories; The one or more memories are used to store computer program codes, and the computer program codes include computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the device configuration method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed on a computer, the computer is enabled to execute the device configuration method according to any one of claims 1 to 4.
