Memory pool configuration method, system, electronic device and computer program product

By constructing a virtual relay protection device to extend the memory pool nodes in a virtual communication environment, obtaining memory block information, and actively adjusting the memory pool configuration, the problem of low memory pool configuration efficiency of relay protection devices is solved, and efficient memory pool management is achieved.

CN120029759BActive Publication Date: 2025-11-21CYG SUNRI CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411994395.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-11-21
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

The existing methods for configuring memory pools in relay protection equipment are rather passive, requiring collaboration among multiple departments, resulting in high personnel costs and low efficiency. They also cannot effectively address the memory fragmentation problem caused by differences in message length under the MMS protocol.

Method used

A virtual version of the relay protection device is constructed. In the virtual communication environment, the memory pool nodes are expanded to obtain information on the capacity, type, and quantity of memory blocks. Based on this information, the memory pool configuration of the relay protection device is proactively adjusted, avoiding the need for on-site reconfiguration.

Benefits of technology

It achieves proactive optimization of the memory pool, reducing personnel and time costs, improving configuration efficiency, and avoiding communication efficiency reduction caused by memory fragmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120029759B_ABST
    Figure CN120029759B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of electric power, and provides a memory pool configuration method, system, electronic device and computer program product, wherein the method comprises the following steps: a first virtual relay protection device of a relay protection device is constructed; in a virtual communication environment, the number of memory pool nodes of the first virtual relay protection device is expanded from a first number to a second number based on the required storage space capacity size of power interaction data in communication; based on the second number of memory pool nodes, the capacity size types of memory blocks contained in all memory pool nodes in the virtual memory pool of the first virtual relay protection device are obtained, and the number of memory blocks of each capacity size type is obtained; based on the obtained information, the number of memory pool nodes of the relay protection device is adjusted to a third number, and a target number of memory blocks of the same capacity size type are configured for each memory pool node. The scheme can realize active optimization of memory pool configuration, reduce personnel cost, and improve memory pool configuration efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of power technology, and in particular relates to a memory pool configuration method, system, electronic device and computer program product. Background Technology

[0002] Relay protection devices are used to protect the safe operation of power equipment. When applied to the station control layer of the International Electrotechnical Commission (IEC) 61850 standard, relay protection devices employ the Manufacturing Message Specification (MMS) protocol. To address the memory fragmentation issue caused by variations in message length under the MMS protocol, a memory pool is configured for the relay protection devices.

[0003] Before relay protection equipment leaves the factory, a memory pool is usually configured for it. Due to the large number of relay protection equipment models and their varying memory requirements, in some cases, it is necessary to reconfigure the memory pool. The typical procedure is as follows: when on-site maintenance or operation personnel discover poor equipment performance, they notify the engineering technicians responsible for handling the incident to collect information on the capacity and quantity of memory blocks in the memory pool. Then, R&D personnel adjust the number and configuration of memory pool nodes based on this information, resulting in an adjusted memory pool configuration. Finally, engineering technicians reconfigure the memory pool on-site according to the adjusted configuration.

[0004] The above-mentioned method for adjusting memory pool configuration is rather passive, requires collaboration among multiple departments, has high personnel costs, and is inefficient. Summary of the Invention

[0005] This application provides a memory pool configuration method, system, electronic device, and computer program product to solve the problems of existing memory pool configuration methods being relatively passive, requiring multi-departmental collaboration, resulting in high personnel costs and low efficiency.

[0006] The first aspect of this application provides a memory pool configuration method, including:

[0007] A first virtual relay protection device is constructed; both the first virtual relay protection device and the actual relay protection device have corresponding memory pools, and the memory pools contain memory blocks of different sizes and types.

[0008] In a virtual communication environment, based on the storage space required for the power interaction data in the communication, the number of memory pool nodes of the first virtual relay protection device is expanded from a first number to a second number; each memory pool node contains multiple memory blocks of the same size.

[0009] Based on the second number of memory pool nodes, obtain the capacity size types of memory blocks contained in all memory pool nodes in the virtual memory pool of the first virtual relay protection device, and the number of memory blocks of each capacity size type;

[0010] Based on all the capacity size types in the virtual memory pool and the number of memory blocks of each capacity size type, the memory pool nodes of the relay protection device are adjusted to a third number, and a target number of memory blocks of the same capacity size type are configured for each memory pool node; different memory pool nodes in the relay protection device correspond to different capacity size types, and the third number is greater than or equal to the number of all the capacity size types in the virtual memory pool.

[0011] A second aspect of this application provides a memory pool configuration system, including:

[0012] A construction module is used to construct a first virtual relay protection device for the relay protection device; both the first virtual relay protection device and the relay protection device have a corresponding memory pool, and the memory pool contains memory blocks of different sizes and types;

[0013] An expansion module is used to expand the number of memory pool nodes of the first virtual relay protection device from a first number to a second number in a virtual communication environment, based on the storage space capacity required for the power interaction data in the communication; each memory pool node contains multiple memory blocks of the same size.

[0014] The acquisition module is used to acquire, based on the second number of memory pool nodes, the capacity size types of memory blocks contained in all memory pool nodes in the virtual memory pool of the first virtual relay protection device, and the number of memory blocks of each capacity size type;

[0015] An adjustment module is used to adjust the memory pool nodes of the relay protection device to a third number based on all the capacity size types in the virtual memory pool and the number of memory blocks of each capacity size type, and to configure a target number of memory blocks of the same capacity size type for each memory pool node; different memory pool nodes in the relay protection device correspond to different capacity size types, and the third number is greater than or equal to the number of all the capacity size types in the virtual memory pool.

[0016] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described in the first aspect.

[0017] A fourth aspect of this application provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the method as described in the first aspect.

[0018] A fifth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.

[0019] As can be seen from the above, this application constructs a first virtual relay protection device. In a virtual communication environment, the memory pool nodes of the first virtual relay protection device are expanded according to the storage space capacity required for power interaction data. When the number of memory pool nodes is expanded to a second number, the capacity types and the number of memory blocks of each capacity type in all memory pool nodes of the virtual memory pool of the first virtual relay protection device are obtained. Based on this, the number of memory pool nodes of the relay protection device is adjusted to a third number, and a target number of memory blocks of the same capacity type are configured for each memory pool node. This application introduces virtual devices and a virtual communication environment. By running the virtual device in the virtual communication environment for expansion, the capacity and quantity information of memory blocks used for memory pool reconfiguration are successfully obtained. Based on this information, the memory pool of the relay protection device is directly reconfigured, achieving proactive optimization without the need for multi-department collaboration, greatly reducing personnel and time costs, and improving the configuration efficiency of the memory pool. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of an initial memory pool configuration provided in an embodiment of this application;

[0022] Figure 2 This is a schematic diagram illustrating the configuration of an extended memory pool provided in an embodiment of this application;

[0023] Figure 3This is a flowchart of a memory pool configuration method provided in an embodiment of this application;

[0024] Figure 4 This is a structural diagram of a memory pool configuration system provided in an embodiment of this application;

[0025] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0026] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0027] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0028] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0029] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0030] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."

[0031] In specific implementations, the terminals described in the embodiments of this application include, but are not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with touch-sensitive surfaces (e.g., touchscreen displays and / or touchpads).

[0032] The following discussion describes terminals that include displays and touch-sensitive surfaces. However, it should be understood that terminals may include one or more other physical user interface devices such as physical keyboards, mice, and / or joysticks.

[0033] The terminal supports a variety of applications, such as one or more of the following: drawing applications, presentation applications, word processing applications, website creation applications, disc burning applications, spreadsheet applications, game applications, telephone applications, video conferencing applications, email applications, instant messaging applications, exercise support applications, photo management applications, digital camera applications, digital camcorder applications, web browsing applications, digital music player applications, and / or digital video player applications.

[0034] Various applications that can run on a terminal can use at least one common physical user interface device, such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and the corresponding information displayed on the terminal can be adjusted and / or changed between and / or within applications. In this way, the terminal's common physical architecture (e.g., the touch-sensitive surface) can support various applications with user interfaces that are intuitive and transparent to the user.

[0035] It should be understood that the sequence number of each step in this embodiment does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of this application embodiment.

[0036] Relay protection devices use the MMS protocol, under which the transmitted messages vary greatly in length, ranging from tens of bytes to tens of thousands of bytes. Therefore, configuring a memory pool for relay protection devices can solve the problem of memory fragmentation caused by the variation in message length.

[0037] Currently, before relay protection equipment leaves the factory, an initial memory pool is typically configured for it, and this memory pool is managed using a linked list structure. The initial memory pool under the linked list structure is as follows: Figure 1 As shown, Figure 1 This is a schematic diagram of the configuration of an initial memory pool provided in an embodiment of this application.

[0038] according to Figure 1 As can be seen, the initial memory pool in this example is configured with 24 memory pool nodes. Each memory pool node has information such as memory block capacity and number of memory blocks. The memory block sizes at the same node are all the same. Memory pool nodes with smaller memory block capacities are listed first, and memory pool nodes with larger memory block capacities are listed later.

[0039] Figure 1 Only memory pool nodes 1, 5, 18, 19, 23, and 24 are shown, with memory block capacities of 32 bytes, 64 bytes, 1000 bytes, 2000 bytes, 100000 bytes, and 400000 bytes, respectively, and the number of memory blocks is 255, 255, 255, 255, 5, and 5, respectively.

[0040] To facilitate the differentiation of different memory blocks, Figure 1 and the following Figure 2 Different memory blocks are described using the format "memory block a_b". Here, 'a' is the size of the memory block, and 'b' is the number of the memory block among the multiple memory blocks corresponding to the current memory pool node. Both 'a' and 'b' are positive integers.

[0041] When storing power interaction data (such as voltage and current) into the initial memory pool, the required storage space capacity for the power interaction data is compared sequentially with the memory block capacity corresponding to the memory pool nodes. This involves vertically traversing the memory pool nodes to find the memory pool node with the memory block capacity matching the required storage space. After determining the corresponding memory pool node, if a free memory block exists, it can be directly located horizontally to realize the storage of the power interaction data.

[0042] During communication, relay protection devices frequently interact with both clients and power equipment, resulting in massive amounts of power interaction data. When the memory blocks in the memory pool cannot meet the storage requirements, the power interaction data cannot be stored. In this case, the relay protection device's memory pool is expanded. Expansion involves adding new memory pool nodes to the initial memory pool and adding a certain number of memory blocks of the required capacity to each new node. For example... Figure 2 As shown, Figure 2 This is a schematic diagram illustrating the configuration of an extended memory pool according to an embodiment of this application. The extended memory pool includes the memory pool nodes and memory blocks of the original initial memory pool, as well as the newly added memory pool nodes and memory blocks after the expansion.

[0043] By comparing the memory pool nodes, it can be seen that the expansion has added a significant number of nodes and memory blocks, with the memory pool nodes increasing from 24 to 121. (Due to space limitations...) Figure 2Not all new content is shown; only a portion is shown. Figure 2 The content in bold italics represents the nodes and memory blocks added during the runtime process. Figure 2 Memory pool nodes 2, 51, 91, and 93 are the newly added memory pool nodes shown, and the memory blocks corresponding to these memory pool nodes are the newly added memory blocks.

[0044] New memory blocks are sorted along with the initial memory blocks according to their capacity. When using an expanded memory pool, the linked list needs to be traversed vertically to compare capacities and find memory blocks of suitable size. An increase in the number of nodes in the memory pool means an increase in the number of nodes in the linked list. MMS messages use the Open System Interconnection (OSI) seven-layer network protocol; therefore, relay protection devices have multiple layers of nesting when processing messages. If the vertical linked list of the memory pool increases, it will significantly extend the processing time, leading to reduced efficiency, manifested as a noticeable slowdown in the speed at which the relay protection device sends messages to the client.

[0045] The process involves vertically traversing each node and comparing its capacity to the memory requirement of the current storage space. If the capacity does not match the current memory requirement, the next node in the vertical column is found. As the number of nodes in the memory pool increases, the traversal time increases, and the communication efficiency decreases accordingly.

[0046] To improve communication efficiency, it is necessary to reconfigure the memory pool of the relay protection device. However, the memory pool configuration method mentioned in the background is relatively passive. The memory pool is reconfigured only after the communication efficiency has decreased, which is lagging. It involves a large number of people, requires multi-departmental collaboration, has high personnel costs, and low configuration efficiency.

[0047] Therefore, this application provides a memory pool configuration method, system, electronic device, and computer program product to solve the above problems.

[0048] To illustrate the technical solution described in this application, specific embodiments are provided below.

[0049] See Figure 3 , Figure 3 This is a flowchart illustrating a memory pool configuration method provided in an embodiment of this application. Figure 3 As shown, a memory pool configuration method includes the following steps:

[0050] Step 301: Construct a first virtual relay protection device; both the first virtual relay protection device and the actual relay protection device have a corresponding memory pool, and the memory pool contains memory blocks of different sizes and types.

[0051] In some embodiments, a virtual relay protection device and a virtual communication environment are constructed using a Protection Device Simulate Operation Platform (PDSOP). The PDSOP platform is a Windows or Linux architecture software platform built using the C++ language. The memory pool configuration method described in this application can be implemented in a Windows or Linux operating system equipped with the PDSOP platform.

[0052] In some embodiments, constructing the first virtual relay protection device includes: constructing a second virtual relay protection device based on the device configuration information of the relay protection device; both the second virtual relay protection device and the relay protection device correspond to the memory pool, the memory pool containing memory blocks of different sizes and types; resetting the second virtual relay protection device to its factory state to obtain the first virtual relay protection device.

[0053] The device configuration information includes the engineering source files, compilation parameters, and data item configuration information of the relay protection device.

[0054] The project source files include communication signal points and memory pool configuration information for the relay protection equipment. The memory pool configuration information for the relay protection equipment includes the memory pool nodes, the capacity type of each memory pool node, and the number of memory blocks. The communication signal points of the relay protection equipment include input signal points and output signal points, used to describe the signal receiving and transmitting functions of the relay protection equipment. The function of the input signal points is to convert external signals into electrical signals that the relay protection equipment can process. The function of the output signal points is to convert the processing results of the relay protection equipment into signals that external devices can recognize, thereby realizing the protection and control of the power system.

[0055] The compilation parameters specify the libraries that the relay protection device will call during operation. Including these as part of the device configuration information ensures that the constructed first virtual relay protection device can perform signal and message processing.

[0056] The data item configuration information includes telemetry data items, remote signaling data items, remote control data items, setting items, soft pressure plate status, and other data items. These data items specify the information that the relay protection equipment needs to monitor and the control functions it needs to implement.

[0057] Users can first import project source files into the PDSOP platform, and then use code editing tools to adjust compilation parameters and data item configuration information to achieve the input of compilation parameters and data item configuration information.

[0058] After the user inputs the device configuration information of the relay protection device to be configured into the PDSOP platform, a second virtual relay protection device is first constructed based on the PDSOP platform and the device configuration information. This second virtual relay protection device and the original relay protection device have the same memory pool configuration.

[0059] After successfully constructing the second virtual relay protection device, it should theoretically operate normally upon power-up. However, in practice, especially after the initial setup, some problems may arise. For example, the connections between boards may not be fully compatible, or the configuration data of the boards themselves may contain errors. The device's internal logic verification mechanism will detect these mismatches or errors, resulting in data verification errors. These data verification errors affect the normal operation of the device, manifesting as abnormal device function or performance degradation.

[0060] To ensure the stability and reliability of the equipment, the second virtual relay protection device needs to be reset to its factory state to eliminate potential data verification errors, thus obtaining the first virtual relay protection device. The first and second virtual relay protection devices have the same memory pool configuration; that is, at this stage, the first virtual relay protection device and the relay protection device have the same memory pool configuration.

[0061] In addition to constructing the first virtual relay protection device, it is also necessary to construct a virtual communication environment that enables the first virtual relay protection device to operate and achieve communication interaction.

[0062] Input the compiled analog input script file, input output script file, protection action script file, and communication test script file into the PDSOP platform.

[0063] In some embodiments, script files can be written using the Python language.

[0064] Analog quantities are generated based on analog quantity script files. Analog quantities refer to continuously changing physical quantities received by relay protection equipment, such as current and voltage.

[0065] Input quantities are generated based on the input quantity script file. Input quantities refer to discrete signals received by relay protection equipment, such as switch status and button press.

[0066] Output quantities are generated based on the output quantity script file. Output quantities refer to the control signals output by relay protection equipment, such as trip signals, alarm signals, and start signals.

[0067] Protection actions are generated based on protection action script files. Protection actions refer to the protective measures taken by relay protection equipment when a fault or abnormality is detected, such as instantaneous overcurrent protection and overvoltage protection.

[0068] The script files mentioned above can be flexibly invoked to generate different types of data. Data types are divided into single-type and composite-type. A single-type data contains only one type of data, which can be one or more analog quantities, one or more input quantities, one or more output quantities, or one or more protection actions. Composite-type data contains different types of data, such as analog quantities + input quantities, including floating-point values ​​and Boolean data. This information is simulation data, which is the data that relay protection devices need to monitor and respond to when monitoring power equipment and power systems.

[0069] This data needs to be stored in a memory pool. After storage, it will occupy corresponding memory blocks in the memory pool, thus consuming memory. The communication interaction messages required by the client can be generated from this data stored in the memory pool.

[0070] Different data volumes correspond to different sizes of power interaction data, and different combinations of data types also correspond to different sizes of power interaction data.

[0071] Analog script files, input script files, output script files, and protection action script files form a power information output terminal used to output power interaction data.

[0072] The communication test script files include a full-load MMS communication test script file and a client full-load service communication test script file. The client can be multiple clients or a single client.

[0073] Full load MMS refers to the operating state of a system or server when it reaches its maximum processing capacity or capacity.

[0074] In some embodiments, it is generally necessary to meet the communication requirements when 16 clients are connected. This application accelerates the expansion process according to a configuration of 18 clients.

[0075] In some embodiments, the communication needs of multiple clients, such as 18 clients, can be configured to the same client, thereby enabling communication between a single virtual client and the first virtual relay protection device.

[0076] A virtual client is constructed to interact with the first virtual relay protection device by means of a communication test script file. Through load settings, a large number of concurrent requests are simulated, including reporting services, setting services, log services, remote control services, file services, etc.

[0077] The number of communication signal points in relay protection equipment is limited. Due to this limitation, the relay protection equipment will not perform unlimited memory pool expansion operations during operation. Once a stable state is reached, the memory pool expansion operation will cease. A stable state refers to the state where memory pool nodes no longer expand, meaning the memory pool can meet all the memory requirements for real-time communication of the equipment.

[0078] Users can set a preset time, which is the time they expect to reach a stable state. In actual operation, relay protection equipment requires three to four months to reach a stable state. The preset time can be set to 2-3 days, significantly reducing the time to achieve a stable state compared to actual operation.

[0079] Based on the preset time and the total number of messages referenced during normal operation of the relay protection device, the message interaction speed is determined. This message interaction speed is significantly improved compared to the actual message interaction speed of the relay protection device. The increased message interaction speed and more frequent message interaction can accelerate the generation of the stable state of the first virtual relay protection device.

[0080] Step 302: In the virtual communication environment, based on the storage space capacity required for the power interaction data in the communication, the number of memory pool nodes of the first virtual relay protection device is expanded from a first number to a second number; the memory pool nodes contain multiple memory blocks of the same size.

[0081] In a virtual communication environment, the first virtual relay protection device can receive power interaction data generated based on a script file. This device needs to store the power interaction data in its virtual memory pool. During storage, memory blocks of appropriate size are determined according to the storage space required for the power interaction data.

[0082] By vertically traversing and comparing, a memory pool node corresponding to a memory block capacity that matches the storage space required for the power interaction data is found. If a corresponding memory pool node exists and the memory pool node has free memory blocks, the power interaction data can be stored in a virtual memory pool.

[0083] In some embodiments, expanding the memory pool nodes of the first virtual relay protection device from a first number to a second number based on the storage space capacity required for the power interaction data in the virtual communication environment includes: adding memory pool nodes to the virtual memory pool when there is no memory block storing the power interaction data in the virtual memory pool, wherein the capacity of the memory block of the added memory pool node is greater than or equal to the storage space capacity required for the power interaction data.

[0084] In memory management, if there is no memory block in the virtual memory pool that can store power interaction data, a memory expansion operation is performed to add a new memory pool node to the virtual memory pool. The capacity of the memory block of the newly added memory pool node is greater than or equal to the required storage space capacity.

[0085] In some embodiments, the capacity type that is closest to the required storage space capacity and can normally store the power interaction data is selected from a variety of capacity types as the memory block capacity of the newly added memory pool node. For example, if the various capacity types are 32 bytes, 64 bytes, 128 bytes, etc., and the required storage space capacity is 82 bytes, then a memory pool node containing a 128-byte memory block is added to the virtual memory pool.

[0086] This limitation ensures that power interaction data can be successfully stored in the virtual memory pool without data loss or corruption, thus preventing disruption to normal device operation. Furthermore, since different memory pool nodes correspond to different capacity types, this limitation also avoids overly granular configuration of memory block sizes, which could lead to an increase in the number of memory pool nodes and consequently, negatively impact communication efficiency.

[0087] In some embodiments, the number of memory blocks corresponding to a newly added memory pool node is determined based on the capacity of the corresponding memory block. Typically, smaller memory block capacities result in a larger number of added memory blocks. For example, if a newly added memory pool node corresponds to a 32-byte memory block, then 5000 32-byte memory blocks are configured for that node; if a newly added memory pool node corresponds to a 200,000-byte memory block, then 100 200,000-byte memory blocks are configured for that node.

[0088] The number of memory blocks can be configured flexibly based on their size. When the memory block size is small, increasing the number of memory blocks can reduce the probability of frequent allocation of small memory blocks, avoiding more memory pool nodes that need to be traversed and compared. For large memory blocks, configuring a smaller number can reduce memory waste.

[0089] Step 303: Based on the second number of memory pool nodes, obtain the capacity size types of memory blocks contained in all memory pool nodes in the virtual memory pool of the first virtual relay protection device, and the number of memory blocks of each capacity size type.

[0090] The number of communication signal points of the first virtual relay protection device is limited. When expanded to a certain extent, the corresponding virtual memory pool can already meet all the memory requirements of the first virtual relay protection device for real-time communication, and no further memory pool expansion operations will occur. This state, which can meet all the memory requirements of the first virtual relay protection device for real-time communication and no longer requires memory pool expansion operations, is called the stable state of the memory pool.

[0091] In a stable state, the number of memory pool nodes in the virtual memory pool no longer increases. Therefore, the number of memory pool nodes can be used to determine whether a stable state has been reached.

[0092] After expansion, a second number of memory pool nodes are obtained. This second number changes dynamically with the expansion operation. By monitoring the second number of memory pool nodes, it can be determined whether the virtual memory pool of the first virtual relay protection device has reached a stable state.

[0093] As mentioned earlier, it is expected that when the first virtual relay protection device reaches its preset operating time, its memory pool will meet the real-time dynamic requirements and reach a stable state. However, during operation, communication requirements may change due to various factors. For example, network latency, signal interference, or equipment failure may all prolong the time to reach a stable state.

[0094] To quickly determine and obtain the capacity and quantity information corresponding to the stable state, the memory pool node count monitoring process before the preset time can be skipped.

[0095] In some embodiments, obtaining the capacity size types of memory blocks contained in all memory pool nodes of the virtual memory pool of the first virtual relay protection device, and the number of memory blocks of each capacity size type, based on the second number of memory pool nodes, includes: obtaining the number of memory pool nodes of the first virtual relay protection device when the running time of the first virtual relay protection device reaches a preset time; comparing the number of memory pool nodes with the previous number of memory pool nodes; if the number of memory pool nodes is the same as the previous number of memory pool nodes, incrementing the count by one; if the count has not reached a set number, returning to the step of obtaining the number of memory pool nodes of the first virtual relay protection device; and if the count has reached a set number, obtaining the capacity size types of memory blocks contained in all memory pool nodes of the virtual memory pool of the first virtual relay protection device, and the number of memory blocks of each capacity size type.

[0096] It should be noted that after comparing the number of memory pool nodes with the previous number of memory pool nodes, the method further includes: if the number of memory pool nodes is different from the previous number of memory pool nodes, the count is reset to zero, and the process returns to the step of obtaining the number of memory pool nodes of the first virtual relay protection device.

[0097] By comparing the number of memory pool nodes multiple times, abnormal fluctuations during device memory expansion can be detected and addressed in a timely manner. This involves resetting the count to zero, ensuring that the memory block information is obtained after the number of nodes stabilizes. This guarantees that the obtained memory block information is a true reflection of the device in a stable state, avoiding data errors caused by fluctuations in device operating status, and obtaining more accurate information on the size, type, and quantity of memory blocks.

[0098] Furthermore, once the types of memory block sizes in a stable state and the number of memory blocks of each type are obtained, the first virtual relay protection device is stopped from running to save resources.

[0099] In some embodiments, a first virtual relay protection device is run in a virtual communication environment. After the first virtual relay protection device has been running for a preset time, the memory pool information in a stable state is determined and obtained by comparing the number of memory pool nodes.

[0100] In some embodiments, an information table containing memory pool information is obtained. As shown in Table 1, Table 1 is a memory pool operation status table of a first virtual relay protection device provided in an embodiment of this application.

[0101] Table 1. Operating Status of the Memory Pool of the First Virtual Relay Protection Device

[0102]

[0103] Table 1 clearly shows the memory pool information of the first virtual relay protection device after it reaches a stable state in the virtual communication environment based on the initial memory pool. This includes different memory pool nodes, the memory block capacity and number of memory blocks contained in each memory pool node, and the allocation process between the node and its corresponding memory blocks.

[0104] In Table 1, "Pool" refers to a memory pool. "Pool + number" indicates the node number within the memory pool. For example, "Pool 23" represents the 23rd node in the memory pool, which can be referred to as memory pool node 23 for ease of description. The allocation process includes V1.0 initial allocation and in-process expansion allocation. V1.0 initial allocation refers to the memory configured before the first virtual relay protection device starts operating. In-process expansion allocation refers to the additional memory added to the memory pool during the operation of the first virtual relay protection device. Here, V1.0 is used to distinguish it from V2.0 in Table 2, indicating the initial state of the memory pool at different stages of the first virtual relay protection device.

[0105] To display more information, memory pool nodes with the same memory block capacity and number of memory blocks and belonging to the same allocation stage have been merged and placed in the same row in the table. For details of the merged items, please refer to the first column of Table 1.

[0106] It should be noted that the memory block capacity, number of memory blocks, and allocation stage contained in each row indicate that all memory pool nodes corresponding to that row correspond to this information.

[0107] For example, the first line indicates that the memory block capacity of each memory pool node in Pool 0 to Pool 23 is 32 bytes, the number of memory blocks in each memory pool node is 255, and all of them are initially allocated nodes and memory blocks; the fourth line indicates that the memory pool capacity of each memory pool node in Pool 282 to Pool 460 is 64 bytes, the number of memory blocks in each memory pool node is 1000, and these nodes and memory blocks are obtained by expansion during operation.

[0108] Based on the memory pool information at a stable state, as shown in Table 1, we can count the different capacity types and the number of memory blocks corresponding to each capacity type. According to Table 1, the capacity types are 32 bytes, 64 bytes, 1000 bytes, 400,000 bytes, and 900,000 bytes. Similarly, based on the information in Table 1, we can calculate that there are 261,120 memory blocks with a capacity of 32 bytes, 179,765 memory blocks with a capacity of 64 bytes, 5 memory blocks with a capacity of 400,000 bytes, and 4 memory blocks with a capacity of 900,000 bytes.

[0109] Through statistical calculations, we obtained the types of capacity sizes and the number of memory blocks corresponding to each type of capacity size.

[0110] By extending virtual relay protection devices in a virtual communication environment and combining this with the number of memory pool nodes, the system can proactively obtain memory block capacity and quantity information under stable conditions. On-site maintenance or operation personnel no longer need to constantly monitor the relay protection devices for abnormal times caused by an increase in memory pool nodes, thus freeing up manpower and saving personnel costs.

[0111] Step 304: Based on all the capacity size types in the virtual memory pool and the number of memory blocks of each capacity size type, adjust the memory pool nodes of the relay protection device to a third number, and configure a target number of memory blocks of the same capacity size type for each memory pool node; different memory pool nodes in the relay protection device correspond to different capacity size types, and the third number is greater than or equal to the number of all the capacity size types in the virtual memory pool.

[0112] The obtained virtual memory pool contains information on all capacity types and the number of memory blocks for each capacity type, which represents the memory pool capacity and number of memory pools that can meet all the memory requirements for real-time communication of the first virtual relay protection device.

[0113] Different memory pool nodes correspond to memory blocks of different capacity sizes. The number of memory pool nodes to be configured for the relay protection device can be determined based on all capacity sizes in the virtual memory pool. Each capacity size corresponds to at least one memory pool node.

[0114] In some embodiments, a memory pool node is determined for each capacity size type, where the third quantity is equal to the total number of all capacity size types in the virtual memory pool. Accordingly, the number of memory blocks corresponding to each capacity size type can be determined as the number of memory blocks to be configured in the corresponding memory pool node, or, based on the number of memory blocks corresponding to that capacity size type, a certain number of memory blocks can be appropriately increased to help cope with sudden demand or memory allocation peaks and improve response speed.

[0115] In some embodiments, adjusting the number of memory pool nodes of the relay protection device to a third number based on all capacity size types and the number of memory blocks of each capacity size type in the virtual memory pool, and configuring a target number of memory blocks of the same capacity size type for each memory pool node, includes: determining the capacity size types to be supplemented and the corresponding number of memory blocks based on the number of communication signal points of the relay protection device; determining the third number of memory pool nodes and the target number of memory blocks of the same capacity size type corresponding to each memory pool node according to all capacity size types and the number of memory blocks of each capacity size type in the virtual memory pool, and the number of capacity size types to be supplemented and the corresponding number of memory blocks; configuring the third number of memory pool nodes for the memory pool of the relay protection device, and configuring the target number of memory blocks of the same capacity size corresponding to each memory pool node.

[0116] When the first virtual relay protection device is running in the virtual communication environment, its communication and memory requirements may differ from those in the actual power system. This difference may result in insufficient consideration of the memory block requirements of certain specific capacity sizes when expanding in the virtual communication environment, leading to the loss of capacity information for some capacity sizes.

[0117] In some embodiments, the number of communication signal points of the relay protection device can be combined to query the memory block information of the relay protection device with the same number of communication signal points when it is reconfigured using the existing method, and determine the capacity size information to be supplemented and the corresponding number of memory blocks.

[0118] In some embodiments, a memory pool node is determined for each capacity size type and a memory pool node is determined for each capacity size type to be supplemented, wherein the third quantity is equal to the sum of the quantities of all the capacity size types in the virtual memory pool and the capacity size types to be supplemented.

[0119] The number of memory blocks corresponding to each capacity size category in the virtual memory pool is determined as the number of memory blocks to be configured for the corresponding memory pool node. Similarly, the number of memory blocks corresponding to each capacity size category to be supplemented is determined as the number of memory blocks to be configured for its corresponding memory pool node. Likewise, a certain number of memory blocks can be appropriately increased based on the existing number of memory blocks.

[0120] In some embodiments, based on the number of communication signal points of the relay protection device, a reference capacity size category corresponding to the number of communication signal points is determined; all the capacity size categories in the virtual memory pool are compared with the reference capacity size category to obtain the capacity size category to be supplemented; the capacity size of the capacity size category to be supplemented is greater than any capacity size of all the capacity size categories in the virtual memory pool; based on the number of communication signal points, the number of memory blocks corresponding to the capacity size category to be supplemented is determined.

[0121] Based on the number of communication signal points of the relay protection device, query the capacity size categories of other relay protection devices with the same number of communication signal points when reconfiguring the memory pool, and use these as reference capacity size categories.

[0122] By comparing with all capacity size types in the virtual memory pool, the missing capacity size types that need to be added are identified.

[0123] Then, based on the number of communication signal points, query the number of memory blocks corresponding to the types of capacity to be supplemented in other relay protection devices with the same number of communication signal points, and use this as a reference data when configuring the number of memory blocks to realize the configuration of memory blocks for memory pool nodes of the types of capacity to be supplemented.

[0124] In some embodiments, the type of capacity to be supplemented and the corresponding number of memory blocks can be calculated based on the number of communication signal points.

[0125] In some embodiments, the Secure Shell File Transfer Protocol (SFTP) is used to adjust the number of memory pool nodes in the relay protection device to a third number, and to configure a target number of memory blocks of the same capacity and type for each memory pool node. As can be seen from the above, the target number for different memory pool nodes may vary.

[0126] To fully verify the effectiveness of the memory pool configuration method described in this application after configuration, based on all capacity types and the number of memory blocks for each capacity type in the virtual memory pool, a memory pool configuration scheme with a significantly reduced number of memory pool nodes compared to the second scheme is determined. In this scheme, the number of memory blocks for each capacity type is greater than or equal to the number of memory blocks corresponding to that capacity type in the virtual memory pool. The memory pool of the first virtual relay protection device is reconfigured according to this memory pool configuration scheme to obtain the reconfigured first virtual relay protection device.

[0127] In the virtual communication environment, the reconfigured first virtual relay protection device is run. After the reconfigured first virtual relay protection device has been running for a preset time, the memory pool node count is compared and counted to determine that a stable state has been reached. Then, the memory pool information of the reconfigured first virtual relay protection device is obtained.

[0128] In some embodiments, the information obtained is shown in Table 2, which is a memory pool operation status table of a reconfigured first virtual relay protection device provided in the embodiments of this application.

[0129] The V2.0 initial allocation in Table 2 represents the memory configured for the first virtual relay protection device after reconfiguration and before operation. Relative to the reconfigured first virtual relay protection device after operation, it belongs to the initial memory pool. To distinguish it from the initial memory pool in Table 1, it is referred to here as the V2.0 initial configuration.

[0130] Table 2. Memory pool operation status of the first virtual relay protection device after reconfiguration.

[0131]

[0132] Table 2 also includes memory pool nodes, memory block capacity, number of memory blocks, and allocation process. The difference lies in the significantly reduced number of memory pool nodes compared to Table 1. Furthermore, based on the allocation process, the reconfigured first virtual relay protection device did not exhibit any expanded nodes or memory blocks during operation in the virtual communication environment. The significantly reduced number of nodes means less time is spent searching and comparing memory blocks of different sizes, thus improving communication efficiency. The absence of expanded nodes and memory blocks indicates that the reconfigured memory pool can meet the memory usage requirements of the first virtual relay protection device and its corresponding relay protection devices.

[0133] It should be noted that in Table 2, Pool 0 to Pool 5 correspond to the same memory block capacity of 32 bytes, and Pool 6 to Pool 8 correspond to the same memory block capacity of 64 bytes. This means that when determining memory pool nodes, multiple memory pool nodes can be allocated not only to multiple memory blocks of the same size, but also to multiple memory pool nodes. It is important to note that the number of memory pool nodes after reconfiguration should not exceed the set number of nodes; exceeding this number will reduce communication efficiency. For example, the set number of nodes can be taken from the range of 40-60.

[0134] Table 2 shows that multiple memory blocks of the same size (32 bytes) are allocated into Pool 0 through Pool 4, each containing 50,000 memory blocks, and Pool 5, containing 12,000 memory blocks. The number of memory blocks in Pool 5 differs from that in Pools 0 through 4. This demonstrates that when allocating multiple memory pool nodes for multiple memory blocks of the same size, allocating the number of memory blocks in each node reasonably based on the total number of memory blocks can save memory usage.

[0135] Table 2 also includes Pool 23, which contains 160 memory blocks of 500,000 bytes each, and Pool 24, which contains 10 memory blocks of 1,000,000 bytes each. The arrangement of these nodes and their corresponding memory blocks takes into account the possibility of larger memory blocks during actual operation. However, the first virtual relay protection device, operating in a virtual communication environment, may not involve relevant power interaction data, resulting in a lack of different capacity types. Therefore, the necessary capacity types and their corresponding memory block quantities have been added to supplement this information.

[0136] Compare the number of memory blocks of the same size type shown in Tables 1 and 2. Table 1 shows 261,120 32-byte memory blocks, while Table 2 shows 262,000. Table 1 shows 179,765 64-byte memory blocks, while Table 2 shows 180,000. This indicates that during configuration, the memory block capacity of any size type is greater than or equal to the expanded memory block capacity upon reconfiguration.

[0137] Communication tests showed that the communication interaction time of the relay protection device configured in Table 1 was in the second range, while the communication interaction time of the relay protection device configured in Table 2 was in the tens of milliseconds range. The latter improved the communication interaction time by two orders of magnitude compared to the former, which means that the communication efficiency was greatly improved.

[0138] This application transforms passive learning into proactive learning by accelerating the simulation of the stable state of the memory pool of relay protection devices operating for extended periods within a substation based on a constructed virtual relay protection device and virtual communication environment. According to the memory pool configuration information under stable conditions, the memory pool configuration of the relay protection device is pre-optimized, ensuring its design remains stable. This solves the problem of memory pool reconfiguration lag and avoids the issues of increased nodes and decreased communication efficiency caused by insufficient memory resource allocation. It ensures that the relay protection device can continuously and efficiently communicate, thus better protecting power equipment and the power system.

[0139] In this embodiment, a first virtual relay protection device is constructed. In a virtual communication environment, the memory pool nodes of the first virtual relay protection device are expanded according to the storage space required for power interaction data. When the number of memory pool nodes expands to a second number, the capacity types and the number of memory blocks of each capacity type in all memory pool nodes of the first virtual relay protection device are obtained. Based on this, the number of memory pool nodes of the relay protection device is adjusted to a third number, and a target number of memory blocks of the same capacity type are configured for each memory pool node. This application introduces virtual devices and a virtual communication environment. By running the expansion of the virtual device in the virtual communication environment, the capacity and quantity information of the memory blocks used for memory pool reconfiguration are successfully obtained. Based on this information, the memory pool of the relay protection device is directly reconfigured, achieving proactive optimization without the need for multi-department collaboration, greatly reducing personnel and time costs, and improving the configuration efficiency of the memory pool.

[0140] See Figure 4 , Figure 4 This is a structural diagram of a memory pool configuration system provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiment of this application are shown.

[0141] The memory pool configuration system 400 includes: a construction module 401, an extension module 402, an acquisition module 403, and an adjustment module 404.

[0142] The construction module 401 is used to construct a first virtual relay protection device for the relay protection device; both the first virtual relay protection device and the relay protection device have a corresponding memory pool, and the memory pool contains memory blocks of different sizes and types.

[0143] The expansion module 402 is used to expand the number of memory pool nodes of the first virtual relay protection device from a first number to a second number in a virtual communication environment based on the storage space capacity required for the power interaction data in the communication; each memory pool node contains multiple memory blocks of the same size.

[0144] The acquisition module 403 is used to acquire, based on the second number of memory pool nodes, the capacity size type of all memory pool nodes in the virtual memory pool of the first virtual relay protection device, and the number of memory blocks of each capacity size type.

[0145] The adjustment module 404 is used to adjust the memory pool nodes of the relay protection device to a third number based on all the capacity size types in the virtual memory pool and the number of memory blocks of each capacity size type, and to configure a target number of memory blocks of the same capacity size type for each memory pool node; different memory pool nodes in the relay protection device correspond to different capacity size types, and the third number is greater than or equal to the number of all the capacity size types in the virtual memory pool.

[0146] In some embodiments, the building module is specifically used for:

[0147] Based on the device configuration information of the relay protection device, a second virtual relay protection device is constructed; both the second virtual relay protection device and the relay protection device correspond to the memory pool, and the memory pool contains memory blocks of different sizes and types;

[0148] The second virtual relay protection device is reset to its factory default state to obtain the first virtual relay protection device.

[0149] In some embodiments, the extension module is specifically used for:

[0150] If there is no memory block in the virtual memory pool to store the power interaction data, a memory pool node is added to the virtual memory pool, and the capacity of the memory block of the added memory pool node is greater than or equal to the storage space capacity required for the power interaction data.

[0151] In some embodiments, the acquisition module is specifically used for:

[0152] When the running time of the first virtual relay protection device reaches a preset time, obtain the number of memory pool nodes of the first virtual relay protection device;

[0153] Compare the number of memory pool nodes with the previous number of memory pool nodes;

[0154] If the number of memory pool nodes is the same as the previous number of memory pool nodes, then the count is incremented by one;

[0155] If the count does not reach the set number, return to the step of obtaining the number of memory pool nodes of the first virtual relay protection device;

[0156] When the count reaches a set number, the capacity size type of the memory blocks contained in all memory pool nodes of the first virtual relay protection device is obtained, as well as the number of memory blocks of each capacity size type.

[0157] If the number of memory pool nodes is different from the previous number of memory pool nodes, the count is reset to zero, and the process returns to the step of obtaining the number of memory pool nodes of the first virtual relay protection device.

[0158] In some embodiments, the adjustment module is specifically used for:

[0159] Based on the number of communication signal points of the relay protection device, determine the type of capacity to be supplemented and the corresponding number of memory blocks;

[0160] Based on all the capacity size types in the virtual memory pool and the number of memory blocks of each capacity size type, as well as the capacity size types to be supplemented and the corresponding number of memory blocks, the third number of memory pool nodes and the target number of memory blocks of the same capacity size type corresponding to each memory pool node are determined.

[0161] Configure the third number of memory pool nodes for the memory pool of the relay protection device, and configure the target number of memory blocks of the same capacity size for each memory pool node.

[0162] Based on the number of communication signal points of the relay protection device, determine the reference capacity size type corresponding to the number of communication signal points;

[0163] The capacity size categories in the virtual memory pool are compared with the reference capacity size category to obtain the capacity size category to be supplemented; the capacity size of the capacity size category to be supplemented is greater than any capacity size among all the capacity size categories in the virtual memory pool.

[0164] Based on the number of communication signal points, determine the number of memory blocks corresponding to the type of capacity to be supplemented.

[0165] The memory pool configuration system provided in this application can implement all the processes of the above-described memory pool configuration method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0166] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of this application. As shown in the figure, the electronic device 5 of this embodiment includes: at least one processor 50 ( Figure 5 (Only one is shown in the diagram), memory 51, and computer program 52 stored in said memory 51 and executable on said at least one processor 50, wherein said processor 50 executes said computer program 52 to implement the steps in any of the above method embodiments.

[0167] The electronic device 5 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. The electronic device 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will understand that... Figure 5 This is merely an example of electronic device 5 and does not constitute a limitation on electronic device 5. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0168] The processor 50 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0169] The memory 51 can be an internal storage unit of the electronic device 5, such as a hard disk or memory. The memory 51 can also be an external storage device of the electronic device 5, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 51 can include both internal and external storage units of the electronic device 5. The memory 51 is used to store the computer program and other programs and data required by the electronic device. The memory 51 can also be used to temporarily store data that has been output or will be output.

[0170] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0171] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0172] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0173] In the embodiments provided in this application, it should be understood that the disclosed systems / electronic devices and methods can be implemented in other ways. For example, the system / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of systems or units may be electrical, mechanical, or other forms.

[0174] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0175] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0176] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0177] The processes in the above-described embodiments can be implemented by a computer program product. When the computer program product is run on an electronic device, the electronic device executes the steps in the above-described method embodiments.

[0178] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A memory pool configuration method, characterized in that, include: Construct the first virtual relay protection device for relay protection equipment; Both the first virtual relay protection device and the relay protection device have corresponding memory pools, and the memory pools contain memory blocks of different sizes and types. In a virtual communication environment, based on the storage space required for the power interaction data in the communication, the number of memory pool nodes of the first virtual relay protection device is expanded from a first number to a second number; specifically, this includes: when there is no memory block in the virtual memory pool to store the power interaction data, adding memory pool nodes to the virtual memory pool, wherein the capacity of the memory blocks of the added memory pool nodes is greater than or equal to the storage space required for the power interaction data; and each memory pool node contains multiple memory blocks of the same size. Based on the second number of memory pool nodes, the capacity size types of memory blocks contained in all memory pool nodes of the first virtual relay protection device, and the number of memory blocks of each capacity size type are obtained; specifically, this includes: when the running time of the first virtual relay protection device reaches a preset time, obtaining the number of memory pool nodes of the first virtual relay protection device; comparing the number of memory pool nodes with the previous number of memory pool nodes; wherein, if the number of memory pool nodes is the same as the previous number of memory pool nodes, the count is incremented by one; if the count has not reached the set number, the step of obtaining the number of memory pool nodes of the first virtual relay protection device is returned; if the count has reached the set number, obtaining the capacity size types of memory blocks contained in all memory pool nodes of the first virtual relay protection device, and the number of memory blocks of each capacity size type; if the number of memory pool nodes is different from the previous number of memory pool nodes, the count is reset to zero, and the step of obtaining the number of memory pool nodes of the first virtual relay protection device is returned. Based on all capacity sizes and the number of memory blocks for each capacity size in the virtual memory pool, the number of memory pool nodes of the relay protection device is adjusted to a third number, and a target number of memory blocks of the same capacity size are configured for each memory pool node. Specifically, this includes: determining the capacity sizes to be supplemented and the corresponding number of memory blocks based on the number of communication signal points of the relay protection device; determining the third number of memory pool nodes and the target number of memory blocks of the same capacity size corresponding to each memory pool node based on all capacity sizes and the number of memory blocks for each capacity size in the virtual memory pool, and the number of capacity sizes to be supplemented and their corresponding memory blocks; configuring the third number of memory pool nodes for the relay protection device. The system establishes a node and configures each memory pool node with the target number of memory blocks of the same capacity size type. Different memory pool nodes in the relay protection device correspond to different capacity size types, and the third number is greater than or equal to the total number of all capacity size types in the virtual memory pool. A reference capacity size type is determined based on the number of communication signal points in the relay protection device. All capacity size types in the virtual memory pool are compared with the reference capacity size type to obtain the capacity size type to be supplemented. The capacity size of the capacity size type to be supplemented is greater than any capacity size among all capacity size types in the virtual memory pool. The number of memory blocks corresponding to the capacity size type to be supplemented is determined based on the number of communication signal points.

2. The method according to claim 1, characterized in that, The first virtual relay protection device for constructing relay protection equipment includes: Based on the device configuration information of the relay protection device, a second virtual relay protection device is constructed; both the second virtual relay protection device and the relay protection device correspond to the memory pool. The second virtual relay protection device is reset to its factory default state to obtain the first virtual relay protection device.

3. A memory pool configuration system, characterized in that, include: The building module is used to construct the first virtual relay protection device for relay protection equipment; Both the first virtual relay protection device and the relay protection device have corresponding memory pools, and the memory pools contain memory blocks of different sizes and types. An expansion module is used to expand the number of memory pool nodes of the first virtual relay protection device from a first number to a second number in a virtual communication environment, based on the storage space capacity required for the power interaction data in the communication; each memory pool node contains multiple memory blocks of the same size; the expansion module is specifically used to: add memory pool nodes to the virtual memory pool when there are no memory blocks in the virtual memory pool for storing the power interaction data, wherein the capacity of the memory blocks of the added memory pool nodes is greater than or equal to the storage space capacity required for the power interaction data; The acquisition module is configured to, based on the second number of memory pool nodes, acquire the capacity size types of memory blocks contained in all memory pool nodes of the first virtual relay protection device, and the number of memory blocks of each capacity size type; specifically, the acquisition module is configured to: acquire the number of memory pool nodes of the first virtual relay protection device when the running time of the first virtual relay protection device reaches a preset time; compare the number of memory pool nodes with the previous number of memory pool nodes; wherein, if the number of memory pool nodes is the same as the previous number of memory pool nodes, the count is incremented by one; if the count has not reached a set number, return to the step of acquiring the number of memory pool nodes of the first virtual relay protection device; if the count has reached a set number, acquire the capacity size types of memory blocks contained in all memory pool nodes of the first virtual relay protection device, and the number of memory blocks of each capacity size type; if the number of memory pool nodes is different from the previous number of memory pool nodes, the count is reset to zero, and return to the step of acquiring the number of memory pool nodes of the first virtual relay protection device. An adjustment module is used to adjust the memory pool nodes of the relay protection device to a third quantity based on all capacity size types and the number of memory blocks of each capacity size type in the virtual memory pool, and to configure a target number of memory blocks of the same capacity size type for each memory pool node; different memory pool nodes in the relay protection device correspond to different capacity size types, and the third quantity is greater than or equal to the number of all capacity size types in the virtual memory pool; the adjustment module is specifically used to: determine the capacity size types to be supplemented and the corresponding number of memory blocks based on the number of communication signal points of the relay protection device; and determine the third quantity based on all capacity size types and the number of memory blocks of each capacity size type in the virtual memory pool, and the number of capacity size types to be supplemented and the corresponding number of memory blocks. The system comprises: a number of memory pool nodes and a target number of memory blocks of the same capacity size corresponding to each memory pool node; configuring the third number of memory pool nodes for the memory pool of the relay protection device, and configuring the target number of memory blocks of the same capacity size corresponding to each memory pool node; wherein, based on the number of communication signal points of the relay protection device, a reference capacity size corresponding to the number of communication signal points is determined; comparing all the capacity size types in the virtual memory pool with the reference capacity size type to obtain the capacity size type to be supplemented; the capacity size of the capacity size type to be supplemented is greater than any capacity size of all the capacity size types in the virtual memory pool; and determining the number of memory blocks corresponding to the capacity size type to be supplemented based on the number of communication signal points.

4. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device performs the method as described in any one of claims 1 to 2.

5. A computer program product, characterized in that, Includes a computer program, which, when run, causes the method as described in any one of claims 1 to 2 to be performed.

Citation Information

Patent Citations

  • Memory pool construction, memory allocation method and device

    CN109144712A

  • Software protection method and system thereof

    US20210374254A1