Equipment data updating method and device, electronic equipment and storage medium

By using standard configuration files to generate test messages, the problems of poor access scalability and protocol adaptability of third-party equipment are solved, the rapid adaptation and update of equipment data is achieved, and the flexibility and adaptability of data updates are improved.

CN120017704AInactive Publication Date: 2025-05-16ZHEJIANG LNXALL IOT TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510473393.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-05-16
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the energy management system, the access scalability of third-party devices is poor and cannot uniformly adapt to the protocols of each device, which makes it inconvenient to modify descriptive text during data updates, and poor cross-platform characteristics.

Method used

By pre-determining the standard configuration file corresponding to the device, a call message corresponding to the device is generated to achieve rapid adaptation of the device data. The specific steps include receiving the equipment call command, determining the corresponding standard configuration file, generating the call message, obtaining response data, and updating the data according to the standard configuration file.

Benefits of technology

It realizes rapid access and data update of third-party equipment, improves adaptability and flexibility in the data update process, and reduces the complexity of docking equipment manufacturers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017704A_ABST
    Figure CN120017704A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment data updating method and device, electronic equipment and a storage medium, and the method comprises the steps: determining a standard configuration file corresponding to an equipment interrogation command when the equipment interrogation command is received; generating an equipment interrogation message corresponding to the equipment interrogation command according to a standard configuration file, and obtaining interrogation response data corresponding to the equipment interrogation message; and analyzing the interrogation response data according to the standard configuration file to determine target update data, and performing data update according to the standard configuration file and the target update data. Based on the technical scheme, rapid access of the third-party equipment is realized according to the standard configuration file corresponding to the equipment, and data interrogation is performed according to the standard configuration file corresponding to the third-party equipment in an equipment data updating process, so that rapid adaptation of the third-party equipment in the data updating process is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and apparatus for updating device data, an electronic device and a storage medium. Background Art

[0002] In the energy management system industry, the ability to quickly access third-party devices is one of its important functions. Rapid access to devices can achieve rapid reading of device data, thereby ensuring the real-time nature of the data.

[0003] However, due to the large number of technical protocols and their complex types, and the fact that docking equipment manufacturers usually describe the capabilities and data of equipment through data point addresses, the access scalability of third-party equipment is poor during the actual docking process, and it is inconvenient to modify descriptive texts such as units, data classification, and classification. It is also impossible to uniformly adapt the protocols of each device, and all modifications must be compiled, resulting in poor cross-platform features. Summary of the invention

[0004] The present invention provides a method, apparatus, electronic device and storage medium for updating device data, which achieves rapid adaptation of third-party devices during data updating by predetermining a standard configuration file corresponding to the device and then generating a call message corresponding to the device according to the standard configuration file.

[0005] According to one aspect of the present invention, a method for updating device data is provided, which includes:

[0006] When receiving a device test call command, determining a standard configuration file corresponding to the device test call command;

[0007] Generate a device test call message corresponding to the device test call command according to a standard configuration file, and obtain test call response data corresponding to the device test call message;

[0008] The test call response data is parsed according to the standard configuration file to determine target update data, and data is updated according to the standard configuration file and the target update data.

[0009] Furthermore, before receiving the device test call command, the method further includes:

[0010] Obtain the device protocol document to be processed corresponding to the device to be added;

[0011] The protocol document of the device to be processed is converted into the standard configuration file according to the preset document configuration rules, and the name of the device to be added is added to the device list; wherein the standard configuration file corresponds to the protocol of the device to be added, including the data collection point configuration information corresponding to the device to be added.

[0012] Further, after converting the device protocol document to be processed into the standard configuration file according to the preset document configuration rule, the method includes:

[0013] Creating a data collection thread corresponding to the device to be added according to the standard configuration file and the device list;

[0014] Initialize physical interface parameters corresponding to the device data acquisition thread according to the standard configuration file.

[0015] Further, the updating of data according to the standard configuration file and the target update data includes:

[0016] Determine a target device corresponding to the target update data, and obtain a bidirectional mapping table corresponding to the target device;

[0017] Data updating is performed based on the bidirectional mapping table, the standard configuration file and the target update data.

[0018] Further, the data updating based on the bidirectional mapping table, the standard configuration file and the target update data includes:

[0019] Determining a device data point name corresponding to the target update data from the standard configuration file;

[0020] The data to be updated is determined from the forward data mapping table according to the device data point name, and the data to be updated is updated based on the target update data.

[0021] Further, the parsing the test call response data according to the standard configuration file to determine the target update data includes:

[0022] Determine an unpacking configuration parameter corresponding to the test call response data according to the standard configuration file, and perform a data parsing operation on the test call response data according to the unpacking configuration parameter.

[0023] Further, the generating, according to the standard configuration file, a device test call message corresponding to the device test call command includes:

[0024] A target protocol type is determined according to the standard configuration file, and a device test call message corresponding to the target protocol type is generated according to the standard configuration file.

[0025] According to another aspect of the present invention, there is provided a device for updating device data, comprising:

[0026] A configuration file determination module, configured to determine a standard configuration file corresponding to the device test call command upon receiving the device test call command;

[0027] A response data acquisition module, used to generate a device test call message corresponding to the device test call command according to a standard configuration file, and acquire test call response data corresponding to the device test call message;

[0028] The data updating module is used to parse the test call response data according to the standard configuration file to determine target update data, and perform data updating according to the standard configuration file and the target update data.

[0029] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0030] at least one processor; and

[0031] a memory communicatively connected to the at least one processor; wherein,

[0032] The memory stores a computer program that can be executed by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the device data updating method described in any embodiment of the present invention.

[0033] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device data updating method described in any embodiment of the present invention when executed.

[0034] The technical solution of the embodiment of the present invention is to determine the standard configuration file corresponding to the device call test command when receiving the device call test command, and then generate a device call test message corresponding to the device call test command according to the standard configuration file, and obtain the call test response data corresponding to the device call test message, and finally parse the call test response data according to the standard configuration file to determine the target update data, and perform data update according to the standard configuration file and the target update data. Based on the above technical solution, according to the standard configuration file corresponding to the device, the rapid access of the third-party device is realized, and in the process of device data update, the data call test is performed according to the standard configuration file corresponding to the third-party device, so as to realize the rapid adaptation of the third-party device in the process of data update.

[0035] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0037] Figure 1 is a flow chart of a method for updating device data provided according to an embodiment of the present invention;

[0038] Figure 2 is a schematic diagram of the contents of a standard configuration file provided according to an embodiment of the present invention;

[0039] Figure 3 is a schematic diagram of data update based on a bidirectional mapping table provided according to an embodiment of the present invention;

[0040] Figure 4 is a schematic diagram of a flow chart of a method for updating device data provided in an embodiment of the present invention;

[0041] Figure 5 is a schematic diagram of a method for addressing device data points according to an embodiment of the present invention;

[0042] Figure 6 is a schematic diagram of the structure of a device for updating device data provided by an embodiment of the present invention;

[0043] Figure 7 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0046] Embodiment 1

[0047] Figure 1 The present invention provides a flowchart of a device data update method. This embodiment is applicable to the case where a data call test is required for an electric power device, a standard configuration file corresponding to the device is determined, and the device data call test is performed according to the marked configuration file. The method can be executed by a device data update device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0048] S110: When a device test call command is received, determine a standard configuration file corresponding to the device test call command.

[0049] The device call command may be a command for obtaining device measurement data corresponding to the target device. The target device may be understood as a third-party measurement device connected to the current energy management system, such as a third-party ammeter, a third-party voltmeter, or a smart meter or other power equipment. The standard configuration file may be a pre-generated file for storing configuration information corresponding to the target device. It should be noted that the standard configuration file may be a file having a specific file format, such as a json format file or an xml format file.

[0050] Specifically, when receiving a device test call command, the target device corresponding to the device test call command is determined, and a standard configuration file corresponding to the target device is obtained. For example, the device name in the test call command can be obtained by parsing the test call command, and then the target device is determined according to the device name, and the standard configuration file corresponding to the target device is queried from the database. It should be noted that the device test call command can be triggered manually or triggered by polling according to a preset test call cycle, that is, the corresponding device test call command is generated by a pre-configured polling cycle and corresponding polling parameters.

[0051] Based on the above technical solution, before receiving the device test call command, it also includes: obtaining the device protocol document to be processed corresponding to the device to be added; converting the device protocol document to be processed into the standard configuration file according to the preset document configuration rules, and adding the name of the device to be added to the device list.

[0052] Among them, the device to be added can be understood as a third-party device that needs to be connected to the energy management system. The device protocol document can be a document used to guide communication and data exchange with the device, and the document may include information such as the communication protocol, data format, and command set of the device to be added. The preset document configuration rules can be pre-set data extraction rules for converting the information in the device protocol document into a standard configuration file, for example, it may include extraction fields and field order. The standard configuration file corresponds to the protocol of the device to be added, and includes data collection point configuration information corresponding to the device to be added.

[0053] Specifically, it is necessary to parse the device protocol document, extract the information related to device communication and data exchange, and convert the extracted information into a standard configuration file according to the preset document configuration rules. It should be noted that during the conversion process, the name of the device to be added is added to the device list, so as to achieve rapid search and identification of third-party power equipment in the process of connecting the third-party device to the current power management system. The converted standard configuration file corresponds to the protocol of the device to be added, and includes data collection point configuration information related to the device. The configuration information is usually used to guide the sending of the device call command and the parsing of the received data. The configuration information may include data point number, data point name, data point multiplier, enumeration mapping table, extended description field and at least one of the unpacking data configuration. And it should be noted that, if Figure 2 As shown in the figure, the configuration information corresponds to the current device, that is, the communication protocols corresponding to different devices may be different. When the communication protocol is the MODBUS protocol, its unpacked data configuration includes information such as function code, register address, protocol data type and byte order; when the communication protocol is the DLT645 protocol, the unpacked data configuration includes parameters such as point address and bit offset.

[0054] For example, if a device has multiple attribute values, such as an electric meter with three collection points such as current / voltage / power, then the three collection points in the configuration content must correspond to three independent configuration information, identifying the description of some collection points and business processing parameters and data conversion parameters. Each independent collection point contains 7 configuration information, including point number / name / multiplier / enumeration value map table / extended description 1 / extended description 2 / unpacked data PDU configuration. The description information provides auxiliary static information corresponding to the collection point, the business processing parameters provide secondary processing or mapping of the data, and the data conversion parameters are dynamically bound to the parameter definition and number of the PDU configuration mentioned above and the multiple used protocol types, so that the content in the PDU parameters can be dynamically parsed according to the protocol type during the device data update process.

[0055] On the basis of the above technical solution, after converting the protocol document of the device to be processed into the standard configuration file according to the preset document configuration rules, it includes: creating a data acquisition thread corresponding to the device to be added according to the standard configuration file and the device list; initializing the physical interface parameters corresponding to the device data acquisition thread according to the standard configuration file.

[0056] The data collection thread may be a data collection unit responsible for collecting data from a specified data source and storing the collected data in a specified location. Physical interface parameters may be understood as parameters that describe the characteristics and behavior of a physical interface and are used to configure and manage network interface devices.

[0057] Specifically, use the device information obtained from the device list, such as the device name, IP address, port number, etc., and the data collection point configuration information defined in the standard configuration file to create an independent data collection thread for each device to be added. The data collection thread is responsible for sending a call command to the device periodically or on demand, receiving the response data returned by the device, and initializing the physical interface parameters corresponding to the device data collection thread according to the standard configuration file. The physical interface parameters related to device communication can be read from the standard configuration file, such as the communication protocol (TCP / IP, UDP, serial port, etc.), baud rate (for serial port communication), data bit, stop bit, check bit, etc., and the physical interface corresponding to each device data collection thread is initialized according to the physical interface parameters.

[0058] S120: Generate a device test call message corresponding to the device test call command according to a standard configuration file, and obtain device test call response data corresponding to the device test call message.

[0059] The device call message may be a message for collecting device data corresponding to the device call command. The call response data may be understood as data corresponding to the call message fed back by the external device to the energy management system. The external device may be a third-party device connected to the current energy management system.

[0060] Specifically, by parsing the standard configuration file, the information for communicating with the device to be added, such as the device address, communication protocol, data collection point, etc., is determined, and then according to the information in the standard configuration file, a device call message corresponding to the device call is constructed. For example, a header, a checksum, a serial number and other communication elements can be added to the device call command to ensure that the format of the device call message corresponds to the communication protocol of the third-party device. It should be noted that the technical solution of the present invention generates a device call message corresponding to the device call command according to the standard configuration file, and obtains the call response data corresponding to the device call message, so as to ensure that the system can communicate and collect data with the device efficiently and reliably.

[0061] Based on the above technical solution, generating a device test call message corresponding to the device test command according to a standard configuration file includes: determining a target protocol type according to the standard configuration file, and generating a device test call message corresponding to the target protocol type according to the standard configuration file.

[0062] The target protocol type may be understood as the type of communication protocol corresponding to the target device, such as the MODBUS protocol or the DLT645 protocol.

[0063] Specifically, the standard configuration file is read and parsed, and the target protocol type corresponding to the connected third-party device is determined by parsing the standard configuration file, and then the framework of the call test command is constructed according to the requirements of the protocol, including setting the command start character, address field, function code, data field and check code, etc. According to the specific instructions and data collection point information in the standard configuration file, the parameters of the call test command are filled, including specifying the address of the data point to be read, setting the length or format of the read data, etc., and then the constructed call test command is encapsulated into a complete message according to the requirements of the target protocol, and the necessary header information, data field and check code are added according to the target protocol type, so as to form a device call test message corresponding to the target protocol type. Exemplarily, the protocol template in the protocol library is called according to the target protocol type, and the register address, function code, and data length parameters in the standard configuration file are filled into the PDU field of the protocol template to generate a complete message header and data segment. The protocol template supports at least one of MODBUS, IEC104, and DL / T645.

[0064] S130: parse the test call response data according to the standard configuration file to determine target update data, and perform data update according to the standard configuration file and the target update data.

[0065] The target update data may be understood as target data obtained after parsing the response data, that is, measurement data of a third-party device.

[0066] Specifically, the test call response data returned from the device is received. The test call response data is encapsulated in a specific communication protocol format and includes information such as device status, measurement data, error code, etc., and then the test call response data is parsed according to the standard configuration file, and the target update data is extracted from the test call response data, and then the data is updated according to the standard configuration file and the target update data.

[0067] On the basis of the above technical solution, the parsing of the test call response data according to the standard configuration file to determine the target update data includes: determining the unpacking configuration parameters corresponding to the test call response data according to the standard configuration file, and performing data parsing operations on the test call response data according to the unpacking configuration parameters.

[0068] Among them, the unpacking configuration parameters include byte offset, big-endian mode, data type conversion and multiplication factor, which are parameters used to parse the call test response data.

[0069] Specifically, according to the determined unpacking configuration parameters, the received call test response data is unpacked, and after the unpacking is completed, each data item is parsed. This includes identifying the type, length and position of the data field, and extracting the actual data value. It should be noted that after parsing the data field, the data correctness needs to be checked. The correctness of the data can be checked by checking whether the data is within the expected range, whether it conforms to a specific format or standard, and whether the check code matches.

[0070] On the basis of the above technical solution, the data update according to the standard configuration file and the target update data includes: determining the target device corresponding to the target update data, and obtaining a bidirectional mapping table corresponding to the target device; and updating the data based on the bidirectional mapping table, the standard configuration file and the target update data.

[0071] The bidirectional mapping table may be a table that defines the corresponding relationship between device data points and stored data items.

[0072] Specifically, the bidirectional mapping table corresponding to the target device is read, and then the data is updated based on the bidirectional mapping table, the standard configuration file and the target update data. It should be noted that the bidirectional mapping table usually contains two sets of mapping rules: the forward mapping table is a mapping from device data points to system data items, and the reverse MAP is a mapping from system data items back to device data points, ensuring the bidirectional flow and consistency of data. It should be noted that the forward MAP table uses the data point path as the key, stores the register address and real-time data value, and responds to application layer data requests; the reverse MAP table uses the register address as the key, stores the data point path and business processing rules, and is used to test response data updates.

[0073] On the basis of the above technical solution, the data update based on the bidirectional mapping table, the standard configuration file and the target update data includes: determining the device data point name corresponding to the target update data from the standard configuration file; determining the data to be updated from the forward data mapping table according to the device data point name, and updating the data to be updated based on the target update data.

[0074] Specifically, parse the target update data, identify the key information contained therein, such as device ID, data point identifier, etc., match the corresponding device data point name in the standard configuration file based on the parsed key information, and then read the forward data mapping table related to the target device. The forward data mapping defines the mapping relationship between the device data point and the data items stored or processed in the system, and according to the device data point name, find the corresponding data item to be updated in the forward data mapping table, assign the value in the target update data to the data item to be updated, and complete the data update. It should be noted that each device uses two MAP tables, one positive and one negative, and is implemented through dual MAP tables. The data point content is quickly located through the forward MAP table, and the updated data is searched and updated through the reverse MAP table to implement data read and write operations, such as Figure 3 As shown, (1) respond to the request of the data test cycle; (2) the external device responds to the message, which is sent to the protocol layer, removes the information on the link, and finds the register address used for indexing; (3) data processing requires searching the data point content through the reverse MAP table and updating its content; (4) the application layer initiates a request for the data point position; (5) according to the "device data point name", search the data point content in the positive MAP table and update its content.

[0075] The technical solution of the embodiment of the present invention is to determine the standard configuration file corresponding to the device call test command when receiving the device call test command, and then generate a device call test message corresponding to the device call test command according to the standard configuration file, and obtain the call test response data corresponding to the device call test message, and finally parse the call test response data according to the standard configuration file to determine the target update data, and perform data update according to the standard configuration file and the target update data. Based on the above technical solution, according to the standard configuration file corresponding to the device, the rapid access of the third-party device is realized, and in the process of device data update, the data call test is performed according to the standard configuration file corresponding to the third-party device, so as to realize the rapid adaptation of the third-party device in the process of data update.

[0076] Embodiment 2

[0077] Figure 4 The present invention provides a flowchart of a method for updating device data according to an embodiment of the present invention. The technical solution of the embodiment further introduces a method for updating device data based on the above embodiment. For specific implementation methods, please refer to the description of this embodiment. Among them, the technical features that are the same or similar to the above embodiment will not be repeated here. Figure 4 As shown, the method of the embodiment of the present invention may include:

[0078] Protocol configuration structured generation steps: Convert the third-party device protocol document into a structured JSON configuration file, which contains device-level global parameters and collection point-level independent parameters, where: device-level parameters include physical layer interface definition, polling cycle, PDU parameter set and frame interval control rules; collection point-level parameters include point number, register address mapping relationship, data conversion rules, multiplier coefficient, enumeration mapping table and unpacking PDU configuration. It should be noted that the device data point addressing design provided by the present invention follows the tree structure management, such as Figure 5 As shown in the figure, different device levels can be device nodes or data point nodes; data point nodes cannot have any nodes. The design principle of device data point names is: first-layer device + 2nd-layer device + n-layer device + data point n. The top-level business initiates data reading and writing, such as DEV1.DEVa.Data1. The data acquisition module searches for matching devices from the root and queries one by one from the first layer. If a layer does not exist, it returns failure; if it exists, it will return data point n and return the data.

[0079] Configuration preloading and initialization phase: load the device configuration to the physical interface parameter management module, create a data acquisition thread, write physical layer parameters such as serial port baud rate according to the configuration, and load the content in the configuration, with the device physical bus as each business module.

[0080] Dynamic message generation and parsing steps: Based on the JSON configuration file, perform the following operations: dynamically bind PDU parameters according to the target protocol type, generate transport layer messages that conform to the target protocol format; truncate the device response message, extract the valid data segment according to the unpacking PDU configuration, and perform big-endian and small-endian conversion, data type parsing, and rate scaling. By processing the source of the call and test command initiated by the EMS access device, the dynamic change of the call and test message content through configuration during runtime is achieved. Compared with the previous need to add / modify the call and test interface of the master station in the code, the call and test parameters of the master station, such as message content or call and test cycle, are changed according to the standardized configuration. In this process, only the PDU stage of the call and test of the master station is completed. For example, MODBUS only completes (function code + register starting address + number of registers) here.

[0081] Exemplarily, the protocol library strips the transport layer message, intercepts the PDU and calls the data decomposition module, processes the data in the PDU according to the configuration content, that is, decomposes the bytecode and converts the data object one by one. The master station's call test parameters can be changed according to the standard configuration file. Compared with the traditional method, the message is decomposed one by one in the code as needed, and the truncation / big-end switching / data type / data address information / data offset and other modifications of the PDU message are realized through dynamic configuration at runtime. It should be noted that in addition to realizing the parsing of the master station message / slave station message / timeout message processing of the traditional device access, the protocol library adds the inter-frame interval and the frame-frame interval; the inter-frame interval is used to process the same frame message, inserting a small amount of delay in the middle to cause the frame message to be discontinuous; the frame-frame interval is used to process some special devices that cannot process the message from the master station immediately, and need to realize the sending and receiving interaction once to wait for the frame-frame interval before initiating a new message. That is to say, the inter-frame interval threshold is used to segment non-continuous data streams within the same message frame. If the threshold is exceeded, it is determined to be the start of a new frame. The inter-frame interval threshold forces the master station to insert waiting time between two message interactions to adapt to the response delay of low-speed devices.

[0082] Dual MAP table data management steps: construct a forward MAP table and a reverse MAP table, where: the forward MAP table uses the data point path as the key, stores the register address and real-time data value, and responds to application layer data requests; the reverse MAP table uses the register address as the key, stores the data point path and business processing rules, and is used to update the test response data;

[0083] Hot loading and adaptive adjustment steps: monitor configuration file changes in real time through the file monitoring module, dynamically update physical layer parameters, polling strategies and data parsing rules, and trigger at least one of the following operations: rebuild data acquisition thread; refresh dual MAP table index; reset frame interval timer.

[0084] The technical solution of the embodiment of the present invention is to determine the standard configuration file corresponding to the device call test command when receiving the device call test command, and then generate a device call test message corresponding to the device call test command according to the standard configuration file, and obtain the call test response data corresponding to the device call test message, and finally parse the call test response data according to the standard configuration file to determine the target update data, and perform data update according to the standard configuration file and the target update data. Based on the above technical solution, according to the standard configuration file corresponding to the device, the rapid access of the third-party device is realized, and in the process of device data update, the data call test is performed according to the standard configuration file corresponding to the third-party device, so as to realize the rapid adaptation of the third-party device in the process of data update.

[0085] Embodiment 3

[0086] Figure 6 A schematic diagram of the structure of a device data updating apparatus provided by an embodiment of the present invention. Figure 6 As shown, the device includes: a configuration file determination module 610, a response data acquisition module 620 and a data update module 630, wherein:

[0087] The configuration file determination module 610 is used to determine a standard configuration file corresponding to the device test call command when receiving the device test call command;

[0088] The response data acquisition module 620 is used to generate a device test call message corresponding to the device test call command according to a standard configuration file, and acquire the device test call response data corresponding to the device test call message;

[0089] The data updating module 630 is configured to parse the test call response data according to the standard configuration file to determine target update data, and perform data updating according to the standard configuration file and the target update data.

[0090] On the basis of the above technical solution, the device also includes: a standard configuration file generation module, which is used to obtain the protocol document of the device to be processed corresponding to the device to be added before receiving the device call test command; convert the protocol document of the device to be processed into the standard configuration file according to the preset document configuration rules, and add the name of the device to be added to the device list; wherein the standard configuration file corresponds to the protocol of the device to be added, including the data collection point configuration information corresponding to the device to be added.

[0091] Based on the above technical solution, the standard configuration file generation module is used to create a data acquisition thread corresponding to the device to be added according to the standard configuration file and the device list; and initialize the physical interface parameters corresponding to the device data acquisition thread according to the standard configuration file.

[0092] Based on the above technical solution, the data update module is used to determine the target device corresponding to the target update data and obtain a bidirectional mapping table corresponding to the target device; and perform data update based on the bidirectional mapping table, the standard configuration file and the target update data.

[0093] Based on the above technical solution, the data update module is used to determine the device data point name corresponding to the target update data from the standard configuration file; determine the data to be updated from the forward data mapping table according to the device data point name, and update the data to be updated based on the target update data.

[0094] On the basis of the above technical solution, the data update module is used to determine the unpacking configuration parameters corresponding to the test call response data according to the standard configuration file, and perform data parsing operations on the test call response data according to the unpacking configuration parameters.

[0095] On the basis of the above technical solution, the response data acquisition module is used to determine the target protocol type according to the standard configuration file, and generate a device test call message corresponding to the target protocol type according to the standard configuration file.

[0096] The technical solution of the embodiment of the present invention is to determine the standard configuration file corresponding to the device call test command when receiving the device call test command, and then generate a device call test message corresponding to the device call test command according to the standard configuration file, and obtain the call test response data corresponding to the device call test message, and finally parse the call test response data according to the standard configuration file to determine the target update data, and perform data update according to the standard configuration file and the target update data. Based on the above technical solution, according to the standard configuration file corresponding to the device, the rapid access of the third-party device is realized, and in the process of device data update, the data call test is performed according to the standard configuration file corresponding to the third-party device, so as to realize the rapid adaptation of the third-party device in the process of data update.

[0097] The device data updating apparatus provided in the embodiment of the present invention can execute the device data updating method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0098] Embodiment 4

[0099] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0100] like Figure 7 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11 in communication, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0101] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0102] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for updating device data.

[0103] In some embodiments, the device data update method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the device data update method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the device data update method in any other appropriate manner (e.g., by means of firmware).

[0104] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0105] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0106] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0107] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0108] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0109] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0110] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0111] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for updating device data, characterized in that: include: When receiving a device test call command, determining a standard configuration file corresponding to the device test call command; Generate a device test call message corresponding to the device test call command according to a standard configuration file, and obtain test call response data corresponding to the device test call message; The test call response data is parsed according to the standard configuration file to determine target update data, and data is updated according to the standard configuration file and the target update data.

2. The method according to claim 1, characterized in that Before receiving the device test call command, it also includes: Obtain the device protocol document to be processed corresponding to the device to be added; The protocol document of the device to be processed is converted into the standard configuration file according to the preset document configuration rules, and the name of the device to be added is added to the device list; wherein the standard configuration file corresponds to the protocol of the device to be added, including the data collection point configuration information corresponding to the device to be added.

3. The method according to claim 2, characterized in that After converting the device protocol document to be processed into the standard configuration file according to the preset document configuration rule, the method includes: Creating a data collection thread corresponding to the device to be added according to the standard configuration file and the device list; Initialize physical interface parameters corresponding to the device data acquisition thread according to the standard configuration file.

4. The method according to claim 1, characterized in that: The updating of data according to the standard configuration file and the target update data includes: Determine a target device corresponding to the target update data, and obtain a bidirectional mapping table corresponding to the target device; Data updating is performed based on the bidirectional mapping table, the standard configuration file and the target update data.

5. The method according to claim 4, characterized in that The updating of data based on the bidirectional mapping table, the standard configuration file and the target update data includes: Determining a device data point name corresponding to the target update data from the standard configuration file; The data to be updated is determined from the forward data mapping table according to the device data point name, and the data to be updated is updated based on the target update data.

6. The method according to claim 1, characterized in that The step of parsing the test call response data according to the standard configuration file to determine the target update data includes: Determine an unpacking configuration parameter corresponding to the test call response data according to the standard configuration file, and perform a data parsing operation on the test call response data according to the unpacking configuration parameter.

7. The method according to claim 1, characterized in that The generating, according to the standard configuration file, a device test call message corresponding to the device test call command comprises: A target protocol type is determined according to the standard configuration file, and a device test call message corresponding to the target protocol type is generated according to the standard configuration file.

8. A device for updating device data, characterized in that: include: A configuration file determination module, configured to determine a standard configuration file corresponding to the device test call command upon receiving the device test call command; A response data acquisition module, used to generate a device test call message corresponding to the device test call command according to a standard configuration file, and acquire test call response data corresponding to the device test call message; The data updating module is used to parse the test call response data according to the standard configuration file to determine target update data, and perform data updating according to the standard configuration file and the target update data.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device data updating method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device data updating method according to any one of claims 1 to 7 when executed.

Citation Information

Patent Citations

  • 5G communication method and equipment oriented to power system monitoring and medium

    CN115297167A

  • Universal Modbus protocol analysis method, device and equipment

    CN117978893A

  • Standard message analysis method and device, electronic equipment and storage medium

    CN119697297A