Virtual container resource management method and device and computer equipment
By constructing a mapping relationship between virtual containers and data structures and a data coding sequence, the problem of low efficiency in virtual container resource management is solved, and data compression and management efficiency of resource occupancy information are improved.
Patent Information
- Application Number
- CN202510832738.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-10-17
AI Technical Summary
In conventional technologies, for continuous resource search and management of complex virtual containers in large-scale networks, virtual container resource information is stored in a binary one-to-one manner, resulting in low resource search and management efficiency.
Construct a mapping relationship between each virtual container and a preset data structure, reflect the resource occupancy of each level of virtual containers through a data coding sequence, use the data coding sequence to achieve data compression of the resource occupancy information, and update the data coding in the data structure through the mapping relationship and resource occupancy information.
It achieves data compression of resource occupancy information, improves the efficiency of resource search and management, simplifies the storage method, and ensures the accuracy and efficiency of resource management.
Smart Images

Figure CN120803697A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network technology and security technology, in particular to a virtual container resource management method and device, computer equipment, computer readable storage medium and computer program product. BACKGROUND
[0002] In an SDH (Synchronous Digital Hierarchy) network, the carrying and management of service bandwidth depend on virtual containers (VC) of different levels, such as VC12, VC3 and VC4. A VC4 contains 3 VC3s, and a VC3 contains 21 VC12s.
[0003] In the traditional technology, the management of virtual containers is usually independent recording and calculation of virtual containers of different levels, and then maintaining a list of remaining available resources. Specifically, a database uses multiple information tables and table cascades to store the state of virtual container resources at different granularities according to different virtual container granularities. For example, for the 21 VC12 virtual containers contained in a VC3 virtual container, the resource occupation of each VC12 virtual container is represented one-to-one in a binary manner, obtaining 21 binary sequences. At the same time, the 21 binary sequences can also be used to reflect the resource occupation of a VC3.
[0004] However, in the traditional technology, for the continuous resource search and management of complex virtual containers in a large-scale network, the storage of virtual container resource information in a binary one-to-one manner is low in efficiency. SUMMARY
[0005] Therefore, it is necessary to provide a virtual container resource management method and device, computer equipment, computer readable storage medium and computer program product to solve the above technical problems.
[0006] In a first aspect, the present application provides a virtual container resource management method, which comprises:
[0007] constructing a mapping relationship between each virtual container and a preset data structure; the data structure stores a data coding sequence, and each data coding in the data coding sequence is constructed based on resource occupation information of a plurality of lowest level virtual containers, and the resource occupation of virtual containers of other levels is reflected through the data coding sequence in addition to the lowest level virtual containers;
[0008] receiving a virtual container service issued by an upper layer service system, and parsing virtual container resource occupation information in the virtual container service;
[0009] updating data encoding of a target data position in the data structure based on the mapping relationship and the virtual container resource occupation information, to obtain an updated target data encoding sequence; the data structure is used to reflect occupation of the virtual container resources of the current levels.
[0010] In one of the embodiments, the virtual containers include a first level virtual container, a second level virtual container and a third level virtual container in order from high to low level; the first level virtual container includes a plurality of second level virtual containers, and the second level virtual container includes a plurality of third level virtual containers; the higher the level, the larger the capacity of the virtual container.
[0011] In one of the embodiments, the mapping relationship between the virtual containers and the preset data structure includes:
[0012] mapping relationships between each level virtual container and data positions in the preset data structure are established in order from low to high level of the virtual containers;
[0013] each data encoding sequence corresponding to the first level virtual container is stored in the data mapping table based on the number order of the virtual containers.
[0014] In one of the embodiments, the virtual container resource occupation information includes a resource occupation sequence, and the resource occupation sequence includes numbers of target virtual containers to be occupied in the virtual containers.
[0015] In one of the embodiments, the virtual container resource occupation information in the virtual container service includes:
[0016] the resource occupation sequence in the resource occupation information is parsed in order from high to low level of the virtual containers;
[0017] the target virtual container requiring resource occupation is determined based on the number of the target virtual container in the resource occupation sequence.
[0018] In one of the embodiments, the updating of the data encoding of the target data position in the data structure based on the mapping relationship and the virtual container resource occupation information, to obtain the updated target data encoding sequence, includes:
[0019] the target data position corresponding to the target virtual container is found in the data structure based on the number of the target virtual container included in the resource occupation sequence and the mapping relationship;
[0020] the state parameter data on the target data position is updated, and the updated data encoding corresponding to the target data position is obtained based on the preset data encoding conversion rule and the updated state parameter data;
[0021] constructing an updated target data encoding sequence based on the updated data encoding.
[0022] In one of the embodiments, before the updating of the data encoding of the target data position in the data structure based on the mapping relationship and the virtual container resource occupation information, the method further comprises:
[0023] querying a data mapping table corresponding to the data structure based on the virtual container resource occupation information, and detecting whether the target virtual container resource has been occupied in the data mapping table;
[0024] if the target virtual container resource has been occupied, feeding back resource occupation information to an upper-layer business system.
[0025] In one of the embodiments, the method further comprises:
[0026] querying a data encoding sequence in the data structure in response to a resource occupation query request;
[0027] based on the data encoding sequence, the mapping relationship between each virtual container and the data structure, and a preset data encoding conversion rule, reversely analyzing to obtain resource occupation information of each hierarchical virtual container;
[0028] performing visual processing on the resource occupation information of each hierarchical virtual container, and displaying the resource occupation information of each hierarchical virtual container according to a preset display rule.
[0029] In a second aspect, the application further provides a virtual container resource management device, comprising:
[0030] a construction module configured to construct a mapping relationship between each virtual container and a preset data structure; the data structure stores a data encoding sequence, each data encoding in the data encoding sequence is constructed based on resource occupation information of a plurality of lowest-level virtual containers, and resource occupation of virtual containers at other levels except the lowest-level virtual containers is reflected through the data encoding sequence;
[0031] an analysis module configured to receive a virtual container service issued by an upper-layer business system, and analyze virtual container resource occupation information in the virtual container service;
[0032] an updating module configured to update data encoding of a target data position in the data structure based on the mapping relationship and the virtual container resource occupation information, to obtain an updated target data encoding sequence; the data structure is used to reflect current resource occupation of virtual containers at each level.
[0033] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0034] mapping relationships between the virtual containers and a preset data structure are constructed, the data structure stores data encoding sequences, each data encoding in the data encoding sequences is constructed based on resource occupation information of virtual containers at a lowest level, and resource occupation of virtual containers at other levels is reflected through the data encoding sequences except the virtual containers at the lowest level;
[0035] receiving a virtual container service issued by an upper-layer service system and analyzing virtual container resource occupation information in the virtual container service;
[0036] updating data encoding at a target data position in the data structure based on the mapping relationships and the virtual container resource occupation information to obtain an updated target data encoding sequence; the data structure is used to reflect current resource occupation of virtual containers at each level.
[0037] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program implements the following steps when executed by a processor:
[0038] mapping relationships between the virtual containers and a preset data structure are constructed, the data structure stores data encoding sequences, each data encoding in the data encoding sequences is constructed based on resource occupation information of virtual containers at a lowest level, and resource occupation of virtual containers at other levels is reflected through the data encoding sequences except the virtual containers at the lowest level;
[0039] receiving a virtual container service issued by an upper-layer service system and analyzing virtual container resource occupation information in the virtual container service;
[0040] updating data encoding at a target data position in the data structure based on the mapping relationships and the virtual container resource occupation information to obtain an updated target data encoding sequence; the data structure is used to reflect current resource occupation of virtual containers at each level.
[0041] In a fifth aspect, the present application further provides a computer program product comprising a computer program, and the computer program implements the following steps when executed by a processor:
[0042] constructing a mapping relationship between each virtual container and a preset data structure; the data structure stores data encoding sequences, each data encoding in the data encoding sequences is constructed based on resource occupation information of a plurality of lowest-level virtual containers, and resource occupation of virtual containers at other levels is reflected by the data encoding sequences in addition to the lowest-level virtual containers;
[0043] receiving a virtual container service issued by an upper-layer service system, and parsing virtual container resource occupation information in the virtual container service;
[0044] updating data encoding at a target data position in the data structure based on the mapping relationship and the virtual container resource occupation information, to obtain an updated target data encoding sequence; the data structure is used to reflect current resource occupation of virtual containers at each level.
[0045] The virtual container resource management method, device, computer equipment, computer readable storage medium, and computer program product described above construct a mapping relationship between each virtual container and a preset data structure; the data structure stores data encoding sequences, each data encoding in the data encoding sequences is constructed based on resource occupation information of a plurality of lowest-level virtual containers, and resource occupation of virtual containers at other levels is reflected by the data encoding sequences in addition to the lowest-level virtual containers; a virtual container service issued by an upper-layer service system is received, and virtual container resource occupation information in the virtual container service is parsed; data encoding at a target data position in the data structure is updated based on the mapping relationship and the virtual container resource occupation information, to obtain an updated target data encoding sequence; the data structure is used to reflect current resource occupation of virtual containers at each level. By constructing resource occupation information of a plurality of lowest-level virtual containers into one data encoding, and then forming a data encoding sequence from a plurality of data encodings to reflect resource occupation information of virtual containers at each level, data compression of resource occupation information is achieved, storage space is greatly reduced, and compared with a storage mode of binary digital mapping for each lowest-level virtual container, the storage mode of resource occupation information is simplified, and the efficiency of resource searching and management is improved. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor.
[0047] Figure 1 A flowchart of a virtual container resource management method in an embodiment;
[0048] Figure 2 Flowchart of the process between each virtual container and the preset data structure in an embodiment;
[0049] Figure 3 Flowchart of the process of determining the target virtual container in an embodiment;
[0050] Figure 4 Flowchart of the process of updating the target data encoding sequence in an embodiment;
[0051] Figure 5 Flowchart of the process of querying the resource occupation of the target virtual container in an embodiment;
[0052] Figure 6 Flowchart of the process of visualizing the resource occupation in an embodiment;
[0053] Figure 7 Display page of the resource occupation in an embodiment;
[0054] Figure 8 Structural block diagram of the virtual container resource management device in an embodiment;
[0055] Figure 9 Internal structural diagram of the computer device in an embodiment. DETAILED DESCRIPTION
[0056] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0057] Before introducing the specific embodiments of the present application, the professional terms involved in the present application are explained:
[0058] SDH virtual container: Virtual Container (VC) is a concept in Synchronous Digital Hierarchy (SDH). Virtual Container is an information structure used to support channel layer connection. It is composed of information payload and path overhead (POH) information area arranged in block frame structure with a repetition period of 125μs or 500μs, and the positioning information identifying the starting point of VC frame is provided by the service network. It usually includes two types: high-level (also known as high-order) virtual container and low-level (also known as low-order) virtual container; the high-order virtual container includes VC4, and the low-order virtual container includes VC3 and VC12.
[0059] OTN (Optical Transport Networks): based on wavelength division multiplexing technology, the transport network organized in the optical layer.
[0060] In one embodiment, as shown in Figure 1 A method for managing virtual container resources is provided, and the embodiment is exemplified by the method applied to an EOS service system. The method includes the following steps:
[0061] Step 102, constructing a mapping relationship between each virtual container and a preset data structure.
[0062] In the data structure, there is a data coding sequence, and each data coding in the data coding sequence is constructed based on the resource occupation information of multiple lowest-level virtual containers, and the resource occupation of virtual containers at other levels is reflected through the data coding sequence, except for the lowest-level virtual containers.
[0063] In implementation, the carrying and management of service bandwidth in the SDH network depend on virtual containers at various levels. In order to more efficiently process virtual container resources, the lower-level service system in the lower-level service system needs to construct a mapping relationship between each virtual container and a preset data structure. The preset data structure is designed and configured based on the sequential numbering of virtual containers at various levels, and is a structure for storing and managing virtual container resource information. In the data structure, the core storage content is a data coding sequence. The data coding sequence contains multiple data codings, each of which is not simply corresponding to a single lowest-level virtual container, but is constructed based on the resource occupation information of multiple lowest-level virtual containers in order to achieve data compression. Therefore, the lower-level service system takes the lowest-level virtual container as the basic unit of resource management, and its resource occupation is integrated through specific algorithms and rules to form a data coding. In addition to the lowest-level virtual container, the resource occupation of virtual containers at other higher levels does not need to be recorded separately, but is reflected through the data coding sequence composed of data codings. In this way, through the data coding sequence stored in the data structure and the data codings contained in the data coding sequence, the occupation of virtual container resources at various levels can be presented in a simple and efficient manner, laying a foundation for subsequent virtual container resource management.
[0064] Step 104, receiving the virtual container service issued by the upper-level service system and parsing the virtual container resource occupation information in the virtual container service.
[0065] In implementation, in the process of virtual container resource management, the lower-level service system receives the virtual container service issued by the upper-level service system and parses the resource occupation information thereof, in order to manage the virtual container resources.
[0066] Specifically, when the lower-level business system, for example, the lower-level business system, receives the virtual container service request issued by the upper-level business system, a specific analysis algorithm and rule are used to analyze and process the virtual container service request, and the virtual container resource occupation information contained in the virtual container service request is analyzed, such as the virtual container resources required by the virtual container service request, which involves low-order virtual containers VC3 or low-order virtual containers VC12, occupation time, size of required continuous resource blocks, etc. Through the analyzed virtual container resource occupation information, the lower-level business system can accurately grasp the specific demand of the service for the virtual container resources.
[0067] In step 106, based on the mapping relationship and the virtual container resource occupation information, the data encoding of the target data position in the data structure is updated to obtain an updated target data encoding sequence.
[0068] The data structure is used to reflect the occupation of the virtual container resources at the current levels.
[0069] In implementation, the lower-level business system allocates virtual container resources for the virtual container service based on the virtual container resource occupation information required by the virtual container service, and after allocating the virtual container resources, updates the data encoding of the target data position corresponding to the occupied target virtual container in the data structure based on the mapping relationship and the virtual container resource occupation information, thereby obtaining an updated target data encoding sequence. In this way, the lower-level business system can record the resource occupation of the virtual containers at the current levels in real time by means of the data structure, and at the same time, the lower-level business system can complete the query and management of the virtual container resource occupation based on the data structure.
[0070] Specifically, after obtaining the virtual container resource occupation information, the lower-level business system updates the data structure based on the pre-constructed mapping relationship between the virtual container and the data structure. First, according to the parsed virtual container resource occupation information, the corresponding position of the target virtual container in the data structure is determined. This process relies on the mapping rule of the level, number, etc. of the virtual container and the index of the data structure, i.e. the preset mapping relationship. For example, if the virtual container business request occupies a specific VC12 resource, the lower-level business system quickly locates the position in the data structure where the state parameter data of the VC12 is stored through the mapping relationship. Then, the lower-level business system converts the state parameter data of the virtual container resource into corresponding data according to the established algorithm, for example, the state parameter data includes: "occupied = 1", "unoccupied = 0". Then the state parameter data corresponding to the VC12 is converted from 0 to 1 to form the new resource occupation information of the virtual container V12. Further, based on the change of the resource occupation information of the lowest level virtual container, the data encoding of the resource occupation information of the virtual container (the lowest level virtual container) and other multiple lowest level virtual containers is updated, and then, since the target data position in the data structure is updated, the entire data encoding sequence is also adjusted to form a new target data encoding sequence, so as to reflect the resource occupation situation of the virtual containers at each level based on the updated data structure.
[0071] In this embodiment, the resource occupation information of multiple lowest level virtual containers is constructed into one data encoding, and then multiple data encodings form a data encoding sequence, so as to reflect the resource occupation information of virtual containers at each level, realize data compression of resource occupation information, greatly reduce the storage space, and compared with the storage mode of binary digital mapping of each lowest level virtual container, simplify the storage mode of resource occupation information, and also improve the efficiency of resource searching and management.
[0072] In one embodiment, the virtual containers include first level virtual containers, second level virtual containers and third level virtual containers in order from high to low. The first level virtual containers include multiple second level virtual containers, and the second level virtual containers include multiple third level virtual containers. The higher the level, the larger the capacity of the virtual container.
[0073] In implementation, in the communication network resource management system, the virtual container (VC) adopts a hierarchical architecture design, and is divided into a first-level virtual container, a second-level virtual container and a third-level virtual container in order of capacity and resource management granularity from large to small. This hierarchical structure is similar to the mode of "container in container", and the high-level virtual container can accommodate multiple low-level "small containers" as a "large container". Specifically, the first-level virtual container as a high-order virtual container can contain multiple second-level virtual containers, for example, 1 virtual container VC4 contains 3 VC3s; and each second-level virtual container is further divided into multiple third-level virtual containers, for example, 1 VC3 contains 21 VC12s. The higher the level, the larger the capacity of the virtual container, and the larger the data flow or service scale that can be carried. This hierarchical resource division method not only facilitates the macro overall management of network bandwidth, but also realizes the fine allocation of service demand, and provides flexible and adaptive transmission channels for communication services of different scales and types.
[0074] In an optional embodiment, based on the hierarchical division of virtual containers including VC4, VC3 and VC12, the corresponding data structure can be to map the VC4, VC3 and VC12 resources in the SDH network into a complete virtual "Y chromosome" structure, that is, to use the biological chromosome metaphor to manage the virtual container resources of SDH, and to store in a single table using VC4 as the whole mapping unit, and to map VC3 and VC12 into single chromosomes in the "Y chromosome" and base pairs in the single chromosomes. The specific mapping process is described in the following embodiments.
[0075] In an embodiment, as shown in FIG. 2, step 102 includes steps 202 to 204. Wherein: Figure 2
[0076] Step 202, the mapping relationship between each level of virtual container and the data position in the preset data structure is established in order from low to high level of virtual container.
[0077] In implementation, when constructing the virtual container resource management system, the mapping relationship between the virtual containers and the data positions of the preset data structure is established in low-to-high order based on the numbers of the virtual containers at each level. First, starting from the lowest level, i.e., from the third-level virtual containers, the lower-level business system allocates state parameter data for each third-level virtual container in order according to the number order of the third-level virtual containers, and makes the state parameter data one-to-one corresponding to the specific data positions in the data structure. For example, the third-level virtual container is VC12, and there are two state parameters for VC12, i.e., occupied and unoccupied, represented by 1 and 0 respectively. In this way, the mapping relationship between the state parameter data of each VC12 and the data positions in the preset data structure is established. Then, the mapping of the virtual containers at the upper level is continued, i.e., the mapping relationship of the resources of the virtual containers VC3 at the upper level of VC12 is constructed. Since there are 21 VC12s in one VC3, each VC3 is processed in order based on the number order of VC3, for example, the first VC3 in the full amount of VC3 at this level contains 21 VC12s, and the mapping relationship of the data positions in the preset data structure has been determined, so the data positions in the data structure where the 21 VC12s are located constitute a whole which can correspond to the resources of one VC3. Correspondingly, the mapping of the virtual containers at the upper level is continued, i.e., the mapping of VC4 is continued, and one VC4 contains 3 VC3s, so the data positions of the 3 VC3s in the data structure have a mapping relationship with one VC4.
[0078] In this embodiment, through this low-to-high and layer-by-layer progressive mapping mode, not only can the resource occupation information of the virtual containers at each level be stored in order in the data structure, but also the resource state can be quickly located and queried through the number, greatly improving the efficiency and accuracy of resource management and scheduling.
[0079] In step 204, the data coding sequence corresponding to each first-level virtual container is stored into the data mapping table by taking the first-level virtual container as the mapping unit.
[0080] In implementation, the lower-level business system takes the first-level virtual container as the mapping unit, and stores the data coding sequence corresponding to each first-level virtual container (one VC4) into the same table entry of the data mapping table of the database, so as to facilitate the resource query and management of each first-level virtual container and the lower-order virtual containers (e.g., VC3 and VC12) contained in the first-level virtual container.
[0081] Specifically, the first-level virtual container is the highest-level resource set, covering multiple second-level virtual containers and their subordinate third-level virtual containers, and the state change of which directly affects the overall resource allocation. The lower business system regards each first-level virtual container as a mapping unit, integrates the state of all lower-level virtual containers (i.e., low-order virtual containers, such as VC3 and VC12) in the first-level virtual container, and processes the resource occupation information of each virtual container in order according to the mapping relationship between each level virtual container and the data position in the data structure based on the order of the corresponding number of each level virtual container. Specifically, the lower business system converts the resource occupation information of each virtual container into a data coding sequence according to the preset data coding conversion rule, and then stores the resource occupation information of each second-level virtual container and third-level virtual container contained in the first-level virtual container in the form of a data coding sequence in the data mapping table.
[0082] In an optional embodiment, the lower business system configures the corresponding number of each VC12 as: VC4 number-VC3 number-VC12 row-VC12 column. The number is also the complete virtual container time slot path of the VC12 in each level virtual container. The number of each VC12 is used to sequentially process and store the resource occupation information of each VC12. Each VC3 contains 21 VC12 resources, which form a 7x3 matrix. However, the matrix form is not convenient for direct storage in a database, so the lower business system needs to transform it. For the resource occupation information of the VC12, the resource state of the VC12 is assigned as follows: occupied as 1, and unoccupied as 0. Further, in order to reduce data storage space and compress data, the lower business system encodes and converts the resource occupation information of the 3 VC12s in each row of the 7x3 matrix according to the preset data coding rule, and constructs the resource occupation information of each row of VC12 into a data code. For example, for different situations of the resource occupation information of each row of VC12 in the matrix, there are 8 combination modes for the assignment of each row of VC12. According to the preset data coding rule, 8 data codes corresponding to the 8 combination modes can be obtained. As shown in Table 1 below:
[0083] Table 1
[0084] Resource occupation of 3 V12s Data encoding 000 0 001 1 010 2 011 3 100 4 101 5 110 6 111 7
[0085] Further, for the data coding rule, the resource occupation information of each row VC12 in the 7x3 matrix corresponding to the VC3 corresponds to one data coding, and one VC3 corresponds to one data coding sequence containing 7 data codings. Based on the data coding sequence representing the resource occupation information of the VC3, it is avoided to store one binary number for each VC12, so that one VC3 needs to store 21 binary numbers, achieving the purpose of saving memory. In this way, one VC4 contains 3 VC3s, and the resource occupation information of one VC4 corresponds to 3 data coding sequences, therefore, the lower-level business system takes one VC4 as a mapping unit, and stores the resource occupation information contained in one mapping unit to one table item. That is, the complete representation of the VC4 is:
[0086] {“VC3”:[“first data coding”, “second data coding”, “third data coding”]}
[0087] In this way, the lower-level business system stores the data coding sequences corresponding to each hierarchical virtual container in the data mapping table of the upper-level business system according to the number order of each VC4. The data mapping table is a database table, and the data mapping table is shown in Table 2 as follows:
[0088] Table 2
[0089] VC4 sequence number Data structure mapping resource 1 {"VC3": ["0000000", "0000000", "0000000"]}} 2 {"VC3": ["0000000", "0000000", "0000000"]}} …… {"VC3": ["0000000", "0000000", "0000000"]}}
[0090] Each data coding sequence shown in the above Table 2 is “00000000”, which means that the virtual container resource at the current time is initialized, and each virtual container resource is not occupied.
[0091] In the embodiment, for each first-level virtual container in the data mapping table, the corresponding data coding sequence is accurately written. The data mapping table adopts a structured storage design, and is associated with the identifier of the first-level virtual container through indexing, forming a corresponding relationship between the first-level virtual container number and the data coding sequence. This storage method not only ensures the integrity and independence of the resource occupation information of each first-level virtual container, but also quickly locates the data coding sequence of the target first-level virtual container through indexing when a business request or resource query is performed, efficiently obtains the resource state of each hierarchical virtual container inside it, and provides accurate data support for resource scheduling, conflict detection, and capacity planning of the upper-level business system.
[0092] In one embodiment, the virtual container resource occupation information includes a resource occupation sequence, and the resource occupation sequence includes the number of a target virtual container to be occupied in each hierarchical virtual container.
[0093] In implementation, in the virtual container resource management process, the upper-layer business system issues a virtual container related business to the lower-layer business system, for example, a business related to background data, an EOS (Ethernet over SDH, Ethernet over SDH) business, and the like, and the related business is executed by occupying the virtual container resource, and therefore, the virtual container business request issued carries the virtual container resource occupation information. The virtual container resource occupation information is in the form of a resource occupation sequence, wherein the resource occupation sequence records the target virtual container number to be occupied in each level virtual container. The resource occupation sequence is first arranged in the order from high to low according to the level of the virtual container, starting from the first level virtual container, and specifically specifying the specific number container to be occupied, and then sequentially refined to the second level and the third level. For example, if a business needs to occupy a complete first level virtual container, the resource occupation sequence clearly marks the global number of the first level virtual container. If a business needs to occupy part of the second level and the third level virtual containers in the first level virtual container, the resource occupation sequence clearly marks the global number of the first level virtual container and the specific second level virtual container number to be occupied in the first level virtual container and the corresponding third level virtual container number in the second level virtual container. Through this accurate number identification method of each level and each specific virtual container, the resource management lower-layer business system can quickly locate the mapping position of the target virtual container in the preset data structure, efficiently execute the resource occupation operation, and at the same time ensure the accuracy and uniqueness of the resource allocation, avoid resource conflicts or allocation errors caused by ambiguous information, and provide reliable guarantee for subsequent resource state update and business transmission.
[0094] In one example embodiment, as shown in FIG. 3, step 104 includes steps 302-304. In which: Figure 3
[0095] Step 302, according to the order from high to low according to the level of the virtual container, analyze the resource occupation sequence in the resource occupation information.
[0096] In implementation, after receiving the virtual container business issued by the upper-layer business system, the virtual container resource occupation information contained in the virtual container business is analyzed. The virtual container resource occupation information contains the number of the target virtual container to be occupied, and therefore, the lower-layer business system analyzes the resource occupation sequence in the resource occupation information in the order from high to low according to the level of the virtual container. First, the high-order virtual container VC4 is analyzed, and the VC4 is a large-capacity transmission unit carrying the resource information of multiple low-order virtual containers. By analyzing the resource occupation sequence, the time slot path of each virtual container is analyzed according to the number contained in the resource occupation sequence.
[0097] Step 304, based on the number of the target virtual container in the resource occupation sequence, determine the target virtual container that needs to be occupied.
[0098] In implementation, the lower-layer business system determines the target virtual container that needs resource occupation based on the numbering of each target virtual container in the resource occupation sequence that is parsed. Specifically, the resource occupation sequence records the numbering information of each virtual container to be occupied. For example, if an EOS service with a 10M bandwidth is to be opened, based on the corresponding relationship between virtual container and bandwidth, it is determined that a virtual container of the VC12 type needs to be occupied. In this EOS service, the resource occupation sequence can be a resource occupation sequence such as 1-1-1-1, 1-1-1-2, etc. In this way, based on the numbering of each virtual container that is parsed in this resource occupation sequence, a specific target virtual container can be quickly located.
[0099] Optionally, if the target virtual container corresponding to the number is in an idle state (i.e., unoccupied state), it can be directly determined as the target virtual container that requires resource occupation to carry the new service; if it is occupied, the information that the service resources have been occupied is fed back to the upper-layer service system based on the service priority and scheduling strategy, and the upper-layer service system will search for other available target virtual containers in the resource occupation sequence again to allocate virtual container resources, thereby ensuring smooth service activation and rational use of network resources, and realizing dynamic management and optimal configuration of network resources.
[0100] In this embodiment, the resource occupancy sequence is parsed in descending order of the virtual container hierarchy, and the target virtual container to be occupied is determined based on the target virtual container number included in the resource occupancy sequence. The required resources are accurately located by the target virtual container number, which greatly improves the efficiency and accuracy of resource allocation, enables rapid response to new business needs, and reduces configuration time. This not only achieves refined management of network resources and ensures the efficiency and stability of business deployment, but also provides a reliable basis for dynamic optimization and expansion of the network, significantly improving the utilization efficiency of virtual container resources and the overall service quality.
[0101] In an exemplary embodiment, Figure 4 As shown, step 106 includes steps 402 to 406. Among them:
[0102] Step 402: Based on the number and mapping relationship of the target virtual container included in the resource occupation sequence, search the data structure for the target data position corresponding to the target virtual container.
[0103] In implementation, the lower-layer service system finds the target data location corresponding to the target virtual container in the data structure based on the number of the target virtual container contained in the resource occupation sequence and the mapping relationship. For example, the lower-layer service system receives an EOS service of 10M bandwidth of VC12 granules issued by the upper-layer system, and the resource occupation sequence carried by the EOS includes: 1-1-1-1, 1-1-1-2, 1-1-1-3, 1-1-2-1, 1-1-2-2, etc. In this way, the lower-layer service system parses the resource occupation sequence, determines the number of the target virtual container contained in the resource occupation sequence, and further determines the target virtual container to be occupied. Then, the lower-layer service system further finds the target data location corresponding to the target virtual container in the data structure in combination with the mapping relationship between the virtual container and the data location in the data structure. For example, for the resource occupation sequence 1-1-1-1, based on the configuration rule that the level of the virtual container corresponding to the resource occupation sequence is from high to low, the resource occupation sequence represents that the VC12 resource in the first row and the first column of the first VC3 in the first VC4 of the virtual container resource stored in the data structure will be occupied. For the resource occupation sequence 1-1-1-2, it represents that the VC12 resource in the first row and the second column of the first VC3 in the first VC4 of the virtual container resource stored in the data structure will be occupied. For the resource occupation sequence 1-1-2-1, it represents that the VC12 resource in the second row and the first column of the first VC3 in the first VC4 of the virtual container resource stored in the data structure will be occupied, and other resource occupation sequences follow the same corresponding rule as the example of the resource occupation sequence, which will not be described here again in the embodiment of the present disclosure.
[0104] In step 404, the state parameter data on the target data location is updated, and the updated data coding corresponding to the target data location is obtained based on the preset data coding conversion rule and the updated state parameter data.
[0105] In implementation, the lower-layer service system finds the target data location corresponding to the target virtual container in the data structure based on the number of the target virtual container contained in the resource occupation sequence and the mapping relationship. For example, the lower-layer service system receives an EOS service of 10M bandwidth of VC12 granules issued by the upper-layer system, and the resource occupation sequence carried by the EOS includes: 1-1-1-1, 1-1-1-2, 1-1-1-3, 1-1-2-1, 1-1-2-2, etc. In this way, the lower-layer service system parses the resource occupation sequence, determines the number of the target virtual container contained in the resource occupation sequence, and further determines the target virtual container to be occupied. Then, the lower-layer service system further finds the target data location corresponding to the target virtual container in the data structure in combination with the mapping relationship between the virtual container and the data location in the data structure. For example, for the resource occupation sequence 1-1-1-1, based on the configuration rule that the level of the virtual container corresponding to the resource occupation sequence is from high to low, the resource occupation sequence represents that the VC12 resource in the first row and the first column of the first VC3 in the first VC4 of the virtual container resource stored in the data structure will be occupied. For the resource occupation sequence 1-1-1-2, it represents that the VC12 resource in the first row and the second column of the first VC3 in the first VC4 of the virtual container resource stored in the data structure will be occupied. For the resource occupation sequence 1-1-2-1, it represents that the VC12 resource in the second row and the first column of the first VC3 in the first VC4 of the virtual container resource stored in the data structure will be occupied, and other resource occupation sequences follow the same corresponding rule as the example of the resource occupation sequence, which will not be described here again in the embodiment of the present disclosure.
[0106] Specifically, the state parameter data stored in each data position of the data structure in the initial state is 0, indicating that the resource state of the current virtual container is not occupied, and when the received EOS service is received, the SDH calls the virtual container resource specified in the EOS service, and at the same time, the lower-layer service system needs to update the state parameter data in the target data position in the data structure based on the resource occupation information in the EOS service to record that the target virtual container resource has been occupied. For example, the background data of the service issued by the upper-layer service system is received, and the resource occupation is 1-1-1-1, 1-1-1-2, 1-1-1-3, 1-1-2-1, 1-1-2-2. For the first three resource occupation sequences {1-1-1-1, 1-1-1-2, 1-1-1-3}, it can be determined that the VC12 resource in the first row and the third column in the first VC3 in the first VC4 in the virtual container is fully occupied, therefore, the lower-layer service system updates the state parameter data in the target data position from "000" to "111". For the resource occupation sequences {1-1-2-1, 1-1-2-2}, it can be determined that the VC12 resource in the first row and the first two columns (i.e., the first column and the second column) in the first VC3 in the first VC4 in the virtual container is fully occupied, therefore, the lower-layer service system updates the state parameter data "000" in the corresponding target data position to "110". Then, the initial 7*3 matrix with all 0s is updated by the resource occupation sequences {1-1-1-1, 1-1-1-2, 1-1-1-3, 1-1-2-1, 1-1-2-2} to obtain the updated matrix as follows:
[0107]
[0108] Step 406, constructing an updated target data encoding sequence based on the updated data encoding.
[0109] In implementation, for the updated data encoding, the lower-layer service system further obtains the data encoding sequence constructed by the updated data encoding, i.e., the updated target data encoding sequence.
[0110] Specifically, the above example in step 404 is further illustrated, for the state parameter data corresponding to the 3 VC12s of the updated first row "111" in the matrix, in combination with the preset data encoding rule, the lower-level business system can further convert the updated state parameter data "111" into a new data code "7". For the state parameter data corresponding to the 3 VC12s of the second row "110" in the matrix, in combination with the preset data encoding rule, the lower-level business system further converts the updated state parameter data "110" into a new data code "6". Therefore, for the data code sequence corresponding to the first VC3 in the first VC4, the original "0000000" is updated to "7600000". In this way, as reflected in the data mapping table, it is shown in Table 3 as follows:
[0111] Table 3
[0112] VC4 sequence number Data structure mapping resource 1 {"VC3": ["7600000", "0000000", "0000000"]}} 2 {"VC3": ["0000000", "0000000", "0000000"]}} …… {"VC3": ["0000000", "0000000", "0000000"]}}
[0113] Other data codes and the updating process of the data code sequence are similar to the above process, and the updating process of the full amount of data code sequence in the data mapping table is not described one by one in the embodiment of the application.
[0114] In the embodiment, based on the target virtual container number and the mapping relationship, the data position is accurately positioned, the state parameter data is updated in real time, the data code is converted based on the preset encoding rule, and the updated data code sequence is constructed, which not only can quickly locate the data record corresponding to the target virtual container, but also can ensure that the resource state in the data structure is synchronized with the actual use by updating the state parameter in real time, and realize efficient management of the virtual container resources.
[0115] In an optional embodiment, batch updating processing can be performed on multiple data code sequences, or the updating of the data code sequence can be processed one by one for each data code sequence, and the embodiment of the disclosure does not limit this. Based on the analogy in the foregoing embodiment, when the data structure is a "Y chromosome" chromosome mapping, the data code sequence in the data structure corresponds to a "gene code sequence", and updating the data code in the data code sequence is updating the gene code in the gene code sequence, thereby obtaining an updated gene code sequence.
[0116] In an embodiment, as shown in Figure 5 , before step 106, the method further includes:
[0117] Step 502, based on the virtual container resource occupation information, querying the data mapping table corresponding to the data structure, and detecting whether the target virtual container resource has been occupied in the data mapping table.
[0118] In implementation, after receiving the EOS service issued by the upper-layer service system, the lower-layer service system needs to detect whether the resource is occupied before allocating the virtual container resource for the EOS service. Therefore, after analyzing the resource occupation information in the EOS service, the lower-layer service system queries the data mapping table corresponding to the data structure, and detects whether the target virtual container resource to be occupied in the resource occupation information is already occupied in the data mapping table.
[0119] Specifically, when there is a new EOS service demand, the lower-layer service system acquires the virtual container resource occupation information required by the service, and determines the type (for example, VC12, VC3, etc.), quantity and corresponding number (for example, 1-1-1-1, 1-1-1-2, etc.) of the target virtual container. Subsequently, the lower-layer service system queries the data mapping table corresponding to the data structure according to the data structure, and detects the corresponding resource record by taking the number of the target virtual container as the search condition in the data mapping table. If the state parameter data shows "unoccupied" or "idle" state, it indicates that the virtual container resource can be occupied by the new service. For example, for the first EOS service of 10M bandwidth newly issued by the upper-layer service system, the multiple VC12s in the second VC3 of the first VC4 are occupied, which is specifically represented as: 1-2-1-1, 1-2-1-2, 1-2-1-3, 1-2-3-1, 1-2-3-2. The lower-layer service system needs to query the data mapping table corresponding to the data structure, and detect whether the target virtual container resource is already occupied in the data mapping table. From the above updated data mapping table (i.e., Table 3), it is clear that the virtual container resources required by the new EOS service are not occupied. That is, when allocating resources, the lower-layer service system obtains the VC12 resources of the first row and the third row in the second VC3 of the first VC4 as "0000000" and "0000000" according to the data code of the corresponding target data position according to the required VC12 resources. Both "0000000" are in the unoccupied state. Then, the SDH can allocate the corresponding VC12 resources for the new EOS service. After the resource allocation, the state parameter data of the target data position in the data structure is modified from "0" to "1", and a new data code sequence "7060000" is obtained by updating. At this time, the resource occupation reflected in the data mapping table is shown in Table 4 as follows:
[0120] Table 4
[0121] VC4 sequence number Data structure mapping resource 1 {"VC3": ["7600000", "7060000", "0000000"]}} 2 {"VC3": ["0000000", "0000000", "0000000"]}} …… {"VC3": ["0000000", "0000000", "0000000"]}}
[0122] Step 504, if the target virtual container resource is already occupied, feedback the resource occupation information to the upper-layer service system.
[0123] In implementation, if the state of the target virtual container reflected by the data encoding (state parameter data is parsed) in the data mapping table is "occupied", it means that the resource is currently carrying other services and cannot be directly used for new services. Therefore, the lower-level service system needs to feedback the information of resource occupation to the upper-level service system, so that the upper-level service system re-allocates the virtual container resource for the service.
[0124] In this embodiment, the resource occupation information of the virtual container for the new service is searched and detected in the data structure. Through the detection process, the lower-level service system can quickly and accurately master the occupation of the target virtual container resource, effectively avoid resource conflict, and improve the utilization efficiency of network resources and the accuracy of service deployment.
[0125] In an optional embodiment, if the upper-level service system continues to issue a new VC3 particle EOS service, for example, the EOS service requests to occupy the entire VC3 in the first VC4, the corresponding data encoding sequence of the VC3 in the data mapping table is updated to the occupied state. The updating process of the data encoding sequence is similar to the above-mentioned updating process of the data encoding sequence, which will not be described here. The specific updated data mapping table is shown in Table 5 as follows:
[0126] Table 5
[0127] VC4 sequence number Data structure mapping resource 1 {"VC3": ["7600000", "7060000", "7777777"]}} 2 {"VC3": ["0000000", "0000000", "0000000"]}} …… {"VC3": ["0000000", "0000000", "0000000"]}}
[0128] In an embodiment, as shown in Figure 6 , the method further includes:
[0129] Step 601, in response to the resource occupation query request, querying the data encoding sequence in the data structure.
[0130] In implementation, when the network administrator needs to master the resource usage of the virtual container of the current network, or needs to confirm the available resources before the new service is opened, the resource occupation query request needs to be initiated. Therefore, the network administrator initiates the resource query request through the upper-level service system, and based on the resource occupation query request, locates the pre-constructed data structure. In the data structure, the upper-level service system takes the key information carried in the resource occupation query request, such as the specified query range (a certain regional network, a specific service type), the virtual container type (VC12, VC3, etc.) as the retrieval condition, and quickly scans and filters each data encoding sequence in the data structure, so as to obtain the data encoding sequence related to the resource occupation query request.
[0131] Step 602, based on the data encoding sequence, the mapping relationship between each virtual container and the data structure, and the preset data encoding conversion rule, reversely parsing to obtain the resource occupation information of each level virtual container.
[0132] In implementation, after obtaining the relevant data encoding sequence, the upper-level business system maps each data encoding in the data encoding sequence to a specific data position in the data structure according to the mapping relationship, and accurately locates the virtual container resource associated with each data encoding. Then, the upper-level business system performs inverse operation on the data encoding sequence according to the preset data encoding conversion rule, and reversely analyzes to obtain the resource occupation information of each level virtual container in matrix form.
[0133] For example, the 7 data encodings contained in the data encoding sequence are disassembled and traversed, and each data encoding is reversely converted into a 1x3 matrix composed of "0 or 1" state parameter data according to the preset data encoding conversion rule, that is, the resource occupation information of VC12 in one row (3) is obtained, and other data positions are repeated in this way, and finally 7x3 matrix is obtained. The 7x3 matrix contains state parameter data corresponding to each VC12, which can directly reflect the resource occupation information of each VC12.
[0134] In step 603, the resource occupation information of each level virtual container is visualized and displayed according to the preset display rule.
[0135] In implementation, for the matrix form of resource occupation information of each level virtual container reversely analyzed, the upper-level business system can perform visual processing on the resource occupation information of each level virtual container, for example, one or more color coding is performed on each resource occupation information, and then the resource occupation information of each level virtual container is output and displayed according to the preset display rule. For example, the upper-level business system can display the resource occupation information of each level virtual container by displaying the state parameter data "0" as green, i.e. the unoccupied state, and displaying the state parameter data "1" as red, i.e. the occupied state. Other display colors can also be used to display the resource occupation state of each level virtual container, and the embodiments of the present application are not limited thereto. As shown in the figure, the resource occupation information of each VC3 is displayed in a VC4, and the resource occupation information of 21 VC12s in each VC3 is displayed horizontally for comparison, so as to realize intuitive display of the resource state of each virtual container. Figure 7 Figure 7 In this embodiment, when the business system responds to the resource occupation query request, the data encoding sequence is quickly retrieved, and the resource occupation information of each level virtual container is reversely analyzed based on the mapping relationship and the conversion rule. The combination of visual processing and preset display rule converts the complex data encoding sequence into graphical representation, so that the network resource distribution can be quickly mastered without deep analysis of the underlying data, the management efficiency is effectively improved, the network resource dynamic allocation capability is enhanced, and the stable and efficient operation of the business is ensured.
[0136] In this embodiment, when the business system responds to the resource occupation query request, the data encoding sequence is quickly retrieved, and the resource occupation information of each level virtual container is reversely analyzed based on the mapping relationship and the conversion rule. The combination of visual processing and preset display rule converts the complex data encoding sequence into graphical representation, so that the network resource distribution can be quickly mastered without deep analysis of the underlying data, the management efficiency is effectively improved, the network resource dynamic allocation capability is enhanced, and the stable and efficient operation of the business is ensured.
[0137] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential but can be alternately executed with at least some of the other steps or the steps or stages in the other steps.
[0138] Based on the same inventive concept, the embodiments of the present application also provide a virtual container resource management apparatus for implementing the above-mentioned virtual container resource management method. The problem-solving implementation scheme provided by the apparatus is similar to the implementation scheme described in the above method, and therefore the specific limitations in one or more virtual container resource management apparatus embodiments provided below can refer to the limitations of the virtual container resource management method described above, which will not be described here again.
[0139] In one exemplary embodiment, as shown in Figure 8 A virtual container resource management apparatus is provided, comprising a construction module 801, an analysis module 802 and an update module 803, wherein:
[0140] The construction module 801 is configured to construct a mapping relationship between each virtual container and a preset data structure. The data structure stores a data coding sequence, and each data coding in the data coding sequence is constructed based on resource occupation information of a plurality of virtual containers at the lowest level. In addition to the virtual containers at the lowest level, the resource occupation of the virtual containers at other levels is reflected through the data coding sequence.
[0141] The analysis module 802 is configured to receive a virtual container service issued by an upper-layer service system and analyze virtual container resource occupation information in the virtual container service.
[0142] The update module 803 is configured to update data coding at a target data location in the data structure based on the mapping relationship and the virtual container resource occupation information, to obtain an updated target data coding sequence. The data structure is used to reflect the current resource occupation of the virtual containers at each level.
[0143] In one embodiment, the virtual containers include, in order from high to low, first-level virtual containers, second-level virtual containers and third-level virtual containers. The first-level virtual containers include a plurality of second-level virtual containers, and the second-level virtual containers include a plurality of third-level virtual containers. The higher the level, the larger the capacity of the virtual container.
[0144] In one of the embodiments, the constructing module 801 is specifically configured to sequentially establish a mapping relationship between each hierarchical virtual container and a data location in the preset data structure in a low-to-high order of the hierarchical virtual containers;
[0145] Taking the first hierarchical virtual container as a mapping unit, the data encoding sequence corresponding to each first hierarchical virtual container is stored into the data mapping table based on the numbering order of the hierarchical virtual containers.
[0146] In one of the embodiments, the virtual container resource occupation information contains a resource occupation sequence, and the resource occupation sequence contains the number of a target virtual container to be occupied in each hierarchical virtual container.
[0147] In one of the embodiments, the analyzing module 802 is specifically configured to analyze the resource occupation sequence in the resource occupation information in a high-to-low order of the hierarchical virtual containers.
[0148] Based on the number of the target virtual container in the resource occupation sequence, the target virtual container requiring resource occupation is determined.
[0149] In one of the embodiments, the updating module 803 is specifically configured to find a target data location corresponding to the target virtual container in the data structure based on the number of the target virtual container contained in the resource occupation sequence and the mapping relationship.
[0150] The state parameter data on the target data location is updated, and an updated data encoding corresponding to the target data location is obtained based on a preset data encoding conversion rule and the updated state parameter data.
[0151] An updated target data encoding sequence is constructed based on the updated data encoding.
[0152] In one of the embodiments, the apparatus 800 further includes:
[0153] The first querying module is configured to query a data mapping table corresponding to the data structure based on the virtual container resource occupation information, and detect whether the target virtual container resource has been occupied in the data mapping table.
[0154] The sending module is configured to feed back resource occupation information to an upper-layer business system if the target virtual container resource has been occupied.
[0155] In one of the embodiments, the apparatus 800 further includes:
[0156] The second querying module is configured to query the data encoding sequence in the data structure in response to a resource occupation query request.
[0157] The reverse analysis module is configured to obtain resource occupation information of each hierarchical virtual container based on the data coding sequence, the mapping relationship between each virtual container and the data structure, and a preset data coding conversion rule.
[0158] The display module is configured to visually process the resource occupation information of each hierarchical virtual container and display the resource occupation information of each hierarchical virtual container according to a preset display rule.
[0159] Each module in the virtual container resource management apparatus described above can be realized by software, hardware, or a combination thereof, in whole or in part. Each module described above can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each module.
[0160] In one exemplary embodiment, a computer device, which can be a terminal, has an internal structure diagram as shown in Figure 9 The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected through a lower business system bus, and the communication interface, the display unit, and the input device are connected to the lower business system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating lower business system and a computer program. The internal memory provides an environment for running the operating lower business system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals. The wireless communication can be achieved through WIFI, mobile cellular network, near field communication (NFC), or other technologies. The computer program is executed by the processor to implement a virtual container resource management method. The display unit of the computer device is configured to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or can be a key, trackball, or touchpad arranged on the shell of the computer device, or can be an external keyboard, touchpad, or mouse, etc.
[0161] Those skilled in the art can understand that Figure 9The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0162] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0163] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0164] A mapping relationship is established between each virtual container and a preset data structure; the data structure stores a data code sequence, each data code in the data code sequence is constructed based on resource occupancy information of multiple virtual containers at the lowest level, and resource occupancy of virtual containers at other levels except the lowest level is reflected by the data code sequence;
[0165] Receive the virtual container service sent by the upper-layer service system and analyze the virtual container resource occupancy information in the virtual container service;
[0166] Based on the mapping relationship and virtual container resource occupancy information, the data code of the target data position in the data structure is updated to obtain an updated target data code sequence; the data structure is used to reflect the current occupancy of virtual container resources at each level.
[0167] In one embodiment, the virtual containers include a first-level virtual container, a second-level virtual container, and a third-level virtual container in descending order of hierarchy; the first-level virtual container includes multiple second-level virtual containers, and the second-level virtual container includes multiple third-level virtual containers; the higher the level, the larger the capacity of the virtual container.
[0168] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0169] Establishing a mapping relationship between each level of virtual container and the data position in the preset data structure in order from low to high levels of virtual containers;
[0170] The first-level virtual container is used as a mapping unit, and the data coding sequence corresponding to each first-level virtual container is stored in a data mapping table based on the numbering sequence of each level of virtual container.
[0171] In an embodiment, the virtual container resource occupation information comprises a resource occupation sequence, and the resource occupation sequence comprises a number of a target virtual container to be occupied in each level of virtual containers.
[0172] In an embodiment, the processor, when executing the computer program, further implements the following steps:
[0173] According to the order from high to low of the level of the virtual containers, the resource occupation sequence in the resource occupation information is parsed;
[0174] Based on the number of the target virtual container in the resource occupation sequence, the target virtual container requiring resource occupation is determined.
[0175] In an embodiment, the processor, when executing the computer program, further implements the following steps:
[0176] Based on the number of the target virtual container contained in the resource occupation sequence and the mapping relationship, the target data position corresponding to the target virtual container is searched in the data structure;
[0177] The state parameter data on the target data position is updated, and based on the preset data encoding conversion rule and the updated state parameter data, the updated data encoding corresponding to the target data position is obtained;
[0178] Based on the updated data encoding, an updated target data encoding sequence is constructed.
[0179] In an embodiment, the processor, when executing the computer program, further implements the following steps:
[0180] Based on the virtual container resource occupation information, a data mapping table corresponding to the data structure is queried, and whether the target virtual container resource has been occupied is detected in the data mapping table;
[0181] If the target virtual container resource has been occupied, the resource occupation information is fed back to the upper-layer business system.
[0182] In an embodiment, the processor, when executing the computer program, further implements the following steps:
[0183] In response to the resource occupation query request, the data encoding sequence in the data structure is queried;
[0184] Based on the data encoding sequence, the mapping relationship between each virtual container and the data structure, and the preset data encoding conversion rule, the resource occupation information of each level of virtual containers is reversely parsed;
[0185] The resource occupation information of each level of virtual containers is visualized, and the resource occupation information of each level of virtual containers is displayed according to the preset display rule.
[0186] In an embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps of the above method embodiments.
[0187] In an embodiment, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the steps of the above method embodiments.
[0188] A person of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, the computer program can include the processes of the above method embodiments. In each embodiment provided in the present application, any reference to a memory, a database or other medium can include at least one of a non-volatile memory and a volatile memory. The non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive random access memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric random access memory (FRAM), a phase change memory (PCM), a graphene memory, etc. The volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as a static random access memory (SRAM) or a dynamic random access memory (DRAM), etc. The database involved in each embodiment provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., and is not limited thereto. The processor involved in each embodiment provided in the present application can be a general processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., and is not limited thereto.
[0189] Any technical features in the above embodiments can be combined, and for the sake of brevity, not all possible combinations are described above, however, any combination of these technical features is deemed to be within the scope of the present application.
[0190] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be pointed out that, for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for managing virtual container resources, characterized in that: The method comprises: Constructing a mapping relationship between each virtual container and a preset data structure; wherein the data structure stores a data code sequence, wherein each data code in the data code sequence is constructed based on resource occupancy information of multiple virtual containers at the lowest level, and wherein resource occupancy of virtual containers at other levels, except for the virtual container at the lowest level, is reflected by the data code sequence; Receiving a virtual container service issued by an upper-layer service system, and parsing virtual container resource occupancy information in the virtual container service; Based on the mapping relationship and the virtual container resource occupancy information, the data code of the target data position in the data structure is updated to obtain an updated target data code sequence; the data structure is used to reflect the current occupancy of virtual container resources at each level.
2. The method according to claim 1, characterized in that The virtual containers include, in descending order of levels, a first-level virtual container, a second-level virtual container, and a third-level virtual container; the first-level virtual container includes multiple second-level virtual containers, and the second-level virtual container includes multiple third-level virtual containers; the higher the level, the larger the capacity of the virtual container.
3. The method according to claim 1, characterized in that The step of constructing a mapping relationship between each virtual container and a preset data structure includes: Establishing a mapping relationship between each level of virtual container and the data position in the preset data structure in order from low to high levels of virtual containers; The first-level virtual container is used as a mapping unit, and the data coding sequence corresponding to each first-level virtual container is stored in a data mapping table based on the numbering sequence of each level of virtual containers.
4. The method according to claim 1, wherein The virtual container resource occupation information includes a resource occupation sequence, and the resource occupation sequence includes the serial numbers of target virtual containers to be occupied in virtual containers at each level.
5. The method according to claim 4, characterized in that The analyzing the virtual container resource occupancy information in the virtual container service includes: Parsing the resource occupancy sequence in the resource occupancy information in descending order of the levels of the virtual containers; The target virtual container requiring resource occupation is determined based on the serial number of the target virtual container in the resource occupation sequence.
6. The method according to claim 4, characterized in that The updating of the data encoding of the target data position in the data structure based on the mapping relationship and the virtual container resource occupancy information to obtain an updated target data encoding sequence includes: Based on the number of the target virtual container included in the resource occupation sequence and the mapping relationship, searching for the target data position corresponding to the target virtual container in the data structure; Updating the state parameter data at the target data position, and obtaining an updated data code corresponding to the target data position based on a preset data code conversion rule and the updated state parameter data; An updated target data code sequence is constructed based on the updated data code.
7. The method according to claim 1, characterized in that Before updating the data encoding of the target data position in the data structure based on the mapping relationship and the virtual container resource occupancy information, the method further includes: Based on the virtual container resource occupancy information, querying the data mapping table corresponding to the data structure, and detecting in the data mapping table whether the target virtual container resource has been occupied; If the target virtual container resources are occupied, resource occupation information is fed back to the upper-layer service system.
8. The method according to claim 1, characterized in that The method further comprises: In response to a resource occupancy query request, querying a data encoding sequence in the data structure; Based on the data coding sequence, the mapping relationship between each virtual container and the data structure, and the preset data coding conversion rule, reverse parsing is performed to obtain resource occupancy information of each level of virtual container; The resource occupancy information of the virtual containers at each level is visualized and displayed according to a preset display rule.
9. A virtual container resource management device, characterized in that: The device comprises: A construction module is configured to construct a mapping relationship between each virtual container and a preset data structure; the data structure stores a data code sequence, each data code in the data code sequence is constructed based on resource occupancy information of multiple virtual containers at the lowest level, and the resource occupancy of virtual containers at other levels, except for the virtual containers at the lowest level, is reflected by the data code sequence; A parsing module, configured to receive a virtual container service sent by an upper layer service system and parse virtual container resource occupancy information in the virtual container service; The updating module is used to update the data code of the target data position in the data structure based on the mapping relationship and the virtual container resource occupancy information to obtain an updated target data code sequence; the data structure is used to reflect the current occupancy of virtual container resources at each level.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.