A memory management method for realizing remote reliable control of a power system

CN115576694BActive Publication Date: 2026-08-21NARI NANJING CONTROL SYSTEM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211317642.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2026-08-21
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

[0004]为解决现有技术的不足,本发明的目的在于提供一种实现电力系统远程可靠控制的内存管理方法,解决了现有技术中对遥控命令缺乏必要的校验和清零手段的问题

Benefits of technology

在不同的控制方式类型下实现可靠的校验方法。该方法在不同的遥控方式下,通过标志位的不同状态,实现校验和清零。通过对标志位的清零,防止因操作不当或者操作失败而重用内存中遗留的记录;通过对标志位的校验保证了遥控操作的正确性,解决多设备同时操作的校验唯一性检查。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115576694B_ABST
    Figure CN115576694B_ABST
Patent Text Reader

Abstract

The application discloses a memory management method for realizing remote reliable control of a power system, and comprises the following steps: applying for a control command memory yk_command to an operating system, zeroing and initializing the control command memory, wherein the control command memory yk_command comprises the number of control instructions count, information memory yk_struct[] and check memory yk_check[], receiving and judging the legality of a remote control command, writing the received remote control command into the information memory yk_struct[] based on the legal remote control command, executing corresponding operations by a terminal device based on the type of the remote control command, checking based on the execution result of the terminal device, and outputting a check result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a memory management method for realizing remote and reliable control of power systems, belonging to the field of power system memory management technology. Background Technology

[0002] With the continuous development of the power internet and unmanned substations, the stability requirements for remote control are becoming higher. As an important support system for enterprises and even society, the stable operation of the power system is a basic requirement for enterprise management.

[0003] For safety reasons, remote control operation using electronic devices is employed. In larger enterprises or factories with numerous devices, multiple devices may operate simultaneously. Ensuring the correctness of these operations while maintaining simultaneous operation is crucial to prevent confusion and accidents caused by overlapping or conflicting actions. Incorrect operation can lead to significant losses and even personal injury, making accuracy paramount and placing higher demands on remote operation. Currently, remote control commands are categorized as: remote preset, remote execute, and remote cancel. Typically, remote execute is only sent after successful remote preset verification. Existing technology lacks a confirmation mechanism; executing remote commands without verifying presets can easily lead to accidents. Furthermore, failure to promptly clear remote commands from memory can leave records, which, if mishandled, may mistakenly invoke previously stored commands, affecting the current operation. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the present invention aims to provide a memory management method for realizing remote and reliable control of power systems, thereby solving the problem of the lack of necessary verification and clearing methods for remote control commands in existing technologies.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: A memory management method for realizing remote and reliable control of a power system includes the following steps: Request control command memory yk_command from the operating system. Control command memory yk_command includes information memory yk_struct for storing information about each control object and check memory yk_check for storing check information for each channel. Receive remote control commands and verify their validity; Write valid remote control commands into the information memory yk_struct; If the valid remote control command type is not a remote control preset, the information in the information memory yk_struct is sent to the terminal device; otherwise, the information in the information memory yk_struct is sent to the terminal device and some information is written to the verification memory yk_check. The receiving terminal device returns the remote control preset information result_info based on the information memory yk_struct, and uses the information in yk_check to verify the reliability of result_info.

[0006] Furthermore, the aforementioned method for determining the legality of remote control commands is as follows: If a remote control command simultaneously satisfies the following conditions: type is valid, keyid is greater than 0, order is greater than 0, value is 0 or 1, and chan_no is greater than 0, then the remote control command is considered valid; otherwise, the remote control command is considered invalid. The remote control command includes type, keyid, order, value, and chan_no. The type represents the type of remote control. If it is remote control preset, remote control execution, or remote control cancellation, it is considered valid; otherwise, it is considered invalid. keyid defines the ID of the object being operated on, ensuring the object's uniqueness. A value greater than 0 is considered valid, otherwise it is considered invalid. The order represents the sequence number of the operation; a value greater than 0 indicates a valid operation, otherwise it is considered invalid. value represents the remote control value. A value of 0 or 1 is considered valid, and otherwise it is considered invalid. chan_no represents the channel number to which the current signal belongs.

[0007] Furthermore, the aforementioned step of writing a valid remote control command into the information memory yk_struct includes: Organize the valid remote control commands into a yk_struct structure. The yk_struct structure includes exist, type, keyid, order, value, and chan_no. Exist is 0, which means that the memory is not used. Exist is 1, which means that the memory has been owned by the object. Exist is 2, which means that the memory needs to be verified. Check if count in yk_command memory is less than MAX_YK_NUM. If so, start from count+1, write yk_struct messages sequentially into yk_struct[count+1] memory, set exist in yk_struct[count+1] to 1, and increment count by 1. Otherwise, discard the instructions and exit. MAX_YK_NUM is the maximum number of control objects in yk_struct, and count is the number of control instructions in yk_command.

[0008] Furthermore, the aforementioned step of sending the information in the information memory yk_struct to the terminal device if the valid remote control command type is not a remote control preset includes: Set the exist value in yk_struct[count+1] to 0, and send the remote control command to the terminal device in the form of a protocol message; The terminal device executes the corresponding operation according to the remote control command.

[0009] Furthermore, if the aforementioned valid remote control command type is a remote control preset, the steps of sending the information in the information memory yk_struct to the terminal device while simultaneously writing some information into the verification memory yk_check include: Save the information in the yk_struct memory queue to a temporary cache buff, which includes exist, type, keyid, order, value, and chan_no. If the chan_no in the buff is greater than MAX_CHAN_NUM, then discard the buff information; otherwise, adjust the exist flag of the buff to 2. MAX_CHAN_NUM is the maximum number of channels in yk_check. All information of the adjusted buff is pre-loaded into the yk_check[chan_no] memory queue, and the buff information is sent to the terminal device.

[0010] Furthermore, the aforementioned steps for verifying the reliability of the information in result_info and yk_check[] are as follows: The terminal device feeds back result_info, which includes the channel number chan_no, the point number offset, the remote control value extend, and the preset result result; Read the preset messages from the yk_check[chan_no] memory queue into the buffer; If the following conditions are met simultaneously: the exist flag of the buff is 2, the offset is consistent with the order value in the cached buff, the extend value is consistent with the value in the buff, and the result_info returns a preset result value of 1, then set the exist flag of yk_check[chan_no] to 0 to indicate that the preset result result is successful; otherwise, set the exist flag of yk_check[chan_no] to 0 to indicate that the preset result result is unsuccessful. The preset result is sent to the operation interface. If the result is successful, a remote execution or cancellation command is issued; if the result is unsuccessful, a remote cancellation or new remote preset command is issued.

[0011] The beneficial effects achieved by this invention are as follows: A reliable verification method is implemented under different control modes. This method achieves verification and clearing through different flag states under different remote control modes. Clearing the flag prevents the reuse of records left in memory due to improper operation or operation failure; verifying the flag ensures the correctness of remote control operations and solves the uniqueness check problem when multiple devices are operating simultaneously. Attached Figure Description

[0012] Figure 1 This is the overall flowchart of the memory management method of the present invention; Figure 2 This is a memory structure diagram of the memory management method of the present invention; Figure 3 This is a flowchart of the remote control preset, recalibration, and remote control execution process of the present invention. Detailed Implementation

[0013] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments and specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations thereof. In the absence of conflict, the embodiments and technical features in the embodiments can be combined with each other.

[0014] This embodiment discloses a memory management method for achieving reliable remote control of a power system, such as... Figure 1 As shown, the steps include: Step 1: Initialize memory to zero.

[0015] Step 1.1: Request a complete shared memory segment from the operating system to store instruction information, denoted as control command memory (represented by yk_command), such as... Figure 2 As shown, the memory segment for control commands includes the number of control commands (recording the current total number of control objects, denoted as count), information memory, and verification memory. Information memory stores information for each control object (denoted as yk_struct, with a maximum number of control objects of MAX_YK_NUM), and verification memory stores verification information for each channel (denoted as yk_check, with a maximum number of channels of MAX_CHAN_NUM). Both information memory yk_struct and verification memory yk_check contain six members: exist, type, keyid, order, value, and chan_no. Step 1.2: Zero out memory. Initialize the successfully allocated memory segment. Set the count of control commands in the control command memory yk_command to 0. Initialize the exist, type, keyid, order, value, and chan_no in the information memory yk_struct and the verification memory yk_check to 0, -1, -1, -1, -1, -1, respectively.

[0016] Step 1.3: Define constants and rules to specify the validity of numerical values: A value of 0 indicates that the memory is not in use, a value of 1 indicates that the memory has been owned by an object, and a value of 2 indicates that the memory needs to be verified. The type represents the operation type, which is divided into remote preset, remote execution, and remote cancellation. Other types are considered invalid. keyid defines the ID of the object being operated on, ensuring the object's uniqueness; a value greater than 0 is considered valid. The order number represents the sequence number of the operation; a value greater than 0 indicates that the operation is valid. The value represents the remote control value, which has only two types: split (value is 0) and combined (value is 1). Other values ​​are considered invalid. chan_no represents the channel number to which the current signal belongs. Only one check buff information is stored for each channel. The remote control command structure contains five members: keyid, type, order, value, and chan_no.

[0017] `result` represents the preset result returned by the terminal; 0 indicates failure, and 1 indicates success. Step 2: Determine the validity of the remote control command.

[0018] Step 2.1: Wait for the remote control command; Step 2.2: Receive the remote control preset command sent by the graphical interface (only preset commands can be sent the first time); Step 2.3: Parse the command content and determine its validity: if keyid is greater than 0, type is remote preset, remote execution, or remote cancellation, order is greater than 0, value is 0 or 1, and chan_no is greater than 0, the command is considered valid. Step 2.4: If the command is valid, proceed to the next step; otherwise, proceed to step 2.1 and continue waiting for a valid remote control command.

[0019] Step 3: Write the received valid remote control commands into the control command memory array yk_struct[ ].

[0020] Step 3.1: Organize the valid commands into a yk_struct structure.

[0021] Step 3.2: Determine if the count in memory for yk_command is less than the maximum number of control objects, MAX_YK_NUM. If not, stop writing, discard the instruction, and exit; if yes, continue to the next step. Step 3.3: Starting from count+1, write the yk_struct messages sequentially into the memory of yk_struct[count+1], set exist in yk_struct[count+1] to 1, and increment the count value by 1; Step 3.4: Determine if the type of the valid command in Step 3.1 is a remote control preset. If yes, proceed to Step 4; otherwise, set the exist value in yk_struct[count+1] to 0 and proceed to Step 5.

[0022] Step 4: Write the remote control preset command into the yk_check[] array of the verification memory.

[0023] Step 4.1: Read the preset instruction (read one) information that was written to the yk_struct[ ] memory queue in step 3.3 into the temporary cache buff. The buff information contains 6 members: exist, type, keyid, order, value, and chan_no. Step 4.2: Determine if the chan_no in the buff is greater than MAX_CHAN_NUM. If yes, discard the buff information, do not write it to memory, and exit; otherwise, continue to the next step. Step 4.3: Set the exist flag of the buff to 2 for verification, and leave other member values ​​unchanged; Step 4.4: Write the buff information into the memory queue of yk_check[chan_no]; Step 4.5: Send the buff information to the specific terminal device in the form of a protocol.

[0024] Step 5: Send the remote execution and cancellation commands to the substation-side equipment or terminal in the form of protocol messages.

[0025] Step 5.1: Read the valid execution or cancellation information of yk_struct from Step 3.4; Step 5.2: Distribute the information to the specific terminal device through the protocol; Step 5.3: The terminal device executes the corresponding operation according to the execute or cancel command, the process ends, and it exits.

[0026] Step 6: Read and process the results returned by the remote control preset.

[0027] Step 6.1: Parse the remote control preset information result_info returned by the terminal device through the protocol, including channel number chan_no, point number offset, remote control value extend, and preset result result; Step 6.2: Based on the returned chan_no, read the preset message from the yk_check[chan_no] memory queue in step 4.4 into the temporary buffer buff, which contains 6 member information such as exist and chan_no; Step 6.3: Check if the exist flag value of the buff is 2 (to prevent the exist value from changing due to other abnormal reasons, such as memory crashes or abnormal modifications by other programs, this second check is to further ensure correctness). If not, it means that there is no signal that needs to be checked in the channel, and continue to step 6.6; if yes, continue to step 6.4; Step 6.4: Compare the order and value of the buff with the offset and extend values ​​in the preset return result_info. If they are inconsistent, the verification object is incorrect, and continue to step 6.6; if they are consistent, the verification object is successful, set the exist of yk_check[chan_no] to 0, and check if the result value in the preset return result_info is 1. If not, the verification failed, and continue to step 6.6; if yes, the verification was successful, and proceed to step 6.5. Step 6.5: Send a message indicating successful preset to the graphical interface, and send a remote execution or cancellation message to continue to step 2; Step 6.6: Set the exist of yk_check[chan_no] to 0. If the preset fails, send a message to the graphical interface indicating that the preset has failed. Send a remote preset or cancel message and continue to step 2.

[0028] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A memory management method for realizing remote and reliable control of a power system, characterized in that, Includes the following steps: The system requests control command memory yk_command from the operating system. The control command memory yk_command includes information memory yk_struct for storing information about each control object and check memory yk_check for storing check information about each channel. Receive remote control commands and determine their validity; Write valid remote control commands into the information memory yk_struct; If the valid remote control command type is not a remote control preset, the information in the information memory yk_struct will be sent to the terminal device. If the valid remote control command type is remote control preset, then the information in the information memory yk_struct is sent to the terminal device, and all information is written to the verification memory yk_check, specifically including: The information in the yk_struct memory queue is saved to a temporary cache buff, which includes exist, type, keyid, order, value, and chan_no; the type represents the remote control type, the keyid defines the ID of the operation object, the order represents the sequence number of the operation, the value represents the remote control value, and the chan_no represents the channel number to which the current signal belongs; exist = 0 indicates that the memory is not used, 1 indicates that the memory has been owned by the object, and 2 indicates that the memory needs to be verified; If the chan_no in the buff is greater than MAX_CHAN_NUM, then discard the buff information; otherwise, adjust the exist flag of the buff to 2. MAX_CHAN_NUM is the maximum number of channels in yk_check. All the adjusted buff information is pre-loaded into the yk_check[chan_no] memory queue, and the buff information is sent to the terminal device; The receiving terminal device returns the remote control preset information result_info based on the information memory yk_struct, and uses the information in yk_check to perform reliability verification on result_info.

2. The memory management method for realizing remote reliable control of a power system according to claim 1, characterized in that, The method for determining the legality of remote control commands is as follows: If a remote control command simultaneously satisfies the following conditions: type is valid, keyid is greater than 0, order is greater than 0, value is 0 or 1, and chan_no is greater than 0, then the remote control command is considered valid; otherwise, the remote control command is considered invalid. The remote control command includes type, keyid, order, value, and chan_no. The "type" represents the remote control type. If it is remote control preset, remote control execution, or remote control cancellation, it is considered valid; otherwise, it is considered invalid. The keyid defines the ID of the operation object to ensure the object's uniqueness. A value greater than 0 is considered valid, otherwise it is considered invalid. The order represents the sequence number of the operation; a value greater than 0 is considered valid, otherwise it is considered invalid. The value represents the remote control value, which is either 0 or 1. A value of 0 or 1 is considered valid, and otherwise it is considered invalid. The chan_no represents the channel number to which the current signal belongs.

3. The memory management method for realizing remote reliable control of a power system according to claim 2, characterized in that, The steps of writing valid remote control commands into the information memory yk_struct include: Organize the valid remote control commands into a yk_struct structure. The yk_struct structure includes exist, type, keyid, order, value, and chan_no. Exist is 0 to indicate that the memory is not used, 1 to indicate that the memory has been owned by the object, and 2 to indicate that the memory needs to be verified. Determine if the count in the memory of yk_command is less than MAX_YK_NUM. If so, starting from count+1, sequentially write the yk_struct messages into the memory of yk_struct[count+1], set the exist in yk_struct[count+1] to 1, and increment the count value by 1. Otherwise, discard the instructions and exit. MAX_YK_NUM is the maximum number of control objects in yk_struct, and count is the number of control instructions in yk_command.

4. The memory management method for realizing remote reliable control of a power system according to claim 3, characterized in that, If the valid remote control command type is not a remote control preset, the step of sending the information in the information memory yk_struct to the terminal device includes: Set the exist in yk_struct[count+1] to 0, and send the remote control command to the terminal device in the form of a protocol message; The terminal device executes the corresponding operation according to the remote control command.

5. A memory management method for realizing remote reliable control of a power system according to claim 1, characterized in that, The steps for performing reliability verification on the information in result_info and yk_check[] are as follows: The terminal device feeds back result_info, which includes the channel number chan_no, the point number offset, the remote control value extend, and the preset result result; Read the preset messages from the yk_check[chan_no] memory queue into the buffer; If the following conditions are met simultaneously: the exist flag of the buff is 2, the offset is consistent with the order value in the cached buff, the extend value is consistent with the value in the buff, and the result_info returns a preset result value of 1, then set the exist flag of yk_check[chan_no] to 0 to indicate that the preset result result is successful; otherwise, set the exist flag of yk_check[chan_no] to 0 to indicate that the preset result result is unsuccessful. The preset result is sent to the operation interface. If the result is successful, a remote execution or cancellation command is issued; if the result is unsuccessful, a remote cancellation or new remote preset command is issued.

Citation Information

Patent Citations

  • Substation 10KV outlet switch remote control method

    CN103178613A

  • Remote control method for switch in transformer substation of distribution network automation master station

    CN111899501A