A virtual IO module communication control method, device, equipment and storage medium

By modular physical IO devices, configuration files and data mapping tables are generated, IO requirements are monitored and automatically scheduled in real time, and the mapping relationship between virtual IO modules and physical IO devices and data stream transmission paths are dynamically optimized, which solves the shortcomings of virtual IO module communication control methods in the existing technology, and realizes efficient and flexible IO module data transmission.

CN119166556BActive Publication Date: 2025-04-29SHENZHEN SANMING ELECTRIC CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411673621.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-04-29
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

The existing virtual IO module communication control methods lack effective configuration and mapping mechanisms, the degree of automation of IO requirements monitoring and scheduling algorithms is not high, it is difficult to adapt to dynamically changing IO requirements, and there is a lack of effective strategies and methods in mapping relationship adjustment and data stream transmission path optimization.

Method used

By modularizing physical IO devices, determining the configuration requirements of virtual IO modules, generating configuration files, creating data mapping tables, realizing the original mapping between virtual IO modules and physical IO devices, initializing data transmission channels, controlling data stream transmission, monitoring IO requirements in real time, automatically triggering IO scheduling algorithms, dynamically configure mapping relationships, and optimizing data stream transmission paths.

Benefits of technology

It realizes efficient matching and resource utilization between virtual IO modules and physical IO devices, improves system flexibility and data transmission efficiency, can respond to changes in IO requirements in a timely manner, and optimizes resource allocation and data flow paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166556B_ABST
    Figure CN119166556B_ABST
Patent Text Reader

Abstract

The present invention discloses a virtual IO module communication control method, device, equipment and storage medium. The present invention determines the configuration requirements of the virtual IO module; configures the virtual IO module according to the number of physical IO devices and the requirements of the virtual IO module to generate a configuration file; implements the original mapping between the virtual IO module and the physical IO device according to the data mapping table; initializes the data transmission channel between the virtual IO module and the physical IO device; controls the physical IO device, the virtual IO module and the main control device to achieve normal data flow transmission; monitors the IO requirements of the physical IO device and the virtual IO module in real time; automatically triggers the preset IO scheduling algorithm; dynamically configures the mapping relationship between the virtual IO module and the physical IO device; and optimizes the data flow transmission path to achieve efficient data transmission. The present invention can achieve effective expansion of IO input and output, improve the data transmission efficiency of the bus IO module, and has high reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of bus technology, and in particular to a virtual IO module communication control method, device, equipment and storage medium. Background Art

[0002] With the development of information technology, physical input / output (IO) devices are increasingly used in computer systems. These physical IO devices usually exchange data with a master device (such as a computer processor) to meet various data processing needs. However, the traditional direct connection between physical IO devices and master devices has some problems and limitations: 1) Lack of flexibility: The connection between traditional IO devices and master devices is usually fixed, which makes the system inflexible when dealing with changing IO requirements. 2) Low resource utilization: In traditional IO device management, the resource utilization of physical IO devices is often not high, especially in a multi-tasking environment. 3) Poor scalability: As the scale of the system expands, the number and types of physical IO devices also increase, which brings challenges to the expansion of the system.

[0003] In order to solve the above problems, the existing technology has proposed the concept of virtual IO module, which abstracts the IO input and output ports through virtualization technology to improve the flexibility and resource utilization of the system. However, the existing virtual IO module communication control method still has the following shortcomings: 1) The lack of effective configuration and mapping mechanism leads to unsatisfactory matching between virtual IO module and physical IO device. 2) The automation level of IO demand monitoring and scheduling algorithm is not high, which makes it difficult to adapt to dynamically changing IO demand. 3) There is a lack of effective strategies and methods in adjusting mapping relationship and optimizing data flow transmission path.

[0004] Therefore, how to reliably and efficiently implement virtual IO module communication control has become an urgent problem to be solved by technicians in this field. Summary of the invention

[0005] In view of the above defects, the embodiments of the present invention provide a virtual IO module communication control method, device, equipment and storage medium to solve the problems existing in the prior art.

[0006] In order to solve the above technical problems, an embodiment of the present invention provides a virtual IO module communication control method, the method comprising:

[0007] Modularize physical IO devices and determine the configuration requirements of virtual IO modules;

[0008] Configuring the virtual IO module according to the number of the physical IO devices and the requirements of the virtual IO module, and generating a configuration file;

[0009] Creating a data mapping table according to the configuration file, and implementing the original mapping between the virtual IO module and the physical IO device according to the data mapping table;

[0010] Initialize the data transmission channel between the virtual IO module and the physical IO device according to the configuration file and the data mapping table;

[0011] Controlling the physical IO device, the virtual IO module and the main control device to achieve normal data flow transmission;

[0012] Monitor the IO requirements of the physical IO device and the virtual IO module in real time to capture changes in requirements;

[0013] When it is detected that the IO demand exceeds a preset threshold, a preset IO scheduling algorithm is automatically triggered;

[0014] Dynamically configure the mapping relationship between the virtual IO module and the physical IO device according to the IO scheduling algorithm;

[0015] The data flow transmission path is optimized according to the adjusted mapping relationship between the virtual IO module and the physical IO device to achieve efficient data transmission.

[0016] Preferably, the virtual IO module communication control method further includes:

[0017] Classifying the processing levels of the virtual IO modules;

[0018] Identify the virtual IO module with a high processing level, and reserve the corresponding physical IO device for the virtual IO module with a high processing level;

[0019] The mapping relationship between the virtual IO module of the high processing level and the corresponding physical IO device is fixed to avoid dynamic allocation.

[0020] Preferably, the dynamically configuring the mapping relationship between the virtual IO module and the physical IO device according to the IO scheduling algorithm includes:

[0021] Evaluate the original mapping relationship between the virtual IO module and the physical IO device;

[0022] Calculating a new optimal mapping relationship based on the original mapping relationship and the IO scheduling algorithm;

[0023] Based on the calculation results, a new mapping configuration file is generated;

[0024] The connection between the virtual IO module and the physical IO device is re-established according to the mapping configuration file.

[0025] Preferably, the calculating a new optimal mapping relationship according to the original mapping relationship and the IO scheduling algorithm includes:

[0026] Comparing the current load parameters of each of the physical IO devices;

[0027] Allocating different weights to each of the physical IO devices according to the comparison result;

[0028] The new optimal mapping relationship is calculated according to the allocation result.

[0029] Preferably, the creating a data mapping table according to the configuration file, and implementing the original mapping between the virtual IO module and the physical IO device according to the data mapping table comprises:

[0030] The mapping between the virtual IO module and the physical IO device is a one-to-one mapping.

[0031] Preferably, the creating a data mapping table according to the configuration file, and implementing the original mapping between the virtual IO module and the physical IO device according to the data mapping table comprises:

[0032] The mapping between the virtual IO module and the physical IO device is a many-to-one mapping.

[0033] Preferably, the controlling the physical IO device, the virtual IO module and the main control device to realize normal data stream transmission includes:

[0034] Ensure that the communication link between the virtual IO module and the main control device is established correctly;

[0035] Starting the virtual IO module, and controlling the virtual IO module to enter a listening state to receive an IO request from the master control device;

[0036] When the master control device generates an IO request, controlling the virtual IO module to forward the IO request to the corresponding physical IO device according to the data mapping table;

[0037] Control the physical IO device to perform corresponding IO operations after receiving the IO request, and return the result to the virtual IO module;

[0038] The virtual IO module is controlled to receive response data from the physical IO device, and transmit the response data back to the main control device.

[0039] In order to solve the above technical problems, an embodiment of the present invention provides a communication control device for a virtual IO module, the device comprising:

[0040] The requirement confirmation module modularizes the physical IO devices and determines the configuration requirements of the virtual IO modules;

[0041] A configuration module, configured according to the number of the physical IO devices and the requirements of the virtual IO module, and generates a configuration file;

[0042] A mapping module, which creates a data mapping table according to the configuration file, and implements the original mapping between the virtual IO module and the physical IO device according to the data mapping table;

[0043] An initialization module, which initializes a data transmission channel between the virtual IO module and the physical IO device according to the configuration file and the data mapping table;

[0044] A data transmission control module controls the physical IO device, the virtual IO module and the main control device to realize normal data flow transmission;

[0045] A demand monitoring module monitors the IO demand of the physical IO device and the virtual IO module in real time to capture demand changes;

[0046] A trigger module, when monitoring that the IO demand exceeds a preset threshold, automatically triggers a preset IO scheduling algorithm;

[0047] A dynamic configuration module dynamically configures the mapping relationship between the virtual IO module and the physical IO device according to the IO scheduling algorithm;

[0048] The optimization module optimizes the data flow transmission path according to the adjusted mapping relationship between the virtual IO module and the physical IO device to achieve efficient data transmission.

[0049] To solve the above technical problems, an embodiment of the present invention provides a virtual IO module communication control device, comprising: at least one processor, at least one memory and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, the method of the first aspect in the above embodiment is implemented.

[0050] To solve the above technical problem, an embodiment of the present invention provides a storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method of the first aspect in the above embodiment is implemented.

[0051] In summary, the embodiments of the present invention provide a method, device, equipment and storage medium for virtual IO module communication control. The present invention can simplify the management and configuration process by modularizing the physical IO device and determining the configuration requirements of the virtual IO module. The virtual IO module is configured according to the number of physical IO devices and the requirements of the virtual IO module to generate a configuration file, which will serve as the basis for subsequent data mapping table creation, data transmission channel initialization, etc. A data mapping table is created according to the configuration file, and the original mapping between the virtual IO module and the physical IO device is implemented according to the data mapping table, so that the corresponding relationship between the virtual IO module and the physical IO device can be confirmed. According to the configuration file and the data mapping table, the data transmission channel between the virtual IO module and the physical IO device is initialized to ensure that the data is transmitted according to the established path and improve the reliability of the transmission. The normal data flow transmission between the physical IO device, the virtual IO module and the main control device is controlled. The IO requirements of the physical IO device and the virtual IO module are monitored in real time, and the changes in requirements are captured, so that the system can respond to the changes in IO requirements in a timely manner. When it is detected that the IO demand exceeds the preset threshold, the preset IO scheduling algorithm is automatically triggered. The mapping relationship between the virtual IO module and the physical IO device is dynamically configured according to the IO scheduling algorithm, thereby optimizing the data flow path and resource utilization. The data flow transmission path is optimized according to the adjusted mapping relationship between the virtual IO module and the physical IO device to achieve efficient data transmission. Therefore, the present invention can achieve effective expansion of IO input and output, improve the data transmission efficiency of the bus IO module, and has high reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following briefly introduces the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0053] Figure 1 The present invention is a flowchart of a virtual IO module communication control method according to an embodiment of the present invention.

[0054] Figure 2 It is a framework schematic diagram of a virtual IO module communication control method according to an embodiment of the present invention.

[0055] Figure 3 It is a flow chart of another virtual IO module communication control method according to an embodiment of the present invention.

[0056] Figure 4 The present invention is a flowchart of a mapping relationship between a virtual IO module and a physical IO device dynamically configured according to an IO scheduling algorithm.

[0057] Figure 5It is a flow chart of calculating a new optimal mapping relationship according to an IO scheduling algorithm in an embodiment of the present invention.

[0058] Figure 6 The present invention is a flowchart of an embodiment of controlling a physical IO device, a virtual IO module and a main control device to realize normal data flow transmission.

[0059] Figure 7 It is a structural diagram of a communication control device for virtual IO modules according to an embodiment of the present invention.

[0060] Figure 8 It is a structural diagram of a virtual IO module communication control device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0061] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.

[0062] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0063] See also Figure 1 , Figure 1 A virtual IO module communication control method provided by the present application comprises the following steps:

[0064] S1. Modularize the physical IO devices and determine the configuration requirements of the virtual IO modules.

[0065] Specifically, in this embodiment, the carrier of the virtual IO module is a bus module. The bus module is also called a bus device, which can control the bus and is the underlying data communication network in the field of automation. The bus module is used in the production site to connect the two-way transmission and branch structure communication network of the intelligent field equipment and the automation control system, and can exchange data with other communicative devices.

[0066] Specifically, the physical IO device is fixed on the bus module and is configured as one or more interfaces such as a connection interface, an Ethernet network interface, a USB interface, etc., which are not specifically limited here.

[0067] Specifically, in this embodiment, the physical IO devices arranged on the bus module are modularized, that is, each physical IO device is defined as an independent module, each module has a unique identifier and configurable parameters, wherein the configurable parameters include read / write speed, capacity, interface type, etc.

[0068] It is worth mentioning that modularizing physical IO devices can simplify the management and configuration process and improve the flexibility of the system.

[0069] Specifically, in this embodiment, the system further analyzes the requirements of the virtual IO module, including the required read and write speeds, data transfer rates, response times, memory size, CPU occupancy, bandwidth, etc., in order to evaluate the compatibility between the virtual IO module and the physical IO device and ensure that the virtual IO module can be effectively mapped to the physical IO device.

[0070] S2. Configure the virtual IO module according to the number of physical IO devices and the requirements of the virtual IO module, and generate a configuration file.

[0071] Specifically, in this embodiment, the virtual IO modules are configured according to the number of physical IO devices and the requirements of the virtual IO modules to ensure that each virtual IO module can be effectively mapped to the corresponding physical IO device. It can be understood that in this embodiment, the number of physical IO devices and virtual IO modules can be set according to user requirements and is not specifically limited here.

[0072] Specifically, in this embodiment, the generated configuration file is used to record the mapping relationship and configuration parameters between the virtual IO module and the physical IO device, and the configuration file will serve as the basis for subsequent data mapping table creation, data transmission channel initialization, etc.

[0073] Specifically, before generating a configuration file, the system creates a configuration file template, which is used to define the format and structure of the configuration file. When generating a configuration file, the corresponding parameters are filled into the configuration file template according to the number of physical IO devices and the requirements of the virtual IO module. These parameters include but are not limited to: the identifier of the virtual IO module, the identifier of the physical IO device mapped to it, the performance parameters of the virtual IO module (such as bandwidth, IOPS, etc.), and the configuration information of the physical IO device (such as interface type, queue depth, etc.).

[0074] It is worth noting that this application stores configuration files in a secure and easily accessible location for system management and maintenance.

[0075] S3. Create a data mapping table according to the configuration file, and implement the original mapping between the virtual IO module and the physical IO device according to the data mapping table.

[0076] Specifically, the data mapping table, as a logical structure, defines the corresponding relationship between the virtual IO module and the physical IO device. In this embodiment, creating the data mapping table according to the information in the configuration file can ensure that data is correctly transmitted from the virtual IO module to the corresponding physical IO device.

[0077] Specifically, in this embodiment, the configuration file is first parsed, then read, and after the configuration parameters of the virtual IO module and the physical IO device are extracted, the key parameters in the configuration file, such as the virtual IO module ID, the physical IO device ID, and performance parameters, are parsed.

[0078] Specifically, in this embodiment, when creating a data mapping table, the data mapping table is initialized to create an empty data mapping table structure, which is used to store the mapping relationship. After the system parses the key parameters in the configuration file, each virtual IO module is associated with the corresponding physical IO device, and the association relationship is filled into the empty data mapping table, thereby realizing the original mapping between the virtual IO module and the physical IO device.

[0079] Specifically, in this embodiment, the format of the data mapping table is set to one of CSV, XML, and a database table, and the format of the data mapping table is not specifically limited herein.

[0080] S4. Initialize the data transmission channel between the virtual IO module and the physical IO device according to the configuration file and the data mapping table.

[0081] Specifically, in this embodiment, the data transmission channel between the virtual IO module and the physical IO device is initialized according to the configuration file and the data mapping table, so as to configure the communication path between the virtual IO module and the physical IO device to ensure that the virtual IO module and the physical IO device can start exchanging data.

[0082] Specifically, in this embodiment, according to the information in the configuration file and the data mapping table, a data transmission channel is configured for each mapping relationship between the virtual IO module and the physical IO device, and necessary system resources such as network bandwidth and cache size are allocated to the data transmission channel.

[0083] Furthermore, the present application also verifies whether the data transmission channel is operating normally by sending a test data packet. In addition, the present application records the initialization state of each data transmission channel for subsequent monitoring and management.

[0084] S5. Control the physical IO device, the virtual IO module and the main control device to achieve normal data flow transmission.

[0085] S6. Monitor the IO requirements of physical IO devices and virtual IO modules in real time to capture changes in requirements.

[0086] Specifically, in this embodiment, by real-time monitoring of the IO requirements of the physical IO devices and the virtual IO modules, it is ensured that the system can respond to changes in the IO requirements in a timely manner, thereby maintaining the efficiency and reliability of data transmission.

[0087] Specifically, in this embodiment, the system collects IO demand data in real time. The IO demand data includes but is not limited to the number of read and write times, data volume, operation type, OPS (input / output operations per second), etc. The collected IO demand data is transmitted to the main control device, and the main control device analyzes the demand changes of the physical IO devices and virtual IO modules based on the IO demand data.

[0088] S7: When the IO demand is detected to exceed the preset threshold, the preset IO scheduling algorithm is automatically triggered.

[0089] Specifically, in this embodiment, the system collects IO demand data in real time for integrated quantification, so as to make a comprehensive judgment on the IO demand data. When the IO demand of the physical IO device and the virtual IO module changes and the IO demand exceeds the preset threshold, the preset IO scheduling algorithm is automatically triggered, so that the application can automatically adjust resource allocation.

[0090] S8. Dynamically configure the mapping relationship between the virtual IO module and the physical IO device according to the IO scheduling algorithm.

[0091] Specifically, the IO scheduling algorithm is used to dynamically reallocate the mapping relationship between virtual IO modules and physical IO devices according to the current IO demand and workload, thereby optimizing the data flow path and resource utilization.

[0092] S9. Optimize the data flow transmission path according to the adjusted mapping relationship between the virtual IO module and the physical IO device to achieve efficient data transmission.

[0093] Specifically, in this embodiment, the optimal data stream transmission path is determined according to the adjusted mapping relationship between the virtual IO module and the physical IO device.

[0094] Further, according to the optimized path, the data transmission channel between the virtual IO module and the physical IO device is reinitialized, so that normal data flow transmission can be performed between the physical IO device, the virtual IO module and the main control device. Therefore, the present application can achieve more efficient data transmission after the mapping relationship is adjusted, thereby improving the performance of the overall system.

[0095] In summary, the present application provides a virtual IO module communication control method. In this solution, by modularizing the physical IO device and determining the configuration requirements of the virtual IO module, the management and configuration process can be simplified. The virtual IO module is configured according to the number of physical IO devices and the requirements of the virtual IO module, and a configuration file is generated. The configuration file will serve as the basis for subsequent data mapping table creation, data transmission channel initialization, etc. A data mapping table is created according to the configuration file, and the original mapping between the virtual IO module and the physical IO device is implemented according to the data mapping table, so that the corresponding relationship between the virtual IO module and the physical IO device can be confirmed. According to the configuration file and the data mapping table, the data transmission channel between the virtual IO module and the physical IO device is initialized to ensure that the data is transmitted according to the established path and improve the reliability of the transmission. Control the normal data flow transmission between the physical IO device, the virtual IO module and the main control device. The IO requirements of the physical IO device and the virtual IO module are monitored in real time, and the demand changes are captured, so that the system can respond to the IO demand changes in a timely manner. When the IO demand is detected to exceed the preset threshold, the preset IO scheduling algorithm is automatically triggered. The mapping relationship between the virtual IO module and the physical IO device is dynamically configured according to the IO scheduling algorithm, thereby optimizing the data flow path and resource utilization. According to the adjusted mapping relationship between the virtual IO module and the physical IO device, the data flow transmission path is optimized to achieve efficient data transmission. Therefore, the present invention can achieve effective expansion of IO input and output, improve the data transmission efficiency of the bus IO module, and has high reliability.

[0096] Based on the above embodiments:

[0097] See also Figure 2 , Figure 2 A framework schematic diagram of a virtual IO module communication control method provided in this application.

[0098] See also Figure 3 , Figure 3 A flowchart of another virtual IO module communication control method provided in this application.

[0099] As a preferred embodiment, a virtual IO module communication control method further includes:

[0100] S10, classifying each virtual IO module into processing levels.

[0101] Specifically, in this embodiment, the performance requirements and business criticality of each virtual IO module are evaluated. The performance requirements include bandwidth requirements, I / O operation frequency, response time requirements, etc., and the business criticality includes the urgency of data processing, etc., which are not specifically limited here.

[0102] Specifically, in this embodiment, according to the evaluation results, the virtual IO modules are divided into different processing levels, such as level A (critical), level B (important) and level C (general). In addition, the level division of each virtual IO module can also be customized according to user requirements, which is not specifically limited here.

[0103] It is worth noting that the present application can distinguish the importance and priority of virtual IO modules through level classification, so that key business needs can be guaranteed in terms of transmission.

[0104] S11. Identify the virtual IO module with a high processing level, and reserve a corresponding physical IO device for the virtual IO module with the high processing level.

[0105] Specifically, in this embodiment, a unique identification tag is assigned to each virtual IO module, and modules with high processing levels are specifically marked.

[0106] In one embodiment, a field is set in the configuration file of the virtual IO module to record the processing level of the virtual IO module, and the field is encrypted to ensure security.

[0107] S12. Fix the mapping relationship between the virtual IO module with a high processing level and the corresponding physical IO device to avoid dynamic allocation.

[0108] Specifically, in this embodiment, after the virtual IO modules classified as Class A are clearly defined, the mapping relationship between the virtual IO modules of Class A and the reserved physical IO devices is set to static, and specific physical IO devices are statically allocated to the virtual IO modules of the high processing level.

[0109] Furthermore, a list is created for the virtual IO modules classified as class A, the list including detailed information such as the name, identification, and performance requirement of the virtual IO modules.

[0110] Furthermore, a physical IO device with stable performance and sufficient capacity is selected as a reserved resource, and after determining a unique identifier of the physical IO device such as a device ID, each class A virtual IO module is directly mapped to a specific physical IO device.

[0111] See also Figure 4 , Figure 4 A flowchart of a mapping relationship between a virtual IO module and a physical IO device is provided for dynamically configuring the mapping relationship between the virtual IO module and the physical IO device according to an IO scheduling algorithm.

[0112] As a preferred embodiment, dynamically configuring the mapping relationship between the virtual IO module and the physical IO device according to the IO scheduling algorithm includes:

[0113] S81. Evaluate the original mapping relationship between the virtual IO module and the physical IO device.

[0114] Specifically, in this embodiment, the system first collects the original mapping relationship data between the current virtual IO module and the physical IO device, and then further analyzes key performance indicators such as delay, bandwidth utilization, error rate, etc. during data transmission.

[0115] Specifically, the present application evaluates the quality of the original mapping relationship between the virtual IO module and the physical IO device by comparing the actual performance index with the preset performance standard.

[0116] S82. Calculate a new optimal mapping relationship based on the original mapping relationship and the IO scheduling algorithm.

[0117] S83. Generate a new mapping configuration file based on the calculation result.

[0118] Specifically, in this embodiment, the calculated optimal mapping relationship is converted into a configuration file format. The mapping relationship between the virtual IO module and the physical IO device is clearly defined in the configuration file, including information such as device number and port number, and the configuration file is saved for subsequent calls.

[0119] S84. Re-establish the connection between the virtual IO module and the physical IO device according to the mapping configuration file.

[0120] Specifically, in this embodiment, the system reads a new mapping configuration file, obtains a new mapping relationship between the virtual IO module and the physical IO device, and then disconnects the current virtual IO module from the physical IO device.

[0121] According to the new mapping relationship, the data transmission channel between the virtual IO module and the physical IO device is re-established.

[0122] Furthermore, the present application also verifies the new mapping relationship to ensure that data transmission proceeds normally.

[0123] See also Figure 5 , Figure 5 A flowchart for calculating a new optimal mapping relationship based on an IO scheduling algorithm is provided for this application.

[0124] As a preferred embodiment, calculating a new optimal mapping relationship according to the original mapping relationship and the IO scheduling algorithm includes:

[0125] S821. Compare the current load parameters of each physical IO device.

[0126] Specifically, in this embodiment, before calculating the new optimal mapping relationship, the system first collects the load parameters of the physical IO devices and compares and analyzes the collected load parameters, wherein the load parameters include CPU usage, memory usage, I / O operation rate, etc., which are not specifically limited here.

[0127] It is worth noting that, by evaluating the current working status of each physical IO device and performing comparative analysis on the load parameters, the present application can identify which physical IO devices are in a high-load state and which physical IO devices still have the ability to handle more tasks, thereby achieving good load balancing and data transmission optimization processing.

[0128] S822. Allocate a different weight to each physical IO device according to the comparison result.

[0129] Specifically, in this embodiment, the system defines a weight value for each physical IO device according to the current load of each physical IO device.

[0130] It is worth noting that, by assigning different weights to different physical IO devices, the present application quantifies the ability of each physical IO device to handle additional loads, thereby more accurately reflecting the processing capacity of each physical IO device.

[0131] S823. Calculate a new optimal mapping relationship based on the allocation result.

[0132] Specifically, in this embodiment, an IO scheduling algorithm is used to calculate a new mapping relationship. Based on the algorithm calculation result, a new mapping relationship between the virtual IO module and the physical IO device is generated.

[0133] Specifically, in this embodiment, when there are multiple virtual IO modules and multiple physical IO devices, the IO scheduling algorithm for dynamically adjusting the mapping relationship needs to consider the requirements of all virtual IO modules and the load conditions of all physical IO devices.

[0134] Specifically, in this embodiment, the specific formula of the IO scheduling algorithm is: .

[0135] in:

[0136] Indicates virtual IO module Decision variables mapped to physical IO device i.

[0137] P represents the collection of physical IO devices.

[0138] V represents a collection of virtual IO modules.

[0139] Indicates the current load of physical IO device i.

[0140] Indicates the weight of physical IO device i, reflecting the processing capability or priority of the physical IO device.

[0141] Is a function used to quantize the virtual IO module The impact of demand on the physical IO device i load.

[0142] The argmin function is used to indicate the value of the independent variable that makes the function reach the minimum value.

[0143] Specifically, in this embodiment, for each physical IO device i, the total load is the current load Add the sum of the impact of all virtual IO modules on its load .

[0144] Specifically, in this embodiment, the calculated total load is divided by the weight of the physical IO device. , in order to adjust the load calculation so that it can reflect the actual processing capacity of the physical IO device.

[0145] Specifically, when making a mapping decision, for each virtual IO module, a physical IO device that minimizes the above calculation result is selected for mapping, ensuring that each virtual IO module can be mapped to the physical IO device that best suits its needs.

[0146] It is worth noting that the IO scheduling algorithm formula of this application is explained as follows: for each virtual IO module Reselect a physical IO device i so that the total load of the physical IO device (current load Add virtual IO module Demand for this equipment , and then divided by the weight of the device ) minimum. Therefore, this application can ensure that each virtual IO module They are all mapped to the physical IO device that best suits their current needs, thereby achieving load balancing and efficient use of resources.

[0147] As a more specific example, assume there are 3 physical IO devices (P1, P2, P3) and 2 virtual IO modules (V1, V2). Each physical IO device has a weight (W) and a current load (L), and each virtual IO module's demand for the physical IO device is expressed by a function To express.

[0148] The following is a simplified data of physical IO devices and virtual IO modules:

[0149] Physical IO devices:

[0150] P1: weight W1 = 3, current load L1 = 20;

[0151] P2: weight W2 = 2, current load L2 = 10;

[0152] P3: weight W3 = 1, current load L3 = 5;

[0153] Virtual IO module:

[0154] V1: Demand for P1 f(V1, P1) = 5, demand for P2 f(V1, P2) = 3, demand for P3 f(V1, P3) = 2;

[0155] V2: Demand for P1 f(V2, P1) = 4, Demand for P2 f(V2, P2) = 6, Demand for P3 f(V2, P3) = 1;

[0156] Mapping the decision process:

[0157] For Virtual IO Module V1:

[0158] Calculate the total load on each physical IO device (including V1 demand):

[0159] P1: ;

[0160] P2: ;

[0161] P3: ;

[0162] Select the physical IO device with the smallest total load for mapping:

[0163] P2 has the smallest total load (6.5), so V1 is mapped to P2.

[0164] For Virtual IO Module V2:

[0165] Calculate the total load on each physical IO device (including V2 demand):

[0166] P1: ;

[0167] P2: ;

[0168] P3: ;

[0169] Select the physical IO device with the smallest total load for mapping:

[0170] P3 has the smallest total load (6), so V2 is mapped to P3.

[0171] It is worth noting that, through the above process, each virtual IO module in the present application is mapped to the most suitable physical IO device according to the demand. The mapping decision of the present application is based on the total load calculation of each physical IO device, wherein the total load takes into account the current load of the physical IO device and the demand of the virtual IO module for the device. Selecting the physical IO device with the smallest total load for mapping can ensure that the demand of the virtual IO module is met while maintaining the load balance between the physical IO devices.

[0172] As a preferred embodiment, creating a data mapping table according to a configuration file, and implementing the original mapping between the virtual IO module and the physical IO device according to the data mapping table includes:

[0173] The mapping between virtual IO modules and physical IO devices is one-to-one.

[0174] Specifically, in this embodiment, in the case of one-to-one mapping, each virtual IO module is mapped to a physical IO device.

[0175] As a preferred embodiment, creating a data mapping table according to a configuration file, and implementing the original mapping between the virtual IO module and the physical IO device according to the data mapping table includes:

[0176] The mapping between virtual IO modules and physical IO devices is many-to-one mapping.

[0177] Specifically, in this embodiment, in the case of many-to-one mapping, multiple virtual IO modules can be mapped to one physical IO device, which is not specifically limited here.

[0178] See also Figure 6 , Figure 6 A flowchart for controlling normal data flow transmission between a physical IO device, a virtual IO module and a main control device is provided in this application.

[0179] As a preferred embodiment, controlling the normal data flow transmission between the physical IO device, the virtual IO module and the main control device includes:

[0180] S51. Ensure that the communication link between the virtual IO module and the main control device is established correctly.

[0181] S52, start the virtual IO module, and control the virtual IO module to enter a listening state to receive an IO request from the main control device.

[0182] S53: When the master control device generates an IO request, the virtual IO module is controlled to forward the IO request to the corresponding physical IO device according to the data mapping table.

[0183] S54, controlling the physical IO device to perform corresponding IO operations after receiving the IO request, and returning the results to the virtual IO module.

[0184] S55 . Control the virtual IO module to receive the response data from the physical IO device, and transmit the response data back to the main control device.

[0185] See also Figure 7 The embodiment of the present invention provides a virtual IO module communication control device, the device comprising:

[0186] Demand confirmation module 1 modularizes the physical IO devices and determines the configuration requirements of the virtual IO modules;

[0187] Configuration module 2, configuring the virtual IO module according to the number of the physical IO devices and the requirements of the virtual IO module, and generating a configuration file;

[0188] A mapping module 3 is configured to create a data mapping table according to the configuration file, and implement the original mapping between the virtual IO module and the physical IO device according to the data mapping table;

[0189] Initialization module 4, initializes the data transmission channel between the virtual IO module and the physical IO device according to the configuration file and the data mapping table;

[0190] The data transmission control module 5 controls the physical IO device, the virtual IO module and the main control device to realize normal data flow transmission;

[0191] A demand monitoring module 6 monitors the IO demand of the physical IO device and the virtual IO module in real time to capture demand changes;

[0192] The trigger module 7 automatically triggers a preset IO scheduling algorithm when it is detected that the IO demand exceeds a preset threshold;

[0193] A dynamic configuration module 8 dynamically configures the mapping relationship between the virtual IO module and the physical IO device according to the IO scheduling algorithm;

[0194] The optimization module 9 optimizes the data flow transmission path according to the adjusted mapping relationship between the virtual IO module and the physical IO device to achieve efficient data transmission.

[0195] In addition, combined Figure 1 The virtual IO module communication control method described in the embodiment of the present invention can be implemented by a network virtual IO module communication control device. Figure 8 A schematic diagram of the hardware structure of a virtual IO module communication control device provided in an embodiment of the present invention is shown.

[0196] The virtual IO module communication control device may include a processor 401 and a memory 402 storing computer program instructions.

[0197] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.

[0198] The memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 402 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 402 may be inside or outside the data processing device. In a specific embodiment, the memory 402 is a non-volatile solid-state memory. In a specific embodiment, the memory 402 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.

[0199] The processor 401 implements any one of the virtual IO module communication control methods in the above embodiments by reading and executing computer program instructions stored in the memory 402 .

[0200] In one example, the virtual IO module communication control device may further include a communication interface 403 and a bus 410. Figure 8 As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.

[0201] The communication interface 403 is mainly used to implement the communication between the modules, devices, units and / or equipment in the embodiment of the present invention.

[0202] Bus 410 includes hardware, software or both, and couples the components of virtual IO module communication control device to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 410 may include one or more buses. Although the embodiment of the present invention describes and shows a specific bus, the present invention considers any suitable bus or interconnection.

[0203] In addition, in combination with a virtual IO module communication control method in the above embodiment, an embodiment of the present invention can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions. When the computer program instructions are executed by a processor, any virtual IO module communication control method in the above embodiment is implemented.

[0204] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.

[0205] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.

Claims

1. A virtual IO module communication control method, characterized in that: The virtual IO module communication control method comprises: Modularize physical IO devices and determine the configuration requirements of virtual IO modules; Configuring the virtual IO module according to the number of the physical IO devices and the requirements of the virtual IO module, and generating a configuration file; Creating a data mapping table according to the configuration file, and implementing the original mapping between the virtual IO module and the physical IO device according to the data mapping table; Initialize the data transmission channel between the virtual IO module and the physical IO device according to the configuration file and the data mapping table; Controlling the physical IO device, the virtual IO module and the main control device to achieve normal data flow transmission; Monitor the IO requirements of the physical IO device and the virtual IO module in real time to capture changes in requirements; When it is detected that the IO demand exceeds a preset threshold, a preset IO scheduling algorithm is automatically triggered; Dynamically configuring the mapping relationship between the virtual IO module and the physical IO device according to the IO scheduling algorithm includes: Evaluate the original mapping relationship between the virtual IO module and the physical IO device; Calculating a new optimal mapping relationship based on the original mapping relationship and the IO scheduling algorithm; Based on the calculation results, a new mapping configuration file is generated; Re-establishing the connection between the virtual IO module and the physical IO device according to the mapping configuration file; The calculating of a new optimal mapping relationship according to the original mapping relationship and the IO scheduling algorithm includes: Comparing the current load parameters of each of the physical IO devices; Allocating different weights to each of the physical IO devices according to the comparison result; Calculating the new optimal mapping relationship according to the allocation result; The formula of the IO scheduling algorithm is: ; in: Indicates virtual IO module Decision variables mapped to physical IO device i; P represents the set of physical IO devices; V represents a collection of virtual IO modules; Indicates the current load of physical IO device i; Indicates the weight of physical IO device i, reflecting the processing capability or priority of the physical IO device; Is a function used to quantize the virtual IO module The impact of demand on the load of physical IO device i; The data flow transmission path is optimized according to the adjusted mapping relationship between the virtual IO module and the physical IO device to achieve efficient data transmission.

2. A virtual IO module communication control method according to claim 1, characterized in that: The virtual IO module communication control method further includes: Classifying the processing levels of the virtual IO modules; Identify the virtual IO module with a high processing level, and reserve the corresponding physical IO device for the virtual IO module with a high processing level; The mapping relationship between the virtual IO module of the high processing level and the corresponding physical IO device is fixed to avoid dynamic allocation.

3. A virtual IO module communication control method according to claim 1, characterized in that: The step of creating a data mapping table according to the configuration file and implementing the original mapping between the virtual IO module and the physical IO device according to the data mapping table comprises: The mapping between the virtual IO module and the physical IO device is a one-to-one mapping.

4. A virtual IO module communication control method according to claim 1, characterized in that: The step of creating a data mapping table according to the configuration file and implementing the original mapping between the virtual IO module and the physical IO device according to the data mapping table comprises: The mapping between the virtual IO module and the physical IO device is a many-to-one mapping.

5. A virtual IO module communication control method according to claim 1, characterized in that: The controlling the physical IO device, the virtual IO module and the main control device to realize normal data flow transmission includes: Ensure that the communication link between the virtual IO module and the main control device is established correctly; Starting the virtual IO module, and controlling the virtual IO module to enter a listening state to receive an IO request from the master control device; When the master control device generates an IO request, controlling the virtual IO module to forward the IO request to the corresponding physical IO device according to the data mapping table; Control the physical IO device to perform corresponding IO operations after receiving the IO request, and return the result to the virtual IO module; The virtual IO module is controlled to receive response data from the physical IO device, and transmit the response data back to the main control device.

6. A virtual IO module communication control device, characterized in that: The device comprises: The requirement confirmation module modularizes the physical IO devices and determines the configuration requirements of the virtual IO modules; A configuration module, configured according to the number of the physical IO devices and the requirements of the virtual IO module, and generates a configuration file; A mapping module, which creates a data mapping table according to the configuration file, and implements the original mapping between the virtual IO module and the physical IO device according to the data mapping table; An initialization module, which initializes a data transmission channel between the virtual IO module and the physical IO device according to the configuration file and the data mapping table; A data transmission control module controls the physical IO device, the virtual IO module and the main control device to realize normal data flow transmission; A demand monitoring module monitors the IO demand of the physical IO device and the virtual IO module in real time to capture demand changes; A trigger module, when monitoring that the IO demand exceeds a preset threshold, automatically triggers a preset IO scheduling algorithm; A dynamic configuration module dynamically configures the mapping relationship between the virtual IO module and the physical IO device according to the IO scheduling algorithm, including: Evaluate the original mapping relationship between the virtual IO module and the physical IO device; Calculating a new optimal mapping relationship based on the original mapping relationship and the IO scheduling algorithm; Based on the calculation results, a new mapping configuration file is generated; Re-establishing the connection between the virtual IO module and the physical IO device according to the mapping configuration file; The calculating of a new optimal mapping relationship according to the original mapping relationship and the IO scheduling algorithm includes: Comparing the current load parameters of each of the physical IO devices; Allocating different weights to each of the physical IO devices according to the comparison result; Calculating the new optimal mapping relationship according to the allocation result; The formula of the IO scheduling algorithm is: ; in: Indicates virtual IO module Decision variables mapped to physical IO device i; P represents the set of physical IO devices; V represents a collection of virtual IO modules; Indicates the current load of physical IO device i; Indicates the weight of physical IO device i, reflecting the processing capability or priority of the physical IO device; Is a function used to quantize the virtual IO module The impact of demand on the load of physical IO device i; The optimization module optimizes the data flow transmission path according to the adjusted mapping relationship between the virtual IO module and the physical IO device to achieve efficient data transmission.

7. A virtual IO module communication control device, characterized in that: include: At least one processor, at least one memory and computer program instructions stored in the memory, when the computer program instructions are executed by the processor, implement the method according to any one of claims 1 to 5.

8. A storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Virtual distributed network interface controller

    CN116668381A