Memory pool configuration method and system, electronic equipment and computer program product
By building a virtual relay protection device to expand memory pool nodes in a virtual communication environment, obtain memory block information and adjust the memory pool configuration of the relay protection device, the problem of passive and inefficient memory pool configuration in the existing technology is solved, and efficient and active memory pool optimization is achieved.
Patent Information
- Application Number
- CN202411994395.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The existing memory pool configuration method is relatively passive, requiring collaborative cooperation between multiple departments, with high personnel costs and low efficiency.
By building a virtual relay protection device for the relay protection device, expanding the memory pool nodes in the virtual communication environment, and obtaining the capacity size type and quantity information of the memory blocks, adjusting the memory pool configuration of the relay protection device accordingly.
Active optimization of memory pools is realized, reducing personnel and time costs, and improving the efficiency of memory pool configuration.
Smart Images

Figure CN120029759A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electric power technology, and in particular, relates to a memory pool configuration method, system, electronic device and computer program product. Background Art
[0002] Relay protection equipment is used to protect the safe operation of power equipment. When applied to the station control layer of the International Electrotechnical Commission (IEC) 61850 standard, the relay protection equipment adopts the Manufacturing Message Specification (MMS) protocol. In order to deal with the problem of memory fragmentation caused by the difference in message length under the MMS protocol, a memory pool is configured for the relay protection equipment.
[0003] Before a relay protection device leaves the factory, a memory pool is usually configured for it. Since there are many types of relay protection devices and their memory requirements are different, in some cases, the memory pool of the relay protection device needs to be reconfigured. The usual method is: when the on-site maintenance or operation personnel find that the equipment is not operating well at the operation site, they notify the engineering and technical personnel responsible for handling the incident to collect the capacity and quantity information of the memory blocks in the memory pool. Then, the R&D personnel adjust the number of memory pool nodes and node configuration according to the capacity and quantity information of the memory blocks to obtain the adjusted memory pool configuration plan. Finally, the engineering and technical personnel go to the site to reconfigure the memory pool according to the adjusted memory pool configuration plan.
[0004] The above memory pool configuration adjustment method is relatively passive, requires collaboration among multiple departments, has high personnel costs, and is inefficient. Summary of the invention
[0005] The embodiments of the present application provide a memory pool configuration method, system, electronic device and computer program product to solve the problems that the existing memory pool configuration method is relatively passive, requires collaboration among multiple departments, has high personnel costs and is inefficient.
[0006] A first aspect of an embodiment of the present application provides a memory pool configuration method, including:
[0007] Constructing a first virtual relay protection device of the relay protection device; the first virtual relay protection device and the relay protection device both correspond to a memory pool, and the memory pool includes memory blocks of different sizes and types;
[0008] In a virtual communication environment, based on the storage space capacity required for the power interaction data in the communication, the memory pool nodes of the first virtual relay protection device are expanded from a first number to a second number; the capacity sizes of the multiple memory blocks included in each of the memory pool nodes are the same;
[0009] Based on the second number of memory pool nodes, obtaining the capacity size types of memory blocks included in all the 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 and the number of memory blocks of each capacity size type in the virtual memory pool, 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 an embodiment of the present application provides a memory pool configuration system, including:
[0012] A construction module, used to construct a first virtual relay protection device of the relay protection device; the first virtual relay protection device and the relay protection device both correspond to a memory pool, and the memory pool includes memory blocks of different sizes and types;
[0013] An expansion module is used to expand the 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 of the memory pool nodes includes a plurality of memory blocks of the same capacity and type;
[0014] an acquisition module, configured to acquire, based on the second number of memory pool nodes, the capacity types of memory blocks contained in all the memory pool nodes in the virtual memory pool of the first virtual relay protection device, and the number of memory blocks of each capacity type;
[0015] An adjustment module is used to adjust the memory pool nodes of the relay protection device to a third number based on the number of all the capacity size types and each memory block of the capacity size type in the virtual memory pool, 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.
[0016] A third aspect of an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect when executing the computer program.
[0017] A fourth aspect of the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0018] A fifth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0019] As can be seen from the above, the present application constructs a first virtual relay protection device of a relay protection device, and in a virtual communication environment, according to the storage space capacity required for the power interaction data, the expansion of the memory pool node of the first virtual relay protection device is realized. When the memory pool node is expanded to the second number, the capacity size type of the 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 are obtained, and the memory pool nodes of the relay protection device are adjusted to the third number accordingly, and the target number of memory blocks of the same capacity size type are configured for each memory pool node. The present application introduces a virtual device and a virtual communication environment, and successfully obtains the capacity information and quantity information of the memory blocks used to realize the memory pool reconfiguration through the operation and expansion of the virtual device in the virtual communication environment, and directly reconfigures the memory pool of the relay protection device based on this information, realizing active optimization without the need for collaboration among multiple departments, greatly reducing personnel costs and time costs, and improving the configuration efficiency of the memory pool. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 It is a schematic diagram of the configuration of an initial memory pool provided in an embodiment of the present application;
[0022] Figure 2 It is a configuration diagram of an extended memory pool provided in an embodiment of the present application;
[0023] Figure 3is a flow chart of a memory pool configuration method provided by an embodiment of the present application;
[0024] Figure 4 It is a structural diagram of a memory pool configuration system provided in an embodiment of the present application;
[0025] Figure 5 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0027] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0028] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0029] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0030] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0031] In a specific implementation, the terminal described in the embodiments of the present application includes, but is not limited to, other portable devices such as mobile phones, laptop computers, or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch screen displays and / or touch pads).
[0032] In the following discussion, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and / or joystick.
[0033] The terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disk burning application, a spreadsheet application, a game application, a telephone application, a video conferencing application, an email application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital camcorder application, a web browsing application, a digital music player application, and / or a digital video player application.
[0034] Various applications that can be executed on the 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 corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within corresponding applications. In this way, the common physical architecture of the terminal (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 size of the serial numbers of the steps in this embodiment does not mean 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 the embodiment of the present application.
[0036] Relay protection equipment uses the MMS protocol. The length of the messages transmitted under this protocol varies greatly, ranging from tens of bytes to tens of thousands of bytes. Therefore, a memory pool is configured for the relay protection equipment to solve the problem of memory fragmentation caused by the difference in message length.
[0037] At present, before the relay protection equipment leaves the factory, an initial memory pool is usually configured for it, and the memory pool is managed through 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 the present application.
[0038] according to Figure 1 It can be seen that the initial memory pool in this example is configured with 24 memory pool nodes. Each memory pool node has information about the memory block capacity and the number of memory blocks. The capacity and type of memory blocks at the same node are the same. The memory pool nodes corresponding to the smaller memory block capacity are in the front, and the memory pool nodes corresponding to the larger memory block capacity are in the back.
[0039] Figure 1 Only memory pool node 1, memory pool node 5, memory pool node 18, memory pool node 19, memory pool node 23 and memory pool node 24 are shown. The memory block capacities are 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 distinguish different memory blocks, Figure 1 And the following Figure 2 The format of "memory block a_b" is used to describe different memory blocks. Where a is the capacity of the memory block, and b is the number of the memory block in 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, current, etc.) in the initial memory pool, the storage space capacity required for the power interaction data is compared with the memory block capacity corresponding to the memory pool node in sequence, that is, the memory pool nodes are traversed vertically to find the memory pool node corresponding to the memory block capacity that matches the required storage space capacity. After determining the corresponding memory pool node, if there is a free memory block, the free memory block can be directly located horizontally to realize the storage of power interaction data.
[0042] During the communication process, the relay protection device frequently interacts with the client and the power equipment. The amount of power interaction data is huge. When the memory blocks in the memory pool cannot meet the storage requirements, the power interaction data cannot be stored. At this time, the memory pool of the relay protection device will be expanded. The expansion is to add new memory pool nodes on the basis of the initial memory pool and add a certain number of memory blocks of the required capacity to the newly added memory pool nodes. Figure 2 As shown, Figure 2 This is a configuration diagram of an extended memory pool provided in an embodiment of the present application. The extended memory pool includes the memory pool nodes and memory blocks of the original initial memory pool, as well as the memory pool nodes and memory blocks newly added after the expansion.
[0043] By comparing the memory pool nodes, we can see that the expansion adds a lot of nodes and memory blocks, among which the memory pool nodes have increased from the original 24 nodes to 121 nodes. Figure 2Not all new additions are shown, only some. Figure 2 The content in bold italics is the nodes and memory blocks that are added during the operation. Figure 2 The memory pool node 2, the memory pool node 51, the memory pool node 91 and the memory pool node 93 are newly added memory pool nodes, and the memory blocks corresponding to these memory pool nodes are newly added memory blocks.
[0044] The newly added memory blocks are sorted together with the initial memory blocks according to the memory block capacity. When using the extended memory pool, it is also necessary to traverse the linked list vertically, compare the capacity, and find the memory block of the appropriate capacity. The increase in the number of memory pool nodes means the increase in the number of vertical nodes in the linked list. MMS messages use the Open System Interconnection (OSI) seven-layer network protocol, so the relay protection equipment has multiple layers of nesting when processing messages. If the vertical linked list of the memory pool increases, the operation processing time will be significantly extended, resulting in a decrease in operation efficiency, which is manifested as a significant slowdown in the speed at which the relay protection equipment sends messages to the client.
[0045] The vertical traversal compares the capacity of each node one by one to see if it meets the memory requirements of the current storage space capacity. If not, the next vertical node is found. The number of memory pool nodes increases, the traversal time increases, and the communication efficiency decreases accordingly.
[0046] In order to improve communication efficiency, it is necessary to reconfigure the memory pool of the relay protection equipment. However, the memory pool configuration method mentioned in the above background is relatively passive. The memory pool is reconfigured only after the communication efficiency is reduced. There is a lag, involving a large number of personnel, requiring cooperation among multiple departments, high personnel costs, and low configuration efficiency.
[0047] To this end, the present application provides a memory pool configuration method, system, electronic device and computer program product to solve the above problems.
[0048] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0049] See also Figure 3 , Figure 3 1 is a flow chart of a memory pool configuration method provided by an embodiment of the present application. Figure 3 As shown, a memory pool configuration method comprises the following steps:
[0050] Step 301, constructing a first virtual relay protection device of a relay protection device; the first virtual relay protection device and the relay protection device both correspond to a 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 through a protection device virtual operation platform (Protection Device Simulate Operation Platform, PDSOP). The PDSOP platform is a software platform of Windows or Linux architecture built based on C++ language. The memory pool configuration method described in this application can be implemented in a Windows or Linux operating system with a PDSOP platform.
[0052] In some embodiments, the first virtual relay protection device for constructing a relay protection device includes: constructing a second virtual relay protection device based on the device configuration information of the relay protection device; the second virtual relay protection device and the relay protection device both correspond to the memory pool, and the memory pool contains memory blocks of different capacities and types; resetting the second virtual relay protection device to the factory state to obtain the first virtual relay protection device.
[0053] The device configuration information includes information such as the engineering source files, compilation parameters and data item configuration information of the relay protection device.
[0054] The project source file includes the communication signal points and memory pool configuration information of the relay protection equipment. The memory pool nodes of the memory pool in the relay protection equipment and the capacity, type and number of memory blocks of each memory pool node are its memory pool configuration information. The communication signal points of the relay protection equipment include input signal points and output signal points, which are used to describe the signal receiving and sending functions of the relay protection equipment. The function of the input signal point is to convert the external signal into an electrical signal that can be processed by the relay protection equipment. The function of the output signal point is to convert the processing result of the relay protection equipment into a signal that can be recognized by the external equipment to realize the protection and control of the power system.
[0055] The compilation parameter indicates the compilation library to be called by the relay protection device during operation. By using it as part of the device configuration information, the first virtual relay protection device constructed can realize signal processing and message processing.
[0056] The data item configuration information includes telemetry data items, telesignaling data items, remote control data items, set value items, soft pressure plate status and other data items. These data items indicate the information that the relay protection equipment needs to monitor and the control functions that need to be implemented.
[0057] The user can first import the project source file into the PDSOP platform, and then use the code editing tool to adjust the compilation parameters and data item configuration information to realize 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. The second virtual relay protection device and the relay protection device have a memory pool with the same configuration.
[0059] After successfully building the second virtual relay protection device, in theory the device should be able to operate normally after power-on. However, in actual operation, especially after the device is built for the first time, some problems may occur, such as the connection between the boards may not be fully matched, and the configuration data of the boards themselves may be wrong. The logic verification mechanism inside the device will detect these mismatches or errors, and then perform data verification errors. Data verification errors affect the normal operation of the device, which manifests as abnormal device function or performance degradation.
[0060] In order to ensure the stability and reliability of the device, the second virtual relay protection device needs to be reset to the factory state to eliminate possible data verification errors and obtain the first virtual relay protection device. The first virtual relay protection device and the second virtual relay protection device 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 for the first virtual relay protection device to operate, ie, to realize communication interaction.
[0062] Input the compiled analog quantity script file, input quantity script file, output quantity script file, protection action script file and communication test script file into the PDSOP platform.
[0063] In some embodiments, the script file may be written in Python.
[0064] Generate analog quantity based on analog quantity script file. Analog quantity refers to the continuously changing physical quantity received by the relay protection device, such as current, voltage, etc.
[0065] Generate binary inputs based on binary input script files. Binary inputs refer to discrete signals received by relay protection devices, such as switch status, button presses, etc.
[0066] Generate output quantities based on output quantity script files. Output quantities refer to control signals output by relay protection equipment, such as trip signals, alarm signals, start signals, etc.
[0067] Generate protection actions based on protection action script files. Protection actions refer to the protection measures taken by relay protection devices when a fault or abnormality is detected, such as current quick-break protection, overvoltage protection, etc.
[0068] The above script files can be called flexibly to generate different types of data information. Data information types are divided into single type and composite type. Single type contains only one type of data information, which can be single / multiple analog quantities, single / multiple input quantities, single / multiple output quantities, single / multiple protection actions. Composite type data information contains different types of data information, for example, analog quantity + input quantity, floating point value data, and Boolean type data. This information is simulation information, which is the data information to be monitored and the response data information of the relay protection equipment when monitoring the power equipment and power system.
[0069] These data information need to be stored in the memory pool, and after storage, they can occupy the corresponding memory blocks in the memory pool to realize memory consumption. The communication interaction messages required by the client can be generated through these data information stored in the memory pool.
[0070] Different data amounts correspond to power interaction data of different data sizes, and different combinations of data types also correspond to power interaction data of different data sizes.
[0071] The script files including analog quantity script file, input quantity script file, output quantity script file and protection action script file form the power information output terminal for outputting power interaction data.
[0072] The communication test script file includes a full-load MMS communication test script file and a client full-load service communication test script file, and the client may be multiple clients or a single client.
[0073] Full load MMS is the working state of a system or server when it reaches its maximum processing power or capacity.
[0074] In some embodiments, it is generally necessary to meet the communication requirements when 16 clients are connected. The present application implements acceleration of the expansion process according to 18 client configurations.
[0075] In some embodiments, communication requirements of multiple clients, such as 18 clients, are configured to the same client, so that communication between a single virtual client and the first virtual relay protection device can be achieved.
[0076] A virtual client for message interaction with the first virtual relay protection device is constructed through the communication test script file. Through load setting, large-scale concurrent requests are simulated, including report service, set value service, log service, remote control service, file service, etc.
[0077] The number of communication signal points of the relay protection device is limited. Under the limitation of the number of communication signal points, the relay protection device will not perform unlimited memory pool expansion operations during operation. When the stable state is reached, the memory pool expansion operation is stopped. The stable state refers to the state where the memory pool nodes are no longer expanded, that is, the memory pool can meet all memory requirements of the device's real-time communication.
[0078] The user can set a preset time, which is the time the user expects to reach a stable state. In actual operation, it takes three to four months for the relay protection device to reach a stable state. The preset time can be set to 2-3 days. Compared with actual operation, the time to reach a stable state is greatly reduced.
[0079] The message interaction speed is determined based on the preset time and the total reference amount of messages during normal operation of the relay protection device. Compared with the actual message interaction speed of the relay protection device, the message interaction speed is much higher. The higher the message interaction speed and the more frequent the message interaction, the faster the generation of the stable state of the first virtual relay protection device.
[0080] Step 302, in a virtual communication environment, based on the storage space capacity required for the power interaction data in the communication, the memory pool nodes of the first virtual relay protection device are expanded from a first number to a second number; each of the memory pool nodes contains a plurality of memory blocks of the same capacity type.
[0081] In the virtual communication environment, the first virtual relay protection device can receive the power interaction data generated based on the script file, and the first virtual relay protection device needs to store the power interaction data in its virtual memory pool. When storing, a memory block of appropriate capacity is determined for the power interaction data according to the storage space required for the power interaction data.
[0082] By vertical traversal comparison, a memory pool node corresponding to a memory block capacity that matches the storage space capacity required for the power interaction data is found. If a corresponding memory pool node exists and the memory pool node corresponds to a free memory block, the power interaction data can be stored in a virtual memory pool.
[0083] In some embodiments, in the virtual communication environment, based on the storage space capacity required for the power interaction data in the communication, the memory pool nodes of the first virtual relay protection device are expanded from a first number to a second number, including: when there is no memory block storing the power interaction data in the virtual memory pool, the 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.
[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, and 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, a capacity size type that is closest to the required storage space capacity size and can normally store the power interaction data is selected from the set multiple capacity size types as the memory block capacity of the newly added memory pool node. For example, the set multiple capacity size types include 32 bytes, 64 bytes, 128 bytes, etc., and the required storage space capacity size is 82 bytes, then a memory pool node containing a 128-byte memory block is added to the virtual memory pool.
[0086] This limitation can ensure that the power interaction data can be stored smoothly in the virtual memory pool without data loss or damage, which affects the normal operation of the equipment. At the same time, since different capacity sizes correspond to different memory pool nodes, this limitation can also avoid the configuration of memory block capacity sizes that are too detailed, resulting in an increase in the capacity size types in the memory pool, resulting in an increase in memory pool nodes, and affecting communication efficiency.
[0087] In some embodiments, the number of memory blocks corresponding to the newly added memory pool node is determined based on the corresponding memory block capacity. Generally, the smaller the memory block capacity, the more memory blocks are added. For example, if the newly added memory pool node corresponds to a 32-byte memory block, 5,000 32-byte memory blocks are configured for the node; if the newly added memory pool node corresponds to a 200,000-byte memory block, 100 200,000-byte memory blocks are configured for the node.
[0088] The number of memory blocks can be flexibly configured according to the different memory block capacities. When the memory block capacity is small, adding more memory blocks can reduce the probability of frequent small memory block applications and avoid more memory pool nodes that need to be traversed and compared. For large-capacity 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 types of memory blocks included in all the memory pool nodes in the virtual memory pool of the first virtual relay protection device, and the number of memory blocks of each capacity type.
[0090] The number of communication signal points of the first virtual relay protection device is limited. When it is expanded to a certain extent, the corresponding virtual memory pool can already meet all memory requirements of the first virtual relay protection device for real-time communication, and thereafter, no memory pool expansion operation will occur. This state in which all memory requirements of the first virtual relay protection device for real-time communication can be met and no memory pool expansion operation is performed is called the stable state of the memory pool.
[0091] The number of memory pool nodes of the virtual memory pool in a stable state does not increase any more. Therefore, the number of memory pool nodes can be used to determine whether a stable state has been reached.
[0092] After the expansion, a second number of memory pool nodes is obtained, and the second number changes dynamically with the expansion operation. By monitoring the second number of memory pool nodes, it can be known whether the virtual memory pool of the first virtual relay protection device reaches a stable state.
[0093] As mentioned above, it is expected that when the operation time of the first virtual relay protection device reaches the preset time, its memory pool meets the real-time dynamic requirements and reaches a stable state. However, during the operation, the communication requirements may change due to various factors. For example, network delays, signal interference or equipment failures may extend the time to reach a stable state.
[0094] To quickly determine and obtain the capacity and quantity information corresponding to the stable state, the process of monitoring the number of memory pool nodes before a preset time can be skipped.
[0095] In some embodiments, the method of obtaining the capacity size types of memory blocks contained in all the 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 based on the second number of memory pool nodes 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 number of memory pool nodes of the previous time; if the number of memory pool nodes is the same as the number of memory pool nodes of the previous time, adding one to the count; when the count number does not reach the set number, returning to execute the step of obtaining the number of memory pool nodes of the first virtual relay protection device; when the count number reaches the set number, obtaining the capacity size types of memory blocks contained in all the 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.
[0096] It should be noted that after comparing the number of memory pool nodes with the previous number of memory pool nodes, it also includes: if the number of memory pool nodes is different from the previous number of memory pool nodes, the count number is reset to zero, and the step of obtaining the number of memory pool nodes of the first virtual relay protection device is returned.
[0097] By comparing the number of memory pool nodes multiple times, it is possible to promptly discover and respond to abnormal fluctuations during device memory expansion, that is, the count times are reset to zero, and then the memory block information is obtained after the number of nodes is stable. This ensures that the obtained memory block information is a true reflection of the device in a stable state, avoids data errors caused by fluctuations in the device's operating status, and obtains more accurate information on the capacity, size, type, and quantity of memory blocks.
[0098] In addition, when the capacity size types of the memory blocks in a stable state and the number of memory blocks of each capacity size type are obtained, the operation of the first virtual relay protection device is stopped to save resources.
[0099] In some embodiments, in a virtual communication environment, a first virtual relay protection device is run. After the running time of the first virtual relay protection device reaches a preset time, memory pool information in a stable state is determined and obtained by comparing the number of memory pool nodes.
[0100] In some embodiments, the information table containing the 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 the present application.
[0101] Table 1 Memory pool operation status table of the first virtual relay protection device
[0102]
[0103] Table 1 clearly shows the memory pool information of the first virtual relay protection device when it reaches a stable state after running in the virtual communication environment based on the initial memory pool, which includes different memory pool nodes, the memory block capacity and number of memory blocks contained in the memory pool nodes, and the allocation link between the nodes and their corresponding memory blocks.
[0104] In Table 1, Pool means memory pool, and Pool+number indicates the node number in the memory pool. For example, Pool 23 is the 23rd node in the memory pool. For ease of description, it can be called memory pool node 23. The allocation process includes V1.0 initial allocation and extended allocation during operation. V1.0 initial allocation refers to the memory configured by the first virtual relay protection device before operation. Extended allocation during operation refers to the newly added memory expanded in the memory pool of the first virtual relay protection device during operation. Among them, V1.0 here is 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] In order to display more content, the memory pool nodes with the same memory block capacity and number of memory blocks and belonging to the same allocation link are merged and put into the same row in the table. For specific merged items, see the first column of Table 1.
[0106] It should be noted that the memory block capacity, the number of memory blocks and the allocation link contained in each row indicate that all memory pool nodes corresponding to the row correspond to the 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 of each memory pool node is 255, and they are all 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 of each memory pool node is 1000, and these nodes and memory blocks are all expanded during operation.
[0108] Based on the memory pool information when the stable state is reached as shown in Table 1, the capacity size types and the number of memory blocks corresponding to each capacity size type can be counted. According to the information shown in Table 1, the capacity size types are 32 bytes, 64 bytes, 1000 bytes, 400000 bytes and 900000 bytes. Similarly, according to the information shown in Table 1, it can be calculated that there are 261120 memory blocks with a capacity of 32 bytes, 179765 memory blocks with a capacity of 64 bytes, 5 memory blocks with a capacity of 400000 bytes, and 4 memory blocks with a capacity of 900000 bytes.
[0109] Through statistical calculation, the capacity types and the number of memory blocks corresponding to each capacity type are obtained.
[0110] By expanding the virtual relay protection equipment in the virtual communication environment and combining it with the judgment of the number of memory pool nodes, the memory block capacity and quantity information in a stable state can be actively obtained. On-site maintenance or operation personnel do not need to pay attention to whether there is an abnormal time when the communication efficiency of the relay protection equipment is reduced due to the increase in memory pool nodes at the operation site, which frees up manpower and saves personnel costs.
[0111] Step 304: Based on all the capacity size types and the number of memory blocks of each capacity size type in the virtual memory pool, 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.
[0112] All the capacity types and the number of memory blocks of each capacity type in the acquired virtual memory pool are the memory pool capacity information and memory pool quantity information corresponding to all memory requirements for real-time communication of the first virtual relay protection device.
[0113] Different memory pool nodes correspond to memory blocks of different sizes and types. The number of memory pool nodes to be configured for the relay protection device can be determined based on all sizes and types in the virtual memory pool. Each size and type corresponds to at least one memory pool node.
[0114] In some embodiments, a memory pool node is determined for each capacity size type, and the third number is equal to the number of all the 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 for the corresponding memory pool node, or a certain number of memory blocks can be appropriately increased based on the number of memory blocks corresponding to the capacity size type, which helps to cope with sudden demands or memory allocation peaks and improve response speed.
[0115] In some embodiments, based on the number of all the capacity size types and each memory block of the capacity size type in the virtual memory pool, 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, including: determining the capacity size types and the corresponding number of memory blocks to be supplemented 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 the number of all the capacity size types and each memory block of the capacity size type in the virtual memory pool, as well as the 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 operates in a virtual communication environment, its communication requirements and memory requirements may differ from those in an actual power system. Such differences may result in the requirement for memory blocks of certain specific capacity sizes not being fully considered when expanding in the virtual communication environment, resulting in the missing capacity information of 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 with the same number of communication signal points when reconfigured using the existing method to determine the capacity 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 replenished, and the third number is equal to the sum of the number of all the capacity size types and the capacity size types to be replenished in the virtual memory pool.
[0119] The number of memory blocks corresponding to each capacity size type in the virtual memory pool is determined as the number of memory blocks to be configured for the corresponding memory pool node, and the number of memory blocks corresponding to each capacity size type to be supplemented is determined as the number of memory blocks to be configured for the corresponding memory pool node. Similarly, a certain number of memory blocks can be appropriately increased based on the 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 type corresponding to the number of communication signal points is determined; all the 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 of all the capacity size types in the virtual memory pool; based on the number of communication signal points, the number of memory blocks corresponding to the capacity size type to be supplemented is determined.
[0121] According to the number of communication signal points of the relay protection device, query the capacity size type when the memory pool of other relay protection devices with the same number of communication signal points is reconfigured as a reference capacity size type.
[0122] By comparing with all capacity size types in the virtual memory pool, the capacity size type that does not exist in all capacity size types in the virtual memory pool and needs to be supplemented is determined.
[0123] Then, based on the number of communication signal points, query the number of memory blocks corresponding to the capacity size type to be supplemented in other relay protection devices with the same number of communication signal points, and use it as a reference data when configuring the number of memory blocks to implement the configuration of memory blocks of the memory pool nodes of the capacity size type to be supplemented.
[0124] In some embodiments, the types of capacity to be supplemented and the corresponding number of memory blocks may also be calculated based on the number of communication signal points.
[0125] In some embodiments, the memory pool nodes of the relay protection device are adjusted to a third number through a secure file transfer protocol (Secure Shell File Transfer Protocol, SFTP), and a target number of memory blocks of the same capacity and type are configured for each memory pool node. As can be seen from the above, the values corresponding to the target numbers of different memory pool nodes may be different.
[0126] In order to fully verify the effect of the memory pool configuration method described in this application after configuration, based on all capacity size types and the number of memory blocks of each capacity size type in the virtual memory pool, a memory pool configuration scheme in which the number of memory pool nodes is greatly reduced compared to the second number is determined, and the configuration number of memory blocks of each capacity size type in the scheme is greater than or equal to the number of memory blocks corresponding to the capacity size 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] The reconfigured first virtual relay protection device is run in the virtual communication environment. After the running time of the reconfigured first virtual relay protection device reaches a preset time, the memory pool node number comparison count is performed to determine that a stable state has been reached, and then the memory pool information of the reconfigured first virtual relay protection device is obtained.
[0128] In some embodiments, the obtained information is shown in Table 2, which is a memory pool operation status table of a reconfigured first virtual relay protection device provided in an embodiment of the present application.
[0129] The V2.0 initial allocation in Table 2 represents the configured memory of 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. In order to distinguish it from the initial memory pool in Table 1, it is referred to as the V2.0 initial configuration here.
[0130] Table 2 Memory pool operation status table 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 links. The difference is that the memory pool nodes in Table 2 are greatly reduced compared to Table 1. At the same time, according to the allocation link, the reconfigured first virtual relay protection device does not have expanded nodes and memory blocks during operation in the virtual communication environment. The number of nodes is greatly reduced, which means that the search and comparison time of memory blocks of different sizes is reduced, and the communication efficiency is improved. The absence of expanded nodes and memory blocks means that the reconfigured memory pool can meet the memory usage requirements of the first virtual relay protection device and its corresponding relay protection device.
[0133] It should be noted that Pool 0 to Pool 5 in Table 2 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. That is, when determining the memory pool node, not only can one memory pool node be allocated for multiple memory blocks of the same capacity, but multiple memory pool nodes can also be allocated for multiple memory blocks of the same capacity. It should be noted that the number of memory pool nodes after reconfiguration should not exceed the set number of nodes. If the number of nodes exceeds the set number, the communication efficiency will be reduced. For example, the set number of nodes can be taken from the range of 40-60.
[0134] In Table 2, for the allocation of multiple memory blocks with a capacity of 32 bytes, Pool0 to Pool 4 each contain 50,000 memory blocks, and Pool 5 contains 12,000 memory blocks. The number of memory blocks in Pool 5 is different from that in Pool 0 to Pool 4. That is, when allocating multiple memory pool nodes for multiple memory blocks of the same capacity, reasonably allocating the number of memory blocks in each node according to the total number of memory blocks can save memory occupancy.
[0135] There are also Pool 23 containing 160 memory blocks of 500,000 bytes and Pool 24 containing 10 memory blocks of 1,000,000 bytes in Table 2. The settings of these nodes and the corresponding memory blocks are considered for the possible need for memory blocks with a larger capacity during the actual operation process. When the first virtual relay protection device operates in a virtual communication environment, it may not involve relevant power interaction data, resulting in a lack of capacity size types. The corresponding capacity size types to be supplemented and the number of memory blocks corresponding to them are added.
[0136] Compare the number of memory blocks of the same capacity size types shown in Table 1 and Table 2. There are 261,120 memory blocks of 32 bytes in Table 1 and 262,000 memory blocks of 32 bytes in Table 2. There are 179,765 memory blocks of 64 bytes in Table 1 and 180,000 memory blocks of 64 bytes in Table 2. It shows that during configuration, the memory block capacity of any capacity size type during reconfiguration is greater than or equal to the expanded memory block capacity.
[0137] After communication testing, the communication interaction time of the relay protection device configured in Table 1 is at the second level, and the communication interaction time of the relay protection device configured in Table 2 is at the ten-millisecond level. Compared with the former, the communication interaction time of the latter is improved by two orders of magnitude, that is, the communication efficiency is greatly improved.
[0138] This application turns passive into active. Based on the constructed virtual relay protection device and virtual communication environment, it accelerates the simulation of the stable state of the memory pool of the relay protection device running for a long time in the substation. According to the memory pool configuration information in the stable state, it pre-optimizes the memory pool configuration of the relay protection device to make its memory pool design in a stable state, solves the problem of lag in memory pool reconfiguration, avoids the problem of increased nodes and decreased communication efficiency caused by insufficient memory resource allocation, ensures that the relay protection device continuously and efficiently conducts communication interaction, and can better protect power equipment and the power system.
[0139] In an embodiment of the present application, a first virtual relay protection device of a relay protection device is constructed, and in a virtual communication environment, the expansion of the memory pool node of the first virtual relay protection device is realized according to the storage space capacity required for the power interaction data. When the memory pool node is expanded to the second number, the capacity size type of the 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 are obtained, and the memory pool nodes of the relay protection device are adjusted to the third number accordingly, and the target number of memory blocks of the same capacity size type are configured for each memory pool node. The present application introduces a virtual device and a virtual communication environment, and the capacity information and quantity information of the memory blocks used to realize the memory pool reconfiguration are successfully obtained by running the virtual device in the virtual communication environment. Based on this information, the memory pool of the relay protection device is directly reconfigured, and active optimization is realized without the need for collaboration among multiple departments, which greatly reduces personnel costs and time costs, and improves the configuration efficiency of the memory pool.
[0140] See also Figure 4 , Figure 4 This is a structural diagram of a memory pool configuration system provided in an embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0141] The memory pool configuration system 400 includes: a construction module 401 , an expansion 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 of the relay protection device; the first virtual relay protection device and the relay protection device both have corresponding memory pools, and the memory pool contains memory blocks of different sizes and types.
[0143] The expansion module 402 is used to expand the 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 of the memory pool nodes contains multiple memory blocks of the same capacity type.
[0144] The acquisition module 403 is used to acquire the capacity size types of memory blocks contained in all the 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 based on the second number of the memory pool nodes.
[0145] The adjustment module 404 is used to adjust the memory pool nodes of the relay protection device to a third number based on the number of all the capacity size types and each memory block of the capacity size type in the virtual memory pool, 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.
[0146] In some embodiments, the building blocks are specifically used to:
[0147] Based on the device configuration information of the relay protection device, a second virtual relay protection device is constructed; the second virtual relay protection device and the relay protection device both correspond to the memory pool, and the memory pool includes memory blocks of different sizes and types;
[0148] The second virtual relay protection device is reset to a factory state to obtain the first virtual relay protection device.
[0149] In some embodiments, the expansion module is specifically used for:
[0150] In the case that there is no memory block storing the power interaction data in the virtual memory pool, the 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 to:
[0152] 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;
[0153] Compare the number of memory pool nodes with the number of memory pool nodes of the previous time;
[0154] If the number of nodes in the memory pool is the same as the number of nodes in the previous memory pool, the count is increased by one;
[0155] If the counted number does not reach the set number, returning to the step of obtaining the number of memory pool nodes of the first virtual relay protection device;
[0156] When the count times reaches the set times, the capacity types of the memory blocks included in all the memory pool nodes in the virtual memory pool of the first virtual relay protection device and the number of memory blocks of each capacity type are obtained.
[0157] If the number of memory pool nodes is different from the number of memory pool nodes of the previous time, the count number 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 to:
[0159] Based on the number of communication signal points of the relay protection device, determining the type of capacity to be supplemented and the number of corresponding memory blocks;
[0160] Determine the third number of the memory pool nodes and the target number of memory blocks of the same capacity size type corresponding to each of the memory pool nodes according to all the capacity size types and the number of memory blocks of each capacity size type in the virtual memory pool, and the capacity size types to be supplemented and the number of corresponding memory blocks;
[0161] The memory pool of the relay protection device is configured with the third number of memory pool nodes, and each memory pool node is configured with the target number of memory blocks of the same capacity corresponding to the node.
[0162] Based on the number of communication signal points of the relay protection device, determining a reference capacity size type corresponding to the number of communication signal points;
[0163] 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;
[0164] Based on the number of communication signal points, the number of memory blocks corresponding to the type of capacity size to be supplemented is determined.
[0165] The memory pool configuration system provided in the embodiment of the present application can implement each process of the embodiment of the above-mentioned memory pool configuration method and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0166] Figure 5 is a structural diagram of an electronic device provided in an embodiment of the present application. As shown in the figure, the electronic device 5 of the embodiment includes: at least one processor 50 ( Figure 5 Only one is shown in the figure), a memory 51, and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein the processor 50 implements the steps of any of the above-mentioned method embodiments when executing the computer program 52.
[0167] The electronic device 5 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of the electronic device 5 and does not constitute a limitation of the electronic device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0168] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0169] The memory 51 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. The memory 51 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. Further, the memory 51 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the electronic device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
[0170] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by 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 embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0171] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0172] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0173] In the embodiments provided in the present 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 schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the system or unit can be electrical, mechanical or other forms.
[0174] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0175] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0176] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased 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 electric carrier signals and telecommunication signals.
[0177] The present application implements all or part of the processes in the above-mentioned embodiment method, and may also be implemented through a computer program product. When the computer program product runs on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0178] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A memory pool configuration method, characterized in that: include: Constructing a first virtual relay protection device of the relay protection device; The first virtual relay protection device and the relay protection device both have corresponding memory pools, and the memory pools include memory blocks of different sizes and types; In a virtual communication environment, based on the storage space capacity required for the power interaction data in the communication, the memory pool nodes of the first virtual relay protection device are expanded from a first number to a second number; the capacity sizes of the multiple memory blocks included in each of the memory pool nodes are the same; Based on the second number of memory pool nodes, obtaining the capacity size types of memory blocks included in all the 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; Based on the number of all the capacity size types and memory blocks of each capacity size type in the virtual memory pool, adjusting the memory pool nodes of the relay protection device to a third number, and configuring 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 types, and the third number is greater than or equal to the number of all capacity types in the virtual memory pool.
2. The method according to claim 1, characterized in that The first virtual relay protection device for constructing the relay protection device includes: Based on the device configuration information of the relay protection device, a second virtual relay protection device is constructed; the second virtual relay protection device and the relay protection device both correspond to the memory pool, and the memory pool includes memory blocks of different sizes and types; The second virtual relay protection device is reset to a factory state to obtain the first virtual relay protection device.
3. The method according to claim 1, characterized in that The method of 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 communication in the virtual communication environment comprises: In the case that there is no memory block storing the power interaction data in the virtual memory pool, the 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.
4. The method according to claim 1, characterized in that: The acquiring, based on the second number of memory pool nodes, the capacity size types of memory blocks contained in all the 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, 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; Compare the number of memory pool nodes with the number of memory pool nodes of the previous time; If the number of nodes in the memory pool is the same as the number of nodes in the previous memory pool, the count is increased by one; If the counted number does not reach the set number, returning to the step of obtaining the number of memory pool nodes of the first virtual relay protection device; When the count times reaches the set times, the capacity types of the memory blocks included in all the memory pool nodes in the virtual memory pool of the first virtual relay protection device and the number of memory blocks of each capacity type are obtained.
5. The method according to claim 4, characterized in that After comparing the number of memory pool nodes with the number of memory pool nodes of the previous time, the method further includes: If the number of memory pool nodes is different from the number of memory pool nodes of the previous time, the count number 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.
6. The method according to claim 1, characterized in that The method of adjusting the memory pool nodes of the relay protection device to a third number based on the number of all the capacity size types and the 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, comprises: Determining the type of capacity to be supplemented and the number of corresponding memory blocks based on the number of communication signal points of the relay protection device; Determine the third number of the memory pool nodes and the target number of memory blocks of the same capacity size type corresponding to each of the memory pool nodes according to all the capacity size types and the number of memory blocks of each capacity size type in the virtual memory pool, and the capacity size types to be supplemented and the number of corresponding memory blocks; The memory pool of the relay protection device is configured with the third number of memory pool nodes, and each memory pool node is configured with the target number of memory blocks of the same capacity corresponding to the node.
7. The method according to claim 6, characterized in that The method comprises: Based on the number of communication signal points of the relay protection device, determining a reference capacity size type corresponding to the number of communication signal points; 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; Based on the number of communication signal points, the number of memory blocks corresponding to the type of capacity size to be supplemented is determined.
8. A memory pool configuration system, characterized in that: include: A construction module, used for constructing a first virtual relay protection device of the relay protection device; The first virtual relay protection device and the relay protection device both have corresponding memory pools, and the memory pools include memory blocks of different sizes and types; An expansion module is used to expand the 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 of the memory pool nodes includes a plurality of memory blocks of the same capacity and type; an acquisition module, configured to acquire, based on the second number of memory pool nodes, the capacity types of memory blocks contained in all the memory pool nodes in the virtual memory pool of the first virtual relay protection device, and the number of memory blocks of each capacity type; an adjustment module, configured to adjust the memory pool nodes of the relay protection device to a third number based on the number of all the capacity size types and the memory blocks of each capacity size type in the virtual memory pool, 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 types, and the third number is greater than or equal to the number of all capacity types in the virtual memory pool.
9. An electronic device, characterized in that: The electronic device comprises 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 implements the method according to any one of claims 1 to 7.
10. A computer program product, characterized in that The invention comprises a computer program which, when executed, causes the method according to any one of claims 1 to 7 to be performed.
Citation Information
Patent Citations
Memory pool construction, memory allocation method and device
CN109144712A
Software protection method and system thereof
US20210374254A1