A power consumption collection terminal communication simulation method and system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU HUAGANG INTELLIGENT TECH CO LTD
- Filing Date
- 2026-07-07
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]针对上述中的相关技术,模拟设备根据通信协议解析请求报文后读取对应的数据,然而当面对多类设备和多协议并存的场景时,模拟设备仅能按照其中一种通信协议生成响应,从而难以保证数据一致性,进而导致用电采集终端运行的可靠性降低,还有改进的空间
1.通过对模拟设备类型和模拟通信协议分析后确定对象映射表,将运行方案导入通信模拟装置后确定当前模拟状态数据,从而控制通信模拟装置接收用电采集终端发送的协议报文,从而对协议报文、当前模拟状态数据和对象映射表分析后得到通信模拟结果,从而通过对象映射表将各个通信协议的数据项统一映射到同一状态源,无论用电采集终端通过哪一种通信协议读取,均从同一设备状态中进行取值,从而有效避免模拟设备仅能按照一种通信协议生成响应而导致数据一致性降低的情况发生,进而保证提高用电采集终端运行的可靠性的效果;
Smart Images

Figure CN122533964A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of communication simulation, and in particular to a communication simulation method and system for a power consumption acquisition terminal. Background Technology
[0002] The term "power consumption data acquisition terminal" refers to the technology used to test the data acquisition, control, and anomaly handling of a power consumption data acquisition terminal in a simulated environment, with the aim of improving the reliability of the power consumption data acquisition terminal's operation.
[0003] In related technologies, the communication simulation method for power consumption acquisition terminals typically involves configuring the type of the simulation device on a test platform, then setting the communication address, communication protocol type, and operating parameters for the simulation device. The power consumption acquisition terminal sends a request to the simulation device through the communication protocol. The simulation device parses the request message according to the communication protocol, then reads the corresponding data and generates a response message to return to the power consumption acquisition terminal, thereby completing the communication simulation of the power consumption acquisition terminal.
[0004] Regarding the aforementioned technologies, the analog device reads the corresponding data after parsing the request message according to the communication protocol. However, when faced with scenarios involving multiple types of devices and multiple protocols, the analog device can only generate a response according to one of the communication protocols, making it difficult to guarantee data consistency. This leads to a decrease in the reliability of the power consumption acquisition terminal, indicating room for improvement. Summary of the Invention
[0005] To ensure the effectiveness of improving the reliability of the power consumption data acquisition terminal, this application provides a communication simulation method and system for the power consumption data acquisition terminal.
[0006] Firstly, this application provides a communication simulation method for an electricity consumption data acquisition terminal, employing the following technical solution: A method for simulating communication of a power consumption data acquisition terminal, comprising: Obtain the analog device type and analog communication protocol; Analyze the types of analog devices and analog communication protocols to determine the object mapping table; The preset operating scheme is imported into the preset communication simulation device to determine the current simulation status data; The control communication simulation device receives protocol messages sent by a preset power consumption acquisition terminal and obtains a reception completion signal; The protocol message, current simulation state data, and object mapping table are analyzed based on the reception completion signal to generate communication simulation results.
[0007] Optionally, the steps of analyzing the analog device type and analog communication protocol to determine the object mapping table include: Obtain the protocol data item configuration table according to the analog communication protocol; Determine the protocol type, data key value, and unified object number based on the protocol data item configuration table; Associate the analog device type, protocol type, data key value, and unified object number to generate an object mapping table.
[0008] Optionally, the step of importing a preset operating scheme into a preset communication simulation device to determine the current simulation state data includes: Import the operating plan into the communication simulation device and obtain the import completion signal; The operation plan is analyzed based on the import completion signal to generate the operation timeline; The running time axis and preset scan step size are analyzed to determine the current simulation state data.
[0009] Optionally, the steps of analyzing the runtime scenario to generate a runtime timeline include: Determine the operating condition segment based on the operation plan; Obtain the start time, end time, affected object, operating parameters, and recovery method of the operating condition segment; Associate the start and end times of the operating condition to generate a timeline for the operating condition segment; The execution content of the working condition segment is determined based on the target object, operating parameters, and recovery method. Associate the timeline of the operating condition segment with the execution content of the operating condition segment to generate the running timeline.
[0010] Optionally, the steps of analyzing the runtime timeline and preset scan steps to determine the current simulation state data include: The current simulation cycle is determined based on the running time axis and scan step size; Determine the current operating condition segment in the runtime timeline based on the current simulation cycle; Determine the current operating parameters and event duration based on the current operating condition segment; Analyze the current simulation cycle, current operating parameters, and event duration to determine the current simulation status data.
[0011] Optionally, the steps of analyzing the current simulation cycle, current operating parameters, and event duration to determine the current simulation state data include: Determine whether the current running parameters and event duration meet the preset abnormal event triggering requirements; If the conditions are met, an abnormal event record is generated based on the current operating parameters, the current simulation cycle, and the event duration, and the current simulation status data is generated based on the abnormal event record. If not, the current operating parameters are analyzed to determine the instantaneous physical quantity and the long-term cumulative quantity; The instantaneous physical quantity and the long-term cumulative quantity are correlated to generate the current simulation state data.
[0012] Optionally, the steps of analyzing protocol messages, current simulation state data, and object mapping tables to generate communication simulation results include: The protocol messages are parsed to determine the protocol type, device address, and data key value; The object number is determined by looking up the object in the object mapping table based on the protocol type, device address, and data key value. The engineering status value is determined based on the unified object number and the preset correspondence between engineering statuses; The simulated response message is determined based on the protocol type and engineering status value; The preset communication simulation device is controlled to send simulated response messages to the preset power consumption acquisition terminal to determine the message sending result; Associate protocol messages, current simulation status data, simulation response messages, and message sending results to generate communication simulation results.
[0013] Secondly, this application provides a communication simulation system for an electricity consumption data acquisition terminal, which adopts the following technical solution: A power consumption data acquisition terminal communication simulation system includes: The acquisition module is used to acquire the analog device type, analog communication protocol, and reception completion signal; A memory for storing a program for a communication simulation method for a power acquisition terminal as described in any of the preceding claims; The processor and the program in the memory can be loaded and executed by the processor to implement a power acquisition terminal communication simulation method as described in any of the above.
[0014] In summary, this application includes at least one of the following beneficial technical effects: 1. After analyzing the simulation device type and simulation communication protocol, an object mapping table is determined. The operation plan is then imported into the communication simulation device to determine the current simulation status data. This controls the communication simulation device to receive protocol messages sent by the power consumption acquisition terminal. After analyzing the protocol messages, the current simulation status data, and the object mapping table, the communication simulation results are obtained. The object mapping table maps the data items of each communication protocol to the same status source. Regardless of which communication protocol the power consumption acquisition terminal uses, the values are retrieved from the same device status. This effectively avoids the situation where the simulation device can only generate a response according to one communication protocol, which leads to a decrease in data consistency. This ensures that the reliability of the power consumption acquisition terminal is improved. 2. By determining the protocol type, data key value, and unified object number according to the protocol data item configuration table, an object mapping table is generated after associating the analog device type, protocol type, data key value, and unified object number. By determining the object mapping table, the data items of each communication protocol are uniformly mapped to the same state source. Regardless of which communication protocol the power acquisition terminal uses to read the data, the value is taken from the same device state, thus effectively avoiding the situation where the analog device can only generate a response according to one communication protocol, which leads to a decrease in data consistency. 3. By determining the operating condition segments according to the operation plan, and then associating the start time and end time of the operating condition to generate the operating condition segment time axis, the execution content of the operating condition segment is determined according to the target object, operating parameters and recovery method. Then, the operating condition segment time axis and the execution content of the operating condition segment are associated to generate the running time axis, thereby representing the communication simulation process in time sequence. The current running status data is periodically updated according to the running time axis and scan step size. When it is necessary to retest the existing abnormal operating condition, the simulation equipment can completely reproduce the abnormal operating condition through the running time axis, thereby effectively avoiding the situation where abnormal operating conditions or equipment failures are inconvenient to reproduce under the same test plan. Attached Figure Description
[0015] Figure 1 This is a flowchart of a communication simulation method for an electricity data acquisition terminal in an embodiment of this application.
[0016] Figure 2 This is a flowchart of the steps in this application embodiment to analyze the analog device type and analog communication protocol to determine the object mapping table.
[0017] Figure 3 This is a flowchart illustrating the steps in this application embodiment of importing a preset operating scheme into a preset communication simulation device to determine the current simulation state data.
[0018] Figure 4 This is a flowchart of the steps in this application embodiment to analyze the operation plan and generate the operation timeline.
[0019] Figure 5 This is a flowchart illustrating the steps in this application embodiment to analyze the running time axis and the preset scan step size to determine the current simulation state data.
[0020] Figure 6 This is a flowchart of the steps in this application embodiment to analyze the current simulation cycle, current operating parameters, and event duration to determine the current simulation state data.
[0021] Figure 7 This is a flowchart of the steps in this application embodiment to analyze protocol messages, current simulation state data, and object mapping tables to generate communication simulation results. Detailed Implementation
[0022] To make the purpose, technical solution, and advantages of this application clearer, the following description is provided in conjunction with the appendix. Figures 1 to 7 The present application will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the application.
[0023] This application discloses a communication simulation method for an electricity data acquisition terminal. Specifically, it discloses a communication simulation device, an electricity data acquisition terminal, and a processing terminal. The processing terminal is communicatively connected to both the communication simulation device and the electricity data acquisition terminal to achieve data interaction and control. After the processing terminal obtains the simulation device type and the simulation communication protocol, it analyzes the simulation device type and the simulation communication protocol to determine an object mapping table. After importing the operation plan into the communication simulation device, it determines the current simulation state data, thereby controlling the communication simulation device to receive protocol messages sent by the electricity data acquisition terminal. By analyzing the protocol messages, the current simulation state data, and the object mapping table, it obtains the communication simulation result. Thus, the object mapping table maps the data items of each communication protocol to the same state source. Regardless of which communication protocol the electricity data acquisition terminal uses to read the data, it retrieves the values from the same device state. This effectively avoids the situation where the simulation device can only generate a response according to one communication protocol, which leads to a decrease in data consistency. This ensures the improved reliability of the electricity data acquisition terminal operation.
[0024] Reference Figure 1 This application discloses a communication simulation method for an electricity consumption data acquisition terminal, comprising the following steps: Step S100: Obtain the analog device type and analog communication protocol.
[0025] The simulated device type refers to the type of device used for communication simulation, such as an electricity meter, photovoltaic inverter, water meter, or gas meter, which is pre-set by the operator. By determining the simulated device type, the communication protocols supported by that type can be determined, facilitating the subsequent determination of the object mapping table.
[0026] Analog communication protocols refer to the protocols used when electricity data acquisition terminals communicate with communication simulation devices. For example, water meters and gas meters use the CJ / T 188 protocol, while electricity meters use the DL / T 645-1997 protocol. These protocols are pre-set by operators according to the type of analog equipment. By determining the analog communication protocol, all potentially accessible data items within the protocol can be identified, facilitating the subsequent determination of the protocol data item configuration table.
[0027] Step S101: Analyze the analog device type and analog communication protocol to determine the object mapping table.
[0028] The object mapping table refers to a mapping table that maps data key values to unified object numbers. It is obtained by the processing terminal after analyzing the analog device type and analog communication protocol. For specific methods, please refer to... Figure 2 The steps are as follows. By determining the object mapping table, when the same simulation device sends the same request to the communication simulation device through different communication protocols, the value is taken from the same device status. This effectively avoids the situation where the simulation device can only generate a response according to one communication protocol, which leads to a decrease in data consistency. This, in turn, ensures the improvement of the reliability of the power consumption acquisition terminal.
[0029] Step S102: Import the preset operation plan into the preset communication simulation device to determine the current simulation status data.
[0030] The current simulation status data refers to the current engineering quantity status of the simulation equipment, which is obtained by the processing terminal after importing the operation plan into the communication simulation device. For specific methods, please refer to [link / reference needed]. Figure 3 The steps involve determining the current simulation status data and then periodically updating the current running status data according to the running time axis and scan step size. This effectively avoids situations where abnormal operating conditions or equipment failures are difficult to reproduce under the same test scheme, thereby ensuring the improved reliability of the power consumption data acquisition terminal.
[0031] In this step, the analog equipment refers to the analog equipment currently used by the communication analog device, such as an electricity meter or water meter. The specific model is set by the operator according to the actual situation.
[0032] An operation plan refers to the operational sequence of a communication simulation device during simulation. It includes normal operating conditions, abnormal operating conditions, equipment failure conditions, and control recovery conditions. Each operating condition corresponds to a different operating condition type and is stored by the operator in the processing terminal. By determining the operation plan, the current operating condition segment can be identified, facilitating the subsequent determination of the operating timeline.
[0033] A communication simulation device is a device used to simulate communication with an electricity consumption data acquisition terminal. The communication simulation device can simulate various intelligent power distribution devices, water meters, gas meters and other data acquisition and control devices in a distribution area, and interact with the electricity consumption data acquisition terminal through a communication protocol. It does not require the actual operation of the simulation device, and can automatically run the simulation function according to the set operation plan. At the same time, it can simulate abnormal operating conditions and equipment failures of different simulation devices. Taking an electricity meter as an example, it can simulate abnormal electricity consumption scenarios and failure scenarios such as voltage loss, voltage undervoltage, current overcurrent, metering failure or storage failure.
[0034] Step S103: Control the communication simulation device to receive the protocol message sent by the preset power consumption acquisition terminal and obtain the reception completion signal.
[0035] The control communication simulation device receives protocol messages sent by the power consumption acquisition terminal, and obtains a reception completion signal after the communication simulation device has finished receiving the messages, thereby determining that the communication simulation device has completed receiving the messages, so as to facilitate the subsequent determination of the communication simulation results.
[0036] A power consumption data acquisition terminal is a device responsible for collecting or sending control commands from electrical equipment. The specific model is determined by the operator based on the actual situation. The power consumption data acquisition terminal interacts with a communication simulation device and performs control through a communication protocol, thereby realizing the communication simulation method of the power consumption data acquisition terminal.
[0037] A protocol message refers to a binary data stream encoded and encapsulated by the power acquisition terminal according to the supported communication protocol. This stream is used to send a data interaction request to the communication simulation device, which then receives the protocol message from the power acquisition terminal. By controlling the communication simulation device to receive the protocol message from the power acquisition terminal, data interaction occurs between the power acquisition terminal and the communication simulation device, facilitating the subsequent determination of the communication simulation results.
[0038] The "reception completion signal" refers to the signal indicating that the communication simulation device has successfully received the protocol message. This signal is generated when the communication simulation device receives the protocol message from the power consumption data acquisition terminal and then sends the corresponding level signal to the processing terminal. By confirming the reception completion signal, it is determined that the communication simulation device has successfully received the request message from the power consumption data acquisition terminal, facilitating subsequent determination of the communication simulation results.
[0039] Step S104: Analyze the protocol message, current simulation status data, and object mapping table based on the reception completion signal to generate communication simulation results.
[0040] Upon receiving the reception completion signal, the processing terminal responds by analyzing the protocol message, current simulation state data, and object mapping table to generate the communication simulation result. The specific method is described in [reference needed]. Figure 7 The steps involve determining the communication simulation results to achieve communication simulation of the power consumption data acquisition terminal while ensuring data consistency. This effectively avoids the situation where the simulation device can only generate a response according to one communication protocol, which leads to reduced data consistency and thus ensures improved reliability of the power consumption data acquisition terminal.
[0041] Communication simulation results refer to the results obtained from the interaction between the power consumption data acquisition terminal and the communication simulation device. These results are derived by the processing terminal through analysis of protocol messages, current simulation status data, and object mapping tables. By analyzing the communication simulation results, it is possible to determine whether the communication simulation device's response to the power consumption data acquisition terminal's requests is correct, thereby improving the reliability of the power consumption data acquisition terminal's operation.
[0042] Reference Figure 2 The steps for analyzing analog device types and analog communication protocols to determine the object mapping table include: Step S200: Obtain the protocol data item configuration table according to the analog communication protocol.
[0043] The protocol data item configuration table records key information about all potentially accessible data items supported by the communication simulation device, including protocol type, data key value, and unified object number. The protocol type indicates which protocol the data item belongs to, the data key value is the unique identifier of the data item within the protocol (e.g., data identifier in DL / T645, object attribute identifier in DL / T 698.45, and data identifier in CJ / T 188), and the unified object number is a globally unique identifier within the simulation device. Regardless of the communication protocol used, data with the same physical meaning will be mapped to the same unified object number. This effectively avoids the situation where the simulation device can only generate a response according to one communication protocol, leading to reduced data consistency and thus ensuring improved reliability of the power acquisition terminal.
[0044] Step S201: Determine the protocol type, data key value, and unified object number based on the protocol data item configuration table.
[0045] The protocol type refers to the protocol type to which the data item in the protocol data item configuration table belongs. The processing terminal identifies and calls the protocol data item configuration table to facilitate the subsequent determination of the object mapping table.
[0046] Data key values refer to the unique identifiers of data items in the protocol data item configuration table, such as data identifiers in DL / T645, object attribute identifiers in DL / T 698.45, and data identifiers in CJ / T 188. These identifiers are identified and retrieved by the processing terminal from the protocol data item configuration table to facilitate the subsequent determination of the object mapping table.
[0047] A unified object number is a globally unique identifier within the simulation device, which is identified and retrieved by the processing terminal from the protocol data item configuration table. By determining the unified object number, regardless of the communication protocol used to access the data, as long as the data has the same physical meaning, it will be mapped to the same unified object number, facilitating the subsequent determination of the object mapping table.
[0048] Step S202: Associate the analog device type, protocol type, data key value, and unified object number to generate an object mapping table.
[0049] After determining the protocol type, data key value, and unified object number, the processing terminal associates the analog device type, protocol type, data key value, and unified object number to generate an object mapping table. By determining the object mapping table, data items from various communication protocols are uniformly mapped to the same state source. Regardless of which communication protocol the power consumption acquisition terminal uses to read the data, it retrieves the value from the same device state. This effectively avoids the situation where the analog device can only generate a response according to one communication protocol, leading to reduced data consistency, and thus ensures improved reliability of the power consumption acquisition terminal.
[0050] Reference Figure 3 The steps for importing the preset operating scheme into the preset communication simulation device to determine the current simulation state data include: Step S300: Import the running scheme into the communication simulation device and obtain the import completion signal.
[0051] The "import completion signal" refers to the signal indicating that the operation plan has been successfully imported into the communication simulation device. This signal is generated when the operator successfully imports the operation plan into the communication simulation device, which then sends a signal representing the import completion to the processing terminal. By confirming the import completion signal, it is determined that the operation plan has been successfully imported at the current moment, facilitating the subsequent determination of the operation timeline.
[0052] Step S301: Analyze the running scheme based on the import completion signal to generate the running time axis.
[0053] Upon receiving the import completion signal, the processing terminal responds by analyzing the operation plan and generating an operation timeline. By determining the operation timeline, the communication simulation process is represented in a time sequence. Based on the operation timeline and scan step size, the current operating status data is periodically updated, effectively avoiding situations where abnormal operating conditions or equipment failures are difficult to reproduce under the same test plan, thereby improving the reliability of the power consumption data acquisition terminal.
[0054] The runtime timeline refers to the timeline describing the execution time and content of the execution plan. It is obtained by the processing terminal after analyzing the execution plan. For specific methods, please refer to [link / reference needed]. Figure 4 The steps involve determining the running timeline to represent the communication simulation process in a time sequence, thereby effectively avoiding situations where abnormal operating conditions or equipment failures are difficult to reproduce under the same test scheme, and facilitating the subsequent determination of the current simulation state data.
[0055] Step S302: Analyze the running time axis and the preset scan step size to determine the current simulation state data.
[0056] After determining the runtime timeline, the processing terminal analyzes the runtime timeline and scan step size to determine the current simulation state data. The specific method is described in [reference needed]. Figure 5 This process involves periodically updating the current running status data based on the running time axis and scan step size, thereby effectively avoiding situations where abnormal operating conditions or equipment failure conditions are difficult to reproduce under the same test plan.
[0057] The scan step size refers to the time span for scanning the running time axis, which is set in advance by the operator. By determining the scan step size, the current operating condition segment can be determined, thus providing data support for subsequently determining the current simulation cycle.
[0058] Reference Figure 4 The steps for analyzing the operational plan to generate the operational timeline include: Step S400: Determine the operating condition segment based on the operating plan.
[0059] The operating condition segment refers to the type of operating condition the communication simulation device is in during simulation, such as normal operating condition segment, abnormal operating condition segment, equipment failure segment, and control recovery segment. Each operating condition segment corresponds to a different operating condition type. Each operating condition segment stores the start time, end time, target object, operating parameters, and recovery method preset by the operator, which are then identified and invoked by the processing terminal from the operating plan. By determining the operating condition segment, the operating condition segments included in the operating plan are determined, and thus the execution time and content of the operating condition segment are determined, facilitating the subsequent determination of the operating condition timeline and the operating condition execution content.
[0060] Step S401: Obtain the start time, end time, target, operating parameters, and recovery method of the operating condition segment.
[0061] The start time of the operating condition refers to the time when the operating condition segment begins to run, which is identified and invoked by the processing terminal from the operating condition segment.
[0062] The end time of the operating condition refers to the time when the operating condition segment ends, which is identified and called by the processing terminal from the operating condition segment.
[0063] The target of the action refers to the simulated equipment that executes the operating condition segment, such as an electricity meter or a photovoltaic inverter, which is identified and invoked by the processing terminal from the operating condition segment.
[0064] Operating parameters refer to the initial operating parameters of the operating condition segment, such as voltage, current, or charging power, which are identified and retrieved by the processing terminal from the operating condition segment.
[0065] The recovery method refers to how the simulated equipment returns to normal operation after an abnormal working condition or equipment failure occurs. For example, it can be timed recovery or recovery via control command. Timed recovery means automatic recovery at a preset time point, while recovery via control command means that the simulated device waits for the control command issued by the power consumption acquisition terminal to resolve the abnormality, and the processing terminal identifies and calls it from the operating condition segment.
[0066] By determining the start and end times of the operating condition, the operating time period of the operating condition segment is determined. The target object, operating parameters, and recovery method are the contents executed by the operating condition segment during operation. By associating the operating time and operating contents of the operating condition segment, the time axis of different operating condition segments is determined, and then the operating condition segments are represented in time sequence.
[0067] Step S402: Associate the start time and end time of the operating condition to generate the operating condition segment time axis.
[0068] The operating condition segment timeline refers to the timeline describing the operating condition segment, which is obtained by associating the start and end times of the operating condition with the processing terminal. By determining the operating condition segment timeline, the start and end times of different operating condition segments can be determined, facilitating the subsequent generation of the operating timeline.
[0069] Step S403: Determine the execution content of the working condition segment based on the target object, operating parameters, and recovery method.
[0070] The execution content of a working condition segment refers to the content that needs to be executed during the operation of different working condition segments. It is obtained by the processing terminal after associating the target object, operating parameters, and recovery method. By determining the execution content of the working condition segment, the content that needs to be executed during the operation of the current working condition segment can be determined, so as to facilitate the subsequent generation of the running timeline.
[0071] Step S404: Associate the time axis of the operating condition segment and the execution content of the operating condition segment to generate the running time axis.
[0072] After determining the execution content of the operating condition segment, the processing terminal associates the operating condition segment time axis with the execution content of the operating condition segment to obtain the running time axis, thereby representing the communication simulation process in time sequence. Based on the running time axis and the scan step size, the current running status data is updated periodically. When it is necessary to retest an existing abnormal operating condition, the simulation equipment can completely reproduce the abnormal operating condition through the running time axis, thereby effectively avoiding the situation where abnormal operating conditions or equipment failures are inconvenient to reproduce under the same test plan, and thus ensuring the effect of improving the reliability of the power consumption acquisition terminal.
[0073] Reference Figure 5 The steps for analyzing the runtime timeline and preset scan step size to determine the current simulation state data include: Step S500: Determine the current simulation cycle based on the running time axis and scan step size.
[0074] The current simulation cycle refers to the simulation cycle that has elapsed since the start of the simulation, determined by the scan step size. It is obtained by the processing terminal counting the number of scan steps that have passed along the running time axis. By determining the current simulation cycle, the current operating condition segment of the simulation can be determined, thus providing data support for subsequent determination of the current operating condition segment.
[0075] Step S501: Determine the current operating condition segment in the running time axis according to the current simulation cycle.
[0076] The current operating condition segment refers to the current operating condition segment, which is divided by the processing terminal in the running time axis according to the current simulation cycle, so as to determine which operating condition segment the current simulation cycle falls into, so as to determine the current operating parameters and event duration in the future.
[0077] Step S502: Determine the current operating parameters and event duration based on the current operating condition segment.
[0078] Among them, the current operating parameters refer to the operating parameters of the current operating condition segment, such as voltage, current and charging power, which are identified and retrieved by the processing terminal from the current operating condition segment.
[0079] The event duration refers to the time that the current operating condition segment has been running, which is read from the running time axis by the processing terminal according to the current simulation cycle.
[0080] By determining the current operating parameters and event duration, the execution status of the current operating segment can be determined, thereby providing data support for subsequently determining the current simulation status data.
[0081] Step S503: Analyze the current simulation cycle, current operating parameters, and event duration to determine the current simulation state data.
[0082] After determining the current operating parameters and event duration, the processing terminal analyzes the current simulation cycle, current operating parameters, and event duration to obtain the current simulation state data. The specific method is described in [reference needed]. Figure 6 This process involves representing the communication simulation process in a time sequence and periodically updating the current running status data according to the running time axis and scan step size. This effectively avoids situations where abnormal operating conditions or equipment failures are difficult to reproduce under the same test scheme, thereby improving the reliability of the power consumption acquisition terminal.
[0083] Reference Figure 6 The steps to determine the current simulation state data by analyzing the current simulation cycle, current operating parameters, and event duration include: Step S600: Determine whether the current running parameters and event duration meet the preset abnormal event triggering requirements.
[0084] The abnormal event triggering requirement refers to the requirement that both the current operating parameters and the event duration meet the triggering conditions. This requirement is pre-set by the operator. For example, if the abnormal event is an undervoltage event, assuming the current simulation cycle is k, the current operating parameters are the voltage of the k-th simulation cycle, and the event duration is the duration the current operating condition segment has been running for, then the abnormal event triggering requirement is that the voltage is less than the preset undervoltage threshold and the event duration is greater than the preset baseline undervoltage time. When both conditions are met, the undervoltage event is determined to have been triggered. By determining whether the current operating parameters and event duration both meet the abnormal event triggering requirements, it is determined whether the current operating condition is abnormal, which facilitates the subsequent determination of the current simulation status data.
[0085] Step S6001: If it does not meet the requirements, analyze the current operating parameters to determine the instantaneous physical quantity and the long-term cumulative quantity.
[0086] If the current operating parameters and event duration do not meet the requirements for triggering an abnormal event, it indicates that the current period is not within an abnormal operating condition. At this time, the processing terminal analyzes the current operating parameters based on the type of simulation equipment to obtain instantaneous physical quantities and long-term accumulated quantities. For example, if the simulation equipment is a three-phase energy meter, the communication simulation device updates the three-phase voltage, current, power factor, and active power in each simulation cycle. One simulation cycle, , , Three-phase active power can be expressed as , , ,in , , These represent the three-phase active power, , , They represent the first Three-phase voltage for one simulated cycle, , , They represent the first Three-phase current for one simulated cycle, , , They represent the first The three-phase power factor for each simulation cycle, where the three-phase voltage, three-phase current, and three-phase power factor are all derived from the operating parameters in the operating condition segment of the operating scheme, and the total active power equals the sum of the three-phase active power. The total active power and the three-phase active power are instantaneous physical quantities, and the cumulative electrical energy can be expressed as... ,in Indicates cumulative electrical energy. The cumulative electrical energy from the previous simulation cycle is read by the processing terminal from the operating parameters in the running time axis. Indicates total active power. This indicates the scan step size, and the accumulated electrical energy is the long-term cumulative amount.
[0087] Instantaneous physical quantities refer to the physical parameters exhibited by the simulation equipment at the current operating condition point in each simulation cycle, such as the three-phase voltage and total active power of a three-phase energy meter. They reflect the operating state of the simulation equipment at the current point in time, thereby providing data support for determining the current simulation state data.
[0088] Long-term cumulative quantity refers to the total quantity index of the simulation equipment accumulated based on instantaneous physical quantities, such as the cumulative electrical energy of a three-phase energy meter. It reflects the long-term operating status of the simulation equipment, thereby providing data support for determining the current simulation data.
[0089] Step S6002: Associate instantaneous physical quantities and long-term accumulated quantities to generate current simulation state data.
[0090] In this process, after determining the instantaneous physical quantity and the long-term accumulated quantity, the processing terminal associates the instantaneous physical quantity and the long-term accumulated quantity to generate the current simulation state data. This data is then stored when no abnormal operating conditions occur, so as to facilitate the subsequent generation of communication simulation results.
[0091] Step S60021: If the conditions are met, generate an abnormal event record based on the current operating parameters, the current simulation cycle, and the event duration, and generate the current simulation state data based on the abnormal event record.
[0092] If the current operating parameters and event duration meet the requirements for triggering an abnormal event, it indicates that the system is in an abnormal operating condition segment. At this time, the processing terminal generates an abnormal event record based on the current operating parameters, the current simulation cycle, and the event duration. Based on the abnormal event record, the terminal selects the operating parameters for the current operating condition segment to generate the current simulation state data. When it is necessary to retest an existing abnormal operating condition, the simulation equipment can completely reproduce the abnormal operating condition through the running time axis and the abnormal event record. This effectively avoids the situation where it is inconvenient to reproduce abnormal operating conditions or equipment failures under the same test plan, thereby ensuring the effectiveness of improving the reliability of the power consumption acquisition terminal.
[0093] An abnormal event log refers to the recorded content of abnormal events, such as current operating parameters, current simulation cycle, and event duration. It is generated by the processing terminal based on these parameters. By identifying abnormal event logs, when retesting existing abnormal operating conditions is required, the simulation equipment can fully reproduce the abnormal conditions using the operating timeline and the logs, thereby ensuring and improving the reliability of the power consumption data acquisition terminal.
[0094] Reference Figure 7 The steps for analyzing protocol messages, current simulation state data, and object mapping tables to generate communication simulation results include: Step S700: Parse the protocol message to determine the protocol type, device address, and data key value.
[0095] In this step, the protocol type is the same as that in step S201. The difference is that in this step, the protocol type is extracted by the processing terminal after parsing the protocol message. The processing terminal identifies the protocol type based on message characteristics such as communication port, message start character, control code, etc., and extracts the device address and data key value from the protocol message to facilitate the subsequent lookup of the unified object number in the object mapping table. This effectively avoids the situation where the simulation device can only generate a response according to one communication protocol, which leads to a decrease in data consistency, thereby ensuring the effectiveness of improving the reliability of the power acquisition terminal.
[0096] The device address is a logical code used by the power consumption data acquisition terminal to locate the simulated device during the communication simulation process. It is extracted by the processing terminal after parsing the protocol messages. By determining the device address, the simulated device that will communicate with the power consumption data acquisition terminal during the communication simulation can be identified, which facilitates the subsequent determination of a unified object number.
[0097] In this step, the data key value is the same as that in step S201. The difference is that in this step, the data key value is extracted by the processing terminal after parsing the protocol message. By determining the data key value, a unified object number can be determined through the object mapping table, thereby effectively avoiding the situation where the simulation device can only generate a response according to one communication protocol, which would lead to reduced data consistency.
[0098] Step S701: Search the object mapping table according to the protocol type, device address, and data key value to determine the unified object number.
[0099] In this step, the unified object number is the same as that in step S201. The difference is that in this step, the unified object number is obtained by the processing terminal by looking up the object mapping table based on the protocol type, device address, and data key value. By determining the unified object number, regardless of which communication protocol accesses the data, as long as it has the same physical meaning, it will be mapped to the same unified object number, which facilitates the subsequent determination of the object mapping table.
[0100] Step S702: Determine the engineering status value based on the unified object number and the preset engineering status correspondence.
[0101] The engineering status correspondence refers to the correspondence between the unified object number and the engineering status value. Operators create a mapping table by mapping the unified object number to the engineering status value one-to-one. First, the unified object number is determined based on the data key value. Then, the unified object number is mapped to the current simulated status data. Finally, the engineering status value is obtained through a preset conversion relationship between the actual engineering value and the protocol frame value. The conversion relationship processing steps are as follows: When the communication simulation device needs to return data to the power acquisition terminal, the processing terminal obtains the actual engineering value from the current simulated status data. Then, it subtracts the offset of the data item from the engineering value, divides it by the scaling factor, rounds the result according to the data precision specified in the protocol, and finally converts it into a protocol frame value using the protocol's encoding function. The offset is the fixed difference between the protocol frame value and the actual engineering value, preset by the operator. The scaling factor is the coefficient that needs to be multiplied when converting the protocol frame value in the protocol message to the actual engineering value, also preset by the operator.
[0102] The engineering status value refers to the value obtained after converting the actual engineering value that needs to be returned to the power consumption acquisition terminal into a protocol frame value. This value is retrieved by the processing terminal from a mapping table of engineering status correspondences based on a unified object number. By determining the engineering status value, the data that the communication simulation device needs to return to the power consumption acquisition terminal is determined, facilitating the subsequent determination of the simulated response message.
[0103] Step S703: Determine the simulated response message based on the protocol type and project status value.
[0104] The simulated response message refers to the communication message containing request data returned by the communication simulation device to the power consumption acquisition terminal in response to a request sent by the power consumption acquisition terminal. The processing terminal fills the data field of the simulated response message with the project status value and, according to the message rules of the protocol type, fills in the address field, control code, and data length, etc. By determining the simulated response message, the communication simulation device responds to the request sent by the power consumption acquisition terminal, facilitating the subsequent determination of the message transmission result.
[0105] Step S704: Control the preset communication simulation device to send the simulated response message to the preset power consumption acquisition terminal to determine the message sending result.
[0106] The message transmission result refers to the result of the communication simulation device sending a simulated response message to the power consumption data acquisition terminal. This result is obtained after the processing terminal controls the communication simulation device to send the simulated response message to the power consumption data acquisition terminal. By determining the message transmission result, it is possible to determine whether the communication simulation device successfully sent the message to the power consumption data acquisition device, so as to facilitate the subsequent determination of the communication simulation result.
[0107] The communication simulation device in this step is the same as the communication simulation device in step S102.
[0108] The power consumption data acquisition terminal in this step is the same as the power consumption data acquisition terminal in step S103.
[0109] Step S705: Associate the protocol message, current simulation status data, simulation response message, and message sending result to generate the communication simulation result.
[0110] The process involves processing the terminal-associated protocol message, current simulation status data, simulation response message, and message transmission result after determining the message transmission result. The protocol message determines the information the power consumption data acquisition terminal wants to receive; the current simulation status data determines the actual data status occurring in the current communication simulation device; the simulation response message determines the information returned by the communication simulation device to the power consumption data acquisition terminal; and the message transmission result determines whether the communication simulation device successfully sent the message to the power consumption data acquisition terminal. By analyzing the communication simulation result, the system can determine whether the communication simulation device's response to the power consumption data acquisition terminal's request is correct, thereby improving the reliability of the power consumption data acquisition terminal's operation.
[0111] Based on the same inventive concept, embodiments of this application provide a communication simulation system for an electricity consumption data acquisition terminal, comprising: The acquisition module is used to acquire the analog device type, analog communication protocol, reception completion signal, protocol data item configuration table, start time of operation, end time of operation, target object, operating parameters and recovery method; A memory used to store a program for a communication simulation method for a power acquisition terminal; The processor can load and execute programs in memory to implement a communication simulation method for power acquisition terminals.
[0112] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above 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. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0113] This application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and executed as a method for simulating communication of an electricity acquisition terminal.
[0114] Computer storage media include, for example, USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media that can store program code.
[0115] Based on the same inventive concept, embodiments of this application provide a smart terminal, including a memory and a processor, wherein the memory stores a computer program that can be loaded and executed by the processor to simulate a power acquisition terminal communication method.
[0116] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above 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. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0117] The above are all preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any feature disclosed in this specification (including the abstract and drawings) may be replaced by other equivalent or similar features unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is only one example of a series of equivalent or similar features.
Claims
1. A communication simulation method for a power consumption data acquisition terminal, characterized in that, include: Obtain the analog device type and analog communication protocol; Analyze the types of analog devices and analog communication protocols to determine the object mapping table; The preset operating scheme is imported into the preset communication simulation device to determine the current simulation status data; The control communication simulation device receives protocol messages sent by a preset power consumption acquisition terminal and obtains a reception completion signal; The protocol message, current simulation state data, and object mapping table are analyzed based on the reception completion signal to generate communication simulation results.
2. The communication simulation method for a power consumption data acquisition terminal according to claim 1, characterized in that, The steps for analyzing analog device types and analog communication protocols to determine the object mapping table include: Obtain the protocol data item configuration table according to the analog communication protocol; Determine the protocol type, data key value, and unified object number based on the protocol data item configuration table; Associate the analog device type, protocol type, data key value, and unified object number to generate an object mapping table.
3. The communication simulation method for a power consumption data acquisition terminal according to claim 1, characterized in that, The steps for importing a preset operating scheme into a preset communication simulation device to determine the current simulation status data include: Import the operating plan into the communication simulation device and obtain the import completion signal; The operation plan is analyzed based on the import completion signal to generate the operation timeline; The running time axis and preset scan step size are analyzed to determine the current simulation state data.
4. The communication simulation method for a power consumption data acquisition terminal according to claim 3, characterized in that, The steps for analyzing the execution plan to generate the execution timeline include: Determine the operating condition segment based on the operation plan; Obtain the start time, end time, affected object, operating parameters, and recovery method of the operating condition segment; Associate the start and end times of the operating condition to generate a timeline for the operating condition segment; The execution content of the working condition segment is determined based on the target object, operating parameters, and recovery method. Associate the timeline of the operating condition segment with the execution content of the operating condition segment to generate the running timeline.
5. The communication simulation method for a power consumption data acquisition terminal according to claim 3, characterized in that, The steps for analyzing the runtime timeline and preset scan step size to determine the current simulation state data include: The current simulation cycle is determined based on the running time axis and scan step size; Determine the current operating condition segment in the runtime timeline based on the current simulation cycle; Determine the current operating parameters and event duration based on the current operating condition segment; Analyze the current simulation cycle, current operating parameters, and event duration to determine the current simulation status data.
6. The communication simulation method for a power consumption acquisition terminal according to claim 5, characterized in that, The steps to analyze the current simulation cycle, current operating parameters, and event duration to determine the current simulation state data include: Determine whether the current running parameters and event duration meet the preset abnormal event triggering requirements; If the conditions are met, an abnormal event record is generated based on the current operating parameters, the current simulation cycle, and the event duration, and the current simulation status data is generated based on the abnormal event record. If not, the current operating parameters are analyzed to determine the instantaneous physical quantity and the long-term cumulative quantity; The instantaneous physical quantity and the long-term cumulative quantity are correlated to generate the current simulation state data.
7. The communication simulation method for a power consumption data acquisition terminal according to claim 1, characterized in that, The steps for analyzing protocol messages, current simulation state data, and object mapping tables to generate communication simulation results include: The protocol messages are parsed to determine the protocol type, device address, and data key value; The object number is determined by looking up the object in the object mapping table based on the protocol type, device address, and data key value. The engineering status value is determined based on the unified object number and the preset correspondence between engineering statuses; The simulated response message is determined based on the protocol type and engineering status value; The preset communication simulation device is controlled to send simulated response messages to the preset power consumption acquisition terminal to determine the message sending result; Associate protocol messages, current simulation status data, simulation response messages, and message sending results to generate communication simulation results.
8. A communication simulation system for a power consumption data acquisition terminal, characterized in that, include: The acquisition module is used to acquire the analog device type, analog communication protocol, and reception completion signal; A memory for storing a program for a communication simulation method for a power acquisition terminal as described in any one of claims 1 to 7; The processor and the program in the memory can be loaded and executed by the processor to implement the power acquisition terminal communication simulation method as described in any one of claims 1 to 7.