WO2021104168A1 - Resource allocation method, apparatus, and device - Google Patents
Resource allocation method, apparatus, and device Download PDFInfo
- Publication number
- WO2021104168A1 WO2021104168A1 PCT/CN2020/130424 CN2020130424W WO2021104168A1 WO 2021104168 A1 WO2021104168 A1 WO 2021104168A1 CN 2020130424 W CN2020130424 W CN 2020130424W WO 2021104168 A1 WO2021104168 A1 WO 2021104168A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- resources
- group
- resource
- services
- service
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/24—Traffic characterised by specific attributes, e.g. priority or QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
- H04L47/76—Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/70—Admission control; Resource allocation
- H04L47/80—Actions related to the user profile or the type of traffic
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L5/00—Arrangements affording multiple use of the transmission path
Definitions
- This application relates to the field of flexible Ethernet communication transmission, and in particular to a resource allocation method, device and equipment.
- Ethernet Early native Ethernet was born in a local area network, using Carrier Sense Multiple Access with Collision Detection (CSMA/CD) technology to interconnect multiple points. At that time, the local area network was generally a bus-type network topology. With the development of Ethernet, ordinary Ethernet has followed the frame format of native Ethernet and formulated the IEEE 802.3 Ethernet standard, which is widely used in parks, enterprises and data centers. Ordinary Ethernet adopts full-duplex mode and no longer requires CSMA/CD technology. The network speed has increased by 10 times, and the development of 10 megabits per second (Million bits per second, Mbps), 100 Mbps (Fast Ethernet, FE), 1Gbps (Gigabit Ethernet, GE), 10Gbps (10GE), 100Gbps (100GE) and other Ethernet.
- Carrier Ethernet is the introduction of transport network functions on the basis of ordinary Ethernet, with high reliability, end-to-end quality of service (Quality of Service, QoS) guarantee capabilities, complete OAM (Operation, Administration, Maintenance, operation, management, Maintenance (short for maintenance) mechanism and manageability.
- QoS Quality of Service
- OAM Operation, Administration, Maintenance, operation, management, Maintenance
- Flexible Ethernet Flexible Ethernet
- FlexE Flexible Ethernet
- FlexE Flexible Ethernet
- FlexE Flexible Ethernet
- Flexible Ethernet supports greater bandwidth through port binding, such as binding 8 100Gbps ports to achieve 800Gbps bandwidth.
- the channelization technology the flexible allocation of bandwidth is realized, and diversified service rate access is supported, without being restricted by the stepped rate system formulated by the IEEE802.3 standard. By building an end-to-end link, it provides stronger QoS capabilities for multi-service bearers and enhances user experience.
- FlexE forms a flexible Ethernet group (FlexE group) by binding multiple physical layers (Physical Layer, PHY) to obtain a larger bandwidth; and realizes flexible bandwidth allocation by dividing the interface into time slots and reallocating it. FlexE divides the 100Gbps interface into 20 time slots, each of which is 5Gbps, so FlexE can support N ⁇ 5Gbps services through time slot allocation.
- PHY Physical Layer
- the service rate is diverse.
- the E1 service rate in the Plesiochronous Digital Hierarchy (PDH) network is 2.048Mbps
- the service rate is 155Mbps
- the STM-4 service rate is 622Mbps
- the optical channel Data Unit (ODU) 0 rate of the optical transport network is 1.25Gbps
- ODU1 rate is 2.5Gbps.
- the time slot particles divided by FlexE are 5Gbps, and the allocated bandwidth must be based on a fixed 5Gbps as the basic unit for resource transmission and allocation. Therefore, for small-particle time slots, the scale of FlexE's time slot configuration table Limited, the transmission resources are inflexible and not scalable.
- This application provides a simpler and flexible resource allocation method to realize multiplexing or demultiplexing of multiple services, and defines a flexible frame format to support real-time multiplexing or demultiplexing of multiple services.
- each service has a certain value for bandwidth resource requirements.
- m services can be divided into k groups for resource allocation, where each The resource allocation unit of group allocation represents the granularity of resources, and the sender can allocate resources in sequence according to the granularity of the resources, and then uniquely determined m service reuse schemes can be obtained.
- the receiving end can also allocate according to the resource granularity according to the required resource value, and obtain the same m service demultiplexing scheme.
- This resource allocation method is simple and straightforward, does not require any calculation, and can give the current resource's business based on the number of resources in real time.
- the sending end can multiplex multiple services in real time according to the number of resources required by the service.
- the receiving end needs to obtain service parameters in advance, including the number of services, service numbers, and resources required by each service. number. Therefore, a flexible frame format is defined, and the service parameters are transmitted before the service data, and the number of services, the number of the services, the number of resources required by the service, and the total number of resources can be dynamically adjusted.
- the present invention provides a solution for intercommunication between a new interface and a FlexE interface.
- an embodiment of the present application discloses a resource allocation method, which can be applied to a sending end device or a receiving end device.
- the method includes: obtaining the number of k sets of resources for m services,
- the number of resources in each group corresponds to a resource allocation unit N, and the number of resources in each group includes a coefficient a corresponding to each service.
- the coefficient a represents the number of resource allocation units included in a service
- the resource allocation unit N represents a resource allocation.
- the number of resources included in the unit, k ⁇ 1, N ⁇ 1, and k and N are all positive integers; the resources corresponding to the m services are determined from the number of resources of the k groups, and L is a positive integer And L ⁇ 1.
- the method provided in this aspect divides the number of resources of m services into k groups of resource numbers, and allocates resources according to the resource allocation unit corresponding to each group of resource numbers in the k groups of resource numbers. Since the resource allocation unit indicates a group The smallest unit of resource allocation in the number of resources, so the resource allocation of smaller resource granularity is realized, and the flexibility and expandability of resource allocation are improved.
- the allocation of service resources according to the number of k groups of resources can avoid the limitation of sending resource configuration tables, and there is no need to send redundant resource configuration tables, which saves transmission overhead.
- the resource granularity is expressed by the resource allocation unit N in this technical solution, that is, when the resource allocation unit N is smaller, the corresponding resource granularity is smaller.
- the obtaining the number of k sets of resources for m services includes: obtaining the number of m resources corresponding to the m services, each The number of resources is expressed in a first base, me1; the number of resources in each of the resource numbers expressed in the first base is expressed in a second binary to obtain the number of k groups of resources, and the first binary includes binary, octal, Decimal and hexadecimal.
- the first binary system is a decimal system
- the second binary system is a binary system
- one resource number C1 in the k sets of resource numbers can be expressed as:
- C1 is the number of resources of the first service S1
- a 1,1 ,a 1,2 ,...,a 1,n are coefficients
- the base is ⁇ 0 , ⁇ 1 ,..., ⁇ k-1
- the resource allocation unit N is ⁇ 0 , ⁇ 1 ,..., ⁇ k-1
- the coefficient a has a value range of [0, ⁇ -1]
- the number of resources C1 of the first service is as follows: One group allocates a i,1 ⁇ 0 resources, and the corresponding resource allocation unit N is ⁇ 0 ; the second group allocates a i,2 ⁇ 1 resource, and the corresponding resource allocation unit N is ⁇ 1 , the k-th group
- the number of allocated resources is a i,k ⁇ k-1 resources for allocation, and the corresponding resource allocation unit N is ⁇ k-1 .
- the value of the coefficient a is 0 or 1. In binary, the value of the coefficient a ranges from 0 to 9.
- This implementation mode can extend the binary-based resource allocation method to any hexadecimal system, thereby realizing resource allocation of multiple services for multiplexing or demultiplexing, so as to increase the flexibility of resource allocation and reduce the jitter of service allocation Sex.
- determining the resources corresponding to the m services among the L resources according to the number of the k sets of resources includes: The number of group resources determines the resources corresponding to the m services among the L resources in the order of the first group to the k-th group, and the number of resources allocated to each group is the sum of the coefficient a of the m services and the The product of the resource allocation unit N corresponding to each group.
- resources are allocated in the order of group numbers, which improves the efficiency of resource allocation.
- the method further includes: performing resource allocation on the number of the k groups of resources in an order of any permutation and combination from the first group to the k-th group.
- the number of the k groups of resources is determined in the order of the first group to the kth group, and the number of the L resources
- the resources corresponding to the m services include: in the order of the first group to the k-th group, if the allocated resources of any one of the first group to the k-th group include two or more services, then For the group containing the two or more services, the resources corresponding to each service are allocated according to the order of service numbers or the order of interleaving the service numbers.
- the resources corresponding to the services are interleaved and allocated, thereby reducing the jitter of service allocation.
- determining the resources corresponding to the m services among the L resources according to the number of the k sets of resources includes: acquiring the first sequence , The first sequence is used to indicate the positional relationship between resource allocation units N of the number of k sets of resources; according to the number of k sets of resources and the first sequence, the m number of resources are determined Resources corresponding to the business.
- the first sequence is used to indicate the resource allocation status of each service, so that the number of resources of each service can be allocated more flexibly, and the jitter of service allocation is also reduced.
- the first sequence is used to indicate that the position order of the resource allocation unit N corresponding to the resources of the first group to the k-th group in the number of resources of the k groups is arbitrary.
- the group number of the first resource corresponding to the resource allocation unit N is 20
- the second group number of resources corresponding to the resource allocation unit N is 21
- the corresponding resource allocation unit N is 2 2
- the resource allocation unit N corresponding to the number of resources in the k-th group is 2 k-1 .
- the first sequence includes k first units, and different first units correspond to different numbers of group resources.
- the first first unit corresponds to the number of resources in the first group
- the second first unit corresponds to the number of resources in the second group
- the kth first unit corresponds to the number of resources in the kth group.
- the first sequence can indicate the first group The positional relationship between the number of resources to the k-th group.
- the first sequence indicates that the order between the k first units can be arbitrary.
- the first sequence includes z second units, different second units correspond to different group resource numbers, at least one second unit corresponds to at least two group resource numbers, z ⁇ k, z is positive Integer and z ⁇ 2.
- the first sequence contains two of the second units, and each of the second units corresponds to two sets of resource numbers, for example, one second unit corresponds to the first set of resource numbers and the second set of resources.
- the number of group resources, and the other second unit corresponds to the number of resources in the third group and the number of resources in the fourth group.
- all resources of m services are divided into two units, and then each unit is further grouped, for example, each unit is divided into two groups, thereby realizing resource allocation with smaller resource granularity.
- the first sequence includes p third units, and a group resource number corresponds to N different The third unit.
- each third unit corresponds to a group number i, i is any one of 1 to k, and the i-th group of resources The number corresponds to 2 i-1 third units in the first sequence.
- this embodiment does not limit the order of the group numbers i corresponding to the 15 third units.
- the resource allocation unit N corresponding to the number of resources in the i-th group is 2 i-1
- the resource allocation unit N corresponding to the number of resources in the i+1-th group is 2 i+1-1
- the 2i-1 resources include the first resource of the i-th group
- the 2i+1- th resources include the first resource of the i+1th group and the second resource of the i+1th group
- the first sequence is used to indicate that the first resource of the i-th group is located between the first resource of the i+1th group and the second resource of the i+1th group among the L resources.
- the resource allocation unit N corresponding to the number of resources in the third group is 4, and one resource allocation unit in the third group includes the first resource, the second resource, the third resource, and the fourth resource of the third group.
- the first sequence indicates: allocate the first resource of the third group and the second resource of the third group to the The first service; the third resource of the third group and the fourth resource of the third group are allocated to the second service; or, the first resource of the third group and the third resource of the third group Allocating to the first service; allocating the second resource of the third group and the fourth resource of the third group to the second service.
- the two resources of the first service and the two resources of the second service are interleaved and allocated, so that the jitter of service resource allocation can be effectively reduced.
- the first sequence includes 2 k -1 units, and each unit corresponds to a group number i, where i is from 1 to k
- the first sequence is used to indicate the group number i corresponding to each of the units, and the m number of resources are determined according to the number of k groups of resources and the first sequence
- the resources corresponding to the services include: determining the resources corresponding to the m services according to the number of the k groups of resources and the group number i corresponding to each unit indicated by the first sequence.
- the first sequence is a palindrome arrangement of bits
- the group number i is any one of the 1st to the kth bits
- the sequence number composed of 2 k -1 units is A sequence number of 2 k-1 is the first center, and the bit sequence corresponding to the left sequence number of the first center and the bit sequence corresponding to the right sequence number are symmetrical about the first center;
- the left serial number of the center, with the serial number 2 k-2 as the second center, the bit sequence corresponding to the left serial number of the second center and the bit sequence corresponding to the right serial number are related to the second center Symmetrical; in the k-1 center with a sequence number of 2 k-(k-1) , the bit sequence corresponding to the left sequence number of the k-1 center is related to the bit sequence corresponding to the right sequence number
- the k-1th center is symmetrical.
- the generated first sequence is a palindrome arrangement of bits, so that each bit is symmetrical about the center bit, and the resource allocation units of each group are split and arranged in order to reduce the jitter of service resources.
- the acquiring the first sequence includes: starting from all 0s to all bit values for each group of resource numbers, the bit value represented by binary 1 Listed in sequence, a total of 2 k count units; each time a count unit is generated, compare the bit value changes of the current count unit and the previous count unit to determine the bit that undergoes a transition.
- the transition refers to the same bit
- the bit value on the bit changes from 0 in the previous count unit to 1 in the current count unit; all the transitioned bits corresponding to the determined 2 k -1 count units are sorted to generate The first sequence.
- the 2 k -1 counting units are all counting units remaining except for the first counting unit whose bit value is all 0.
- the acquiring the first sequence includes: using k resource allocation units of the k sets of resource numbers as k services, and using The preset algorithm establishes the correspondence between the k services and the total number of resources composed of the k services, and generates the first sequence according to the correspondence; wherein, the preset algorithm is: l ⁇ B modQ , L is a constant, the value of l ranges from 1 to Q; B is the number of resources required by any of the first to kth services represented by k services, Q is a parameter, and Q ⁇ Max ⁇ B1 , B2, B3,..., Bk ⁇ , B1 represents the number of resources required by the first business, B2 represents the number of resources required by the second business, Bk represents the number of resources required by the k-th business, and Q ⁇ B1 to Bk
- the maximum value in; mod represents the remainder operation, l ⁇ B modQ represents the remainder obtained by dividing l ⁇ B by Q.
- the first sequence is a bit sequence.
- the preset algorithm is the Sigma/Delta algorithm.
- the lowercase “l” and the uppercase “L” have different meanings.
- the lowercase “l” is a constant, with a value range of 1 to Q, Q ⁇ 1 and positive Integer.
- the uppercase “L” represents the total number of transmission resources per unit time in a link channel, and L is greater than or equal to the total number of resources for m services.
- bit sequence is generated by the Sigma/Delta algorithm, and the resources required by m services can be allocated alternately, thereby reducing the jitter of service resources.
- the acquiring the first sequence includes: generating the bit sequence by interleaving bits, and the interleaving bits
- the bit method includes: inserting the first bit in the sequence number 2 k-1 in the bit sequence composed of 2 k -1 bits; taking the first bit as the center, and inserting the first bit in the first bit sequence. Insert a second bit to the left and right of each bit position; insert a third bit to the left and right of each second bit with each second bit as the center; until each The k-1th bit is the center, and a kth bit is inserted to the left and right of each k-1th bit.
- the acquiring the first sequence includes: the bit values of all binary representations of the first device start from all 0s to the The bit values are all 1s listed in sequence, a total of 2 k counting units, the numbers are 0, 1, 2, ..., 2 k -1, wherein the number is represented by w; the first device counts once every time the counter Output a bit, the bit satisfies kj, where j is an exponential power of 2, 0 ⁇ j ⁇ k, and satisfies the first relationship: The quotient is a, and the remainder is b. It is judged that j takes the minimum value among all j values when the quotient a is an odd number; the bits of all counting units output by the counter are sorted to generate the bit sequence.
- the method further includes: using an overhead frame to send service parameters, where the service parameters include: the number of services m, and m service numbers And the number of m resources.
- using the number of overhead frames to send the number of services m and the number of m resources includes: sending 32 flexible Ethernet FlexE overhead frames to Transmit the service parameters; wherein the 1st to 20th FlexE overhead frames are used to carry the m service numbers, the 21st to 27th FlexE overhead frames are used to carry the m resource numbers, and the 28th to the 28th FlexE overhead frames are used to carry the m service numbers.
- FlexE overhead frames are used to carry reserved resources; and the version identifier VER field in each FlexE overhead frame is configured with a first identifier, and the first identifier is used to indicate the service carried in the FlexE overhead frame
- the number or the number of resources are currently used business parameters.
- the VER field is used to indicate the currently transmitted service parameters, thereby avoiding the transmission of redundant time slot resource configuration tables and saving transmission overhead.
- each business corresponds to a required number of resources and a business number.
- the bit value corresponding to the first identifier is 1.
- sending the service parameter using an overhead frame includes: sending 2m+2 overhead frames to transmit the service parameter; where The 2m+2 overhead frames include the first overhead frame, the second overhead frame, the third overhead frame to the 2m+2 overhead frame, and the first overhead frame includes the sum of m resources, and The second overhead frame includes the number of services m, the m overhead frames in the 3rd to m+2th overhead frames include m service numbers, and the m+3th to 2m+2th overhead frames.
- the m overhead frames include the number of m resources, and the version identifier VER field in each overhead frame is configured with a first identifier, and the first identifier is used to indicate the service number or the service number carried in the overhead frame.
- the number of resources is the currently used service parameter.
- the FlexE interface is extended, and is no longer restricted by the original 100Gbps interface that can only support up to 20 service resource allocation restrictions; the expanded FlexE interface can define resource granularity according to business needs to determine the total number of resources. And the number of resources required by each business, thereby realizing flexible bandwidth allocation for multiple services.
- the overhead frame includes one control code block and Y data code blocks, Y ⁇ 2 and Y is a positive integer, and the control The code blocks are used to locate and transmit the number m of services, and the Y data code blocks are used to transmit the m resource numbers and the m service numbers.
- the Y data code blocks include at least one first code block, wherein one of the first code blocks is used to carry the number of m resources, or, in the at least one first code block, The m first code blocks are used to carry the m resource numbers.
- a new frame format is defined in this implementation, and the frame format can change with the change of multiplexing services, so the services that can be carried are more flexible and have stronger flexibility.
- the m service parameters corresponding to the m services can be transmitted to the receiving end with only one transmission, which improves the transmission efficiency.
- an embodiment of the present application also provides a resource allocation device, which is used to implement the foregoing first aspect and the resource allocation method in various implementation manners of the first aspect.
- the device includes at least one functional unit or module, and further, the at least one functional unit includes an acquisition unit, a processing unit, a sending unit, and the like.
- the obtaining unit is used to obtain the number of k groups of resources for m services, each group of resource numbers corresponds to a resource allocation unit N, and each group of resource numbers includes a coefficient a corresponding to each service, and the coefficient a represents a service
- the number of resource allocation units included, the resource allocation unit N represents the number of resources included in one resource allocation unit, k ⁇ 1, N ⁇ 1, and k and N are all positive integers; the processing unit is used for The resources corresponding to the m services are determined among the L resources according to the number of the k sets of resources.
- an embodiment of the present application also provides a network device, including a processor, a memory, and a communication interface, the processor is coupled to the memory, and further, the communication interface is used to obtain m services
- the number of k groups of resources each group of resources corresponds to a resource allocation unit N, each group of resources includes a coefficient a corresponding to each service, and the coefficient a represents the number of resource allocation units included in a service, and the resource allocation unit N represents the number of resources included in a resource allocation unit, k ⁇ 1, N ⁇ 1, and k and N are all positive integers;
- the processor is configured to determine the number of resources among the L resources according to the number of k groups of resources. Resources corresponding to the m services.
- the communication interface is specifically configured to obtain the number of m resources corresponding to the m services, and each number of resources is in accordance with The first hexadecimal representation, m ⁇ 1; the k groups of resource numbers are obtained after each resource number expressed in the first hexadecimal system is expressed in a binary system, and the second binary system includes binary, octal, decimal, and hexadecimal. Base.
- the processor is specifically configured to:
- the resources corresponding to the m services are determined from the L resources, where the number of resources allocated in each group is the product of the sum of the coefficient a of the m services and the resource allocation unit N corresponding to each group.
- the processor is specifically configured to follow the order of the first group to the kth group, and if the first group to the kth group
- the allocated resources of any group in the kth group include two or more services, and each group including the two or more services is allocated in the order of service numbers or in the order of interleaving of service numbers. Resources corresponding to the business.
- the processor is specifically configured to obtain a first sequence, and the first sequence is used to indicate the number of the k groups of resources The location relationship between the resource allocation units N; according to the number of the k sets of resources and the first sequence, the resources corresponding to the m services are determined among the L resources.
- the first sequence includes k first units, and different first units correspond to different group resource numbers.
- the first sequence includes z second units, different second units correspond to different group resource numbers, at least one second unit corresponds to at least two group resource numbers, z ⁇ k, z is a positive integer and z ⁇ 2.
- the first sequence includes p third units, and a group resource number corresponds to N different third units in the first sequence.
- each third unit corresponds to a group number i, i is any one of 1 to k, and the i-th group of resources The number corresponds to 2 i-1 third units in the first sequence.
- i is any one of 1 to k
- the resource allocation unit N corresponding to the number of resources in the i-th group is 2 i-1
- the resource allocation unit N corresponding to the number of resources in the i+1 group is 2 i+1-1
- the 2 i-1 resources include the first resource of the i-th group, and the 2 i+1-1 resource It includes the first resource of the (i+1)th group and the second resource of the (i+1)th group
- the first sequence is used to indicate that the first resource of the ith group is located in the (i+1)th resource among the L resources. Between the first resource of the group and the second resource of the i+1th group.
- the first sequence includes 2 k -1 units, and each unit corresponds to a group number i, where i is from 1 to k
- the first sequence is used to indicate the group number i corresponding to each of the units, and the processor is specifically used to indicate the number of resources in the k groups and the number of each unit indicated by the first sequence.
- the corresponding group number i determines the resources corresponding to the m services.
- the first sequence is a palindrome arrangement of bits
- the group number i is any one of the 1st to the kth bits
- the sequence number composed of 2 k -1 units is A sequence number of 2 k-1 is the first center, and the bit sequence corresponding to the left sequence number of the first center and the bit sequence corresponding to the right sequence number are symmetrical about the first center;
- the left serial number of the center, with the serial number 2 k-2 as the second center, the bit sequence corresponding to the left serial number of the second center and the bit sequence corresponding to the right serial number are related to the second center Symmetrical; in the k-1 center with a sequence number of 2 k-(k-1) , the bit sequence corresponding to the left sequence number of the k-1 center is related to the bit sequence corresponding to the right sequence number
- the k-1th center is symmetrical.
- the processor is specifically configured to start with the bit value of each group of resource numbers expressed in binary from all 0s to all 1s. Listed in order, a total of 2 k count units; each time a count unit is generated, compare the bit value changes of the current count unit and the previous count unit to determine the bit that undergoes a transition. The transition refers to the same bit. The value of the above bit changes from 0 in the previous count unit to 1 in the current count unit; all the transitioned bits corresponding to the determined 2 k -1 count units are sorted to generate all The first sequence. Wherein, the 2 k -1 counting units are all counting units remaining except for the first counting unit whose bit value is all 0.
- the processor is specifically configured to use the k resource allocation units of the k sets of resource numbers as k services, and use the preset
- an algorithm establishes the correspondence between the k services and the total number of resources composed of the k services, and generates the first sequence according to the correspondence;
- the preset algorithm is: l ⁇ BmodQ, l is a constant, the value of l ranges from 1 to Q; B is the number of resources required by any one of the first to kth services represented by k services, the value of B ranges from B1 to Bk, and Q ⁇ Max ⁇ B1, B2, B3,..., Bk ⁇ ; mod represents the remainder operation, l ⁇ B modQ represents the remainder obtained by dividing l ⁇ B by Q.
- the processor is specifically configured to generate the bit sequence by interleaving bits, and the interleaving bits
- the method includes: inserting the first bit in the sequence number 2 k-1 in the bit sequence composed of 2 k -1 bits; taking the first bit as the center, and inserting the first bit in the first bit sequence. Insert a second bit to the left and right of each bit; insert a third bit to the left and right of each second bit with each second bit as the center; until each The k-1th bit is the center, and a kth bit is inserted to the left and right of each k-1th bit.
- the processor is specifically configured to start from all 0s to the bit values of all binary representations by the first device.
- the values of all 1s are listed in sequence, a total of 2 k counting units, and the serial numbers are 0, 1, 2, ..., 2 k -1, where the number is represented by w; the first device outputs the output every time the counter counts.
- a bit the bit satisfies kj, where j is an exponential power of 2, 0dj ⁇ k, and satisfies the first relationship:
- the quotient is a, and the remainder is b. It is judged that j takes the minimum value among all j values when the quotient a is an odd number; the bits of all counting units output by the counter are sorted to generate the bit sequence.
- the communication interface is further used to send service parameters using overhead frames, and the service parameters include: the number of services m and m Service number and the number of m resources.
- the communication interface is specifically configured to send the service parameters through 32 flexible Ethernet FlexE overhead frames; among them, the first to The 20th FlexE overhead frame is used to carry the m service numbers corresponding to the m services, the 21st to 27th FlexE overhead frames are used to carry the m resource numbers, and the 28th to 32nd FlexE overhead frames are used Resources are reserved for the bearer; and a first identifier is configured on the version identifier VER field in each FlexE overhead frame, and the first identifier is used to indicate that the service number or the number of resources carried in the FlexE overhead frame is the current Business parameters used.
- the bit corresponding to the first identifier is 1.
- the communication interface is specifically configured to send 2m+2 overhead frames to transmit the service parameters; wherein, the 2m+ The two overhead frames include the first overhead frame, the second overhead frame, the third overhead frame to the 2m+2 overhead frame, the first overhead frame includes the sum of m resources, and the second overhead
- the frame includes the number of services m, the m overhead frames in the 3rd to m+2th overhead frames include m service numbers, and the m overheads in the m+3th to 2m+2th overhead frames
- the frame includes the number of m resources, and a first identifier is configured on the version identifier VER field in each overhead frame, and the first identifier is used to indicate that the service number or the number of resources carried in the overhead frame is The business parameters currently in use.
- the overhead frame includes one control code block and Y data code blocks, Y ⁇ 2 and Y is a positive integer, and the control The code blocks are used to locate and transmit the number m of services, and the Y data code blocks are used to transmit the m resource numbers and the m service numbers.
- the Y data code blocks include at least one first code block, wherein one first code block is used to carry the m number of resources, or the m number of the at least one first code block One code block is used to carry the number of m resources.
- the embodiments of the present application also provide a network system, which includes a sending-end device and a receiving-end device.
- the sending-end device and the receiving-end device may be those described in the foregoing various implementations of the third aspect.
- the network device is configured to implement the foregoing first aspect and the methods described in various implementation manners of the first aspect.
- the embodiments of the present application also provide a computer storage medium, the computer storage medium stores instructions, and when the instructions are run on a computer, they can implement part or all of the resource allocation methods provided in the present application. step.
- this application also provides a computer program product.
- the computer program product includes one or more computer instructions, such as resource allocation instructions. When the instructions are run on a computer, some or all of the steps in the embodiments of the resource allocation method provided in this application can be implemented.
- the embodiments of the present application also provide an overhead frame, the overhead frame includes a version identifier VER field, and a first identifier is configured in the VER field, and the first identifier is used to indicate where the overhead frame is located.
- the service number or resource number carried is the service parameter currently used.
- the bit value carried by the first identifier is "1".
- the overhead frame is also used to carry the service number of a service, or the number of resources required by the service.
- the overhead frame is a flexible Ethernet FlexE overhead frame.
- the service parameters are sent through 32 FlexE overhead frames; among them, the 1st to 20th FlexE overhead frames are used to carry m service numbers corresponding to the m services, and the 21st to 27th FlexE overhead frames are used for Carrying the number of m resources, the 28th to 32nd FlexE overhead frames are used to carry reserved resources.
- the number of services m and the number of m resources are sent through 2m+2 overhead frames; wherein, the 2m+ The content carried in the two overhead frames includes: the number of services m, the sum of the number of resources required by the m services P, the service number, and the number of the m resources; and the version in each overhead frame
- the identifier VER field is configured with a first identifier, and the first identifier is used to indicate that the service number or the number of resources carried in the overhead frame is a currently used service parameter.
- the service parameters may also be transmitted by sending 2m+2 overhead frames.
- the 2m+2 overhead frames include the first overhead frame and the second overhead frame.
- the overhead frame, the third overhead frame to the 2m+2th overhead frame, the first overhead frame includes the sum of the number of resources of m resources, the second overhead frame includes the number of services m, and the first overhead frame includes the number m of services.
- the m overhead frames in the 3 to m+2th overhead frames include m service numbers
- the m overhead frames in the m+3 to 2m+2th overhead frames include the m resource numbers
- each The version identifier VER field in each overhead frame is configured with a first identifier, and the first identifier is used to indicate that the service number or the number of resources carried in the overhead frame is a currently used service parameter.
- the embodiments of the present application also provide another overhead frame.
- the overhead frame includes a control code block and Y data code blocks, Y ⁇ 2 and a positive integer, and the control code block is used to locate and transmit data.
- the number of services is m, and the Y data code blocks are used to transmit the number of m resources and the number of m services.
- the Y data code blocks include at least one first code block, wherein one first code block is used to carry the m number of resources, or the m number of the at least one first code block One code block is used to carry the number of m resources.
- the resource allocation method and device provided in this embodiment divide the resource number of m services into k groups of resource numbers, and perform resource allocation according to the resource allocation unit corresponding to each group of resource numbers in the k groups of resource numbers.
- the unit indicates the smallest unit of resource allocation in a group of resource numbers, so resource allocation with smaller resource granularity is realized, and the flexibility and scalability of resource allocation are improved.
- the sender when the granularity of resource allocation is small, through the same rules on both the sender and the receiver, the sender only needs to send the multiplexing scheme of the service allocation instead of sending the redundant resource configuration table to the receiver, thereby reducing This reduces the resource overhead of sending a long resource configuration table.
- FIG. 1 is a schematic structural diagram of a FlexE provided by an embodiment of the application
- FIG. 2 is a schematic diagram of a FlexE time slot configuration table provided by an embodiment of the application
- FIG. 3 is an architecture diagram of a network system including a sending end 10 and a receiving end 20 according to an embodiment of the application;
- FIG. 4 is a flowchart of a resource allocation method provided by an embodiment of the application.
- FIG. 5 is a schematic diagram of allocating service resources according to a sequential method according to an embodiment of the application.
- FIG. 6 is a schematic diagram of allocating service resources according to an interleaving method according to an embodiment of the application.
- FIG. 7a is a schematic diagram of grouping binary resource numbers according to an embodiment of this application.
- FIG. 7b is a schematic diagram of allocating service resources according to a segmentation method according to an embodiment of the application.
- FIG. 7c is another schematic diagram of allocating service resources according to the segmentation method according to an embodiment of the application.
- FIG. 7d is another schematic diagram of allocating service resources according to the segmentation method provided by an embodiment of the application.
- FIG. 8 is a schematic diagram of a service resource provided by an embodiment of this application.
- FIG. 9a is a schematic diagram of grouping resource numbers according to an embodiment of the application.
- FIG. 9b is a schematic diagram of service resource allocation provided by an embodiment of this application.
- FIG. 10a is a schematic diagram of a bit sequence provided by an embodiment of this application.
- FIG. 10b is a schematic diagram of determining hopping bit positions according to an embodiment of the application.
- FIG. 10c is a schematic diagram of a bit palindrome arrangement provided by an embodiment of the application.
- FIG. 10d is a schematic diagram of a corresponding relationship between each bit and a service provided by an embodiment of this application.
- FIG. 10e is a schematic diagram of implementing service resource allocation by using a palindrome arrangement of bits according to an embodiment of the application.
- FIG. 11 is a schematic diagram of a palindrome arrangement for generating bits according to an embodiment of the application.
- FIG. 12 is a schematic diagram of another palindrome arrangement for generating bits according to an embodiment of the application.
- FIG. 13a is a schematic diagram of bit allocation using the Sigma/Delta algorithm according to an embodiment of the application.
- FIG. 13b is a schematic diagram of generating a bit sequence by using the Sigma/Delta algorithm according to an embodiment of the application;
- FIG. 13c is a schematic diagram of realizing service resource allocation by using a bit sequence according to an embodiment of the application.
- FIG. 14a is a schematic structural diagram of a FlexE overhead code block provided by an embodiment of this application.
- FIG. 14b is a schematic diagram of transmitting service parameters using FlexE overhead code blocks according to an embodiment of the application.
- 14c is another schematic diagram of transmitting service parameters using FlexE overhead code blocks according to an embodiment of the application.
- FIG. 15a is a schematic structural diagram of an overhead frame provided by an embodiment of this application.
- 15b is a schematic structural diagram of a control code block in an overhead frame provided by an embodiment of this application.
- FIG. 15c is a schematic structural diagram of a first code block provided by an embodiment of this application.
- FIG. 16 is a schematic structural diagram of a resource allocation device provided by an embodiment of this application.
- FIG. 17 is a schematic structural diagram of a network system provided by an embodiment of this application.
- Ethernet is a baseband local area network specification, and it is the most common communication protocol standard used by existing local area networks today.
- Flexible Ethernet Flexible Ethernet, FlexE
- FlexE Flexible Ethernet
- FlexE is an interface technology that implements service isolation and bearer and network fragmentation. It has developed rapidly in the past two years and has been widely accepted by major standards organizations.
- Ubiquitous Ethernet X-Ethernet, XE
- X-Ethernet XE
- XE bit block
- the encoding type used by XE can be: 64B/66B encoding type, etc.
- the FlexE standard protocol defined by the Optical Internetworking Forum (Optical Internetworking Forum, OIF) standardization organization is based on a physical link group composed of several 50/100/200/400G Ethernet physical interfaces, and each interface supports one Or multiple FlexE instances, each instance introduces a fixed periodic frame structure.
- the time slot is divided based on a time division multiplexing mechanism (Testing Data Management, TDM), and one or more time slots are used to support an Ethernet service flow or a flexible Ethernet client (FlexE Client) signal.
- TDM Time Division multiplexing mechanism
- FlexE Client Flexible Ethernet client
- the FlexE standard defines FlexE client (Client), FlexE cushion (Shim) and FlexE group (Group).
- FlexE Client is a MAC layer service, and its service rate can be 10Gbps, 40Gbps or m ⁇ 25Gbps.
- FlexE Group binds multiple PHYs into a group to support larger bandwidth. For example, two 100Gbps PHYs can be bound into 200Gbps ports.
- the FlexE Shim layer maps or demaps FlexE Client signals to FlexE Group, which includes multiplexing and demultiplexing processes. Among them, the FlexE multiplexing process refers to the sending direction, which is mapped from the FlexE Client to the FlexE Group; the demultiplexing process refers to the receiving direction, and the FlexE Client is demapped from the FlexE Group.
- FlexE divides time slots to support lower service rates; and allocates time slots to achieve flexible bandwidth allocation. For 100Gbps PHY, FlexE divides it into 20 time slots, each of which is 5Gbps. Therefore, FlexE can support services at a minimum rate of 5Gbps. According to the actual service rate, FlexE uses the FlexE configuration table (Calendar) to allocate time slots on demand, such as 15Gbps services. FlexE Calendar can allocate 3 time slots for it, and each time slot is 15Gbps bandwidth. FlexE Calendar allocates bandwidth by determining the business to which each time slot belongs.
- Calendar is divided into configuration table A and configuration table B.
- configuration table A and configuration table B are mutual backups.
- the configuration table A has a total of 20 entries, corresponding to 20 time slots, and each entry indicates the specific client ID to which the current time slot belongs.
- the client ID is used to configure time slot 0 of table A (English: Client ID for calendar A slot 0).
- the second entry in configuration table A is filled with client ID 0x1111, and the second table The entry corresponds to slot 1 (slot 1), indicating that slot 1 is occupied by client ID 0x1111.
- Different time slots in the configuration table A may have the same client ID, which means that these time slots are allocated to the same client.
- the configuration table B is similar to the configuration table A, and also has 20 entries, and each entry indicates the specific client to which the current time slot belongs.
- FlexE breaks the stepped rate system established by the IEEE 802.3 standard, realizes the flexible allocation of bandwidth, and supports arbitrary N ⁇ 5Gbps services.
- Huawei went a step further by privately implementing FlexE with 1Gbps granules to support N ⁇ 1Gbps services.
- the existing FlexE allocation mechanism realizes a service with a time slot granularity of 5 Gbps or a smaller granularity of 1 Gbps, the divided time slot granularity still does not meet the requirements for small granular services and non-integer time slot granular services.
- the service support for these smaller time slot particles is not flexible enough.
- the granularity of the divided time slots must be smaller, which leads to an increase in the number of divided time slots under the same interface. The increase in the number of time slots will increase the cost of time slot maintenance and management. Therefore, for small-particle time slots, the time slot configuration table of FlexE is not scalable.
- the time slot configuration of FlexE is transmitted through FlexE multiframes, and it is impossible to dynamically allocate bandwidth in real time.
- the technical scenarios applied by the technical solutions of the various embodiments of the present application include, but are not limited to, Ethernet, flexible Ethernet, and optical transport network (Optical Transport Network, OTN), and these networks include at least two network devices.
- the product form of the network equipment may include typical core routers, edge routers, OTN transmission equipment, etc., as well as specific scenarios-oriented IP radio access network (Radio Access Network, RAN) box-type or frame-type transmission equipment, packet transmission network (Packet Transport Network, PTN) box-type or frame-type transmission equipment, etc.
- Radio Access Network Radio Access Network
- PTN Packet Transport Network
- the interface of the network device may be a FlexE interface, an OTN interface, an Ethernet interface, etc., or may also be a pipe divided by these interfaces.
- a network system includes a sending end 10 and a receiving end 20, and the sending end 10 and the receiving end 20 are connected through a communication interface.
- the sending end 10 is used to multiplex multiple services and send the multiplexed data to the receiving end 20.
- the receiving end 20 demultiplexes the data, thereby recovering the original multiplexed service data.
- the multiplexing of multiple services means that multiple services data share a transmission pipe for transmission, in which each service occupies resources in the transmission pipe according to its own service bandwidth requirements.
- the demultiplexing of multiple services is the inverse process of multiplexing multiple services, and it refers to recovering the original multiple service data from the transmission pipeline.
- the service parameters are first obtained, and the service parameters include: the number of services, the service number, and the number of resources required for each service.
- the number of known services is m, m ⁇ 1, and each service corresponds to a number.
- the corresponding service numbers of m services are S1, S2, ..., Sm, and each service requires a certain amount of resources (can be Called the number of resources) bearer; the number of resources corresponding to the m services with service numbers S1, S2, ..., Sm are C1, C2, ..., Cm, respectively.
- the sending end 10 determines a multiplexing scheme according to the number of resources required by each service; finally, the sending end 10 multiplexes m services according to the multiplexing scheme, and sends the multiplexed data to the receiving end 20.
- the receiving end 20 On the receiving end 20 side, the receiving end 20 first obtains the service parameters, and then determines the demultiplexing scheme according to the service parameters, and finally performs the demultiplexing operation on the multiplexed data stream sent by the sending end 10 according to the demultiplexing scheme, and recovers m-way business.
- the receiving end 20 determines the demultiplexing scheme in the same manner and process as the transmitting end 10, so as to ensure that the demultiplexing scheme of the receiving end 20 and the multiplexing scheme of the transmitting end 10 are consistent.
- the sending end 10 is taken as an example to describe the multiplexing operation of the sending end 10 in detail.
- the main core method flow of the sending end is shown in FIG. 4, this embodiment provides a resource allocation method, and each step of the method can be executed by the sending end 10.
- the method includes:
- each group of resources corresponds to a resource allocation unit N, and each group of resources includes the coefficient a corresponding to each service, k ⁇ 1, N ⁇ 1 and k, N are all positive Integer.
- the coefficient a represents the number of resource allocation units included in a service
- the resource allocation unit N represents the number of resources included in one resource allocation unit.
- the number of resources, or the number of resources for short refers to the resources required to transmit a certain service. For example, an Ethernet service requires 10 Mbps bandwidth. If 1 Mbps bandwidth is used as the basic unit of resources, the service requires 10 such resources. That is, the number of resources is 10.
- Step 101 includes: obtaining the number of m resources corresponding to the m services, each of the resource numbers is expressed in a first base, m ⁇ 1; and each resource number expressed in the first base is passed
- the number of resources in the k groups is obtained after the first binary representation, and the second binary includes binary, octal, decimal, hexadecimal, and so on.
- the corresponding resource numbers are C1, C2, and C3.
- each resource number C is represented by the first base, such as decimal.
- the four sets of resource numbers obtained in step 101 are: the first set of resources ⁇ 0,0,0 ⁇ , the second set of resources ⁇ 2,0,2 ⁇ , and the second set of resources ⁇ 0,4, 4 ⁇ , the number of resources in the second group ⁇ 8,0,0 ⁇ .
- the resource allocation unit N corresponding to the number of resources in the first group is 1, the resource allocation unit N corresponding to the number of resources in the second group is 2, the resource allocation unit N corresponding to the number of resources in the third group is 4, and the resource corresponding to the fourth group of resources
- the allocation unit N is 8.
- the coefficient a is 0 or 1.
- L resources refer to the total number of transmission resources per unit time in a link channel.
- L is greater than or equal to the sum of the resource numbers of m services, that is, L ⁇ (C1+C2+C3+...+Cm). Further, if L is greater than the sum of the number of resources of m services, it indicates that there are vacant resources; further, if these vacant resources are used as resources required by a service, it can be understood that L resources are equal to m+1 services The total number of resources.
- the sender configures the number of resources required by m services in L transmission resources to form a multiplexing scheme for m services, and then multiplexes the m services according to the multiplexing scheme, and sends the multiplexed service to the receiving end Data flow.
- the number of resources allocated in each group is the product of the sum of the coefficient a of m services and the resource allocation unit N corresponding to each group.
- L is the total number of resources.
- L 20, that is, the 20 resources required for 3 services are allocated to L resources through 4 groups of resources. Further, the number of resources in the first group is 0.
- a first specific implementation manner is to obtain a first sequence, where the first sequence is used to indicate the position relationship between the resource allocation units N of the number of resources of the k groups.
- the first sequence includes k first units, and different first units correspond to different numbers of group resources.
- the number of k groups of resources is k first units, where the first first unit corresponds to the number of resources in the first group, the second first unit corresponds to the number of resources in the second group, and so on, the kth first unit
- the first sequence can indicate the positional relationship between the number of resources in the first group to the k-th group. Further, the order between the k first units indicated by the first sequence may be arbitrary.
- the k first units are allocated resources corresponding to m services among the L resources in the order of 1 to k.
- the first sequence indicates that the order of the four first units is 1, 2, 3, and 4. Since the first group has no resources, it is not shown in Figure 5.
- the service allocation of 20 resources are arranged in sequence, and the sending end will assign the first to second, thirteenth Time slot resources No. 20 are allocated to service S1, No. 3 to No. 4, No. 9 to No. 12 time slot resources are allocated to Service S3, and No. 5 to No. 8 time slot resources are allocated to Service S2.
- the service numbers corresponding to time slot 1 to time slot 20 are as follows: S1, S1, S3, S3, S2, S2, S2, S2, S2, S2, S2, S3, S3, S3, S3, S3, S3, S1, S1, S1, S1 , S1, S1, S1, S1.
- resource allocation can be completed in k groups according to the base, and the resource unit allocated for each group is twice that of the previous group.
- the resource allocation unit N of the first group is 1, the resource allocation unit N of the second group is 2, and the resource allocation unit N of the third group is 4, so the allocation is continued, the resource allocation unit N of the jth group is 2 j-1 , And finally the resource allocation unit N of the k-th group is 2 k-1 resources.
- the transmission can determine the resource allocation for the service Si in the i-th group according to the coefficient a.
- the method also includes:
- the sending end multiplexes the current 20 time slot resources according to the corresponding relationship of the 20 time slot resources corresponding to the 3 services of S1, S2, and S3, and sends the multiplexed data to the receiving end.
- the process of multiplexing and sending the multiplexed data at the transmitting end can be implemented in a variety of ways, which is not limited in this embodiment.
- the method provided in this embodiment divides the number of resources of m services into k groups of resource numbers, and allocates resources according to the resource allocation unit corresponding to each group of resource numbers in the k groups of resource numbers. Because the resource allocation unit indicates a resource allocation unit. The smallest unit of resource allocation in the number of group resources, so resource allocation with smaller resource granularity is realized, and the flexibility and scalability of resource allocation are improved.
- the resources corresponding to the m services are determined among the L resources, if the allocated resources of any group from the first to the kth group include two or more services , For a group containing two or more services, the resources corresponding to each service can be allocated in the order of interleaving, which is also referred to as "interleaving".
- the first sequence indicates that the group order of the four first units is 1, 2, 3, and 4.
- the number of resources in the second group corresponds to services S1 and S3, and the resource allocation unit N is 2, then service S1 and service S3 can be interleaved and allocated in one allocation, that is, S1 and S3 are taken as a whole Assign business.
- the first resource (slot 1) and the third resource (slot 3) are allocated to service S1
- the second resource (slot 2) and the fourth resource are allocated to service S1.
- (Time slot 4) is allocated to service S2.
- the services that need to be allocated are S2 and S3, and the 8 resources of the third group are allocated in the order of S2 and S3 interleaving and polling. Therefore, the obtained multiplexing scheme is shown in Figure 6.
- the sender allocates the 1, 3, 13-20 time slot resources to the service S1, and the 5, 7, 9 and 11th time slot resources to the service S2. , Allocate the resources of the second, fourth, sixth, eighth, tenth, and twelfth time slots to service S3. According to the multiplexing scheme, the sending end can multiplex 3 services.
- the sequence formed by the group numbers of the second to fourth groups may be referred to as the first sequence, and the first sequence indicates the positional relationship between the number of k groups of resources, and the number of resources in each group can be regarded as One first unit, that is, the number of k groups of resources corresponds to k first units.
- a third specific implementation manner is that the first sequence includes z second units, different second units correspond to different group resource numbers, and at least one second unit corresponds to at least two group resource numbers, z ⁇ k , Z is a positive integer and z ⁇ 2.
- the first sequence indicates that the order of the z second units is 1, 2, 3,... Z.
- the k groups of resource numbers can be divided into at least two second units, and each second unit can be further divided into two or more resource numbers.
- the first sequence includes two second units, and each second unit corresponds to two sets of resource numbers in k groups.
- each second unit corresponds to the number of resources in the first and second groups in the k groups, and another second unit corresponds to the number of resources in the third and fourth groups in the k groups; then, for each second unit The two groups are sorted by position.
- the coefficient a corresponding to a set of resource numbers is not the binary bit value "1" or "0"
- the coefficient a can be segmented, for example, the coefficient a can be divided into two or two segments according to the binary rule
- the number of characters (or number of bits) contained in each paragraph is the same. Between two adjacent paragraphs is called inter-paragraph. Two or more characters in a paragraph are called intra-paragraph. This method is called "division”. Paragraph method”.
- the coefficient a determines whether the service needs to allocate resources, and the basis determines the number of resources allocated each time.
- the required number of resources Ci can be expressed in binary as:
- k is the number of resource groups
- the binary sequence of the resource number Ci can be divided into p segments, and each segment contains d resource allocation units, then the resource number Ci can be expressed as:
- the service Si can allocate resources according to the p segments, and in each segment, the resources can be allocated according to the sequential method, or the polling interleaving method, or the sequential method and the polling interleaving method.
- the d resource allocation units in each segment can also be allocated according to the sequential method, or the polling interleaving method, or the sequential method and the polling interleaving method.
- the following takes the number of services m 3 in the above embodiment as an example for description.
- services can be allocated according to the sequential method or the interleaving method. specifically,
- One way to allocate between groups is, as shown in Figure 7b, for the 4 resources of the first group of resources, corresponding to services S1 and S3, the resource allocation unit in the group is 2, and the 4 resources corresponding to the sequence method are respectively These are S1, S1, S3, and S3.
- the 4 resources corresponding to each group are S2, S3, S1, and S1.
- the team allocates resources and repeats 4 times.
- the service multiplexing schemes corresponding to time slot resources 1 to 20 established according to this allocation method are: S1, S1, S3, S3, S2, S3, S1, S1, S2, S3, S1, S1, S2, S3, S1, S1, S2, S3, S1, S1, S2, S3, S1, S1, S2, S3, S1, S1.
- Fig. 7c Another way to allocate between groups is, as shown in Fig. 7c, both within and between segments are allocated according to the polling interleaving method.
- the four resources of the number of resources in the first group are allocated according to the way of interleaving services S1 and S3 to obtain four resources, namely S1, S3, S1, and S3.
- S1 and S3 the way of interleaving services
- the allocation method of the second group can also be allocated in the order of S2, S3, S1, and S1 interleaving.
- Another method of allocation between groups can also be that the number of resources in the first and second groups are allocated in a sequential manner, and the resulting resource reuse scheme is shown in Figure 7d.
- the number of resources in the first group is as follows Resources are allocated in the order of S1, S1, S3, and S3, the number of resources in the second group is allocated in the order of S2, S3, S1, and S1, and the resource allocation unit in the second group is 4.
- each large group of resources can be divided once or more than once, until the number of resources of each group is a binary resource allocation unit after division.
- the number of segmentation or grouping is not limited.
- This embodiment proposes a segmented resource allocation method.
- the bits of the number of resources are segmented, and the resource allocation of the services is realized through the intra-segment and the inter-segment, and through the sub-segmentation within the segment, the result is Recursive resource allocation method. This can effectively reduce the jitter of service resource allocation.
- the polling and interleaving method when used for resources within and between segments, the resources occupied by each service are relatively more uniform and the jitter is lower.
- this embodiment divides the resource number bit sequence into segments, and the resource allocation of the service is realized by resource allocation within and between segments. If the length of the divided segment is large, the bit sequence in the segment can be further divided to form a recursive segmentation method, which can be called a recursive resource allocation method. Further, the further division and the allocation of resources after the division are the same as the allocation methods shown in FIG. 7a to FIG. 7d, and will not be repeated here.
- the resource allocation process for this service in this embodiment includes:
- the first and third groups have no resource allocation
- the number of resources in the second group is 2
- the corresponding coefficient a is 1
- the resource allocation unit N is 2
- the number of resources in the fourth group is 8, and the corresponding coefficient a is 1.
- the resource allocation unit N is 8.
- time slots 1 and 2 are allocated two resources of the second group of service S1
- the foregoing embodiments all perform conversion and resource allocation for each decimal (first system) resource number according to the binary (first binary) rule.
- the resource allocation method in this application can also be extended to any system, such as octal, decimal, hexadecimal, etc.
- the decimal system is used as an example in the binary system.
- the number of resources in the first group includes services S2 and S3, and the number of resources that need to be allocated for service S2 is 4, and the number of resources that needs to be allocated for S3 is 6.
- the number of resources in the second group only service S1 is included, and the number of resources to be allocated for S2 is 10.
- the redistribution coefficients 4 and 6 can be divided into 3 groups. As shown in Figure 9a, the number of resources in the first group is 0, the number of resources in the second group is 2, and the number of resources in the third group is 8. In the second group, only business S3 is included, and the resource allocation unit corresponding to this business S3 is 2. In the third group, business S2 and S3 are included, and the resource allocation unit corresponding to each business is 4; there are two allocation methods . One is to allocate in the order of service numbers S2 and S3, and the corresponding resource allocation units are S2, S2, S3, and S3. The other is interleaved allocation according to service numbers S2 and S3, and the corresponding resource allocation units are S2, S3, S2, and S3.
- the number of resources of the first group is 10 according to the allocation method of the second group and the third group to obtain the multiplexing scheme of the services S1, S2, and S3.
- the smaller groups can be further divided into binary groups, so as to allocate smaller resource allocation units to achieve cross-distribution of services within each group, thereby Improve the flexibility of business allocation, and at the same time can effectively reduce the jitter of business resource allocation.
- this embodiment proposes a resource allocation method based on arbitrary mechanism rules.
- Si the number of resources corresponding to it is Ci
- Ci can be expressed as:
- k is the number of resource groups
- a i, j are coefficients, a i, j ⁇ ⁇ 0,1 ⁇
- the number of resources in each group is a i,j ⁇ j-1 , where the coefficient a i,j can be the number of resource allocation units included in a business, and the base ⁇ j- 1 is the resource allocation unit N.
- the number of resources corresponding to the business Si is 45, which can be divided into 2 groups to complete the resource allocation.
- the number of resources in the first group is 13, and the number of resources in the second group is 32.
- the 32 resources in the second group can be further divided into two groups Allocation, such as dividing into the 1st group and the 2nd group, the resource allocation unit corresponding to each group is 16.
- This embodiment extends the binary-based resource allocation method to any hexadecimal system, thereby realizing resource allocation of multiple services for multiplexing or demultiplexing processes, so as to increase the flexibility of resource allocation and reduce the jitter of service allocation.
- step 102 includes: acquiring a first sequence, the first sequence being used to indicate the resource allocation unit of the number of k groups of resources The positional relationship between N; according to the number of k sets of resources and the first sequence, the resources corresponding to the m services are determined among the L resources.
- the resource allocation unit N corresponding to the number of resources in the i group is 2 i-1
- the resource allocation unit N corresponding to the number of resources in the i+1 group is 2 i+1-1
- i is any one of 1 to k Value
- the 2i-1 resources include the first resource of the i-th group
- the 2i+1-1th resources include the first resource of the i+1th group and the first resource of the i+1th group.
- Two resources; the first sequence is used to indicate that the first resource of the i-th group is located in the L resources among the first resource of the i+1th group and the second resource of the i+1th group between.
- the second group includes the first resource and the second resource
- the third group includes the first, second, third and fourth resources
- the first sequence is used to indicate that the first resource of the second group is located in the first resource of the third group and the second resource of the third group
- the second resource of the second group is located between the third resource of the third group and the fourth resource of the third group. In this way, resource interleaving between resource allocation units of different groups is realized.
- one resource allocation unit of the third group includes the first resource, the second resource, the third resource, and the fourth resource of the third group. If the four resources of the third group correspond to the first service S1 and the second service Service S2, the first sequence indicates that the first resource of the third group and the second resource of the third group are allocated to the first service S1; the third resource of the third group and the fourth resource of the third group are allocated to the first service S1; The second service S2 is S1, S1, S2, and S2. Or, the first sequence indicates that the first resource of the third group and the third resource of the third group are allocated to the first service S1, and the second resource of the third group and the fourth resource of the third group are allocated to the second service S2 is S1, S2, S1, S2.
- a first sequence is obtained according to the number of resource groups k.
- the first sequence includes p third units.
- a group resource number corresponds to N different third units in the first sequence, and p is a positive integer and p ⁇ 2, N is the resource allocation unit.
- each third unit corresponds to a group number i
- i is any one of 1 to k
- the first sequence is used to indicate each The group number i corresponding to the unit
- the number of resources in the i-th group corresponds to 2 i-1 third units in the first sequence.
- i 4
- the first sequence consists of 15 units
- the sending end allocates resource group numbers of m services among the L resources according to the group number of each third unit in the first sequence and the correspondence between each group number and the service.
- first sequence indication described in this embodiment is not limited to a sequence of binary rules, and may also indicate the positional relationship of third units in other systems.
- a sequence represented by a binary rule is taken as an example for description.
- the following describes the generation process of the first sequence in this embodiment, and various implementations of allocating resource numbers of m services according to the instructions of the first sequence.
- the acquiring the first sequence includes:
- Step 1 For each group of resource numbers, the bit values represented in binary are listed in sequence from all 0s to all 1s, a total of 2 k count units.
- Step 2 Each time a counting unit is generated, compare the bit value change of the current counting unit and the previous counting unit to determine the bit that has jumped.
- the jumped change means that the bit value on the same bit changes from the The 0 of the previous count unit becomes 1 at the current count unit.
- Step 3 Sorting all the hopping bits corresponding to the determined 2 k -1 count units to generate the first sequence, and the first sequence is a palindrome arrangement of bits.
- the 2 k -1 count units are all count units remaining except the first count unit whose bit value is all 0.
- the number of resource groups k is the same as the number of bits after binary conversion.
- bit width k the number of bits may also be referred to as bit width.
- bit width k the bit width k can be determined in the following two ways:
- Manner 2 The bit width of the number of resources required by the first service is used as the bit width of the counter, where the number of resources required by the first service is the largest number of resources required among all services .
- the largest number of resources is C1.
- the embodiment of the present application uses the bit width determined in the second method to establish the correspondence relationship.
- Step 1 the order is from low to high according to the bit order, or it can also be from high to low according to the bit order.
- the bit order is sorted from low to high.
- the number of the count unit is represented by w, and the value range of w is from 0. To 15.
- Each counting unit corresponds to a bit sequence, for example, the sequence number 0 corresponds to the bit sequence 0000, the sequence number 1 corresponds to the bit sequence 0001, and so on, the sequence number 15 corresponds to the bit sequence 1111. In this embodiment, a total of 16 bit sequences are included.
- step 2 the bit value changes of the bit sequence of the next counting unit and the previous counting unit are compared one by one, and the bits that have jumped are screened out.
- the bits that have jumped refer to the same bit.
- the bit whose value of the upper bit changes from 0 to 1, defines a jump: when the bit value of a bit changes from 0 to 1, it is defined as a jump; in addition, the bit is the 1st to the kth bit One of the bits.
- the k-th bit has 2 k-1 transitions
- the k-1 bit has 2k-2 transitions
- the second bit has two transitions
- the bit sequence of the next counting unit is compared, that is, the bit sequence of the bit sequence 0000 of the sequence number 0 and the bit sequence of the bit sequence 0001 of the sequence number 1 are compared, and it can be seen that only the bit sequence of the first counting unit is changed.
- the 4-bit bit changes from 0 to 1, so the bit that jumps from the first counting unit to the second counting unit is the "4th bit", and the jump bit corresponding to the bit sequence 0001 is recorded as "4".
- Step 3 all the bits corresponding to the transitions corresponding to the 2 k -1 counting units except the one counting unit with the bit value of all 0s are arranged in order.
- a bit sequence of a count unit and the previous count unit, and record each bit that changes, that is, the position of the output transition bit, and the final output sequence is a palindrome arrangement of the bits.
- Fig. 10b For example, as shown in Fig. 10b, for the bit sequence 1000 of sequence number 8, when determining the bit that has hopped, compare the bit sequence 0111 of the previous sequence number 7 with the bit sequence of the current bit sequence 1000 that sent hops. It can be seen that, Only the first bit changes from 0 to 1, so the jump bit corresponding to the bit sequence 1000 is recorded as "1". In the same way, a total of 15 bits that have jumped from sequence number 0 to sequence number 15 are determined, and the palindrome arrangement of the bits is obtained. In this embodiment, as shown in Figure 10c, the palindrome arrangement of the bits is: 4 3 4 2 4 3 4 1 4 3 4 2 4 3 4.
- each service and its time slot is determined according to the palindrome arrangement of the bits and the service corresponding to each bit.
- the service number corresponding to each bit can be based on the number of resources represented in binary, as shown in Figure 10d, all bits in C1, C2, and C3 with a bit value of "1" are the services that need to be allocated resources, and the bit value Bits that are "0" do not need to be allocated services.
- the bit sequence 1001 of the resource number C1 (1001 in the order of the bit position from high to low) is on the 4th bit and the 1st bit
- the service S1 needs to be allocated, and no resources are allocated on the 3rd and 2nd bits.
- the bit sequence 1110 of the number of resources C2 (0111 in the order of the bits from high to low) needs to be allocated service S2 on the first to third bits, and no resources are allocated on the fourth bit.
- the bit sequence 0010 of the resource number C3 (0100 in the order of bits from high to low) needs to be allocated service S3 on the 3rd bit, and no resources are allocated on the remaining bits, the 4th, the 2nd and the 1st bit. .
- the correspondence between the services S1, S2, and S3 and the time slot resources is obtained.
- the bit corresponding to the sequence number 1 of the palindrome arrangement is "4"
- the fourth bit and the service that needs to be transmitted on the fourth bit is S1, and corresponds to a time slot.
- the service configured in slot 1 is S1 (that is, slot 1 is used to transmit service S1).
- the bit corresponding to the sequence number 2 of the palindrome arrangement of the bit is "3", then according to the corresponding relationship shown in FIG. 10d, the services that need to be configured on the third bit are S2 and S3, each service corresponds to a time slot, then time slot 2 is used to transmit service S2, and time slot 3 is used to transmit service S3.
- there is only S2 for the service that needs to be transmitted for the second bit so the time slot 6 and time slot 17 corresponding to the second bit are used to transmit the service S2; for the service that needs to be transmitted for the first bit, there are S1 and S2. Therefore, two time slot resources need to be occupied on each second bit to transmit services S1 and S2. For example, if the time slot indicated by the first bit includes time slot 15 and time slot 16, then time slot 15 is used to transmit services S1, time slot 16 is used to transmit service S2.
- the sender allocates a certain resource for each service among the 20 resources, obtains a multiplexing scheme for all services, and completes the allocation of time slot resources.
- a counter is used to establish a palindrome arrangement of bits, and then a correspondence relationship between each service and the resource where each service is located is established according to the palindrome arrangement of bits, so as to complete each of the L resources.
- Business resource allocation is used to establish a palindrome arrangement of bits, and then a correspondence relationship between each service and the resource where each service is located is established according to the palindrome arrangement of bits, so as to complete each of the L resources.
- bit sequence when generating the bit sequence, the bit sequence is sorted from low to high.
- bit sequence can also be sorted from high to low. That is, the kth bit, the k-1th bit, ..., the 2nd bit, the 1st bit. Then the rest of the process is the same as “Step 2" and "Step 3" of this embodiment, and will not be repeated here.
- this embodiment generates a palindrome in which the first sequence is a bit position, and the palindrome of the bit position consists of 2 k -1 group numbers i, where the group number i is the 1st to the kth bit Any one of the bits. Further, in the sequence number composed of 2 k -1 units, the sequence number is 2 k-1 as the first center, and the bit sequence corresponding to the left sequence number of the first center is the same as the right sequence number.
- the corresponding bit sequence is symmetrical about the first center; the sequence number on the left of the first center, with the sequence number 2 k-2 as the second center, the bit sequence corresponding to the sequence number on the left of the second center.
- the bit sequence corresponding to the sequence number on the right is symmetric about the second center; the sequence number is 2 k-(k-1) as the k-1 center, and the left sequence number of the k-1 center is The corresponding bit sequence and the bit sequence corresponding to the sequence number on the right are symmetric about the k-1th center.
- the first center is the first bit of sequence number 8
- the sequence 4 3 4 2 4 3 4 to the left of the first bit is symmetrical with the sequence 4 3 4 2 4 3 4 to the right of the first bit.
- the second bit of sequence number 4 is the center, that is, the second center.
- the left sequence 4 3 4 of the second center is symmetrical to the right sequence 4 3 4; it is on the left of the second bit
- sequence 4 3 4 the left and right sides are symmetric about the third center (that is, the 3rd bit).
- the first sequence generated is a palindrome arrangement of bits, so that each bit is symmetrical about the center bit, and the resource allocation units of each group are split and arranged in order to reduce the jitter of service resources, and Improve the flexibility of resource allocation.
- this application may also obtain the first sequence in other ways, specifically,
- the number of resources represented by the first bit to the k-th bit is 1, 2, ..., 2 k-1 respectively .
- the service numbers are respectively S1, S2,..., Sk
- the total number of resources P 2 k -1.
- the interleaving and recursive methods can be used to generate a palindrome arrangement of bits.
- the method includes: first determining the intermediate position Bit position, and then insert the bit position on both sides with the bit position in the middle position.
- the method for generating a palindrome arrangement of bits includes:
- the sequence number of the first bit is placed in the middle according to the order of the bits from the 1st to the kth bit.
- the two sequence numbers of the second bit are placed on both sides of the sequence numbers of the first bit.
- the third step is to insert at least two sequence numbers of the third bit between each of the sequence numbers of the first bit and the second bit, including the two sequence numbers of the second bit. The two ends of the serial number.
- each service determines the correspondence between each service and its time slot, as shown in Figure 10e
- the services corresponding to time slot 20 are: S1, S2, S3, S1, S2, S1, S2, S3, S1, S1, S2, S1, S2, S3, S1, S2, S1, S2, S3, S1.
- the positions of two different bits that are not adjacent in the middle may be exchanged.
- the bit positions of serial numbers 4 and 6 in Figure 10c are interchanged.
- the bit position of serial number 4 becomes the third bit
- the bit position of serial number 6 becomes the second bit; similarly, you can also change the sequence
- the bits on numbers 10 and 12 are exchanged, as shown in Figure 12, the palindrome of the bits obtained after the exchange is arranged as: 4 3 4 3 4 2 4 1 4 2 4 3 4 3 4.
- this implementation manner uses parity conditions to generate a palindrome arrangement of bits. Specifically, the method includes:
- the bit width k is determined.
- the specific determination method is the same as the foregoing embodiment, and will not be described again.
- the second step is to sort the 2 k bit sequence.
- the specific process is the same as the foregoing embodiment, and will not be repeated here.
- bit order is sorted from low to high, as shown in Figure 10a.
- serial number of the 16 bit sequence is represented by w, which are sorted in ascending order: 0, 1, 2, ..., 14, 15.
- the third step each time the counter counts, a bit position is output, and the bit position satisfies k-j, the bit positions of all counting units output by the counter are recorded, and the palindrome arrangement of the bits is generated by statistics.
- k is the bit width
- j is an exponential power of 2, that is, 2 to the power of j
- 0 ⁇ j ⁇ k a method for determining j includes:
- the bit palindrome arrangement is generated as: 4 3 4 2 4 3 4 1 4 3 4 2 4 3 4.
- this embodiment also provides a method for obtaining the first sequence.
- the method uses the Sigma/Delta algorithm to generate the first sequence, and the first sequence is also called a bit sequence.
- the method for generating the bit sequence includes: taking k resource allocation units N of the number of k groups of resources, or bit width k as k services, and then using a preset algorithm to establish the k services and the The corresponding relationship between the total number of resources composed of k services, and finally the first sequence is generated according to the corresponding relationship.
- the preset algorithm is the Sigma/Delta algorithm.
- the Sigma/Delta algorithm is used to allocate resources for 4 services (4 bits).
- the Sigma/Delta algorithm can be expressed as: l ⁇ B modQ,
- l is a constant, the value of l ranges from 1 to 8; B represents the number of resources required for each business, and the value range of B is from B1 to Bk; Q is the selected parameter, mod represents the remainder operation, l ⁇ B modQ, which means that the quotient obtained by dividing l ⁇ B by Q takes the remainder.
- FIG. 13a it is a schematic diagram of using the Sigma/Delta algorithm to determine the bit arrangement.
- the service that needs to be allocated corresponds to the fourth bit; when the value of l is 2, the service that needs to be allocated corresponds to the third bit.
- the 4th bit when the value of l is 3, the service that needs to be allocated corresponds to the 4th bit; when the value of l is 4, the service that needs to be allocated corresponds to the 2nd to 4th bit; the value of l is At 5, the service to be allocated corresponds to the 4th bit; when the value of l is 6, the service to be allocated corresponds to the 3rd and 4th bits; when the value of l is 7, the service to be allocated corresponds to the 4th bit When the value of l is 8, the service to be allocated corresponds to the first to fourth bits, and the final bit sequence is: 4 3 4 4 2 3 4 4 3 4 4 1 2 3 4.
- the sequence number corresponding to this bit sequence is from 1 to 15. Then, according to the corresponding relationship between each bit and the service number, such as the corresponding relationship shown in Figure 10d, 20 resources corresponding to 3 services are obtained.
- the Sigma/Delta algorithm is used to obtain the first sequence, and then resource allocation is performed according to binary bits, and finally the service multiplexing scheme is obtained, which can reduce the jitter of the resource allocation method.
- this embodiment only exemplifies four implementation methods for obtaining the first sequence, including three methods for generating a palindrome of bits, and one method for generating a bit sequence, which may also be included in the foregoing Other implementation manners improved on the basis of various implementation manners are not limited in this embodiment.
- each method step in each of the above embodiments is mainly aimed at the sending end device, that is, the sending end device generates the first sequence according to the service parameters, and generates the multiplexing plan of the service resources according to the first sequence, and pairs according to the multiplexing plan.
- the resources corresponding to each business are allocated.
- it can also be applied to the receiving end device, that is, after the receiving end obtains the number of k sets of resources, it determines the demultiplexing scheme in the L resources according to the number of k sets of resources, and finally transmits to the transmitting end according to the demultiplexing scheme.
- the multiplexed data stream is demultiplexed, and m services are recovered.
- the receiving end can obtain a demultiplexing scheme consistent with the multiplexing scheme of the sending end. Furthermore, the process of determining L resource demultiplexing schemes at the receiving end according to the number of k sets of resources is the same as the process of generating L resource multiplexing schemes at the transmitting end. Refer to the description of the foregoing embodiments. This embodiment does not Go into details again.
- the resource allocation method provided in this embodiment can be used in the multiplexing or demultiplexing process of multiple services.
- the resource allocation method based on the number of k sets of resources can directly determine the resources occupied by the service in the transmission pipeline according to the size of the resource allocation unit required by the service, which is simple and straightforward, does not require any calculation, and is easy to expand.
- this method also realizes the automatic allocation of resources, and solves the problem of inflexible allocation of resources by FlexE for small-granularity services and non-integer time slot granular services.
- the method further includes: the sending end uses the overhead frame to send the number m of services and the number of m resources.
- the specific step includes: the sending end sends service parameters, and the service parameters include the number of services m and the number of m resources.
- the service parameters are carried and transmitted through overhead frames, which specifically include the following implementation modes:
- the first implementation method is based on the structure of the FlexE overhead frame in the OIF standard.
- the modified FlexE overhead frame carries the Business parameters.
- a 100Gbps FlexE interface is divided into 20 time slots, and each time slot has a bandwidth of 5Gpbs.
- the time slot configuration table (Calendar) defined in the FlexE standard contains a total of 20 entries, and each entry corresponds to a time slot resource.
- the service ID filled in the table entry is used to indicate that each time slot belongs to Which business. And if a service requires multiple time slots, two or more entries in the time slot configuration table correspond to the same service ID.
- FIG 14a it is a schematic diagram of a FlexE overhead frame and a multi-frame, including a 66-bit frame header, where the field "SH" represents a synchronization header and occupies 2 bits.
- the FlexE frame header consists of 8 code blocks, which are numbered in sequence from block 1 to block 8.
- the 2nd to 33rd bits in block 3 are used to transmit service parameters.
- the 2nd to 17th bits are used to transmit the service parameters of the time slot configuration table A (English: service parameters for A); the 18th to the 33th bits are used to transmit the service parameters of the time slot configuration table B (English: service parameters for B).
- Time slot configuration table B and time slot configuration table A are mutual backups.
- Table 3 below shows the Chinese interpretation of the content contained in the frame structure shown in FIG. 14a.
- the service parameter is the service ID (English: Service ID for A) of time slot configuration table A, for example, Service 1 ID for A represents the service number (ID) corresponding to service 1 of configuration table A.
- Service 1 ID for A represents the service number (ID) corresponding to service 1 of configuration table A.
- each frame carries a service entry of a time slot, and transmission of 20 service entries requires 20 overhead frames. The remaining 21st to 32nd frames are used to transmit the number of resources corresponding to each service ID.
- an implementation method is that the sending end sends the service parameters through 32 flexible Ethernet FlexE overhead frames.
- the 1st to 20th FlexE overhead frames are used to carry all the corresponding service numbers in the service parameters
- the 21st to 27th FlexE overhead frames are used to carry the resources in the service parameters
- “C1 for A” represents the service ID (Service ID) 1 of the time slot configuration table A and the corresponding resource number is C1
- “C2 for A” represents the service ID (Service ID) 2 of the time slot configuration table A.
- the corresponding resource number is C2, and so on.
- each 16-bit code block can carry the resource number indicator information of 3 services, and the indicator information of each resource number occupies 5 bits.
- the 21st frame carries the resource number of C1, C2, and C3, which occupies 15 bits. The remaining 1 bit is a reserved field (Reserved).
- the 28th to 32nd FlexE overhead frames are used to transmit reserved fields, and the reserved fields are used to configure reserved resources.
- the content configured in the version identifier (Version, VER) field in each FlexE overhead frame is a first identifier
- the first identifier is used to indicate the service number or the service number carried in the FlexE overhead frame.
- the number of resources is currently used service parameters.
- the first identifier is represented by the bit value "1".
- the VER field indicates the bit value is "1”
- the VER field indicates the bit value is "0"
- a resource allocation method is used to generate a FlexE time slot configuration table, thereby realizing automatic configuration of time slot resources.
- the second implementation method is designed to transmit more Business parameters of the number of services and resources.
- the second implementation mode expands the Calendar field in a FlexE overhead code block to transmit required service parameters, including the number of services m, the sum of the number of resources required by m services P, or The total number of resources, the service number S1, S2,..., Sm of each business, and the number of resources C1, C2,..., Cm required by each business.
- the resource granularity is 2Mbps
- each resource number needs to be represented by 16 bits in binary
- the maximum number of supported services m 50,000
- the service number is also required 16-bit representation, so when the number of transmitted services and the number of resources are large, the following method can be used to send the service parameters.
- the sending end sends a first overhead frame
- the first overhead frame includes the total number of resources P; in a specific field, it is expressed as the total number of resources P in the time slot configuration table A, which is in English Rescource number(P) for A.
- the second overhead frame includes the number of services m, specifically, a field of the second overhead frame is expressed as the number of services m in the time slot configuration table A, which is Service number in English (m) for A.
- the m+3 to 2m+2th overhead frames are sent, and m overhead frames in the m+3 to 2m+2th overhead frames are used to transmit the m number of resources, wherein each of the overhead frames
- the number of resources required to carry a business For example, the number of resources required to transmit the service ID 1 in the m+3 frame is expressed in a specific field as: Service 1 resource required for A. If each transmission indicates the number of resources for one service, m services require a total of m frames to transmit the number of resources, and the last overhead frame is the 2m+2th overhead frame.
- the 12th bit in the first overhead code block of the FlexE overhead code block is used as the version identifier (VER) of the FlexE overhead code block.
- VER version identifier
- the indication of the VER field is "1"
- the original Calendar field in the third overhead code block of the FlexE overhead code block is redefined, and the parameters required by the resource allocation method are transferred through 2m+2 frames.
- This embodiment expands the FlexE interface based on the resource allocation method, and is no longer subject to the limitation that the original 100Gbps interface can only support a maximum of 20 service resource allocations; the expanded FlexE interface can define resource granularity according to business needs to determine The total number of resources, as well as the number of resources required by each service, to achieve flexible bandwidth allocation for multiple services. And to ensure that the receiving end can demultiplex the multiplexed data stream.
- This embodiment expands the FlexE interface to support more services and more flexible bandwidth allocation.
- the above two implementations both use the frame format defined by the standard FlexE. Because the standard FlexE frame format has a fixed period, the number of code blocks corresponding to each frame is fixed, so when multiplexing services are multiplexed, they are bound to be restricted. The size of the FlexE frame format cannot meet the needs of supporting more services and finer resource granularity.
- This application provides a third implementation manner.
- a new frame structure is defined for transmitting the service parameters.
- the service parameters are transmitted to the receiving end at one time by sending the first frame.
- the sending end uses an overhead frame to send service parameters, where the service parameters include the number of services m and the number of m resources.
- the overhead frame includes a control code block and Y data code blocks, Y ⁇ 2 and Y is a positive integer, the control code block is used to locate and transmit the number of services m, and the Y data codes The block is used to transmit the m number of resources.
- control code block may be represented by "U", and the type of the control code block U is a combination of 0x4B and 0xE, where 0x4B indicates that the 64B/66B code block is an O code, and 0xE indicates the O code type.
- each of the Y data code blocks may be represented by "D" (Data).
- control code block U is a 66-bit code block, and the control code block U includes a first indication field and a second indication field, and the first indication field is used to indicate the The total number of resources P; the second indication field is used to indicate the number of services m.
- the length of the first indication field is 16 bits, ranging from the 9th bit to the 24th bit; and the length of the second indication field is 8 bits, ranging from the 25th bit to the 32nd bit.
- the Y data code blocks include at least one first code block, where one first code block may be used to carry the m number of resources, or the m first code blocks may be used to carry the m resources number.
- S0 represents the first code block, and each first code block is used to transmit the number of resources for one service.
- the first code block S0 carries the number of resources C1 required for service number 1 and service number 1 of time slot configuration table A, and the number of resources C1 required for service number 1 and service number 1 of time slot configuration table B.
- the indication information contained in the first code block S0 (C1) is: the service number S1 of the time slot configuration table A, the number of resources C1 required, and the service number S1 of the time slot configuration table B , The number of required resources C1.
- the indication information contained in the first code block S0 (C2) is: the service number S2 of the time slot configuration table A, the required resource number C2, and the service number of the time slot configuration table B S2, the number of required resources C2; and so on, the indication information contained in the first code block S0(Cm) is: for the service numbers Sm of the time slot configuration tables A and B and the number of resources required Cm. And it contains a total of m first code blocks, carrying service numbers and resource numbers of m services.
- This embodiment defines a new frame format, which can change with the change of multiplexing services, so the services that can be carried are more flexible and have stronger flexibility.
- the m service parameters corresponding to the m services can be transmitted to the receiving end with only one transmission, which improves the transmission efficiency.
- FIG. 16 is a schematic structural diagram of a resource allocation device provided by an embodiment of this application.
- the device may be the receiving end in any of the foregoing embodiments, or may also be the sending end, and may be used to implement the method steps in each of the foregoing embodiments.
- the device may include: an acquiring unit 161, a processing unit 162, and a sending unit 163.
- the device may also include more or fewer components, such as a storage unit, etc., which is not included in this embodiment. Qualify.
- the obtaining unit 161 is configured to obtain the number of k groups of resources for m services, each group of resource numbers corresponds to a resource allocation unit N, and each group of resource numbers includes a coefficient a corresponding to each service, and the coefficient a represents a service
- the number of resource allocation units included, where the resource allocation unit N represents the number of resources included in a resource allocation unit, k ⁇ 1, N ⁇ 1, and k and N are all positive integers;
- the processing unit 162 is configured to The number of the k sets of resources determines the resources corresponding to the m services among the L resources.
- the obtaining unit 161 is specifically configured to obtain the number of m resources corresponding to the m services, and each of the resource numbers is expressed in the first base system. , M ⁇ 1; and, after each resource number expressed in the first base system is expressed in a second binary system, the number of resources in the k groups is obtained, and the second binary system includes binary, octal, decimal, and hexadecimal, etc. .
- the processing unit 162 is specifically configured to arrange the number of the k groups of resources in the order of the first group to the k-th group, among the L resources The resources corresponding to the m services are determined, where the number of resources allocated in each group is the product of the sum of the coefficient a of the m services and the resource allocation unit N corresponding to each group.
- the processing unit 162 is specifically configured to follow the order of the first group to the kth group, if the first group to the kth group If any group of allocated resources contains two or more services, the resources corresponding to each service are allocated to the group containing the two or more services in the order of service numbers or in the order of interleaving the service numbers.
- the processing unit 162 is specifically configured to obtain a first sequence, and determine among L resources according to the number of k sets of resources and the first sequence Resources corresponding to the m services; the first sequence is used to indicate the positional relationship between the resource allocation units N of the number of resources of the k groups.
- the first sequence includes k first units, and different first units correspond to different numbers of group resources.
- the i-th group of the first group to the k-th group to either group number i set of resources the first group number of resources corresponding to the resource allocation unit N is 20, the second group number of resources corresponding to the resource allocation
- the unit N is 2 1
- the resource allocation unit N corresponding to the number of resources in the third group is 2 2
- the resource allocation unit N corresponding to the number of resources in the ith group is 2 i-1
- the first sequence indicates the resources of the number of resources in the i group the positional relationship between the distribution units is N, 0 2 of the first group, the second group 21, third two groups 2, group i 2 i-1 resources.
- the first sequence includes z second units, different second units correspond to different group resource numbers, at least one second unit corresponds to at least two group resource numbers, z ⁇ k, z is a positive integer and z ⁇ 2.
- the first sequence includes p third units, and a group resource number corresponds to N different third units in the first sequence.
- N is the resource allocation unit.
- each third unit corresponds to a group number i, i is any one of 1 to k, and the i-th group of resources The number corresponds to 2 i-1 third units in the first sequence, and p is a positive integer and p ⁇ 2.
- the resource allocation unit N corresponding to the number of resources in the i group is 2 i-1
- the resource allocation unit N corresponding to the number of resources in the i+1 group is 2 i+1-1
- Said 2i-1 resources include the first resource of the i-th group
- the 2i+1-1th resources include the first resource of the i+1th group and the second resource of the i+1th group
- the first sequence is used to indicate that the first resource of the i-th group is located between the first resource of the i+1-th group and the second resource of the i+1-th group among the L resources.
- the resource allocation unit N corresponding to the number of resources in the third group is 4, and one resource allocation unit in the third group includes the first resource, the second resource, the third resource, and the third resource in the third group.
- the processing unit 162 is specifically configured to, when the four resources of the third group correspond to the first service and the second service, use the first sequence to indicate that the first resource of the third group and the third group Allocate the second resource of the third group to the first service; allocate the third resource of the third group and the fourth resource of the third group to the second service; or allocate the first resource of the third group And the third resource of the third group are allocated to the first service; the second resource of the third group and the fourth resource of the third group are allocated to the second service.
- the number of resources in the first group and the number of resources in the second group are the number of resources in the first large group.
- the number of resources in the third group and the number of resources in the fourth group are the number of resources in the second largest group; the first sequence is used to indicate the positional relationship between the number of resources in the first largest group and the number of resources in the second largest group .
- the first sequence includes 2 k -1 units, and each unit corresponds to a group number i, where i is any one of 1 to k; the first sequence is used to indicate The group number i corresponding to each unit, the processing unit 162, is specifically configured to determine the m services according to the number of k groups of resources and the group number i corresponding to each unit indicated by the first sequence Corresponding resources.
- the first sequence is a palindrome arrangement of bits, and the group number i is any one of the 1st to the kth bits.
- the serial number composed of 2 k -1 units the serial number is 2 k-1 as the first center, and the bit sequence corresponding to the left serial number of the first center and the bit corresponding to the right serial number are The bit sequence is symmetrical about the first center; the sequence number on the left of the first center, with the sequence number 2 k-2 as the second center, the bit sequence corresponding to the sequence number on the left of the second center and The bit sequence corresponding to the sequence number on the right is symmetrical about the second center; in the sequence number 2 k-(k-1) as the k-1 center, the left sequence number of the k-1 center corresponds to The bit sequence of and the bit sequence corresponding to the sequence number on the right are symmetric about the k-1th center.
- the processing unit 162 is specifically configured to list the bit values of each group of resource numbers expressed in binary from all 0s to all 1s in order, totaling 2 k count units; each time a count unit is generated, the bit value change of the current count unit and the previous count unit is compared to determine the bit that has jumped.
- the jumped change means that the bit value on the same bit changes from The 0 of the previous count unit becomes 1 in the current count unit; all of the transitioned bits corresponding to the determined 2 k -1 count units are sorted to generate the first sequence.
- the processing unit 162 is specifically configured to use the k resource allocation units of the k sets of resource numbers as k services, and use a preset algorithm to establish the The corresponding relationship between the k services and the total number of resources composed of the k services, and the first sequence is generated according to the corresponding relationship.
- the preset algorithm is: l ⁇ B modQ, l is a constant, and the value of l ranges from 1 to Q; B is the resource required by any one of the first to kth services represented by k services Number, Q ⁇ Max ⁇ B1, B2, B3,..., Bk ⁇ ; mod represents the remainder operation, l ⁇ B modQ represents the remainder obtained by dividing l ⁇ B by Q.
- the sending unit 163 is configured to use an overhead frame to send service parameters, where the service parameters include the number of services m, the number of m services, and the number of m resources.
- the sending unit 163 is specifically configured to send the service parameters through 32 flexible Ethernet FlexE overhead frames; wherein the 1st to 20th FlexE overhead frames are used to carry m service numbers corresponding to the m services , The 21st to 27th FlexE overhead frames are used to carry the number of m resources, the 28th to 32nd FlexE overhead frames are used to carry reserved resources; and the version identification VER field in each FlexE overhead frame A first identifier is configured on it, and the first identifier is used to indicate that the service number or the number of resources carried in the FlexE overhead frame is a currently used service parameter.
- the sending unit 163 is specifically configured to send 2m+2 overhead frames to transmit the service parameters; wherein, the 2m+2 overhead frames include the first overhead Frame, the second overhead frame, the third overhead frame to the 2m+2 overhead frame, the first overhead frame includes the sum of m resource numbers, and the second overhead frame includes the service number m , M overhead frames in the 3rd to m+2th overhead frames include m service numbers, and m overhead frames in the m+3 to 2m+2th overhead frames include the m resource numbers And a first identifier is configured on the version identifier VER field in each overhead frame, and the first identifier is used to indicate that the service number or the number of resources carried in the overhead frame is the currently used service parameter.
- the overhead frame includes one control code block and Y data code blocks.
- Y ⁇ 2 and Y is a positive integer
- the control code block is used to locate and transmit the number of services m
- the Y data code blocks are used to transmit the number of m resources.
- the Y data code blocks include at least one first code block, and the at least one first code block includes the m resource numbers. Furthermore, one first code block is used to carry the m resource numbers, or the m first code blocks in the at least one first code block are used to carry the m resource numbers.
- this embodiment also provides a network system.
- the network system may be the Ethernet, flexible Ethernet FlexE, and ubiquitous Ethernet in the foregoing embodiment.
- the network system includes a sending end 10 and a receiving end 20, and further, the sending end 10 includes a memory 1001, a processor 1002, and a communication interface 1003.
- the communication interface 1003 is a FlexE interface for obtaining service parameters.
- the sending end 10 may also include more or fewer components, or a combination of some components, or a different component arrangement, which is not limited in this application.
- the processor 1002 is the control center of the sending end 10, and executes each of the multiplexing process by running or executing software programs and/or unit modules stored in the memory 1001, and calling data stored in the memory 1001. kind of function.
- the processor 1002 can be composed of an integrated circuit (IC), for example, can be composed of a single packaged IC, or can be composed of multiple packaged ICs with the same function or different functions.
- the processor may only include a combination of a CPU, a digital signal processor (digital signal processor, DSP), and a control chip.
- the memory 1001 is used to store program codes for executing the technical solutions of the present application, and is controlled by the processor 1002 to execute.
- the processor 1002 is configured to execute the computer program code stored in the memory 1001 to implement the resource allocation method in the foregoing embodiments.
- the memory 1001 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), or can store information and instructions
- ROM read-only memory
- RAM random access memory
- Other types of dynamic storage devices can also be Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory, CD-ROM or other optical disk storage , CD storage (including compressed CDs, laser disks, CDs, digital universal CDs, Blu-ray CDs, etc.), disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and Any other medium that can be accessed by the computer, but not limited to this.
- the memory can exist independently or integrated with the processor.
- the memory 1001 is a computer storage medium
- the computer storage medium may store a program
- the program may include part or all of the steps of the resource allocation method provided in the embodiment of the present application when the program is executed.
- all or part of it may be implemented by software, hardware, firmware, or any combination thereof.
- software it can be implemented in the form of a computer program product in whole or in part.
- the computer program product includes one or more computer instructions. When the computer loads and executes the computer program, all or part of the processes or functions described in the foregoing embodiments of the present application are generated.
- the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
- the communication interface 1003 may include transceiver chips, or components such as receivers, transmitters, and antennas, for receiving service parameters, such as the number of k sets of resources, and data streams, such as multiplexed data streams. In addition, it is also used to send service parameters and the data code stream. Further, the communication interface 1003 may include communication modules such as a wireless local area network module, a Bluetooth module, a baseband module, and a radio frequency (RF) circuit corresponding to the communication module, which is used for wireless local area network communication. , Bluetooth communication, infrared communication and/or cellular communication system communication. In addition, the communication interface 1003 may also support direct memory access (direct memory access).
- RF radio frequency
- the various transceiver chips in the communication interface 1003 can appear in the form of integrated circuit chips, and can be selectively combined without including all transceiver modules and corresponding antenna groups. .
- it may only include a baseband chip, a radio frequency chip, and a corresponding antenna to provide communication functions in a cellular communication system.
- the functions to be implemented by the acquiring unit 161 and the sending unit 163 may be implemented by the communication interface 1003 of the sending end 10, or controlled by the processor 1002.
- the communication interface 1003 is implemented; the functions to be implemented by the processing unit 162 can be implemented by the processor 1002.
- the communication interface 1003 is used to obtain the number of k groups of resources for m services, and each group of resources corresponds to a resource allocation unit N, and each group of resources includes a coefficient a corresponding to each service, and the coefficient a represents the number of resources included in a service.
- the number of resource allocation units, where the resource allocation unit N represents the number of resources included in a resource allocation unit, k ⁇ 1, N ⁇ 1, and k, and N are all positive integers; the processor 1002 is configured to The number of group resources determines the resources corresponding to the m services among the L resources.
- the receiving end 20 includes components such as a memory 2001, a processor 2002, and a communication interface 2003.
- the functions of the components in the memory 2001, the processor 2002, and the communication interface 2003 are the same as the structures and functions of the aforementioned memory 1001, the processor 1002, and the communication interface 1003, which will not be repeated in this embodiment.
- the communication interface 2003 is used to receive service parameters and multiplexed data streams from the sending end 10, where the service parameters include the number of k groups of resources, and demultiplex the multiplexed data streams according to the service parameters. Obtain m services corresponding to the number of k groups of resources, for example, service 1, service 2 to service m.
- the memory 1001 or the memory 2001 in this embodiment is used to store a computer program product, and the computer program product includes one or more computer instructions, such as resource allocation instructions.
- the computer loads and executes the computer program, the method flow or function according to the above-mentioned embodiment of the present application is generated in whole or in part.
- the overhead frame includes a control code block and Y data code blocks, Y ⁇ 2 and a positive integer, and the control code block is used to locate and transmit the number of services m ,
- the Y data code blocks are used to transmit the m resource numbers.
- the Y data code blocks include at least one first code block, and one or more first code blocks in the at least one first code block are used to carry the m resource numbers.
- the service parameters corresponding to the m services can be sent at one time through the overhead frame, and the overhead frame can be changed with the change of the multiplexed service, thereby making the carried service more flexible.
- the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform.
- the technical solutions in the embodiments of the present invention can be embodied in the form of software products, which can be stored in a storage medium, such as ROM/RAM. , Magnetic disks, optical disks, etc., including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiment of the present invention.
- plural means two or more than two.
- words such as “first” and “second” are used to distinguish the same items or similar items that have substantially the same function and effect. Those skilled in the art can understand that words such as “first” and “second” do not limit the quantity and order of execution, and words such as “first” and “second” do not limit the difference.
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
本申请涉及灵活以太网通信传输领域,尤其涉及一种资源分配方法、装置和设备。This application relates to the field of flexible Ethernet communication transmission, and in particular to a resource allocation method, device and equipment.
早期原生以太网诞生于局域网中,采用载波侦听多路访问/冲突检测(Carrier Sense Multiple Access with Collision Detection,CSMA/CD)技术将多点进行互联,当时局域网一般为总线型网络拓扑。随着以太网的发展,普通以太网沿用了原生以太网的帧格式,并制定了IEEE 802.3以太网标准,广泛应用于园区、企业以及数据中心中。普通以太网采用全双工模式,不再需要CSMA/CD技术,网络速率以10倍速度增长,发展出了10兆比特每秒(Million bits per second,Mbps)、100Mbps(快速以太网Fast Ethernet,FE)、1Gbps(吉比特以太网Gigabit Ethernet,GE)、10Gbps(10GE)、100Gbps(100GE)等以太网。Early native Ethernet was born in a local area network, using Carrier Sense Multiple Access with Collision Detection (CSMA/CD) technology to interconnect multiple points. At that time, the local area network was generally a bus-type network topology. With the development of Ethernet, ordinary Ethernet has followed the frame format of native Ethernet and formulated the IEEE 802.3 Ethernet standard, which is widely used in parks, enterprises and data centers. Ordinary Ethernet adopts full-duplex mode and no longer requires CSMA/CD technology. The network speed has increased by 10 times, and the development of 10 megabits per second (Million bits per second, Mbps), 100 Mbps (Fast Ethernet, FE), 1Gbps (Gigabit Ethernet, GE), 10Gbps (10GE), 100Gbps (100GE) and other Ethernet.
随着网络流量的多样化,近年来,制定出不同速率的以太网,如40Gbps、25Gbps以太网。随着以太网在局域网中的广泛应用,运营商和设备厂商希望在电信网络中引入这种具有良好的经济性、互通性和易用性的网络技术,因此诞生了电信级以太网。电信级以太网是在普通以太网基础上引入传送网功能,具备高可靠性、端到端服务质量(Quality of Service,QoS)保障能力、完善的OAM(Operation、Administration、Maintenance,操作、管理、维护的简称)机制以及可管理性。With the diversification of network traffic, in recent years, Ethernets of different speeds have been developed, such as 40Gbps and 25Gbps Ethernet. With the widespread application of Ethernet in local area networks, operators and equipment manufacturers hope to introduce this kind of network technology with good economy, interoperability and ease of use into the telecommunication network, so carrier-grade Ethernet was born. Carrier Ethernet is the introduction of transport network functions on the basis of ordinary Ethernet, with high reliability, end-to-end quality of service (Quality of Service, QoS) guarantee capabilities, complete OAM (Operation, Administration, Maintenance, operation, management, Maintenance (short for maintenance) mechanism and manageability.
随着5G时代的到来,各种新型业务(如云服务、车联网等)不断涌现,对以太网技术提出了新的需求,产生灵活以太网技术。灵活以太网(Flexible Ethernet,FlexE)是一种轻量级增强以太网技术,支持端口绑定,支持通道化技术,能够构建端到端链路。灵活以太网通过端口绑定,支持更大带宽,如绑定8个100Gbps端口可实现800Gbps带宽。通过通道化技术,实现带宽的灵活分配,支持多样化的业务速率接入,不必受制于IEEE802.3标准制定的阶梯型速率体系。通过构建端到端链路,为多业务承载提供更强的QoS能力,增强用户体验。With the advent of the 5G era, a variety of new services (such as cloud services, Internet of Vehicles, etc.) continue to emerge, putting new demands on Ethernet technology and creating flexible Ethernet technology. Flexible Ethernet (Flexible Ethernet, FlexE) is a lightweight enhanced Ethernet technology that supports port binding, channelization technology, and can build end-to-end links. Flexible Ethernet supports greater bandwidth through port binding, such as binding 8 100Gbps ports to achieve 800Gbps bandwidth. Through the channelization technology, the flexible allocation of bandwidth is realized, and diversified service rate access is supported, without being restricted by the stepped rate system formulated by the IEEE802.3 standard. By building an end-to-end link, it provides stronger QoS capabilities for multi-service bearers and enhances user experience.
为了实现灵活以太网,光互联网论坛(Optical Internetworking Forum,OIF)制定了FlexE标准,实现灵活的带宽分配。FlexE通过绑定多个物理层(Physical Layer,PHY)形成灵活以太网组(FlexE group),从而获得更大带宽;通过将接口划分成时隙再分配的方式,实现带宽的灵活分配。FlexE将100Gbps接口划分成20个时隙,每个时隙为5Gbps,因此FlexE可通过时隙分配方式支持N×5Gbps业务。In order to realize flexible Ethernet, the Optical Internetworking Forum (OIF) has formulated the FlexE standard to realize flexible bandwidth allocation. FlexE forms a flexible Ethernet group (FlexE group) by binding multiple physical layers (Physical Layer, PHY) to obtain a larger bandwidth; and realizes flexible bandwidth allocation by dividing the interface into time slots and reallocating it. FlexE divides the 100Gbps interface into 20 time slots, each of which is 5Gbps, so FlexE can support N×5Gbps services through time slot allocation.
但现实中业务速率是多种多样的,如准同步数字系列(Plesiochronous Digital Hierarchy,PDH)网络中E1业务速率为2.048Mbps,同步数字系列(Synchronous Digital Hierarchy,SDH)的STM-1(Synchronous Transport Module level 1,同步传送模块水平1)业务速率为155Mbps,STM-4业务速率为622Mbps,光传送网(Optical Transport Network,OTN)的光通道数据单元(Optical channel Data Unit,ODU)0速率为1.25Gbps,ODU1速率为2.5Gbps。However, in reality, the service rate is diverse. For example, the E1 service rate in the Plesiochronous Digital Hierarchy (PDH) network is 2.048Mbps, and the Synchronous Digital Hierarchy (SDH) STM-1 (Synchronous Transport Module) level 1, synchronous transmission module level 1) The service rate is 155Mbps, the STM-4 service rate is 622Mbps, and the optical channel Data Unit (ODU) 0 rate of the optical transport network (Optical Transport Network, OTN) is 1.25Gbps , ODU1 rate is 2.5Gbps.
在FlexE标准中,FlexE划分的时隙颗粒为5Gbps,分配的带宽必须是以固定的5Gbps为基本单元,进行资源传输和分配,因此对于小颗粒时隙而言,FlexE的时隙配置表的规模有限,传输的资源不灵活,也不具有可扩展性。In the FlexE standard, the time slot particles divided by FlexE are 5Gbps, and the allocated bandwidth must be based on a fixed 5Gbps as the basic unit for resource transmission and allocation. Therefore, for small-particle time slots, the scale of FlexE's time slot configuration table Limited, the transmission resources are inflexible and not scalable.
发明内容Summary of the invention
本申请提供一种更简单灵活的资源分配方法,来实现多路业务的复用或解复用,并定义了一种灵活的帧格式,支持多路业务的实时复用或解复用。This application provides a simpler and flexible resource allocation method to realize multiplexing or demultiplexing of multiple services, and defines a flexible frame format to support real-time multiplexing or demultiplexing of multiple services.
本申请的技术方案的核心思路是,每个业务对于带宽资源需求是一个确定的值,在将该值转换成一种进制表示时,可将m个业务分成k组来进行资源分配,其中每组分配的资源分配单元代表了资源粒度,发送端可按照该资源粒度依次分配资源,即可得到唯一确定的m个业务复用方案。接收端也可根据所需资源数值,按照资源粒度分配,得到同样的m个业务解复用方案。The core idea of the technical solution of the present application is that each service has a certain value for bandwidth resource requirements. When the value is converted into a hexadecimal representation, m services can be divided into k groups for resource allocation, where each The resource allocation unit of group allocation represents the granularity of resources, and the sender can allocate resources in sequence according to the granularity of the resources, and then uniquely determined m service reuse schemes can be obtained. The receiving end can also allocate according to the resource granularity according to the required resource value, and obtain the same m service demultiplexing scheme.
这种资源分配方法简单直接,不需要任何计算,可根据资源数实时给出当前资源所属业务。发送端可根据业务所需的资源数对多路业务进行实时地复用,接收端为了实时地解复用,需要提前获取业务参数,包括业务个数、业务编号以及每个业务所需的资源数。因此定义了一种灵活的帧格式,将业务参数放在业务数据之前传输,可动态的调整业务数量、业务编号、业务所需的资源数以及资源总数。This resource allocation method is simple and straightforward, does not require any calculation, and can give the current resource's business based on the number of resources in real time. The sending end can multiplex multiple services in real time according to the number of resources required by the service. In order to demultiplex in real time, the receiving end needs to obtain service parameters in advance, including the number of services, service numbers, and resources required by each service. number. Therefore, a flexible frame format is defined, and the service parameters are transmitted before the service data, and the number of services, the number of the services, the number of resources required by the service, and the total number of resources can be dynamically adjusted.
此外,为了能够兼容现有标准FlexE,本发明提供了一种新接口与FlexE接口互通的方案。In addition, in order to be compatible with the existing standard FlexE, the present invention provides a solution for intercommunication between a new interface and a FlexE interface.
具体地,本申请实施例公开的技术方案包括如下:Specifically, the technical solutions disclosed in the embodiments of the present application include the following:
第一方面,本申请实施例公开了一种资源分配方法,该方法可以应用于发送端设备,也可以应用于接收端设备,具体地,该方法包括:获取m个业务的k组资源数,每组资源数对应一个资源分配单位N,每组资源数包括每个业务对应的系数a,所述系数a表示一个业务包括的资源分配单位的个数,所述资源分配单位N表示一个资源分配单位包括的资源的个数,k≥1,N≥1且k,N均为正整数;根据所述k组资源数在L个资源中确定所述m个业务对应的资源,L为正整数且L≥1。In the first aspect, an embodiment of the present application discloses a resource allocation method, which can be applied to a sending end device or a receiving end device. Specifically, the method includes: obtaining the number of k sets of resources for m services, The number of resources in each group corresponds to a resource allocation unit N, and the number of resources in each group includes a coefficient a corresponding to each service. The coefficient a represents the number of resource allocation units included in a service, and the resource allocation unit N represents a resource allocation. The number of resources included in the unit, k≥1, N≥1, and k and N are all positive integers; the resources corresponding to the m services are determined from the number of resources of the k groups, and L is a positive integer And L≥1.
本方面提供的方法,通过将m个业务的资源数分成k组资源数,并按照k组资源数中每组资源数所对应的资源分配单位进行资源分配,由于该资源分配单位指示了一组资源数中分配资源的最小单位,所以实现了对较小资源粒度的资源分配,提高了资源分配的灵活性和拓展性。The method provided in this aspect divides the number of resources of m services into k groups of resource numbers, and allocates resources according to the resource allocation unit corresponding to each group of resource numbers in the k groups of resource numbers. Since the resource allocation unit indicates a group The smallest unit of resource allocation in the number of resources, so the resource allocation of smaller resource granularity is realized, and the flexibility and expandability of resource allocation are improved.
另外,按照k组资源数进行业务资源的分配,可以避免发送资源配置表的局限性,不必再发送冗余的资源配置表,节省了传输开销。In addition, the allocation of service resources according to the number of k groups of resources can avoid the limitation of sending resource configuration tables, and there is no need to send redundant resource configuration tables, which saves transmission overhead.
其中,本申请中,所述的资源粒度通过本技术方案中的资源分配单位N来表达,即当资源分配单位N越小时,对应的资源粒度越小。Wherein, in this application, the resource granularity is expressed by the resource allocation unit N in this technical solution, that is, when the resource allocation unit N is smaller, the corresponding resource granularity is smaller.
可选的,结合第一方面,在第一方面的一种可能的实现中,所述获取m个业务的k组资源数,包括:获取所述m个业务所对应的m个资源数,每个所述资源数按照第一进制表示,me1;将每个所述按照第一进制表示的资源数通过第二进制表示后得到所述k组资源数,所述第二进制包括二进制、八进制、十进制和十六进制。Optionally, with reference to the first aspect, in a possible implementation of the first aspect, the obtaining the number of k sets of resources for m services includes: obtaining the number of m resources corresponding to the m services, each The number of resources is expressed in a first base, me1; the number of resources in each of the resource numbers expressed in the first base is expressed in a second binary to obtain the number of k groups of resources, and the first binary includes binary, octal, Decimal and hexadecimal.
进一步地,所述第一进制为十进制,所述第二进制为二进制。Further, the first binary system is a decimal system, and the second binary system is a binary system.
更进一步地,所述k组资源数中的一个资源数C1可以表示为:Furthermore, one resource number C1 in the k sets of resource numbers can be expressed as:
C1=(a 1,1,a 1,2,…,a 1,k)=a 1,1×α 0+a 1,2×α 1+…+a 1,k×α k-1, C1=(a 1,1 ,a 1,2 ,…,a 1,k )=a 1,1 ×α 0 +a 1,2 ×α 1 +…+a 1,k ×α k-1 ,
其中,C1为第一业务S1的资源数,a 1,1,a 1,2,...,a 1,n为系数,基底为α 0,α 1,...,α k-1,所述资源分配单位N为α 0,α 1,...,α k-1,所述系数a取值范围为[0,α-1],所述第一业务的资源数C1按照:第一组分配a i,1×α 0个资源,对应的资源分配单位N为α 0;第二组分配a i,2×α 1个资源,对应的资源分配单位N为α 1,第k组分配的资源数是a i,k×α k-1个资源进行分配,对应的资源分配单位N为α k-1。 Among them, C1 is the number of resources of the first service S1, a 1,1 ,a 1,2 ,...,a 1,n are coefficients, and the base is α 0 ,α 1 ,...,α k-1 , The resource allocation unit N is α 0 , α 1 ,..., α k-1 , the coefficient a has a value range of [0, α-1], and the number of resources C1 of the first service is as follows: One group allocates a i,1 ×α 0 resources, and the corresponding resource allocation unit N is α 0 ; the second group allocates a i,2 ×α 1 resource, and the corresponding resource allocation unit N is α 1 , the k-th group The number of allocated resources is a i,k ×α k-1 resources for allocation, and the corresponding resource allocation unit N is α k-1 .
例如,在二进制中,系数a的取值为0或1。在二进制中,系数a的取值范围为0至9。For example, in binary, the value of the coefficient a is 0 or 1. In binary, the value of the coefficient a ranges from 0 to 9.
本实现方式,可以将基于二进制资源分配方法扩展到任意进制,从而实现多路业务的资源分配,用于复用或解复用过程,以增加资源分配的灵活性,并且降低业务分配的抖动性。This implementation mode can extend the binary-based resource allocation method to any hexadecimal system, thereby realizing resource allocation of multiple services for multiplexing or demultiplexing, so as to increase the flexibility of resource allocation and reduce the jitter of service allocation Sex.
可选的,结合第一方面,在第一方面的另一种可能的实现中,根据所述k组资源数在L个资源中确定所述m个业务对应的资源,包括:将所述k组资源数按照第1组至第k组的顺序,在所述L个资源中确定所述m个业务对应的资源,其中每组分配的资源数为m个业务的系数a之和与所述每组对应的资源分配单位N的乘积。本实现中,按照组号次序分配资源,提高了资源分配效率。Optionally, with reference to the first aspect, in another possible implementation of the first aspect, determining the resources corresponding to the m services among the L resources according to the number of the k sets of resources includes: The number of group resources determines the resources corresponding to the m services among the L resources in the order of the first group to the k-th group, and the number of resources allocated to each group is the sum of the coefficient a of the m services and the The product of the resource allocation unit N corresponding to each group. In this implementation, resources are allocated in the order of group numbers, which improves the efficiency of resource allocation.
可选的,还包括:将所述k组资源数按照第1组至第k组中任意排列组合的顺序进行资源分配。Optionally, the method further includes: performing resource allocation on the number of the k groups of resources in an order of any permutation and combination from the first group to the k-th group.
可选的,结合第一方面,在第一方面的又一种可能的实现中,将所述k组资源数按照第1组至第k组的顺序,在所述L个资源中确定所述m个业务对应的资源,包括:按照所述第1组至第k组的顺序,如果所述第1组至第k组中的任意一组分配的资源包含两个或两个以上业务,则对包含所述两个或两个以上业务的组按照业务编号的顺序、或者按照业务编号交织的顺序分配每个业务对应的资源。本实现中,当一组资源数对应两个或两个以上业务时,将业务所对应的资源交织分配,从而降低业务分配的抖动性。Optionally, with reference to the first aspect, in yet another possible implementation of the first aspect, the number of the k groups of resources is determined in the order of the first group to the kth group, and the number of the L resources The resources corresponding to the m services include: in the order of the first group to the k-th group, if the allocated resources of any one of the first group to the k-th group include two or more services, then For the group containing the two or more services, the resources corresponding to each service are allocated according to the order of service numbers or the order of interleaving the service numbers. In this implementation, when a set of resource numbers correspond to two or more services, the resources corresponding to the services are interleaved and allocated, thereby reducing the jitter of service allocation.
可选的,结合第一方面,在第一方面的又一种可能的实现中,根据所述k组资源数在L个资源中确定所述m个业务对应的资源,包括:获取第一序列,所述第一序列用于指示所述k组资源数的资源分配单位N之间的位置关系;根据所述k组资源数和所述第一序列,在L个资源中确定所述m个业务对应的资源。本实现中,通过第一序列来指示每个业务的资源分配情况,从而能够更灵活地分配各个业务的资源数,并且还降低了业务分配的抖动性。Optionally, with reference to the first aspect, in another possible implementation of the first aspect, determining the resources corresponding to the m services among the L resources according to the number of the k sets of resources includes: acquiring the first sequence , The first sequence is used to indicate the positional relationship between resource allocation units N of the number of k sets of resources; according to the number of k sets of resources and the first sequence, the m number of resources are determined Resources corresponding to the business. In this implementation, the first sequence is used to indicate the resource allocation status of each service, so that the number of resources of each service can be allocated more flexibly, and the jitter of service allocation is also reduced.
其中,所述第一序列用于指示所述k组资源数中的第1组至第k组资源所对应的资源分配单位N的位置顺序是任意的。Wherein, the first sequence is used to indicate that the position order of the resource allocation unit N corresponding to the resources of the first group to the k-th group in the number of resources of the k groups is arbitrary.
进一步地,在第1组至第k组资源数中,第1组资源数对应的资源分配单位N为2 0,第2组资源数对应的资源分配单位N为2 1,第3组资源数对应的资源分配单位N为2 2,第k组资源数对应的资源分配单位N为2 k-1。 Further, in the first group to the k-th group number of resources, the group number of the first resource corresponding to the resource allocation unit N is 20, the second group number of resources corresponding to the resource allocation unit N is 21, the third group number of resources The corresponding resource allocation unit N is 2 2 , and the resource allocation unit N corresponding to the number of resources in the k-th group is 2 k-1 .
其中,可选的,所述第一序列包括k个第一单元,不同的第一单元对应不同的组资源数。例如第1个第一单元对应第1组资源数,第2个第一单元对应第2组资源数,第k个第一单元对应第k组资源数,则通过第一序列可以指示第1组至第k组资源数之间的位置关系。且第一序列指示k个第一单元之间的顺序可以是任意的。Wherein, optionally, the first sequence includes k first units, and different first units correspond to different numbers of group resources. For example, the first first unit corresponds to the number of resources in the first group, the second first unit corresponds to the number of resources in the second group, and the kth first unit corresponds to the number of resources in the kth group. Then the first sequence can indicate the first group The positional relationship between the number of resources to the k-th group. And the first sequence indicates that the order between the k first units can be arbitrary.
另外,可选的,所述第一序列包括z个第二单元,不同的第二单元对应不同的组资 源数,至少一个第二单元对应至少两个组资源数,z<k,z为正整数且z≥2。In addition, optionally, the first sequence includes z second units, different second units correspond to different group resource numbers, at least one second unit corresponds to at least two group resource numbers, z<k, z is positive Integer and z≥2.
例如,z=2,k=4,第一序列包含两个所述第二单元,其中每个所述第二单元对应两组资源数,比如一个第二单元对应第1组资源数和第2组资源数,另一个第二单元对应第3组资源数和第4组资源数。本实现方式中,将m个业务的所有资源分成两个单元,然后再对每个单元进一步地分组,比如将每个单元分成两组,从而实现更小资源粒度的资源分配。For example, z=2, k=4, the first sequence contains two of the second units, and each of the second units corresponds to two sets of resource numbers, for example, one second unit corresponds to the first set of resource numbers and the second set of resources. The number of group resources, and the other second unit corresponds to the number of resources in the third group and the number of resources in the fourth group. In this implementation manner, all resources of m services are divided into two units, and then each unit is further grouped, for example, each unit is divided into two groups, thereby realizing resource allocation with smaller resource granularity.
可选的,结合第一方面,在第一方面的又一种可能的实现中,所述第一序列包括p个第三单元,一个组资源数在所述第一序列中对应N个不同的第三单元。Optionally, with reference to the first aspect, in another possible implementation of the first aspect, the first sequence includes p third units, and a group resource number corresponds to N different The third unit.
进一步地,p=2 k-1,在所述2 k-1个第三单元中,每个所述第三单元对应一个组号i,i为1至k中的任一个,第i组资源数在所述第一序列中对应2 i-1个第三单元。例如,k=4,则第一序列共包含15个第三单元,且这15个第三单元中包含2 i-1=8个4,i=4;2 i-1=4个3,i=3;2 i-1=2个2,i=2和2 i-1=1个1,i=1。并且,本实施方式对这15个第三单元所对应的组号i的顺序不予限制。 Further, p=2 k -1, in the 2 k -1 third units, each third unit corresponds to a group number i, i is any one of 1 to k, and the i-th group of resources The number corresponds to 2 i-1 third units in the first sequence. For example, k=4, the first sequence contains 15 third units in total, and these 15 third units contain 2 i-1 = 8 4, i=4; 2 i-1 = 4 3, i =3; 2 i-1 = 2 2, i=2 and 2 i-1 = 1 1, i=1. In addition, this embodiment does not limit the order of the group numbers i corresponding to the 15 third units.
其中,一个组资源数在所述第一序列中对应N个不同的第三单元,例如,i=4,第4组资源数在第一序列中对应资源分配单位N个不同的第三单元,所述N=2 4-1=8,即第4组资源数在第一序列指示的15个第三单元中占用其中的8个第三单元,另外的7个第三单元则由第1至第3组占用。 Wherein, a group resource number corresponds to N different third units in the first sequence, for example, i=4, the fourth group resource number corresponds to N different third units of resource allocation units in the first sequence, The N=2 4-1 =8, that is, the number of resources in the fourth group occupies 8 third units among the 15 third units indicated in the first sequence, and the other 7 third units are from 1 to 1 Group 3 is occupied.
进一步地,在另一种可能的实现中,第i组资源数对应的资源分配单位N为2 i-1,第i+1组资源数对应的资源分配单位N为2 i+1-1,其中,所述2 i-1个资源中包括第i组的第一资源,第2 i+1-1个资源中包括第i+1组的第一资源和第i+1组的第二资源;所述第一序列用于指示所述第i组的第一资源在L个资源中位于所述第i+1组的第一资源和所述第i+1组的第二资源之间。 Further, in another possible implementation, the resource allocation unit N corresponding to the number of resources in the i-th group is 2 i-1 , and the resource allocation unit N corresponding to the number of resources in the i+1-th group is 2 i+1-1 , Wherein, the 2i-1 resources include the first resource of the i-th group, and the 2i+1- th resources include the first resource of the i+1th group and the second resource of the i+1th group ; The first sequence is used to indicate that the first resource of the i-th group is located between the first resource of the i+1th group and the second resource of the i+1th group among the L resources.
例如,i=3,第3组资源数对应的资源分配单位N为4,在第3组的一个资源分配单位中包括第3组的第一资源、第二资源、第三资源和第四资源,如果所述第3组的四个资源对应第一业务和第二业务,则所述第一序列指示:将所述第3组的第一资源和第3组的第二资源分配给所述第一业务;将所述第3组的第三资源和第3组的第四资源分配给所述第二业务;或者,将所述第3组的第一资源和第3组的第三资源分配给所述第一业务;将所述第3组的第二资源和第3组的第四资源分配给所述第二业务。本实现方式中,在4个资源中,将第一业务的两个资源和第二业务的两个资源交织分配,从而能够有效地降低业务资源分配的抖动。For example, i=3, the resource allocation unit N corresponding to the number of resources in the third group is 4, and one resource allocation unit in the third group includes the first resource, the second resource, the third resource, and the fourth resource of the third group. , If the four resources of the third group correspond to the first service and the second service, the first sequence indicates: allocate the first resource of the third group and the second resource of the third group to the The first service; the third resource of the third group and the fourth resource of the third group are allocated to the second service; or, the first resource of the third group and the third resource of the third group Allocating to the first service; allocating the second resource of the third group and the fourth resource of the third group to the second service. In this implementation manner, among the four resources, the two resources of the first service and the two resources of the second service are interleaved and allocated, so that the jitter of service resource allocation can be effectively reduced.
可选的,结合第一方面,在第一方面的又一种可能的实现中,所述第一序列包含2 k-1个单元,每个单元对应一个组号i,i为1至k中的任一个;所述第一序列用于指示每个所述单元所对应的组号i,所述根据所述k组资源数和所述第一序列,在L个资源中确定所述m个业务对应的资源,包括:根据所述k组资源数和所述第一序列指示的每个单元所对应的组号i,确定所述m个业务对应的资源。 Optionally, with reference to the first aspect, in another possible implementation of the first aspect, the first sequence includes 2 k -1 units, and each unit corresponds to a group number i, where i is from 1 to k The first sequence is used to indicate the group number i corresponding to each of the units, and the m number of resources are determined according to the number of k groups of resources and the first sequence The resources corresponding to the services include: determining the resources corresponding to the m services according to the number of the k groups of resources and the group number i corresponding to each unit indicated by the first sequence.
其中,所述第一序列为比特位的回文排列,所述组号i为第1至第k比特位中的任意一个比特位,所述2 k-1个单元组成的序列号中,以序列号为2 k-1为第一中心,所述第一中心的左边序列号所对应的比特位序列与右边序列号所对应的比特位序列关于所述第一中心对称;在所述第一中心的左边序列号,以序列号为2 k-2为第二中心,所述第二中心的左边序列号所对应的比特位序列与右边序列号所对应的比特位序列关于所述第二中 心对称;在以序列号为2 k-(k-1)为第k-1中心,所述第k-1中心的左边序列号所对应的比特位序列与右边序列号所对应的比特位序列关于所述第k-1中心对称。 Wherein, the first sequence is a palindrome arrangement of bits, the group number i is any one of the 1st to the kth bits, and the sequence number composed of 2 k -1 units is A sequence number of 2 k-1 is the first center, and the bit sequence corresponding to the left sequence number of the first center and the bit sequence corresponding to the right sequence number are symmetrical about the first center; The left serial number of the center, with the serial number 2 k-2 as the second center, the bit sequence corresponding to the left serial number of the second center and the bit sequence corresponding to the right serial number are related to the second center Symmetrical; in the k-1 center with a sequence number of 2 k-(k-1) , the bit sequence corresponding to the left sequence number of the k-1 center is related to the bit sequence corresponding to the right sequence number The k-1th center is symmetrical.
本实现中,通过生成的第一序列为比特位的回文排列,使得各个比特位关于中心比特位对称,将每组的资源分配单位拆分成交织排列,从而降低业务资源的抖动性。In this implementation, the generated first sequence is a palindrome arrangement of bits, so that each bit is symmetrical about the center bit, and the resource allocation units of each group are split and arranged in order to reduce the jitter of service resources.
可选的,结合第一方面,在第一方面的又一种可能的实现中,所述获取第一序列,包括:对每组资源数由二进制表示的比特值从全0开始到比特值全1依次列出,共计2 k个计数单位;每生成一个计数单位,比较当前计数单位与前一个计数单位的比特值变化,确定出发生跳变的比特位,所述发生跳变是指同一比特位上的比特值从所述前一个计数单位的0在所述当前计数单位变成1;对确定的2 k-1个计数单位所对应的所有所述发生跳变的比特位进行排序,生成所述第一序列。其中,所述2 k-1个计数单位是除去比特值全0的第一个计数单位之外剩余的所有计数单位。 Optionally, with reference to the first aspect, in yet another possible implementation of the first aspect, the acquiring the first sequence includes: starting from all 0s to all bit values for each group of resource numbers, the bit value represented by binary 1 Listed in sequence, a total of 2 k count units; each time a count unit is generated, compare the bit value changes of the current count unit and the previous count unit to determine the bit that undergoes a transition. The transition refers to the same bit The bit value on the bit changes from 0 in the previous count unit to 1 in the current count unit; all the transitioned bits corresponding to the determined 2 k -1 count units are sorted to generate The first sequence. Wherein, the 2 k -1 counting units are all counting units remaining except for the first counting unit whose bit value is all 0.
可选的,结合第一方面,在第一方面的又一种可能的实现中,所述获取第一序列,包括:将所述k组资源数的k个资源分配单位作为k个业务,利用预设算法建立所述k个业务与所述k个业务组成的资源总数之间的对应关系,根据所述对应关系生成所述第一序列;其中,所述预设算法为:l×B modQ,l为常数,l的取值范围从1到Q;B为k个业务表示的第1至第k个业务中的任一个所需的资源数,Q为一参数,且Q≥Max{B1,B2,B3,……,Bk},B1表示第1个业务所需资源数,B2表示第2个业务所需资源数,Bk表示第k个业务所需资源数,且Q≥B1至Bk中的最大值;mod表示取余数运算,l×B modQ表示l×B除以Q所得的余数。Optionally, with reference to the first aspect, in yet another possible implementation of the first aspect, the acquiring the first sequence includes: using k resource allocation units of the k sets of resource numbers as k services, and using The preset algorithm establishes the correspondence between the k services and the total number of resources composed of the k services, and generates the first sequence according to the correspondence; wherein, the preset algorithm is: l×B modQ , L is a constant, the value of l ranges from 1 to Q; B is the number of resources required by any of the first to kth services represented by k services, Q is a parameter, and Q≥Max{B1 , B2, B3,..., Bk}, B1 represents the number of resources required by the first business, B2 represents the number of resources required by the second business, Bk represents the number of resources required by the k-th business, and Q≥B1 to Bk The maximum value in; mod represents the remainder operation, l×B modQ represents the remainder obtained by dividing l×B by Q.
其中,所述第一序列为比特位序列。所述预设算法为Sigma/Delta算法。Wherein, the first sequence is a bit sequence. The preset algorithm is the Sigma/Delta algorithm.
需要说明的是,本申请的各个实施例中,小写的“l”与大写的“L”含义不同,小写的“l”为一常数,取值范围是1~Q,Q≥1且为正整数。大写的“L”表示在一条链路通道中,单位时间内传输资源的总数,L大于等于m个业务的资源总数。It should be noted that in the various embodiments of the present application, the lowercase "l" and the uppercase "L" have different meanings. The lowercase "l" is a constant, with a value range of 1 to Q, Q≥1 and positive Integer. The uppercase "L" represents the total number of transmission resources per unit time in a link channel, and L is greater than or equal to the total number of resources for m services.
本实现中,通过Sigma/Delta算法生成比特位序列,可以交错地分配m个业务所需的资源,从而降低业务资源的抖动性。In this implementation, the bit sequence is generated by the Sigma/Delta algorithm, and the resources required by m services can be allocated alternately, thereby reducing the jitter of service resources.
可选的,结合第一方面,在第一方面的又一种可能的实现中,所述获取第一序列,包括:通过间插比特位的方法生成所述比特位序列,所述间插比特位方法包括:在2 k-1个比特位组成的比特位序列中,在序列号为2 k-1的位置插入第1比特位;以所述第1比特位为中心,在所述第1比特位的左边和右边各自插入一个第2比特位;以每个所述第2比特位为中心,在所述每个第2比特位的左边和右边各自插入一个第3比特位;直到以每个第k-1比特位为中心,在每个所述第k-1比特位的左边和右边各自插入一个第k比特位为止。 Optionally, with reference to the first aspect, in another possible implementation of the first aspect, the acquiring the first sequence includes: generating the bit sequence by interleaving bits, and the interleaving bits The bit method includes: inserting the first bit in the sequence number 2 k-1 in the bit sequence composed of 2 k -1 bits; taking the first bit as the center, and inserting the first bit in the first bit sequence. Insert a second bit to the left and right of each bit position; insert a third bit to the left and right of each second bit with each second bit as the center; until each The k-1th bit is the center, and a kth bit is inserted to the left and right of each k-1th bit.
可选的,结合第一方面,在第一方面的又一种可能的实现中,所述获取第一序列,包括:所述第一装置对所有二进制表示的比特值从全0开始到所述比特值全1依次列出,共计2 k个计数单位,编号依次为0、1、2、……、2 k-1,其中所述编号用w表示;所述第一装置在计数器每计数一次输出一个比特位,所述比特位满足k-j,其中,j为2的指数幂,0≤j<k,并且在满足第一关系式: 商为a,余数为b,判断在满足所有商a为奇数的情况下的j值中,j取最小值;将计数器输出的所有计数单位的比特位进行排序生成所述比特位序列。 Optionally, with reference to the first aspect, in yet another possible implementation of the first aspect, the acquiring the first sequence includes: the bit values of all binary representations of the first device start from all 0s to the The bit values are all 1s listed in sequence, a total of 2 k counting units, the numbers are 0, 1, 2, ..., 2 k -1, wherein the number is represented by w; the first device counts once every time the counter Output a bit, the bit satisfies kj, where j is an exponential power of 2, 0≤j<k, and satisfies the first relationship: The quotient is a, and the remainder is b. It is judged that j takes the minimum value among all j values when the quotient a is an odd number; the bits of all counting units output by the counter are sorted to generate the bit sequence.
可选的,结合第一方面,在第一方面的又一种可能的实现中,所述方法还包括:利用开销帧发送业务参数,所述业务参数包括:业务个数m、m个业务编号和m个资源数。Optionally, with reference to the first aspect, in yet another possible implementation of the first aspect, the method further includes: using an overhead frame to send service parameters, where the service parameters include: the number of services m, and m service numbers And the number of m resources.
可选的,结合第一方面,在第一方面的又一种可能的实现中,利用开销帧发送业务个数m和所述m个资源数,包括:发送32个灵活以太网FlexE开销帧来传输所述业务参数;其中,第1至第20个FlexE开销帧用于携带所述m个业务编号,第21至第27个FlexE开销帧用于携带所述m个资源数,第28至第32个FlexE开销帧用于承载保留资源;并且在每个所述FlexE开销帧中的版本标识VER字段上配置有第一标识,所述第一标识用于指示所述FlexE开销帧所携带的业务编号或资源数为当前使用的业务参数。本实现方式中,通过VER字段来指示当前传输的业务参数,从而避免传输冗余的时隙资源配置表,节省了传输开销。Optionally, in combination with the first aspect, in yet another possible implementation of the first aspect, using the number of overhead frames to send the number of services m and the number of m resources includes: sending 32 flexible Ethernet FlexE overhead frames to Transmit the service parameters; wherein the 1st to 20th FlexE overhead frames are used to carry the m service numbers, the 21st to 27th FlexE overhead frames are used to carry the m resource numbers, and the 28th to the 28th FlexE overhead frames are used to carry the m service numbers. 32 FlexE overhead frames are used to carry reserved resources; and the version identifier VER field in each FlexE overhead frame is configured with a first identifier, and the first identifier is used to indicate the service carried in the FlexE overhead frame The number or the number of resources are currently used business parameters. In this implementation manner, the VER field is used to indicate the currently transmitted service parameters, thereby avoiding the transmission of redundant time slot resource configuration tables and saving transmission overhead.
其中,每个业务对应一个所需的资源数和一个业务编号。Among them, each business corresponds to a required number of resources and a business number.
进一步地,在一种可能的实现中,所述第一标识对应的比特值为1。Further, in a possible implementation, the bit value corresponding to the first identifier is 1.
可选的,结合第一方面,在第一方面的又一种可能的实现中,利用开销帧发送所述业务参数,包括:发送2m+2个开销帧来传输所述业务参数;其中,所述2m+2个开销帧中包括第1开销帧、第2开销帧、第3开销帧至第2m+2开销帧,所述第1开销帧中包括m个资源数的资源数总和,所述第2开销帧中包括所述业务个数m,所述第3至第m+2开销帧中的m个开销帧中包括m个业务编号,第m+3至第2m+2开销帧中的m个开销帧中包括所述m个资源数,并且在每个开销帧中的版本标识VER字段上配置有第一标识,所述第一标识用于指示所述开销帧所携带的业务编号或资源数为当前使用的业务参数。Optionally, in conjunction with the first aspect, in yet another possible implementation of the first aspect, sending the service parameter using an overhead frame includes: sending 2m+2 overhead frames to transmit the service parameter; where The 2m+2 overhead frames include the first overhead frame, the second overhead frame, the third overhead frame to the 2m+2 overhead frame, and the first overhead frame includes the sum of m resources, and The second overhead frame includes the number of services m, the m overhead frames in the 3rd to m+2th overhead frames include m service numbers, and the m+3th to 2m+2th overhead frames The m overhead frames include the number of m resources, and the version identifier VER field in each overhead frame is configured with a first identifier, and the first identifier is used to indicate the service number or the service number carried in the overhead frame. The number of resources is the currently used service parameter.
本实现中,将FlexE接口进行了扩展,不再受制于原先100Gbps接口最多只能支持20个业务资源分配的限制;扩展后的FlexE接口,可根据业务需要定义资源粒度,从而确定总资源数,以及每个业务所需的资源数,进而实现多路业务的带宽灵活分配。In this implementation, the FlexE interface is extended, and is no longer restricted by the original 100Gbps interface that can only support up to 20 service resource allocation restrictions; the expanded FlexE interface can define resource granularity according to business needs to determine the total number of resources. And the number of resources required by each business, thereby realizing flexible bandwidth allocation for multiple services.
可选的,结合第一方面,在第一方面的又一种可能的实现中,所述开销帧包括一个控制码块和Y个数据码块,Y≥2且Y为正整数,所述控制码块用于定位和传输所述业务个数m,所述Y个数据码块用于传输所述m个资源数和所述m个业务编号。Optionally, with reference to the first aspect, in another possible implementation of the first aspect, the overhead frame includes one control code block and Y data code blocks, Y≥2 and Y is a positive integer, and the control The code blocks are used to locate and transmit the number m of services, and the Y data code blocks are used to transmit the m resource numbers and the m service numbers.
进一步地,所述Y个数据码块中包括至少一个第一码块,其中,一个所述第一码块用于承载所述m个资源数,或者,所述至少一个第一码块中的m个第一码块用于承载所述m个资源数。Further, the Y data code blocks include at least one first code block, wherein one of the first code blocks is used to carry the number of m resources, or, in the at least one first code block, The m first code blocks are used to carry the m resource numbers.
本实现中定义了一种新的帧格式,该帧格式可随着复用业务的变化而变化,因此能承载的业务更加灵活,具有更强的灵活性。另外,m个业务所对应的m个业务参数同只通过一次发送就可以将所有业务参数都传输给接收端,提高了传输效率。A new frame format is defined in this implementation, and the frame format can change with the change of multiplexing services, so the services that can be carried are more flexible and have stronger flexibility. In addition, the m service parameters corresponding to the m services can be transmitted to the receiving end with only one transmission, which improves the transmission efficiency.
第二方面,本申请实施例还提供了一种资源分配装置,该装置用于实现上述第一方面以及第一方面各种实现方式中的资源分配方法。其中,所述装置包括至少一个功能单元或模块,进一步地,所述至少一个功能单元包括获取单元、处理单元、发送单元等。In the second aspect, an embodiment of the present application also provides a resource allocation device, which is used to implement the foregoing first aspect and the resource allocation method in various implementation manners of the first aspect. Wherein, the device includes at least one functional unit or module, and further, the at least one functional unit includes an acquisition unit, a processing unit, a sending unit, and the like.
其中,所述获取单元,用于获取m个业务的k组资源数,每组资源数对应一个资源分配单位N,每组资源数包括每个业务对应的系数a,所述系数a表示一个业务包括的资源分配单位的个数,所述资源分配单位N表示一个资源分配单位包括的资源的个数,k≥1,N≥1且k,N均为正整数;所述处理单元,用于根据所述k组资源数在L个资源中确定所述m个业务对应的资源。Wherein, the obtaining unit is used to obtain the number of k groups of resources for m services, each group of resource numbers corresponds to a resource allocation unit N, and each group of resource numbers includes a coefficient a corresponding to each service, and the coefficient a represents a service The number of resource allocation units included, the resource allocation unit N represents the number of resources included in one resource allocation unit, k≥1, N≥1, and k and N are all positive integers; the processing unit is used for The resources corresponding to the m services are determined among the L resources according to the number of the k sets of resources.
第三方面,本申请实施例还提供了一种网络设备,包括处理器、存储器和通信接口,所述处理器与所述存储器耦合,进一步地,所述通信接口,用于获取m个业务的k组资源数,每组资源数对应一个资源分配单位N,每组资源数包括每个业务对应的系数a,所述系数a表示一个业务包括的资源分配单位的个数,所述资源分配单位N表示一个资源分配单位包括的资源的个数,k≥1,N≥1且k,N均为正整数;所述处理器,用于根据所述k组资源数在L个资源中确定所述m个业务对应的资源。In a third aspect, an embodiment of the present application also provides a network device, including a processor, a memory, and a communication interface, the processor is coupled to the memory, and further, the communication interface is used to obtain m services The number of k groups of resources, each group of resources corresponds to a resource allocation unit N, each group of resources includes a coefficient a corresponding to each service, and the coefficient a represents the number of resource allocation units included in a service, and the resource allocation unit N represents the number of resources included in a resource allocation unit, k≥1, N≥1, and k and N are all positive integers; the processor is configured to determine the number of resources among the L resources according to the number of k groups of resources. Resources corresponding to the m services.
可选的,结合第三方面,在第三方面的一种可能的实现中,所述通信接口,具体用于获取所述m个业务所对应的m个资源数,每个所述资源数按照第一进制表示,m≥1;将每个所述按照第一进制表示的资源数通过第二进制表示后得到所述k组资源数,所述第二进制包括二进制、八进制、十进制和十六进制。Optionally, with reference to the third aspect, in a possible implementation of the third aspect, the communication interface is specifically configured to obtain the number of m resources corresponding to the m services, and each number of resources is in accordance with The first hexadecimal representation, m≥1; the k groups of resource numbers are obtained after each resource number expressed in the first hexadecimal system is expressed in a binary system, and the second binary system includes binary, octal, decimal, and hexadecimal. Base.
可选的,结合第三方面,在第三方面的另一种可能的实现中,所述处理器,具体用于将所述k组资源数按照第1组至第k组的顺序,在所述L个资源中确定所述m个业务对应的资源,其中每组分配的资源数为m个业务的系数a之和与所述每组对应的资源分配单位N的乘积。Optionally, with reference to the third aspect, in another possible implementation of the third aspect, the processor is specifically configured to: The resources corresponding to the m services are determined from the L resources, where the number of resources allocated in each group is the product of the sum of the coefficient a of the m services and the resource allocation unit N corresponding to each group.
可选的,结合第三方面,在第三方面的又一种可能的实现中,所述处理器,具体用于按照所述第1组至第k组的顺序,如果所述第1组至第k组中的任意一组分配的资源包含两个或两个以上业务,则对包含所述两个或两个以上业务的组按照业务编号的顺序、或者按照业务编号交织的顺序分配每个业务对应的资源。Optionally, with reference to the third aspect, in another possible implementation of the third aspect, the processor is specifically configured to follow the order of the first group to the kth group, and if the first group to the kth group The allocated resources of any group in the kth group include two or more services, and each group including the two or more services is allocated in the order of service numbers or in the order of interleaving of service numbers. Resources corresponding to the business.
可选的,结合第三方面,在第三方面的又一种可能的实现中,所述处理器,具体用于获取第一序列,所述第一序列用于指示所述k组资源数的资源分配单位N之间的位置关系;根据所述k组资源数和所述第一序列,在L个资源中确定所述m个业务对应的资源。Optionally, with reference to the third aspect, in yet another possible implementation of the third aspect, the processor is specifically configured to obtain a first sequence, and the first sequence is used to indicate the number of the k groups of resources The location relationship between the resource allocation units N; according to the number of the k sets of resources and the first sequence, the resources corresponding to the m services are determined among the L resources.
其中,所述第一序列包括k个第一单元,且不同的第一单元对应不同的组资源数。Wherein, the first sequence includes k first units, and different first units correspond to different group resource numbers.
可选的,在一种可能的实现中,所述第一序列包括z个第二单元,不同的第二单元对应不同的组资源数,至少一个第二单元对应至少两个组资源数,z<k,z为正整数且z≥2。Optionally, in a possible implementation, the first sequence includes z second units, different second units correspond to different group resource numbers, at least one second unit corresponds to at least two group resource numbers, z <k, z is a positive integer and z≥2.
可选的,在另一种可能的实现中,所述第一序列包括p个第三单元,一个组资源数在所述第一序列中对应N个不同的第三单元。Optionally, in another possible implementation, the first sequence includes p third units, and a group resource number corresponds to N different third units in the first sequence.
进一步地,p=2 k-1,在所述2 k-1个第三单元中,每个所述第三单元对应一个组号i,i为1至k中的任一个,第i组资源数在所述第一序列中对应2 i-1个第三单元。 Further, p=2 k -1, in the 2 k -1 third units, each third unit corresponds to a group number i, i is any one of 1 to k, and the i-th group of resources The number corresponds to 2 i-1 third units in the first sequence.
可选的,结合第三方面,在第三方面的又一种可能的实现中,i为1至k中的任一个,第i组资源数对应的资源分配单位N为2 i-1,第i+1组资源数对应的资源分配单位N为2 i+1-1,其中,所述2 i-1个资源中包括第i组的第一资源,第2 i+1-1个资源中包括第i+1组的第一资源和第i+1组的第二资源;所述第一序列用于指示所述第i组的第一资源在L个资源中位于所述第i+1组的第一资源和所述第i+1组的第二资源之间。 Optionally, with reference to the third aspect, in another possible implementation of the third aspect, i is any one of 1 to k, the resource allocation unit N corresponding to the number of resources in the i-th group is 2 i-1 , The resource allocation unit N corresponding to the number of resources in the i+1 group is 2 i+1-1 , where the 2 i-1 resources include the first resource of the i-th group, and the 2 i+1-1 resource It includes the first resource of the (i+1)th group and the second resource of the (i+1)th group; the first sequence is used to indicate that the first resource of the ith group is located in the (i+1)th resource among the L resources. Between the first resource of the group and the second resource of the i+1th group.
可选的,结合第三方面,在第三方面的又一种可能的实现中,所述第一序列包含2 k-1个单元,每个单元对应一个组号i,i为1至k中的任一个;所述第一序列用于指示每个所述单元所对应的组号i,所述处理器具体用于根据所述k组资源数和所述第一序列指示的每个单元所对应的组号i,确定所述m个业务对应的资源。 Optionally, with reference to the third aspect, in another possible implementation of the third aspect, the first sequence includes 2 k -1 units, and each unit corresponds to a group number i, where i is from 1 to k The first sequence is used to indicate the group number i corresponding to each of the units, and the processor is specifically used to indicate the number of resources in the k groups and the number of each unit indicated by the first sequence. The corresponding group number i determines the resources corresponding to the m services.
其中,所述第一序列为比特位的回文排列,所述组号i为第1至第k比特位中的任 意一个比特位,所述2 k-1个单元组成的序列号中,以序列号为2 k-1为第一中心,所述第一中心的左边序列号所对应的比特位序列与右边序列号所对应的比特位序列关于所述第一中心对称;在所述第一中心的左边序列号,以序列号为2 k-2为第二中心,所述第二中心的左边序列号所对应的比特位序列与右边序列号所对应的比特位序列关于所述第二中心对称;在以序列号为2 k-(k-1)为第k-1中心,所述第k-1中心的左边序列号所对应的比特位序列与右边序列号所对应的比特位序列关于所述第k-1中心对称。 Wherein, the first sequence is a palindrome arrangement of bits, the group number i is any one of the 1st to the kth bits, and the sequence number composed of 2 k -1 units is A sequence number of 2 k-1 is the first center, and the bit sequence corresponding to the left sequence number of the first center and the bit sequence corresponding to the right sequence number are symmetrical about the first center; The left serial number of the center, with the serial number 2 k-2 as the second center, the bit sequence corresponding to the left serial number of the second center and the bit sequence corresponding to the right serial number are related to the second center Symmetrical; in the k-1 center with a sequence number of 2 k-(k-1) , the bit sequence corresponding to the left sequence number of the k-1 center is related to the bit sequence corresponding to the right sequence number The k-1th center is symmetrical.
可选的,结合第三方面,在第三方面的又一种可能的实现中,所述处理器,具体用于对每组资源数由二进制表示的比特值从全0开始到比特值全1依次列出,共计2 k个计数单位;每生成一个计数单位,比较当前计数单位与前一个计数单位的比特值变化,确定出发生跳变的比特位,所述发生跳变是指同一比特位上的比特值从所述前一个计数单位的0在所述当前计数单位变成1;对确定的2 k-1个计数单位所对应的所有所述发生跳变的比特位进行排序,生成所述第一序列。其中,所述2 k-1个计数单位是除去比特值全0的第一个计数单位之外剩余的所有计数单位。 Optionally, with reference to the third aspect, in yet another possible implementation of the third aspect, the processor is specifically configured to start with the bit value of each group of resource numbers expressed in binary from all 0s to all 1s. Listed in order, a total of 2 k count units; each time a count unit is generated, compare the bit value changes of the current count unit and the previous count unit to determine the bit that undergoes a transition. The transition refers to the same bit. The value of the above bit changes from 0 in the previous count unit to 1 in the current count unit; all the transitioned bits corresponding to the determined 2 k -1 count units are sorted to generate all The first sequence. Wherein, the 2 k -1 counting units are all counting units remaining except for the first counting unit whose bit value is all 0.
可选的,结合第三方面,在第三方面的又一种可能的实现中,所述处理器,具体用于将所述k组资源数的k个资源分配单位作为k个业务,利用预设算法建立所述k个业务与所述k个业务组成的资源总数之间的对应关系,根据所述对应关系生成所述第一序列;其中,所述预设算法为:l×B modQ,l为常数,l的取值范围从1到Q;B为k个业务表示的第1至第k个业务中的任一个所需的资源数,B的取值范围为B1到Bk,Q≥Max{B1,B2,B3,……,Bk};mod表示取余数运算,l×B modQ表示l×B除以Q所得的余数。Optionally, with reference to the third aspect, in another possible implementation of the third aspect, the processor is specifically configured to use the k resource allocation units of the k sets of resource numbers as k services, and use the preset Suppose an algorithm establishes the correspondence between the k services and the total number of resources composed of the k services, and generates the first sequence according to the correspondence; wherein, the preset algorithm is: l×BmodQ, l is a constant, the value of l ranges from 1 to Q; B is the number of resources required by any one of the first to kth services represented by k services, the value of B ranges from B1 to Bk, and Q≥ Max{B1, B2, B3,..., Bk}; mod represents the remainder operation, l×B modQ represents the remainder obtained by dividing l×B by Q.
可选的,结合第三方面,在第三方面的又一种可能的实现中,所述处理器,具体用于通过间插比特位的方法生成所述比特位序列,所述间插比特位方法包括:在2 k-1个比特位组成的比特位序列中,在序列号为2 k-1的位置插入第1比特位;以所述第1比特位为中心,在所述第1比特位的左边和右边各自插入一个第2比特位;以每个所述第2比特位为中心,在所述每个第2比特位的左边和右边各自插入一个第3比特位;直到以每个第k-1比特位为中心,在每个所述第k-1比特位的左边和右边各自插入一个第k比特位为止。 Optionally, with reference to the third aspect, in yet another possible implementation of the third aspect, the processor is specifically configured to generate the bit sequence by interleaving bits, and the interleaving bits The method includes: inserting the first bit in the sequence number 2 k-1 in the bit sequence composed of 2 k -1 bits; taking the first bit as the center, and inserting the first bit in the first bit sequence. Insert a second bit to the left and right of each bit; insert a third bit to the left and right of each second bit with each second bit as the center; until each The k-1th bit is the center, and a kth bit is inserted to the left and right of each k-1th bit.
可选的,结合第三方面,在第三方面的又一种可能的实现中,所述处理器,具体用于所述第一装置对所有二进制表示的比特值从全0开始到所述比特值全1依次列出,共计2 k个计数单位,编号依次为0、1、2、……、2 k-1,其中所述编号用w表示;所述第一装置在计数器每计数一次输出一个比特位,所述比特位满足k-j,其中,j为2的指数幂,0dj<k,并且在满足第一关系式: 商为a,余数为b,判断在满足所有商a为奇数的情况下的j值中,j取最小值;将计数器输出的所有计数单位的比特位进行排序生成所述比特位序列。 Optionally, with reference to the third aspect, in another possible implementation of the third aspect, the processor is specifically configured to start from all 0s to the bit values of all binary representations by the first device. The values of all 1s are listed in sequence, a total of 2 k counting units, and the serial numbers are 0, 1, 2, ..., 2 k -1, where the number is represented by w; the first device outputs the output every time the counter counts. A bit, the bit satisfies kj, where j is an exponential power of 2, 0dj<k, and satisfies the first relationship: The quotient is a, and the remainder is b. It is judged that j takes the minimum value among all j values when the quotient a is an odd number; the bits of all counting units output by the counter are sorted to generate the bit sequence.
可选的,结合第三方面,在第三方面的又一种可能的实现中,所述通信接口,还用于利用开销帧发送业务参数,所述业务参数包括:业务个数m、m个业务编号和m个资源数。Optionally, in conjunction with the third aspect, in another possible implementation of the third aspect, the communication interface is further used to send service parameters using overhead frames, and the service parameters include: the number of services m and m Service number and the number of m resources.
可选的,结合第三方面,在第三方面的又一种可能的实现中,所述通信接口,具体用于通过32个灵活以太网FlexE开销帧发送所述业务参数;其中,第1至第20个FlexE 开销帧用于携带所述m个业务对应的m个业务编号,第21至第27个FlexE开销帧用于携带所述m个资源数,第28至第32个FlexE开销帧用于承载保留资源;并且在每个所述FlexE开销帧中的版本标识VER字段上配置有第一标识,所述第一标识用于指示所述FlexE开销帧所携带的业务编号或资源数为当前使用的业务参数。Optionally, in conjunction with the third aspect, in another possible implementation of the third aspect, the communication interface is specifically configured to send the service parameters through 32 flexible Ethernet FlexE overhead frames; among them, the first to The 20th FlexE overhead frame is used to carry the m service numbers corresponding to the m services, the 21st to 27th FlexE overhead frames are used to carry the m resource numbers, and the 28th to 32nd FlexE overhead frames are used Resources are reserved for the bearer; and a first identifier is configured on the version identifier VER field in each FlexE overhead frame, and the first identifier is used to indicate that the service number or the number of resources carried in the FlexE overhead frame is the current Business parameters used.
进一步地,在一种可能的实现中,所述第一标识对应的比特位为1。Further, in a possible implementation, the bit corresponding to the first identifier is 1.
可选的,结合第三方面,在第三方面的又一种可能的实现中,所述通信接口,具体用于发送2m+2个开销帧来传输所述业务参数;其中,所述2m+2个开销帧中包括第1开销帧、第2开销帧、第3开销帧至第2m+2开销帧,所述第1开销帧中包括m个资源数的资源数总和,所述第2开销帧中包括所述业务个数m,所述第3至第m+2开销帧中的m个开销帧中包括m个业务编号,第m+3至第2m+2开销帧中的m个开销帧中包括所述m个资源数,并且在每个开销帧中的版本标识VER字段上配置有第一标识,所述第一标识用于指示所述开销帧所携带的业务编号或资源数为当前使用的业务参数。Optionally, with reference to the third aspect, in another possible implementation of the third aspect, the communication interface is specifically configured to send 2m+2 overhead frames to transmit the service parameters; wherein, the 2m+ The two overhead frames include the first overhead frame, the second overhead frame, the third overhead frame to the 2m+2 overhead frame, the first overhead frame includes the sum of m resources, and the second overhead The frame includes the number of services m, the m overhead frames in the 3rd to m+2th overhead frames include m service numbers, and the m overheads in the m+3th to 2m+2th overhead frames The frame includes the number of m resources, and a first identifier is configured on the version identifier VER field in each overhead frame, and the first identifier is used to indicate that the service number or the number of resources carried in the overhead frame is The business parameters currently in use.
可选的,结合第三方面,在第三方面的又一种可能的实现中,所述开销帧包括一个控制码块和Y个数据码块,Y≥2且Y为正整数,所述控制码块用于定位和传输所述业务个数m,所述Y个数据码块用于传输所述m个资源数和所述m个业务编号。Optionally, with reference to the third aspect, in another possible implementation of the third aspect, the overhead frame includes one control code block and Y data code blocks, Y≥2 and Y is a positive integer, and the control The code blocks are used to locate and transmit the number m of services, and the Y data code blocks are used to transmit the m resource numbers and the m service numbers.
进一步地,所述Y个数据码块中包括至少一个第一码块,其中,一个第一码块用于承载所述m个资源数,或者所述至少一个第一码块中的m个第一码块用于承载所述m个资源数。Further, the Y data code blocks include at least one first code block, wherein one first code block is used to carry the m number of resources, or the m number of the at least one first code block One code block is used to carry the number of m resources.
第四方面,本申请实施例还提供了一种网络系统,该网络系统中包括发送端设备和接收端设备,所述发送端设备和接收端设备可以为前述第三方面各种实现方式所述的网络设备,所述网络设备用于实现前述第一方面以及第一方面各种实现方式所述的方法。In a fourth aspect, the embodiments of the present application also provide a network system, which includes a sending-end device and a receiving-end device. The sending-end device and the receiving-end device may be those described in the foregoing various implementations of the third aspect. The network device is configured to implement the foregoing first aspect and the methods described in various implementation manners of the first aspect.
第五方面,本申请实施例还提供了一种计算机存储介质,该计算机存储介质存储有指令,该指令在计算机上运行时可实现包括本申请提供的资源分配方法各实施例中的部分或全部步骤。In the fifth aspect, the embodiments of the present application also provide a computer storage medium, the computer storage medium stores instructions, and when the instructions are run on a computer, they can implement part or all of the resource allocation methods provided in the present application. step.
另外,本申请还提供了一种计算机程序产品,所述计算机程序产品包括一个或多个计算机指令,例如资源分配指令等。在计算机上运行所述指令时,可实现包括本申请提供的资源分配方法各实施例中的部分或全部步骤。In addition, this application also provides a computer program product. The computer program product includes one or more computer instructions, such as resource allocation instructions. When the instructions are run on a computer, some or all of the steps in the embodiments of the resource allocation method provided in this application can be implemented.
第六方面,本申请实施例还提供一种开销帧,所述开销帧中包括版本标识VER字段,所述VER字段中配置有第一标识,所述第一标识用于指示所述开销帧所携带的业务编号或资源数为当前使用的业务参数。可选的,所述第一标识所携带的比特值为“1”。In a sixth aspect, the embodiments of the present application also provide an overhead frame, the overhead frame includes a version identifier VER field, and a first identifier is configured in the VER field, and the first identifier is used to indicate where the overhead frame is located. The service number or resource number carried is the service parameter currently used. Optionally, the bit value carried by the first identifier is "1".
进一步地,当所述第一标识所携带的比特值为“1”时,所述开销帧中还用于携带一个业务的业务编号,或者该业务所需的资源数。Further, when the bit value carried by the first identifier is "1", the overhead frame is also used to carry the service number of a service, or the number of resources required by the service.
其中,所述开销帧为灵活以太网FlexE开销帧。Wherein, the overhead frame is a flexible Ethernet FlexE overhead frame.
进一步地,通过32个FlexE开销帧发送业务参数;其中,第1至第20个FlexE开销帧用于携带所述m个业务对应的m个业务编号,第21至第27个FlexE开销帧用于携带所述m个资源数,第28至第32个FlexE开销帧用于承载保留资源。Further, the service parameters are sent through 32 FlexE overhead frames; among them, the 1st to 20th FlexE overhead frames are used to carry m service numbers corresponding to the m services, and the 21st to 27th FlexE overhead frames are used for Carrying the number of m resources, the 28th to 32nd FlexE overhead frames are used to carry reserved resources.
可选的,结合第六方面,在第六方面的又一种可能的实现中,通过2m+2个开销帧发送所述业务个数m和所述m个资源数;其中,所述2m+2个开销帧中所携带的内容包括:所述业务个数m,m个业务所需的资源数总和P,业务编号和所述m个资源数;并且在每个所述开销帧中的版本标识VER字段所配置有第一标识,所述第一标识用于指示 所述开销帧所携带的业务编号或资源数为当前使用的业务参数。Optionally, with reference to the sixth aspect, in yet another possible implementation of the sixth aspect, the number of services m and the number of m resources are sent through 2m+2 overhead frames; wherein, the 2m+ The content carried in the two overhead frames includes: the number of services m, the sum of the number of resources required by the m services P, the service number, and the number of the m resources; and the version in each overhead frame The identifier VER field is configured with a first identifier, and the first identifier is used to indicate that the service number or the number of resources carried in the overhead frame is a currently used service parameter.
可选的,在另一种可能的实现中,还可以通过发送2m+2个开销帧来传输所述业务参数,具体地,所述2m+2个开销帧中包括第1开销帧、第2开销帧、第3开销帧至第2m+2开销帧,所述第1开销帧中包括m个资源数的资源数总和,所述第2开销帧中包括所述业务个数m,所述第3至第m+2开销帧中的m个开销帧中包括m个业务编号,第m+3至第2m+2开销帧中的m个开销帧中包括所述m个资源数,并且在每个开销帧中的版本标识VER字段上配置有第一标识,所述第一标识用于指示所述开销帧所携带的业务编号或资源数为当前使用的业务参数。Optionally, in another possible implementation, the service parameters may also be transmitted by sending 2m+2 overhead frames. Specifically, the 2m+2 overhead frames include the first overhead frame and the second overhead frame. The overhead frame, the third overhead frame to the 2m+2th overhead frame, the first overhead frame includes the sum of the number of resources of m resources, the second overhead frame includes the number of services m, and the first overhead frame includes the number m of services. The m overhead frames in the 3 to m+2th overhead frames include m service numbers, the m overhead frames in the m+3 to 2m+2th overhead frames include the m resource numbers, and each The version identifier VER field in each overhead frame is configured with a first identifier, and the first identifier is used to indicate that the service number or the number of resources carried in the overhead frame is a currently used service parameter.
第七方面,本申请实施例还提供另一种开销帧,该开销帧包括一个控制码块和Y个数据码块,Y≥2且为正整数,所述控制码块用于定位和传输所述业务个数m,所述Y个数据码块用于传输所述m个资源数和所述m个业务编号。In the seventh aspect, the embodiments of the present application also provide another overhead frame. The overhead frame includes a control code block and Y data code blocks, Y ≥ 2 and a positive integer, and the control code block is used to locate and transmit data. The number of services is m, and the Y data code blocks are used to transmit the number of m resources and the number of m services.
进一步地,所述Y个数据码块中包括至少一个第一码块,其中,一个第一码块用于承载所述m个资源数,或者所述至少一个第一码块中的m个第一码块用于承载所述m个资源数。Further, the Y data code blocks include at least one first code block, wherein one first code block is used to carry the m number of resources, or the m number of the at least one first code block One code block is used to carry the number of m resources.
本实施例提供的资源分配方法和装置,通过将m个业务的资源数分成k组资源数,并按照k组资源数中每组资源数所对应的资源分配单位进行资源分配,由于该资源分配单位指示了一组资源数中分配资源的最小单位,所以实现了对较小资源粒度的资源分配,提高了资源分配的灵活性和拓展性。The resource allocation method and device provided in this embodiment divide the resource number of m services into k groups of resource numbers, and perform resource allocation according to the resource allocation unit corresponding to each group of resource numbers in the k groups of resource numbers. The unit indicates the smallest unit of resource allocation in a group of resource numbers, so resource allocation with smaller resource granularity is realized, and the flexibility and scalability of resource allocation are improved.
另外,在资源分配粒度较小时,通过发送端和接收端两端一致的规则,使得发送端只需发送业务分配的复用方案,不必将冗余的资源配置表发送给接收端,从而减小了原发送较长的资源配置表的资源开销。In addition, when the granularity of resource allocation is small, through the same rules on both the sender and the receiver, the sender only needs to send the multiplexing scheme of the service allocation instead of sending the redundant resource configuration table to the receiver, thereby reducing This reduces the resource overhead of sending a long resource configuration table.
图1为本申请实施例提供的一种FlexE的结构示意图;FIG. 1 is a schematic structural diagram of a FlexE provided by an embodiment of the application;
图2为本申请实施例提供的一种FlexE时隙配置表的示意图;FIG. 2 is a schematic diagram of a FlexE time slot configuration table provided by an embodiment of the application;
图3为本申请实施例提供的一种包括发送端10和接收端20的网络系统架构图;FIG. 3 is an architecture diagram of a network system including a sending end 10 and a receiving end 20 according to an embodiment of the application;
图4为本申请实施例提供的一种资源分配方法的流程图;FIG. 4 is a flowchart of a resource allocation method provided by an embodiment of the application;
图5为本申请实施例提供的一种按照顺序法分配业务资源的示意图;FIG. 5 is a schematic diagram of allocating service resources according to a sequential method according to an embodiment of the application; FIG.
图6为本申请实施例提供的一种按照交织法分配业务资源的示意图;FIG. 6 is a schematic diagram of allocating service resources according to an interleaving method according to an embodiment of the application;
图7a为本申请实施例提供的一种对二进制的资源数分组的示意图;FIG. 7a is a schematic diagram of grouping binary resource numbers according to an embodiment of this application;
图7b为本申请实施例提供的一种按照分段法分配业务资源的示意图;FIG. 7b is a schematic diagram of allocating service resources according to a segmentation method according to an embodiment of the application;
图7c为本申请实施例提供的另一种按照分段法分配业务资源的示意图;FIG. 7c is another schematic diagram of allocating service resources according to the segmentation method according to an embodiment of the application;
图7d为本申请实施例提供的又一种按照分段法分配业务资源的示意图;FIG. 7d is another schematic diagram of allocating service resources according to the segmentation method provided by an embodiment of the application; FIG.
图8为本申请实施例提供的一种业务资源的示意图;FIG. 8 is a schematic diagram of a service resource provided by an embodiment of this application;
图9a为本申请实施例提供的一种对资源数进行分组的示意图;FIG. 9a is a schematic diagram of grouping resource numbers according to an embodiment of the application;
图9b为本申请实施例提供的一种业务资源分配的示意图;FIG. 9b is a schematic diagram of service resource allocation provided by an embodiment of this application;
图10a为本申请实施例提供的一种比特序列的示意图;FIG. 10a is a schematic diagram of a bit sequence provided by an embodiment of this application;
图10b为本申请实施例提供的一种确定跳变比特位的示意图;FIG. 10b is a schematic diagram of determining hopping bit positions according to an embodiment of the application;
图10c为本申请实施例提供的一种比特位回文排列的示意图;FIG. 10c is a schematic diagram of a bit palindrome arrangement provided by an embodiment of the application;
图10d为本申请实施例提供的一种每个比特位与业务之间的对应关系的示意图;FIG. 10d is a schematic diagram of a corresponding relationship between each bit and a service provided by an embodiment of this application;
图10e为本申请实施例提供的一种利用比特位的回文排列实现业务资源分配的示意图;FIG. 10e is a schematic diagram of implementing service resource allocation by using a palindrome arrangement of bits according to an embodiment of the application; FIG.
图11为本申请实施例提供的一种生成比特位的回文排列的示意图;FIG. 11 is a schematic diagram of a palindrome arrangement for generating bits according to an embodiment of the application;
图12为本申请实施例提供的另一种生成比特位的回文排列的示意图;FIG. 12 is a schematic diagram of another palindrome arrangement for generating bits according to an embodiment of the application;
图13a为本申请实施例提供的一种利用Sigma/Delta算法进行比特位分配的示意图;FIG. 13a is a schematic diagram of bit allocation using the Sigma/Delta algorithm according to an embodiment of the application;
图13b为本申请实施例提供的一种利用Sigma/Delta算法生成比特位序列的示意图;FIG. 13b is a schematic diagram of generating a bit sequence by using the Sigma/Delta algorithm according to an embodiment of the application;
图13c为本申请实施例提供的一种利用比特位序列实现业务资源分配的示意图;FIG. 13c is a schematic diagram of realizing service resource allocation by using a bit sequence according to an embodiment of the application; FIG.
图14a为本申请实施例提供的一种FlexE开销码块的结构示意图;FIG. 14a is a schematic structural diagram of a FlexE overhead code block provided by an embodiment of this application;
图14b为本申请实施例提供的一种利用FlexE开销码块传输业务参数的示意图;FIG. 14b is a schematic diagram of transmitting service parameters using FlexE overhead code blocks according to an embodiment of the application;
图14c为本申请实施例提供的另一种利用FlexE开销码块传输业务参数的示意图;14c is another schematic diagram of transmitting service parameters using FlexE overhead code blocks according to an embodiment of the application;
图15a为本申请实施例提供的一种开销帧的结构示意图;FIG. 15a is a schematic structural diagram of an overhead frame provided by an embodiment of this application;
图15b为本申请实施例提供的一种开销帧中的控制码块的结构示意图;15b is a schematic structural diagram of a control code block in an overhead frame provided by an embodiment of this application;
图15c为本申请实施例提供的一种第一码块的结构示意图;FIG. 15c is a schematic structural diagram of a first code block provided by an embodiment of this application;
图16为本申请实施例提供的一种资源分配装置的结构示意图;FIG. 16 is a schematic structural diagram of a resource allocation device provided by an embodiment of this application;
图17为本申请实施例提供的一种网络系统的结构示意图。FIG. 17 is a schematic structural diagram of a network system provided by an embodiment of this application.
在对本申请实施例的技术方案说明之前,首先对本申请涉及的名词和相关背景进行介绍。Before describing the technical solutions of the embodiments of the present application, first introduce the terms and related background involved in the present application.
以太网(Ethernet)是一种基带局域网规范,是当今现有局域网采用的最通用的通信协议标准。灵活以太网(Flexible Ethernet,FlexE)是实现业务隔离承载和网络分片的一种接口技术,近两年发展迅速,被各大标准组织广泛接纳。泛在以太网(X-Ethernet,X-E)是一种基于Ethernet物理层的比特码块(Bit Block)交换的技术体系,具备确定性超低时延的特征,X-E所采用的编码类型可以为64B/66B编码类型等。Ethernet (Ethernet) is a baseband local area network specification, and it is the most common communication protocol standard used by existing local area networks today. Flexible Ethernet (Flexible Ethernet, FlexE) is an interface technology that implements service isolation and bearer and network fragmentation. It has developed rapidly in the past two years and has been widely accepted by major standards organizations. Ubiquitous Ethernet (X-Ethernet, XE) is a technology system based on the bit block (Bit Block) exchange of the Ethernet physical layer. It has the characteristics of deterministic and ultra-low latency. The encoding type used by XE can be: 64B/66B encoding type, etc.
其中,对于FlexE,光互联论坛(Optical Internetworking Forum,OIF)标准化组织定义的FlexE标准协议,基于若干个50/100/200/400G等以太网物理接口构成的物理链路组,每个接口支持一个或者多个FlexE实例,每个实例引入固定的周期帧结构。基于时分复用机制(Testing Data Management,TDM)划分时隙,以一个或者多个时隙支持一个以太网业务流,或者灵活以太网客户(FlexE Client)信号。对于100Gbps的FlexE实例,一个固定的周期帧结构包括20个时隙,每个时隙有8184(1023×8=8184)个66比特的传输窗口。由于一个时隙的带宽为5Gbps,因此,每个66比特的传输窗口相当于0.61Mbps(5Gbps/8184=0.61Mbps)的带宽资源。Among them, for FlexE, the FlexE standard protocol defined by the Optical Internetworking Forum (Optical Internetworking Forum, OIF) standardization organization is based on a physical link group composed of several 50/100/200/400G Ethernet physical interfaces, and each interface supports one Or multiple FlexE instances, each instance introduces a fixed periodic frame structure. The time slot is divided based on a time division multiplexing mechanism (Testing Data Management, TDM), and one or more time slots are used to support an Ethernet service flow or a flexible Ethernet client (FlexE Client) signal. For the 100Gbps FlexE instance, a fixed periodic frame structure includes 20 time slots, and each time slot has 8184 (1023×8=8184) transmission windows of 66 bits. Since the bandwidth of one time slot is 5Gbps, each 66-bit transmission window is equivalent to 0.61Mbps (5Gbps/8184=0.61Mbps) bandwidth resources.
在灵活以太网中,OIF制定了FlexE标准,通过引入FlexE Shim实现了媒体介入控制层(Media Access Control,MAC)层与物理层(Physical Layer,PHY)层之间速率的解耦,即MAC层的速率不需要与PHY层速率一一对应。In the flexible Ethernet, OIF formulated the FlexE standard, and realized the decoupling of the rate between the Media Access Control (MAC) layer and the Physical Layer (PHY) layer by introducing FlexE Shim, that is, the MAC layer The rate does not need to correspond to the rate of the PHY layer one-to-one.
如图1所示,FlexE标准定义了FlexE客户端(Client)、FlexE垫层(Shim)和FlexE组(Group)。FlexE Client为MAC层业务,其业务速率可为10Gbps、40Gbps或m×25Gbps。FlexE Group是将多个PHY绑定成一组,用于支持更大带宽,如两个100Gbps的PHY可绑定成200Gbps端口。FlexE Shim层是将FlexE Client信号映射或解映射到FlexE Group,其包括复用过程和解复用过程。其中,FlexE复用过程指发送方向,从FlexE Client映射 到FlexE Group;解复用过程指接收方向,从FlexE Group解映射出FlexE Client。As shown in Figure 1, the FlexE standard defines FlexE client (Client), FlexE cushion (Shim) and FlexE group (Group). FlexE Client is a MAC layer service, and its service rate can be 10Gbps, 40Gbps or m×25Gbps. FlexE Group binds multiple PHYs into a group to support larger bandwidth. For example, two 100Gbps PHYs can be bound into 200Gbps ports. The FlexE Shim layer maps or demaps FlexE Client signals to FlexE Group, which includes multiplexing and demultiplexing processes. Among them, the FlexE multiplexing process refers to the sending direction, which is mapped from the FlexE Client to the FlexE Group; the demultiplexing process refers to the receiving direction, and the FlexE Client is demapped from the FlexE Group.
FlexE通过时隙划分,支持更低的业务速率;通过时隙分配,实现灵活的带宽分配。对于100Gbps PHY,FlexE将其划分成20个时隙,每个时隙为5Gbps,因此FlexE最低可支持5Gbps速率的业务。根据实际业务速率,FlexE利用FlexE配置表(Calendar)按需分配时隙,如15Gbps业务,FlexE Calendar可为其分配3个时隙,每个时隙均为15Gbps带宽。FlexE Calendar通过确定每个时隙所属业务进行带宽分配。FlexE divides time slots to support lower service rates; and allocates time slots to achieve flexible bandwidth allocation. For 100Gbps PHY, FlexE divides it into 20 time slots, each of which is 5Gbps. Therefore, FlexE can support services at a minimum rate of 5Gbps. According to the actual service rate, FlexE uses the FlexE configuration table (Calendar) to allocate time slots on demand, such as 15Gbps services. FlexE Calendar can allocate 3 time slots for it, and each time slot is 15Gbps bandwidth. FlexE Calendar allocates bandwidth by determining the business to which each time slot belongs.
如图2所示,FlexE标准中,Calendar分为配置表A和配置表B。其中配置表A和配置表B互为备份。配置表A共有20个表项,对应20个时隙,每个表项指示当前时隙所属具体客户端ID。例如,客户端ID用于配置表A的时隙0(英文:Client ID for calendar A slot 0),又例如,配置表A中第2个表项填写的是客户端ID 0x1111,第2个表项对应时隙1(slot 1),表明时隙1被客户端ID 0x1111占用。配置表A中不同时隙可以具有相同客户端ID,表示这些时隙被分配给同一个客户端。同理地,对于配置表B与配置表A相似,也具有20个表项,每个表项指示当前时隙所属的具体客户端。As shown in Figure 2, in the FlexE standard, Calendar is divided into configuration table A and configuration table B. Among them, configuration table A and configuration table B are mutual backups. The configuration table A has a total of 20 entries, corresponding to 20 time slots, and each entry indicates the specific client ID to which the current time slot belongs. For example, the client ID is used to configure time slot 0 of table A (English: Client ID for calendar A slot 0). For another example, the second entry in configuration table A is filled with client ID 0x1111, and the second table The entry corresponds to slot 1 (slot 1), indicating that slot 1 is occupied by client ID 0x1111. Different time slots in the configuration table A may have the same client ID, which means that these time slots are allocated to the same client. Similarly, the configuration table B is similar to the configuration table A, and also has 20 entries, and each entry indicates the specific client to which the current time slot belongs.
FlexE通过上述时隙划分和时隙分配,打破了IEEE 802.3标准制定的阶梯型速率体系,实现了带宽的灵活分配,支持任意的N×5Gbps业务。同时华为更进一步,私有地实现了1Gbps颗粒的FlexE,从而支持N×1Gbps业务。Through the above-mentioned time slot division and time slot allocation, FlexE breaks the stepped rate system established by the IEEE 802.3 standard, realizes the flexible allocation of bandwidth, and supports arbitrary N×5Gbps services. At the same time, Huawei went a step further by privately implementing FlexE with 1Gbps granules to support N×1Gbps services.
虽然现有的对FlexE分配机制实现了时隙粒度为5Gbps,或者更小粒度的1Gbps的业务,但是,所划分的时隙粒度仍然不满足对小颗粒业务以及非整数时隙颗粒业务的需求,对于这些更小时隙颗粒的业务支持不够灵活。为了高效支持更小颗粒业务以及非整数时隙颗粒业务,必然要求所划分的时隙粒度要更小,导致相同接口下所划分的时隙数量变多。时隙数量的增多会增加时隙维护和管理的代价,因此对于小颗粒时隙,FlexE的时隙配置表不具有可扩展性。此外,FlexE的时隙配置是通过FlexE复帧进行传输的,无法做到实时地动态分配带宽。Although the existing FlexE allocation mechanism realizes a service with a time slot granularity of 5 Gbps or a smaller granularity of 1 Gbps, the divided time slot granularity still does not meet the requirements for small granular services and non-integer time slot granular services. The service support for these smaller time slot particles is not flexible enough. In order to efficiently support smaller granular services and non-integer time slot granular services, the granularity of the divided time slots must be smaller, which leads to an increase in the number of divided time slots under the same interface. The increase in the number of time slots will increase the cost of time slot maintenance and management. Therefore, for small-particle time slots, the time slot configuration table of FlexE is not scalable. In addition, the time slot configuration of FlexE is transmitted through FlexE multiframes, and it is impossible to dynamically allocate bandwidth in real time.
下面对本申请实施例的技术场景,以及技术场景中所包含的设备进行介绍。The technical scenarios of the embodiments of the present application and the equipment included in the technical scenarios are introduced below.
本申请各个实施例的技术方案所应用的技术场景包括但不限于以太网、灵活以太网、光传送网(Optical Transport Network,OTN),在这些网络中包括至少两个网络设备。所述网络设备的产品形态可以包括典型的核心路由器、边沿路由器、OTN传输设备等,以及面向具体场景的IP无线接入网(Radio Access Network,RAN)盒式或框式传输设备、分组传送网(Packet Transport Network,PTN)盒式或框式传输设备等。The technical scenarios applied by the technical solutions of the various embodiments of the present application include, but are not limited to, Ethernet, flexible Ethernet, and optical transport network (Optical Transport Network, OTN), and these networks include at least two network devices. The product form of the network equipment may include typical core routers, edge routers, OTN transmission equipment, etc., as well as specific scenarios-oriented IP radio access network (Radio Access Network, RAN) box-type or frame-type transmission equipment, packet transmission network (Packet Transport Network, PTN) box-type or frame-type transmission equipment, etc.
本申请的技术方案可应用于任意两个网络设备的接口之间,比如多路业务从一个设备接口输入,从另一个设备接口输出。进一步地,所述网络设备的接口可以是FlexE接口、OTN接口、以太接口等,或者还可以是这些接口划分出的管道。The technical solution of the present application can be applied between the interfaces of any two network devices, for example, multiple services are input from one device interface and output from another device interface. Further, the interface of the network device may be a FlexE interface, an OTN interface, an Ethernet interface, etc., or may also be a pipe divided by these interfaces.
如图3所示,在一网络系统中,包括发送端10和接收端20,且发送端10和接收端20之间通过通信接口连接。发送端10用于对多路业务进行复用,并将复用后的数据发送给接收端20。接收端20获取到来自发送端10的复用数据后,对该数据进行解复用,从而恢复出原来的多路业务数据。As shown in FIG. 3, a network system includes a sending end 10 and a receiving end 20, and the sending end 10 and the receiving end 20 are connected through a communication interface. The sending end 10 is used to multiplex multiple services and send the multiplexed data to the receiving end 20. After receiving the multiplexed data from the transmitting end 10, the receiving end 20 demultiplexes the data, thereby recovering the original multiplexed service data.
其中,所述多路业务复用,是指多路业务数据共用一个传输管道进行传输,在该传输管道中,每个业务会根据自身业务带宽需求占用传输管道中的资源。所述多路业务解复用,是多路业务复用的逆过程,它是指从传输管道中恢复出原来的多路业务数据。Wherein, the multiplexing of multiple services means that multiple services data share a transmission pipe for transmission, in which each service occupies resources in the transmission pipe according to its own service bandwidth requirements. The demultiplexing of multiple services is the inverse process of multiplexing multiple services, and it refers to recovering the original multiple service data from the transmission pipeline.
具体地,在发送端10侧,首先获取业务参数,所述业务参数包括:业务数量、业务 编号和每个业务所需的资源数。比如已知业务个数为m,m≥1,每个业务对应一个编号,m个业务则分别对应的业务编号为S1、S2、……、Sm,且每个业务需要一定数量的资源(可称为资源数)承载;业务编号为S1、S2、……、Sm的m个业务所对应的资源数分别为C1、C2、……、Cm。然后,发送端10根据各个业务所需的资源数确定复用方案;最后,发送端10根据复用方案对m个业务进行复用,并发送复用后的数据给接收端20。Specifically, on the side of the sending end 10, the service parameters are first obtained, and the service parameters include: the number of services, the service number, and the number of resources required for each service. For example, the number of known services is m, m≥1, and each service corresponds to a number. The corresponding service numbers of m services are S1, S2, ..., Sm, and each service requires a certain amount of resources (can be Called the number of resources) bearer; the number of resources corresponding to the m services with service numbers S1, S2, ..., Sm are C1, C2, ..., Cm, respectively. Then, the sending end 10 determines a multiplexing scheme according to the number of resources required by each service; finally, the sending end 10 multiplexes m services according to the multiplexing scheme, and sends the multiplexed data to the receiving end 20.
在接收端20侧,接收端20首先获取业务参数,然后根据该业务参数确定解复用方案,最后再根据解复用方案对发送端10发送的复用数据流进行解复用操作,恢复出m路业务。其中,接收端20采用与发送端10相同方式和过程确定解复用方案,从而保证接收端20的解复用方案与发送端10的复用方案是一致的。On the receiving end 20 side, the receiving end 20 first obtains the service parameters, and then determines the demultiplexing scheme according to the service parameters, and finally performs the demultiplexing operation on the multiplexed data stream sent by the sending end 10 according to the demultiplexing scheme, and recovers m-way business. The receiving end 20 determines the demultiplexing scheme in the same manner and process as the transmitting end 10, so as to ensure that the demultiplexing scheme of the receiving end 20 and the multiplexing scheme of the transmitting end 10 are consistent.
需要说明的是,无论对于发送端还是接收端,均需要知道传输管道中的资源是属于哪个业务的,才能够顺利的对多路业务进行复用或解复用,并且保证复用或解复用过程中,传输管道中每个资源属于哪个业务在两端设备中确定的结果是一致的,为了保证两端设备在复用或解复用过程中确定的结果一致,需要采用一定规则或方法对资源进行分配,下面各个实施例中将对预设规则或分配方法进行具体的说明。It should be noted that for both the sender and the receiver, it is necessary to know which service the resource in the transmission pipeline belongs to, so that the multiple services can be multiplexed or demultiplexed smoothly, and the multiplexing or demultiplexing can be guaranteed. In the process of use, the result of determining which service each resource belongs to in the transmission pipeline is consistent with the equipment at both ends. In order to ensure that the results determined by the equipment at both ends in the multiplexing or demultiplexing process are consistent, certain rules or methods need to be adopted To allocate resources, the preset rules or allocation methods will be specifically described in the following embodiments.
实施例一Example one
本实施例中以发送端10为例,对发送端10的复用操作进行详细说明。具体地,发送端主要的核心方法流程,如图4所示,本实施例提供一种资源分配方法,该方法的各个步骤可以由发送端10来执行,具体地,该方法包括:In this embodiment, the sending end 10 is taken as an example to describe the multiplexing operation of the sending end 10 in detail. Specifically, the main core method flow of the sending end is shown in FIG. 4, this embodiment provides a resource allocation method, and each step of the method can be executed by the sending end 10. Specifically, the method includes:
101:获取m个业务的k组资源数,每组资源数对应一个资源分配单位N,每组资源数包括每个业务对应的系数a,k≥1,N≥1且k,N均为正整数。101: Obtain the number of k groups of resources for m services, each group of resources corresponds to a resource allocation unit N, and each group of resources includes the coefficient a corresponding to each service, k≥1, N≥1 and k, N are all positive Integer.
其中,所述系数a表示一个业务包括的资源分配单位的个数,所述资源分配单位N表示一个资源分配单位包括的资源的个数。所述资源个数,或简称资源数是指传输某一业务所需的资源,比如一个以太网业务需要10Mbps带宽,若以1Mbps带宽作为资源的基本单位,那么该业务需要10个这样的资源,即资源数为10。Wherein, the coefficient a represents the number of resource allocation units included in a service, and the resource allocation unit N represents the number of resources included in one resource allocation unit. The number of resources, or the number of resources for short, refers to the resources required to transmit a certain service. For example, an Ethernet service requires 10 Mbps bandwidth. If 1 Mbps bandwidth is used as the basic unit of resources, the service requires 10 such resources. That is, the number of resources is 10.
步骤101包括:获取所述m个业务所对应的m个资源数,每个所述资源数按照第一进制表示,m≥1;将每个所述按照第一进制表示的资源数通过第二进制表示后得到所述k组资源数,所述第二进制包括二进制、八进制、十进制和十六进制等。Step 101 includes: obtaining the number of m resources corresponding to the m services, each of the resource numbers is expressed in a first base, m≥1; and each resource number expressed in the first base is passed The number of resources in the k groups is obtained after the first binary representation, and the second binary includes binary, octal, decimal, hexadecimal, and so on.
例如,发送端获取3个业务(m=3)所对应的3个资源数,所述资源数用“C”表示,所述业务用业务编号“S”表示,则业务S1、S2和S3所对应的资源数分别是C1、C2和C3。且每个资源数C由第一进制,比如十进制表示。在一示例中,业务S1、S2和S3所对应的资源数C1、C2和C3分别是,C1=10,C2=4,C3=6,资源总数为C1+C2+C3=20。For example, the sender obtains the number of 3 resources corresponding to 3 services (m=3), the number of resources is represented by "C", and the service is represented by the service number "S", then the services S1, S2, and S3 The corresponding resource numbers are C1, C2, and C3. And each resource number C is represented by the first base, such as decimal. In an example, the resource numbers C1, C2, and C3 corresponding to the services S1, S2, and S3 are respectively, C1=10, C2=4, C3=6, and the total number of resources is C1+C2+C3=20.
将每个十进制表示的C1、C2和C3分别转换成二进制数后得到k组资源数,After converting each of C1, C2, and C3 represented by decimal numbers into binary numbers, k groups of resource numbers are obtained,
C1=10=0×2 0+1×2 1+0×2 2+1×2 3,二进制表示为0101; C1=10=0×2 0 +1×2 1 +0×2 2 +1×2 3 , the binary representation is 0101;
C2=4=0×2 0+0×2 1+1×2 2+0×2 3,二进制表示为0010; C2=4=0×2 0 +0×2 1 +1×2 2 +0×2 3 , the binary representation is 0010;
C3=6=0×2 0+1×2 1+1×2 2+0×2 3,二进制表示为0110。 C3=6=0×2 0 +1×2 1 +1×2 2 +0×2 3 , the binary representation is 0110.
根据所述二进制表示的3个资源数得到4组资源数,k=4,Obtain 4 sets of resource numbers according to the 3 resource numbers in the binary representation, k=4,
其中,步骤101中获取的4组资源数分别是,第一组资源数{0,0,0},第二组资源数{2,0,2},第二组资源数{0,4,4},第二组资源数{8,0,0}。第一组资源数对应的资源分配单位N为1,第二组资源数对应的资源分配单位N为2,第三组资源数对应的资源分配单位N为4,第四组资源数对应的资源分配单位N为8。对于二进制来说,所述系数a为0或1。Among them, the four sets of resource numbers obtained in step 101 are: the first set of resources {0,0,0}, the second set of resources {2,0,2}, and the second set of resources {0,4, 4}, the number of resources in the second group {8,0,0}. The resource allocation unit N corresponding to the number of resources in the first group is 1, the resource allocation unit N corresponding to the number of resources in the second group is 2, the resource allocation unit N corresponding to the number of resources in the third group is 4, and the resource corresponding to the fourth group of resources The allocation unit N is 8. For binary, the coefficient a is 0 or 1.
由上面关系式可见,对于业务S1来说,在第2组和第4组中需要分配2个和8个资源;对于业务S2,在第3组中需要分配4个资源;对于业务S3,在第2组和第3组需要分配2和4个资源。It can be seen from the above relationship that for business S1, 2 and 8 resources need to be allocated in the second and fourth groups; for business S2, 4 resources need to be allocated in the third group; for business S3, in Groups 2 and 3 need to allocate 2 and 4 resources.
102:根据所述k组资源数在L个资源中确定所述m个业务对应的资源。102: Determine resources corresponding to the m services from the L resources according to the number of k sets of resources.
其中,L个资源是指在一条链路通道中,单位时间内传输资源的总数。且L大于等于m个业务的资源数总和,即L≥(C1+C2+C3+……+Cm)。进一步地,若L大于m个业务的资源数总和,则表示还有空余资源;进一步地,如果将这些空余资源作为一个业务所需的资源,则可以理解为L个资源等于m+1个业务的资源数总和。Among them, L resources refer to the total number of transmission resources per unit time in a link channel. And L is greater than or equal to the sum of the resource numbers of m services, that is, L≥(C1+C2+C3+...+Cm). Further, if L is greater than the sum of the number of resources of m services, it indicates that there are vacant resources; further, if these vacant resources are used as resources required by a service, it can be understood that L resources are equal to m+1 services The total number of resources.
发送端将m个业务所需的资源数配置在L个传输资源中,形成m个业务的复用方案,然后根据该复用方案对m个业务进行复用,并向接收端发送复用后的数据流。The sender configures the number of resources required by m services in L transmission resources to form a multiplexing scheme for m services, and then multiplexes the m services according to the multiplexing scheme, and sends the multiplexed service to the receiving end Data flow.
例如,在所述L个资源中,每组分配的资源数为m个业务的系数a之和与所述每组对应的资源分配单位N的乘积。L为资源数总和,本示例中,L=20,即将3个业务所需的20个资源通过4组资源数,分配在L个资源中,进一步地,在第1组中资源数为0,无资源分配;在第2组中资源数是4(4=(1+0+1)×2),对应业务S1和S3,每个业务分配2个资源;在第3组中资源数是8(8=(0+1+1)×4),对应业务S2和S3,每个业务分配4个资源;在第4组中资源数是8(8=(1+0+0)×8),对应业务S1,且需要为业务S1分配8个资源。如表1所示,For example, in the L resources, the number of resources allocated in each group is the product of the sum of the coefficient a of m services and the resource allocation unit N corresponding to each group. L is the total number of resources. In this example, L=20, that is, the 20 resources required for 3 services are allocated to L resources through 4 groups of resources. Further, the number of resources in the first group is 0. No resource allocation; the number of resources in the second group is 4 (4=(1+0+1)×2), corresponding to services S1 and S3, each service is allocated 2 resources; the number of resources in the third group is 8 (8=(0+1+1)×4), corresponding to services S2 and S3, each service is allocated 4 resources; the number of resources in the fourth group is 8 (8=(1+0+0)×8) , Corresponding to service S1, and 8 resources need to be allocated for service S1. As shown in Table 1,
表1Table 1
第一种具体的实施方式是,获取第一序列,该第一序列用于指示所述k组资源数的资源分配单位N之间的位置关系。A first specific implementation manner is to obtain a first sequence, where the first sequence is used to indicate the position relationship between the resource allocation units N of the number of resources of the k groups.
具体地,所述第一序列包括k个第一单元,不同的第一单元对应不同的组资源数。例如k组资源数为k个第一单元,其中,第1个第一单元对应第1组资源数,第2个第一单元对应第2组资源数,以此类推,第k个第一单元对应第k组资源数,则通过第一序列可以指示第1组至第k组资源数之间的位置关系。进一步地,第一序列指示k个第一单元之间的顺序可以是任意的。Specifically, the first sequence includes k first units, and different first units correspond to different numbers of group resources. For example, the number of k groups of resources is k first units, where the first first unit corresponds to the number of resources in the first group, the second first unit corresponds to the number of resources in the second group, and so on, the kth first unit Corresponding to the number of resources in the k-th group, the first sequence can indicate the positional relationship between the number of resources in the first group to the k-th group. Further, the order between the k first units indicated by the first sequence may be arbitrary.
在一示例中,将k个第一单元按照1至k的顺序在L个资源中分配m个业务所对应的资源。例如图5所示,k=4,第一序列指示4个第一单元的顺序是1、2、3、4。由于第1组无资源,所以图5未示出,从第2组开始,按照业务编号从S1至S3的顺序,依 次排列出20个资源的业务分配情况,发送端将第1~2,13~20号时隙资源分配给业务S1,将第3~4,9~12号时隙资源分配给业务S3,将第5~8号时隙资源分配给业务S2。最终得到从时隙1至时隙20所对应的业务编号依次分别是:S1、S1、S3、S3、S2、S2、S2、S2、S3、S3、S3、S3、S1、S1、S1、S1、S1、S1、S1、S1。In an example, the k first units are allocated resources corresponding to m services among the L resources in the order of 1 to k. For example, as shown in FIG. 5, k=4, the first sequence indicates that the order of the four first units is 1, 2, 3, and 4. Since the first group has no resources, it is not shown in Figure 5. Starting from the second group, according to the order of the service numbers from S1 to S3, the service allocation of 20 resources are arranged in sequence, and the sending end will assign the first to second, thirteenth Time slot resources No. 20 are allocated to service S1, No. 3 to No. 4, No. 9 to No. 12 time slot resources are allocated to Service S3, and No. 5 to No. 8 time slot resources are allocated to Service S2. Finally, the service numbers corresponding to time slot 1 to time slot 20 are as follows: S1, S1, S3, S3, S2, S2, S2, S2, S3, S3, S3, S3, S1, S1, S1, S1 , S1, S1, S1, S1.
概况地,对于m个业务的复用方案,m个业务的所对应的业务编号为S1、S2、……、Sm,对应的资源数分别为C1、C2、……、Cm,Ci为C1至Cm中的任意一个,在Ci采用二进制表示时,可以写成:Ci=(a i,1,a i,2,…,a i,k)=a i,1×2 0+a i,2×2 1+…+a i,k×2 k-1, Generally speaking, for the multiplexing scheme of m services, the corresponding service numbers of m services are S1, S2, ..., Sm, and the corresponding resource numbers are C1, C2, ..., Cm, and Ci is C1 to Any one of Cm, when Ci is expressed in binary, can be written as: Ci=(a i,1 ,a i,2 ,...,a i,k )=a i,1 ×2 0 +a i,2 × 2 1 +…+a i,k ×2 k-1 ,
其中k为资源组数,a i,j为系数,且在二进制中,a i,j∈{0,1},系数a i,j所对应的基底为2 j-1,i=1,2,……,m,j=1、2、……、k。 Where k is the number of resource groups, a i,j are coefficients, and in binary, a i,j ∈{0,1}, the base corresponding to the coefficients a i,j is 2 j-1 , i=1, 2 ,..., m, j = 1, 2,..., k.
利用资源数Ci的二进制表示,可根据基底分k组完成资源分配,每组所分配的资源单位是上一组的2倍。第1组的资源分配单位N为1,第2组的资源分配单位N为2,第3组的资源分配单位N为4,如此分配下去,第j组的资源分配单位N为2 j-1,最后第k组的资源分配单位N为2 k-1个资源。然后发送可根据系数a确定在第i组对业务Si进行资源分配。比如,当资源数Ci的系数a i,j为“1”时,表示需要在第j组对业务Si分配资源;当所述系数a i,j为“0”时,表示不需要在第j次对业务Si分配资源。 Using the binary representation of the number of resources Ci, resource allocation can be completed in k groups according to the base, and the resource unit allocated for each group is twice that of the previous group. The resource allocation unit N of the first group is 1, the resource allocation unit N of the second group is 2, and the resource allocation unit N of the third group is 4, so the allocation is continued, the resource allocation unit N of the jth group is 2 j-1 , And finally the resource allocation unit N of the k-th group is 2 k-1 resources. Then the transmission can determine the resource allocation for the service Si in the i-th group according to the coefficient a. For example, when the coefficient a i,j of the number of resources Ci is "1", it means that resources need to be allocated to the service Si in the jth group; when the coefficient a i,j is "0", it means that it does not need to be in the jth group. Allocate resources to the business Si.
此外,所述方法还包括:In addition, the method also includes:
103:根据所述m个业务对应的资源生成m个业务的复用方案,并根据所述复用方案对当前资源进行复用。103: Generate a multiplexing plan for m services according to the resources corresponding to the m services, and multiplex the current resources according to the multiplexing plan.
发送端根据所述S1、S2和S3的3个业务所对应的20个时隙资源的对应关系,对当前的20个时隙资源进行复用,以及将复用后的数据发送给接收端。具体地,发送端复用和发送复用数据的过程可以通过多种方式实现,本实施例对此不予限制。The sending end multiplexes the current 20 time slot resources according to the corresponding relationship of the 20 time slot resources corresponding to the 3 services of S1, S2, and S3, and sends the multiplexed data to the receiving end. Specifically, the process of multiplexing and sending the multiplexed data at the transmitting end can be implemented in a variety of ways, which is not limited in this embodiment.
本实施例提供的方法,通过将m个业务的资源数分成k组资源数,并按照k组资源数中每组资源数所对应的资源分配单位进行资源分配,由于该资源分配单位指示了一组资源数中分配资源的最小单位,所以实现了对较小资源粒度的资源分配,提高了资源分配的灵活性和拓展性。The method provided in this embodiment divides the number of resources of m services into k groups of resource numbers, and allocates resources according to the resource allocation unit corresponding to each group of resource numbers in the k groups of resource numbers. Because the resource allocation unit indicates a resource allocation unit. The smallest unit of resource allocation in the number of group resources, so resource allocation with smaller resource granularity is realized, and the flexibility and scalability of resource allocation are improved.
可选的,在上述步骤102中,在L个资源中确定所述m个业务对应的资源时,如果第1组至第k组中的任意一组分配的资源包含两个或两个以上业务,则对包含两个或两个以上业务的组可以按照交织的顺序分配每个业务对应的资源,又简称“交织法”。Optionally, in the foregoing step 102, when the resources corresponding to the m services are determined among the L resources, if the allocated resources of any group from the first to the kth group include two or more services , For a group containing two or more services, the resources corresponding to each service can be allocated in the order of interleaving, which is also referred to as "interleaving".
第二种具体的实施方式是,所述第一序列指示4个第一单元的组顺序是1、2、3、4。并且,在上述表1中,第2组资源数对应业务S1和S3,且资源分配单位N为2,则在一次分配中可将业务S1和业务S3交织分配,即将S1和S3作为一个整体来分配业务。参见图6,在第2组的4个资源中,将第一资源(时隙1)和第三资源(时隙3)分配给业务S1,将第二资源(时隙2)和第四资源(时隙4)分配给业务S2。同理地,在第3组资源分配中,需要分配的业务有S2和S3,则按照S2和S3交织轮询的顺序分配第3组的8个资源。因此,得到的复用方案如图6所示,发送端将第1,3,13~20号时隙资源分配给业务S1,将第5,7,9,11号时隙资源分配给业务S2,将第2,4,6,8,10,12号时隙资源分配给业务S3。发送端该根据复用方案,可对3路业务进行复用。In a second specific implementation manner, the first sequence indicates that the group order of the four first units is 1, 2, 3, and 4. In addition, in the above table 1, the number of resources in the second group corresponds to services S1 and S3, and the resource allocation unit N is 2, then service S1 and service S3 can be interleaved and allocated in one allocation, that is, S1 and S3 are taken as a whole Assign business. Referring to Figure 6, among the 4 resources in the second group, the first resource (slot 1) and the third resource (slot 3) are allocated to service S1, and the second resource (slot 2) and the fourth resource are allocated to service S1. (Time slot 4) is allocated to service S2. Similarly, in the resource allocation of the third group, the services that need to be allocated are S2 and S3, and the 8 resources of the third group are allocated in the order of S2 and S3 interleaving and polling. Therefore, the obtained multiplexing scheme is shown in Figure 6. The sender allocates the 1, 3, 13-20 time slot resources to the service S1, and the 5, 7, 9 and 11th time slot resources to the service S2. , Allocate the resources of the second, fourth, sixth, eighth, tenth, and twelfth time slots to service S3. According to the multiplexing scheme, the sending end can multiplex 3 services.
其中,可选的,由所述第2组至第4组的组号所构成的序列可称为第一序列,第一序列指示k组资源数之间的位置关系,每组资源数可以作为一个第一单元,即k组资源数对应k个第一单元。Wherein, optionally, the sequence formed by the group numbers of the second to fourth groups may be referred to as the first sequence, and the first sequence indicates the positional relationship between the number of k groups of resources, and the number of resources in each group can be regarded as One first unit, that is, the number of k groups of resources corresponds to k first units.
第三种具体的实施方式是,所述第一序列包括z个第二单元,不同的第二单元对应不同的组资源数,并且至少一个第二单元对应至少两个组资源数,z<k,z为正整数且z≥2。所述第一序列指示z个第二单元的顺序是1、2、3、……、z。所述k组资源数可以分为至少两个第二单元,每个第二单元又可以进一步地拆分成两组或两组以上资源数。A third specific implementation manner is that the first sequence includes z second units, different second units correspond to different group resource numbers, and at least one second unit corresponds to at least two group resource numbers, z<k , Z is a positive integer and z≥2. The first sequence indicates that the order of the z second units is 1, 2, 3,... Z. The k groups of resource numbers can be divided into at least two second units, and each second unit can be further divided into two or more resource numbers.
例如k=4时,包含4组资源数,z=2,第一序列包括两个第二单元,且每个第二单元又对应k组中的两组资源数。比如,一个第二单元对应k组中的第1组和第2组资源数,另一个第二单元对应k组中的第3组和第4组资源数;然后对每个第二单元中的两个组进行位置排序。For example, when k=4, there are 4 sets of resource numbers, z=2, the first sequence includes two second units, and each second unit corresponds to two sets of resource numbers in k groups. For example, one second unit corresponds to the number of resources in the first and second groups in the k groups, and another second unit corresponds to the number of resources in the third and fourth groups in the k groups; then, for each second unit The two groups are sorted by position.
或者,在一组资源数所对应的系数a不为二进制的比特值“1”或“0”时,可以将该系数a进行分段,比如将系数a按照二进制规则划分成两段或两段以上,每段中包含的字符个数(或比特数)相同,相邻两段之间称为段间,一个段中的两个或两个以上字符称为段内,本方法称为“分段法”。Or, when the coefficient a corresponding to a set of resource numbers is not the binary bit value "1" or "0", the coefficient a can be segmented, for example, the coefficient a can be divided into two or two segments according to the binary rule Above, the number of characters (or number of bits) contained in each paragraph is the same. Between two adjacent paragraphs is called inter-paragraph. Two or more characters in a paragraph are called intra-paragraph. This method is called "division". Paragraph method".
具体地,每个业务所需资源数通过二进制表示时,系数a决定业务是否需要分配资源,基底确定每次分配的资源数。例如对于任一业务Si,所需的资源数Ci可采用二进制表示为:Specifically, when the number of resources required by each service is expressed in binary, the coefficient a determines whether the service needs to allocate resources, and the basis determines the number of resources allocated each time. For example, for any business Si, the required number of resources Ci can be expressed in binary as:
Ci=(a i,1,a i,2,…,a i,k)=a i,1×2 0+a i,2×2 1+…+a i,k×2 k-1, Ci=(a i,1 ,a i,2 ,…,a i,k )=a i,1 ×2 0 +a i,2 ×2 1 +…+a i,k ×2 k-1 ,
其中,k为资源组数,a i,j为系数,a i,j∈{0,1},系数a i,j所对应的基底为2 j-1,i=1,2,……,m,j=1、2、……、k。 Among them, k is the number of resource groups, a i,j are coefficients, a i,j ∈{0,1}, the basis corresponding to the coefficients a i,j is 2 j-1 , i=1, 2, ..., m, j=1, 2, ..., k.
假设k=p×d,对资源数Ci的二进制序列可以划分成p段,每段包含d个资源分配单位,则资源数Ci可表示为:Assuming k=p×d, the binary sequence of the resource number Ci can be divided into p segments, and each segment contains d resource allocation units, then the resource number Ci can be expressed as:
Ci=((a i,1,a i,2,…,a i,d),(a i,d+1,a i,d+2,…,a i,2d),......(a i,(p-1)d+1,a i,(p-1)d+2,…,a i,pd))=(a i,1×2 0+…+a i,d×2 d-1)+(a i,d+1×2 d+…+a i,2d×2 2d-1)+(a i,(p-1)d+1×2 (p-1)d+…+a i,pd×2 pd-1)=(a i,1×2 0+…+a i,d×2 d-1)+(a i,d+1+…+a i,2d×2 d-1)×2 d+…+(a i,(p-1)d+1+…+a i,pd×2 d-1)×2 (p-1)d。 Ci=((a i,1 ,a i,2 ,…,a i,d ),(a i,d+1 ,a i,d+2 ,…,a i,2d ),... .(a i,(p-1)d+1 ,a i,(p-1)d+2 ,…,a i,pd ))=(a i,1 ×2 0 +…+a i,d ×2 d-1 )+(a i,d+1 ×2 d +…+a i,2d ×2 2d-1 )+(a i,(p-1)d+1 ×2 (p-1) d +…+a i,pd ×2 pd-1 )=(a i,1 ×2 0 +…+a i,d ×2 d-1 )+(a i,d+1 +…+a i, 2d ×2 d-1 )×2 d +…+(a i,(p-1)d+1 +…+a i,pd ×2 d-1 )×2 (p-1)d .
因此业务Si可按照p段进行资源分配,每段内可按照顺序法、或轮询交织法、或顺序法和轮询交织法来进行资源分配。每个段内的d个资源分配单位也可按照顺序法、或轮询交织法、或顺序法和轮询交织法来进行资源分配。Therefore, the service Si can allocate resources according to the p segments, and in each segment, the resources can be allocated according to the sequential method, or the polling interleaving method, or the sequential method and the polling interleaving method. The d resource allocation units in each segment can also be allocated according to the sequential method, or the polling interleaving method, or the sequential method and the polling interleaving method.
下面以上述实施例中的业务个数m=3为例进行说明,其中,3个业务的业务编号分别为S1、S2和S3,对应的资源数分别为C1、C2和C3,且C1=10,C2=4,C3=6,总资源数为20。将每个资源数所对应的二进制进行分段,分两段,每段包含2个比特位,即p=2,d=2。The following takes the number of services m=3 in the above embodiment as an example for description. Among them, the service numbers of the three services are S1, S2, and S3, and the corresponding resource numbers are C1, C2, and C3, and C1=10. , C2=4, C3=6, and the total number of resources is 20. The binary corresponding to each resource number is segmented into two segments, each segment contains 2 bits, that is, p=2, d=2.
C1=10=((0,1),(0,1))=(0×1+1×2 1)+(0×1+1×2 1)×2 2; C1=10=((0,1),(0,1))=(0×1+1×2 1 )+(0×1+1×2 1 )×2 2 ;
C2=4=((0,0),(1,0))=(0×1+0×2 1)+(1×1+0×2 1)×2 2; C2=4=((0,0),(1,0))=(0×1+0×2 1 )+(1×1+0×2 1 )×2 2 ;
C3=6=((0,1),(1,0))=(0×1+1×2 1)+(1×1+0×2 1)×2 2。 C3=6=((0,1),(1,0))=(0×1+1×2 1 )+(1×1+0×2 1 )×2 2 .
分段之后,3个业务包括两组资源数,即两个第二单元,z=2,After segmentation, the 3 services include two sets of resource numbers, that is, two second units, z=2,
第1个第二单元对应的资源数为4,资源分配单位N为1,系数为4(4=2+0+2);第2个第二单元对应的资源数为16,对应的资源分配单位N为4,系数为4(4=2+1+1)。The number of resources corresponding to the first second unit is 4, the resource allocation unit N is 1, and the coefficient is 4 (4=2+0+2); the number of resources corresponding to the second second unit is 16, and the corresponding resource allocation The unit N is 4, and the coefficient is 4 (4=2+1+1).
如图7a所示,为了避免业务的第一个资源为0,对应的系数a为“0”,则先将业务S1、S2和S3每个二进制表示的段内字符的“0”和“1”的顺序调换,即段内按照从高到低的顺序依次是:C1=((1,0),(1,0)),C2=((0,0),(0,1)),C3=((1,0),(0,1))。然后得到第1组对应的3个业务的系数为{10,00,10},第1组对应的3个业务的系数为{10,01,01}。按照组的顺序第1组分配4个资源,第2组分配16个资源。As shown in Figure 7a, in order to avoid that the first resource of the service is 0 and the corresponding coefficient a is “0”, the characters “0” and “1” in each segment of the binary representation of the services S1, S2, and S3 "The order of exchange, that is, the order from high to low within the paragraph is: C1=((1,0),(1,0)), C2=((0,0),(0,1)), C3=((1,0), (0,1)). Then, the coefficients of the three services corresponding to the first group are {10,00,10}, and the coefficients of the three services corresponding to the first group are {10,01,01}. According to the order of the groups, the first group is allocated 4 resources, and the second group is allocated 16 resources.
对于每个组的资源,可以按照顺序法或者交织法进行业务分配。具体地,For the resources of each group, services can be allocated according to the sequential method or the interleaving method. specifically,
一种组间的分配方式是,如图7b所示,对于第1组资源数的4个资源,对应业务S1和S3,组内的资源分配单位是2,按照顺序法对应的4个资源分别是S1、S1、S3和S3。对于第2组的16个资源,按照交织法,分成4个小组,每个小组对应的4个资源分别是S2、S3、S1和S1,则第2组的16个资源按照每4个资源的小组进行资源分配,重复4次。按照该分配方法建立的从时隙资源1至20所对应的业务复用方案为:S1、S1、S3、S3、S2、S3、S1、S1、S2、S3、S1、S1、S2、S3、S1、S1、S2、S3、S1、S1。One way to allocate between groups is, as shown in Figure 7b, for the 4 resources of the first group of resources, corresponding to services S1 and S3, the resource allocation unit in the group is 2, and the 4 resources corresponding to the sequence method are respectively These are S1, S1, S3, and S3. For the 16 resources of the second group, divided into 4 groups according to the interleaving method. The 4 resources corresponding to each group are S2, S3, S1, and S1. The team allocates resources and repeats 4 times. The service multiplexing schemes corresponding to time slot resources 1 to 20 established according to this allocation method are: S1, S1, S3, S3, S2, S3, S1, S1, S2, S3, S1, S1, S2, S3, S1, S1, S2, S3, S1, S1.
另一种组间的分配方式是,如图7c所示,段内和段间均按照轮询交织法进行分配。将第1组资源数的4个资源,按照业务S1和S3交织的方式分配得到4个资源分别是S1、S3、S1和S3。然后再与第2组的16个资源组成复用方案,第2组的分配方式也可以按照S2、S3、S1、S1交织的顺序进行分配。Another way to allocate between groups is, as shown in Fig. 7c, both within and between segments are allocated according to the polling interleaving method. The four resources of the number of resources in the first group are allocated according to the way of interleaving services S1 and S3 to obtain four resources, namely S1, S3, S1, and S3. Then it forms a multiplexing scheme with the 16 resources of the second group, and the allocation method of the second group can also be allocated in the order of S2, S3, S1, and S1 interleaving.
此外,又一种组间的分配方式还可以是,对第1组和第2组的资源数均采用顺序方法进行分配,得到的资源复用方案如图7d所示,第1组资源数按照S1、S1、S3、S3的顺序分配资源,第2组资源数按照S2、S3、S1、S1的顺序分配资源,且第2组中资源分配单位为4。In addition, another method of allocation between groups can also be that the number of resources in the first and second groups are allocated in a sequential manner, and the resulting resource reuse scheme is shown in Figure 7d. The number of resources in the first group is as follows Resources are allocated in the order of S1, S1, S3, and S3, the number of resources in the second group is allocated in the order of S2, S3, S1, and S1, and the resource allocation unit in the second group is 4.
需要说明的是,本实施例对上述组间的各种具体的分配方式不进行限制。并且对于分段或分组过程中,可以对每个大组资源数进行一次或一次以上小组资源数划分,直到划分后每个小组的资源数是以二进制的资源分配单元时为止,本实施例对分段或分组的次数不进行限定。It should be noted that this embodiment does not limit the various specific allocation methods among the foregoing groups. And in the process of segmentation or grouping, each large group of resources can be divided once or more than once, until the number of resources of each group is a binary resource allocation unit after division. The number of segmentation or grouping is not limited.
本实施例提出了一种分段的资源分配方法,在分配业务时将资源数的比特位进行分段,通过段内和段间实现业务的资源分配,并且通过段内的再分段,形成递归的资源分配方法。从而能够有效地降低业务资源分配的抖动。This embodiment proposes a segmented resource allocation method. When allocating services, the bits of the number of resources are segmented, and the resource allocation of the services is realized through the intra-segment and the inter-segment, and through the sub-segmentation within the segment, the result is Recursive resource allocation method. This can effectively reduce the jitter of service resource allocation.
另外,当段内和段间都采用轮询交织的方式进行资源时,各个业务占用的资源相对更均匀,抖动更低。In addition, when the polling and interleaving method is used for resources within and between segments, the resources occupied by each service are relatively more uniform and the jitter is lower.
进一步地,可以理解地,本实施例是将资源数比特序列分段,业务的资源分配通过段内和段间的资源分配实现。如果划分的段内长度较大,则还可对段内的比特序列再进一步划分,如此形成递归的分段法,可称之为递归的资源分配方法。进一步地,对更进一步地划分,以及划分后对资源的分配情况与前述图7a至图7d所示的分配方法相同,不再赘述。Further, it is understandable that this embodiment divides the resource number bit sequence into segments, and the resource allocation of the service is realized by resource allocation within and between segments. If the length of the divided segment is large, the bit sequence in the segment can be further divided to form a recursive segmentation method, which can be called a recursive resource allocation method. Further, the further division and the allocation of resources after the division are the same as the allocation methods shown in FIG. 7a to FIG. 7d, and will not be repeated here.
实施例二Example two
在本实施例中,当m=1时,即只有一个业务S1,S1所需的资源数为C1,例如C1=10,本实施例对该业务的资源分配过程包括:In this embodiment, when m=1, that is, there is only one service S1, and the number of resources required by S1 is C1, for example, C1=10. The resource allocation process for this service in this embodiment includes:
101:获取业务S1的k组资源数。具体地,将十进制的资源数C1转换成二进制后得 到4组资源数,k=4。101: Acquire the number of k groups of resources of the service S1. Specifically, after converting the decimal resource number C1 into binary, 4 sets of resource numbers are obtained, k=4.
C1=10=0×2 0+1×2 1+0×2 2+1×2 3,二进制表示为0101。 C1=10=0×2 0 +1×2 1 +0×2 2 +1×2 3 , and the binary representation is 0101.
其中,第1组和第3组无资源分配,第2组的资源数为2,对应的系数a为1,资源分配单位N为2;第4组的资源数为8,对应的系数a为1,资源分配单位N为8。Among them, the first and third groups have no resource allocation, the number of resources in the second group is 2, the corresponding coefficient a is 1, and the resource allocation unit N is 2; the number of resources in the fourth group is 8, and the corresponding coefficient a is 1. The resource allocation unit N is 8.
102:根据第2组的资源数和第4组的资源数在L个资源中确定业务S1所对应的资源。102: Determine the resource corresponding to the service S1 among the L resources according to the number of resources in the second group and the number of resources in the fourth group.
如图8所示,L=10,在10个时隙资源中,时隙1和2分配业务S1的第2组的两个资源,时隙3至10分配业务S1的第4组的8个资源,从而完成对C1=10个资源的业务分配。As shown in Figure 8, L=10, among the 10 time slot resources, time slots 1 and 2 are allocated two resources of the second group of service S1, and time slots 3 to 10 are allocated 8 resources of the fourth group of service S1. Resources, thereby completing the business allocation of C1=10 resources.
实施例三Example three
上述实施例均按照二进制(第二进制)的规则对每个十进制(第一进制)的资源数进行转换和资源分配。本申请中资源分配方法还可以拓展到任意进制,比如八进制、十进制、十六进制等。本实施例以所述第二进制为十进制举例。The foregoing embodiments all perform conversion and resource allocation for each decimal (first system) resource number according to the binary (first binary) rule. The resource allocation method in this application can also be extended to any system, such as octal, decimal, hexadecimal, etc. In this embodiment, the decimal system is used as an example in the binary system.
例如,m=3,业务S1、S2和S3对应的资源数分别是C1=10,C2=4,C3=6,通过十进制表示分别是:For example, m=3, the number of resources corresponding to services S1, S2, and S3 are C1=10, C2=4, and C3=6, respectively, which are expressed in decimal:
C1=10=0×10 0+1×10 1,十进制表示为0,1; C1=10=0×10 0 +1×10 1 , expressed as 0,1 in decimal system;
C2=4=4×10 0+0×10 1,十进制表示为4,0; C2=4=4×10 0 +0×10 1 , expressed as 4,0 in decimal system;
C3=6=6×10 0+0×10 1,十进制表示为6,0。 C3=6=6×10 0 +0×10 1 , expressed as 6,0 in decimal notation.
进而得到3个业务对应的两组资源数,k=2,Then get the two sets of resource numbers corresponding to 3 services, k=2,
第1组资源数为10,资源分配单位N为1,系数为10(10=0+4+6),第2组资源数为10,资源分配单位N为10,系数为1(1=1+0+0)。其中在第1组资源数中,包含业务S2和S3,且业务S2需要分配的资源数是4,S3需要分配的资源数是6。在第2组资源数中,仅包含业务S1,且S2需要分配的资源数是10。The number of resources in the first group is 10, the resource allocation unit N is 1, and the coefficient is 10 (10=0+4+6), the number of resources in the second group is 10, the resource allocation unit N is 10, and the coefficient is 1 (1=1 +0+0). Among them, the number of resources in the first group includes services S2 and S3, and the number of resources that need to be allocated for service S2 is 4, and the number of resources that needs to be allocated for S3 is 6. In the number of resources in the second group, only service S1 is included, and the number of resources to be allocated for S2 is 10.
进一步地,可以将第1组中的两个业务所需的资源数再分组,即将业务S2对应的系数a=4,和业务S3对应的系数a=6再分小组分配。例如,将系数a的4和6转换成二进制表示,Further, the number of resources required by the two services in the first group can be regrouped, that is, the coefficient a=4 corresponding to service S2 and the coefficient a=6 corresponding to service S3 are divided into groups and allocated. For example, to convert 4 and 6 of the coefficient a into binary representation,
4=0×2 0+0×2 1+1×2 2,二进制表示为0,0,1; 4=0×2 0 +0×2 1 +1×2 2 , the binary representation is 0,0,1;
6=0×2 0+1×2 1+1×2 2,二进制表示为0,1,1。 6=0×2 0 +1×2 1 +1×2 2 , the binary representation is 0,1,1.
再次分配的系数4和6可以划分为3个小组,如图9a所示,第1小组的资源数为0,第2小组的资源数为2,第3小组的资源数为8。在第2小组中仅包含业务S3,该业务S3所对应的资源分配单位为2;在第3小组中包含业务S2和S3,每个业务所对应的资源分配单位为4;存在两种分配方式。一种是按照业务编号S2、S3的顺序分配,对应的资源分配单位为S2、S2、S3、S3。另一种是按照业务编号S2、S3交织分配,对应的资源分配单位为S2、S3、S2、S3。The redistribution coefficients 4 and 6 can be divided into 3 groups. As shown in Figure 9a, the number of resources in the first group is 0, the number of resources in the second group is 2, and the number of resources in the third group is 8. In the second group, only business S3 is included, and the resource allocation unit corresponding to this business S3 is 2. In the third group, business S2 and S3 are included, and the resource allocation unit corresponding to each business is 4; there are two allocation methods . One is to allocate in the order of service numbers S2 and S3, and the corresponding resource allocation units are S2, S2, S3, and S3. The other is interleaved allocation according to service numbers S2 and S3, and the corresponding resource allocation units are S2, S3, S2, and S3.
如图9b所示,将第1组的资源数10按照第2小组和第3小组的分配方式,得到业务S1、S2和S3的复用方案。最后确定3个业务所对应的资源分配方案为:S3、S3、S2、 S3、S2、S3、S2、S3、S2、S3、S1、S1、S1、S1、S1、S1、S1、S1、S1、S1。As shown in Fig. 9b, the number of resources of the first group is 10 according to the allocation method of the second group and the third group to obtain the multiplexing scheme of the services S1, S2, and S3. Finally, determine the resource allocation plan corresponding to the three services: S3, S3, S2, S3, S2, S3, S2, S3, S2, S3, S1, S1, S1, S1, S1, S1, S1, S1, S1 , S1.
本实施例中,对每组资源数中的系数a大于等于2时,可进一步地按照二进制划分更小的组,从而分配更小的资源分配单位,达到每个小组内的业务交叉分配,从而提高业务分配的灵活性,同时还能够有效地降低业务资源分配的抖动。In this embodiment, when the coefficient a in the number of resources in each group is greater than or equal to 2, the smaller groups can be further divided into binary groups, so as to allocate smaller resource allocation units to achieve cross-distribution of services within each group, thereby Improve the flexibility of business allocation, and at the same time can effectively reduce the jitter of business resource allocation.
概括地,本实施例提出了一种以任意机制规则的资源分配方法,对于任意业务Si,其所对应的资源数为Ci,且Ci可以表示为:In summary, this embodiment proposes a resource allocation method based on arbitrary mechanism rules. For any service Si, the number of resources corresponding to it is Ci, and Ci can be expressed as:
Ci=(a i,1,a i,2,…,a i,k)=a i,1×α 0+a i,2×α 1+…+a i,n×α k-1, Ci=(a i,1 ,a i,2 ,…,a i,k )=a i,1 ×α 0 +a i,2 ×α 1 +…+a i,n ×α k-1 ,
其中k为资源组数,a i,j为系数,a i,j∈{0,1},系数a i,j所对应的基底为α j-1,i=1,2,……,m,j=1、2、……、k。对于业务Si可分成k组完成资源分配,每组的资源数为a i,j×α j-1,其中,系数a i,j可以一个业务包括的资源分配单位的个数,基底α j-1为资源分配单位N。例如业务资源数Ci=45,如果采用十六进制,则可表示为:Ci=45=0x2D=13+2×16。 Where k is the number of resource groups, a i, j are coefficients, a i, j ∈ {0,1}, the base corresponding to the coefficients a i, j is α j-1 , i=1, 2, ..., m , J = 1, 2, ..., k. For business Si, it can be divided into k groups to complete resource allocation. The number of resources in each group is a i,j ×α j-1 , where the coefficient a i,j can be the number of resource allocation units included in a business, and the base α j- 1 is the resource allocation unit N. For example, the number of service resources Ci=45, if hexadecimal notation is used, it can be expressed as: Ci=45=0x2D=13+2×16.
该业务Si对应的资源数45,可分成2组完成资源分配,第1组的资源数为13,第2组的资源数为32,该第2组的32个资源可以进一步地分成两个小组分配,比如分成第1小组和第2小组,每个小组对应的资源分配单位为16。The number of resources corresponding to the business Si is 45, which can be divided into 2 groups to complete the resource allocation. The number of resources in the first group is 13, and the number of resources in the second group is 32. The 32 resources in the second group can be further divided into two groups Allocation, such as dividing into the 1st group and the 2nd group, the resource allocation unit corresponding to each group is 16.
本实施例将基于二进制资源分配方法扩展到任意进制,从而实现多路业务的资源分配,用于复用或解复用过程,以增加资源分配的灵活性,并且降低业务分配的抖动性。This embodiment extends the binary-based resource allocation method to any hexadecimal system, thereby realizing resource allocation of multiple services for multiplexing or demultiplexing processes, so as to increase the flexibility of resource allocation and reduce the jitter of service allocation.
实施例四Example four
本实施例是针对上述实施例一中的步骤102的各种不同的实现方式,具体地,上述步骤102包括:获取第一序列,所述第一序列用于指示k组资源数的资源分配单位N之间的位置关系;根据所述k组资源数和所述第一序列,在L个资源中确定所述m个业务对应的资源。This embodiment is directed to various different implementations of step 102 in the above embodiment 1. Specifically, the above step 102 includes: acquiring a first sequence, the first sequence being used to indicate the resource allocation unit of the number of k groups of resources The positional relationship between N; according to the number of k sets of resources and the first sequence, the resources corresponding to the m services are determined among the L resources.
其中,对于第i组资源数对应的资源分配单位N为2 i-1,第i+1组资源数对应的资源分配单位N为2 i+1-1,i为1至k中的任一值,其中,所述2 i-1个资源中包括第i组的第一资源,第2 i+1-1个资源中包括第i+1组的第一资源和第i+1组的第二资源;所述第一序列用于指示所述第i组的第一资源在L个资源中位于所述第i+1组的第一资源和所述第i+1组的第二资源之间。 Among them, the resource allocation unit N corresponding to the number of resources in the i group is 2 i-1 , the resource allocation unit N corresponding to the number of resources in the i+1 group is 2 i+1-1 , and i is any one of 1 to k Value, wherein the 2i-1 resources include the first resource of the i-th group, and the 2i+1-1th resources include the first resource of the i+1th group and the first resource of the i+1th group. Two resources; the first sequence is used to indicate that the first resource of the i-th group is located in the L resources among the first resource of the i+1th group and the second resource of the i+1th group between.
例如,i=2,第2组所对应的资源分配单位为2 2-1=2,第2组中包括第一资源和第二资源;第3组所对应的资源分配单位为2 3-1=4,第3组中包括第一、第二、第三和第四资源;则第一序列用于指示第2组的第一资源位于第3组的第一资源和第3组的第二资源之间;还可以指示第2组的第二资源位于第3组的第三资源和第3组的第四资源之间。从而实现不同组的资源分配单位之间的资源交织。 For example, i=2, the resource allocation unit corresponding to the second group is 2 2-1 = 2, the second group includes the first resource and the second resource; the resource allocation unit corresponding to the third group is 2 3-1 =4, the third group includes the first, second, third and fourth resources; then the first sequence is used to indicate that the first resource of the second group is located in the first resource of the third group and the second resource of the third group It can also indicate that the second resource of the second group is located between the third resource of the third group and the fourth resource of the third group. In this way, resource interleaving between resource allocation units of different groups is realized.
进一步地,在第3组的一个资源分配单位中包括第3组的第一资源、第二资源、第三资源和第四资源,如果第3组的四个资源对应第一业务S1和第二业务S2,则第一序列指示将第3组的第一资源和第3组的第二资源分配给第一业务S1;将第3组的第三资源和第3组的第四资源分配给第二业务S2,即为S1、S1、S2、S2。或者,第一序列指示将第3组的第一资源和第3组的第三资源分配给第一业务S1,将第3组的第二资源和第3组的第四资源分配给第二业务S2,即为S1、S2、S1、S2。Further, one resource allocation unit of the third group includes the first resource, the second resource, the third resource, and the fourth resource of the third group. If the four resources of the third group correspond to the first service S1 and the second service Service S2, the first sequence indicates that the first resource of the third group and the second resource of the third group are allocated to the first service S1; the third resource of the third group and the fourth resource of the third group are allocated to the first service S1; The second service S2 is S1, S1, S2, and S2. Or, the first sequence indicates that the first resource of the third group and the third resource of the third group are allocated to the first service S1, and the second resource of the third group and the fourth resource of the third group are allocated to the second service S2 is S1, S2, S1, S2.
本实施例根据资源组数k得到第一序列,该第一序列包含p个第三单元,一个组资源数在所述第一序列中对应N个不同的第三单元,p为正整数且p≥2,N为资源分配单元。In this embodiment, a first sequence is obtained according to the number of resource groups k. The first sequence includes p third units. A group resource number corresponds to N different third units in the first sequence, and p is a positive integer and p ≥2, N is the resource allocation unit.
可选的,在二进制规则中,p=2 k-1个第三单元,每个第三单元对应一个组号i,i为1至k中的任一个,第一序列用于指示每个所述单元所对应的组号i,第i组资源数在所述第一序列中对应2 i-1个第三单元。例如,i=4,第4组资源数对应资源分配单位N(N=8)个第三单元,即包含8个4。 Optionally, in the binary rule, p=2 k -1 third units, each third unit corresponds to a group number i, i is any one of 1 to k, and the first sequence is used to indicate each The group number i corresponding to the unit, and the number of resources in the i-th group corresponds to 2 i-1 third units in the first sequence. For example, i=4, the number of resources in the fourth group corresponds to N (N=8) third units of resource allocation units, that is, 8 4s are included.
概括地,对于二进制规则,所述2 k-1个第三单元的组号包括2 k-1-i个k-i,其中i=0,1,2,......,k-1。例如k=4时,第一序列由15个单元组成,每个第三单元中对应1至4中的一个组号,且这15个第三单元中包括2 4-1=8个组号4(i=0),2 4-1-1=4个组号3(i=1),2 4-1-2=2个组号2(i=2)和2 4-1-3=1个组号1(i=3)。然后发送端根据第一序列中每个第三单元的组号,以及每个组号与业务之间的对应关系在L个资源中分配m个业务的资源组号。 In summary, for the binary rule, the group numbers of the 2 k -1 third units include 2 k-1-i ki, where i=0,1,2,...,k-1. For example, when k=4, the first sequence consists of 15 units, each of the third units corresponds to a group number from 1 to 4, and these 15 third units include 2 4-1 = 8 group numbers 4 (i=0), 2 4-1-1 = 4 group numbers 3 (i=1), 2 4-1-2 = 2 group numbers 2 (i=2) and 2 4-1-3 =1 Group number 1 (i=3). Then the sending end allocates resource group numbers of m services among the L resources according to the group number of each third unit in the first sequence and the correspondence between each group number and the service.
应理解,本实施例所述的第一序列指示不限于二进制规则的序列,还可以指示其他进制的第三单元的位置关系。本实施例以二进制规则表示的序列为例进行说明。It should be understood that the first sequence indication described in this embodiment is not limited to a sequence of binary rules, and may also indicate the positional relationship of third units in other systems. In this embodiment, a sequence represented by a binary rule is taken as an example for description.
下面对本实施例中的第一序列的生成过程,以及根据第一序列的指示实现对m个业务的资源数做分配的各种实现进行说明。The following describes the generation process of the first sequence in this embodiment, and various implementations of allocating resource numbers of m services according to the instructions of the first sequence.
第一种实现方式,所述获取第一序列,包括:In the first implementation manner, the acquiring the first sequence includes:
第1步:对每组资源数由二进制表示的比特值从全0开始到比特值全1依次列出,共计2 k个计数单位。 Step 1: For each group of resource numbers, the bit values represented in binary are listed in sequence from all 0s to all 1s, a total of 2 k count units.
第2步:每生成一个计数单位,比较当前计数单位与前一个计数单位的比特值变化,确定出发生跳变的比特位,所述发生跳变是指同一比特位上的比特值从所述前一个计数单位的0在所述当前计数单位变成1。Step 2: Each time a counting unit is generated, compare the bit value change of the current counting unit and the previous counting unit to determine the bit that has jumped. The jumped change means that the bit value on the same bit changes from the The 0 of the previous count unit becomes 1 at the current count unit.
第3步:对确定的2 k-1个计数单位所对应的所有所述发生跳变的比特位进行排序,生成所述第一序列,所述第一序列为比特位的回文排列。其中所述2 k-1个计数单位是除去比特值全0的第一个计数单位之外剩余的所有计数单位。 Step 3: Sorting all the hopping bits corresponding to the determined 2 k -1 count units to generate the first sequence, and the first sequence is a palindrome arrangement of bits. The 2 k -1 count units are all count units remaining except the first count unit whose bit value is all 0.
举例说明,发送端获取3个业务(m=3)所对应的3个资源数,业务编号S1、S2和S3所对应的资源数分别是C1、C2和C3。且每个资源数C由第一进制,比如十进制表示。在一示例中,业务S1、S2和S3所对应的资源数C1、C2和C3分别是,C1=9,C2=7,C3=4,资源总数为C1+C2+C3=20。For example, the sender obtains 3 resource numbers corresponding to 3 services (m=3), and the resource numbers corresponding to service numbers S1, S2, and S3 are C1, C2, and C3, respectively. And each resource number C is represented by the first base, such as decimal. In an example, the resource numbers C1, C2, and C3 corresponding to the services S1, S2, and S3 are respectively, C1=9, C2=7, C3=4, and the total number of resources is C1+C2+C3=20.
将每个十进制表示的C1、C2和C3分别转换成二进制数后得到k组资源数。After converting each of C1, C2 and C3 represented by the decimal system into binary numbers, k groups of resource numbers are obtained.
C1=9=1×2 0+0×2 1+0×2 2+1×2 3,二进制表示为1001; C1=9=1×2 0 +0×2 1 +0×2 2 +1×2 3 , the binary representation is 1001;
C2=7=1×2 0+1×2 1+1×2 2+0×2 3,二进制表示为1110; C2=7=1×2 0 +1×2 1 +1×2 2 +0×2 3 , the binary representation is 1110;
C3=4=0×2 0+0×2 1+1×2 2+0×2 3,二进制表示为0010。 C3=4=0×2 0 +0×2 1 +1×2 2 +0×2 3 , the binary representation is 0010.
本实施例中,资源组数k与经过二进制转换后的比特位数相同,本实施例中每个资源数可以通过4个比特表示,比特位数为4,即k=4。In this embodiment, the number of resource groups k is the same as the number of bits after binary conversion. In this embodiment, each resource number can be represented by 4 bits, and the number of bits is 4, that is, k=4.
可选的,所述比特位位数也可称为比特位位宽。具体地,确定所述比特位位宽k可以通过以下两种方式:Optionally, the number of bits may also be referred to as bit width. Specifically, the bit width k can be determined in the following two ways:
方式一、根据总传输资源数的比特位位宽作为所述计数器的比特位位宽,所述总传输资源数是各个业务所需的资源数的和。例如,在上述3个业务S1、S2和S3,且资源数分别是C1、C2和C3。其中,C1=9,C2=7,C3=4,资源总数为20。将该资源总数20通过二进制表示为00101,共有5个比特位,则比特位位宽k=5,从左到右排序依次是:第1比特位、第2比特位、第3比特位、第4比特位和第5比特位。Manner 1: According to the bit width of the total number of transmission resources as the bit width of the counter, the total number of transmission resources is the sum of the number of resources required by each service. For example, in the above three services S1, S2, and S3, and the number of resources is C1, C2, and C3, respectively. Among them, C1=9, C2=7, C3=4, and the total number of resources is 20. The total number of resources 20 is represented by binary as 00101, there are 5 bits in total, then the bit width k=5, and the order from left to right is: the first bit, the second bit, the third bit, and the third bit. 4 bits and 5th bits.
方式二、根据第一业务所需的资源数的比特位位宽作为所述计数器的比特位位宽,其中,所述第一业务所需的资源数为所有业务中所需资源数最大的一个。例如,在上述3个业务S1、S2和S3中最大的资源数是C1。将C1通过二进制表示为1001,共有4个比特位,即k=4,从左到右排序依次是:第1比特位、第2比特位、第3比特位和第4比特位。Manner 2: The bit width of the number of resources required by the first service is used as the bit width of the counter, where the number of resources required by the first service is the largest number of resources required among all services . For example, in the above three services S1, S2, and S3, the largest number of resources is C1. C1 is represented by binary as 1001, there are 4 bits in total, that is, k=4, and the order from left to right is: the first bit, the second bit, the third bit, and the fourth bit.
由于方式二确定的比特位位宽的值小于方式一,在计算上简单,所以本申请实施例以上述方式二确定的比特位位宽来进行对应关系的建立。Since the value of the bit width determined in the second method is smaller than that in the first method, the calculation is simple, so the embodiment of the present application uses the bit width determined in the second method to establish the correspondence relationship.
在上述“第1步”中,按照比特位次序从低到高的顺序,或者还可以是按照比特位次序从高到低。本实施例以比特位次序从低到高的顺序排序,如图10a所示,k=4,共包含2 4=16个计数单位,计数单位的序号用w表示,w取值范围为从0至15。每个计数单位对应一个比特序列,例如序号0对应比特序列0000,序号1对应比特序列0001,以此类推,序号15对应比特序列1111。本实施例中共包括16个比特序列。 In the above-mentioned "Step 1", the order is from low to high according to the bit order, or it can also be from high to low according to the bit order. In this embodiment, the bit order is sorted from low to high. As shown in Fig. 10a, k=4, which contains 2 4 =16 count units in total. The number of the count unit is represented by w, and the value range of w is from 0. To 15. Each counting unit corresponds to a bit sequence, for example, the sequence number 0 corresponds to the bit sequence 0000, the sequence number 1 corresponds to the bit sequence 0001, and so on, the sequence number 15 corresponds to the bit sequence 1111. In this embodiment, a total of 16 bit sequences are included.
在上述“第2步”中,逐一比较后一个计数单位与前一个计数单位的比特序列的比特值变化,筛选出发生跳变的比特位,所述发生跳变的比特位是指同一比特位上比特值从0变成1的比特位,定义跳变:当一个比特位的比特值从0变成1,则定义为发生一次跳变;另外,所述比特位为第1至第k比特位中的一个。In the above-mentioned "step 2", the bit value changes of the bit sequence of the next counting unit and the previous counting unit are compared one by one, and the bits that have jumped are screened out. The bits that have jumped refer to the same bit. The bit whose value of the upper bit changes from 0 to 1, defines a jump: when the bit value of a bit changes from 0 to 1, it is defined as a jump; in addition, the bit is the 1st to the kth bit One of the bits.
按照二进制计数规则,第k个比特位有2 k-1次跳变,第k-1个比特位有2k-2次跳变,…,第2个比特位有两次跳变,第1个比特位有一次跳变。 According to the binary counting rule, the k-th bit has 2 k-1 transitions, the k-1 bit has 2k-2 transitions,..., the second bit has two transitions, the first There is one bit transition.
具体地,从第一个计数单位的比特序列开始与下一个计数单位的比特序列进行比较,即比较序号0的比特序列0000和序号1的比特序列0001中发生跳变的比特位,可见只有第4比特位从0变成1,所以从第一个计数单位到第二个计数单位发生跳变的比特是“第4比特”,记录所述比特序列0001对应的跳变比特是“4”。Specifically, starting from the bit sequence of the first counting unit, the bit sequence of the next counting unit is compared, that is, the bit sequence of the bit sequence 0000 of the sequence number 0 and the bit sequence of the bit sequence 0001 of the sequence number 1 are compared, and it can be seen that only the bit sequence of the first counting unit is changed. The 4-bit bit changes from 0 to 1, so the bit that jumps from the first counting unit to the second counting unit is the "4th bit", and the jump bit corresponding to the bit sequence 0001 is recorded as "4".
另外对于如果比特位从1变成0的情况,则不属于本申请所定义的“发生跳变”的情况。In addition, if the bit changes from 1 to 0, it does not belong to the "jumping" situation defined in this application.
在上述“第3步”中,将除去比特值全0的一个计数单位之外的2 k-1个计数单位所对应的所有发生跳变的比特位按次序排列,计数器每计数一次,比较后一个计数单位与前一个计数单位的比特序列,并记录每个发生变化的比特位,即输出跳变比特位的位置,最终所输出序列为比特位的回文排列。 In the above-mentioned "Step 3", all the bits corresponding to the transitions corresponding to the 2 k -1 counting units except the one counting unit with the bit value of all 0s are arranged in order. Each time the counter counts, after the comparison A bit sequence of a count unit and the previous count unit, and record each bit that changes, that is, the position of the output transition bit, and the final output sequence is a palindrome arrangement of the bits.
比如,如图10b所示,对于序号8的比特序列1000,确定其发生跳变的比特位时,比较前一个序号7的比特序列0111与当前比特序列1000中发送跳变的比特位,可见,只有第1比特为从0变化成1,所以记录所述比特序列1000对应的跳变比特是“1”。同理地,确定出从序号0至序号15的总共发生跳变的15个比特位,得到比特位的回文排列。本实施例中,如图10c所示,所述比特位的回文排列为:4 3 4 2 4 3 4 1 4 3 4 2 4 3 4。For example, as shown in Fig. 10b, for the bit sequence 1000 of sequence number 8, when determining the bit that has hopped, compare the bit sequence 0111 of the previous sequence number 7 with the bit sequence of the current bit sequence 1000 that sent hops. It can be seen that, Only the first bit changes from 0 to 1, so the jump bit corresponding to the bit sequence 1000 is recorded as "1". In the same way, a total of 15 bits that have jumped from sequence number 0 to sequence number 15 are determined, and the palindrome arrangement of the bits is obtained. In this embodiment, as shown in Figure 10c, the palindrome arrangement of the bits is: 4 3 4 2 4 3 4 1 4 3 4 2 4 3 4.
根据所述比特位的回文排列,以及每个比特位所对应的业务确定每个业务与其所在时隙的对应关系。其中,每个比特位所对应的业务编号可以基于二进制表示的资源数,如图10d所示,C1、C2和C3中所有比特值为“1”的比特位为需要分配资源的业务,比特值为“0”的比特位则不需要分配业务。The correspondence between each service and its time slot is determined according to the palindrome arrangement of the bits and the service corresponding to each bit. Among them, the service number corresponding to each bit can be based on the number of resources represented in binary, as shown in Figure 10d, all bits in C1, C2, and C3 with a bit value of "1" are the services that need to be allocated resources, and the bit value Bits that are "0" do not need to be allocated services.
由此可得,每个比特位与每个业务之间的对应关系,资源数C1的比特序列1001(按照比特位从高到低的顺序为1001)在第4比特位和第1比特位上需要分配业务S1,在第 3和第2比特位上不分配资源。资源数C2的比特序列1110(按照比特位从高到低的顺序为0111)在第1至第3比特位上需要分配业务S2,在第4比特位上不分配资源。资源数C3的比特序列0010(按照比特位从高到低的顺序为0100)在第3比特位上需要分配业务S3,在其余比特位,第4、第2和第1比特位上不分配资源。It can be obtained that the corresponding relationship between each bit position and each service, the bit sequence 1001 of the resource number C1 (1001 in the order of the bit position from high to low) is on the 4th bit and the 1st bit The service S1 needs to be allocated, and no resources are allocated on the 3rd and 2nd bits. The bit sequence 1110 of the number of resources C2 (0111 in the order of the bits from high to low) needs to be allocated service S2 on the first to third bits, and no resources are allocated on the fourth bit. The bit sequence 0010 of the resource number C3 (0100 in the order of bits from high to low) needs to be allocated service S3 on the 3rd bit, and no resources are allocated on the remaining bits, the 4th, the 2nd and the 1st bit. .
根据上述图10c所示的比特位的回文排列,以及图10d中每个业务与比特位之间的对应关系,得到业务S1、S2和S3与时隙资源之间的对应关系。如图10e所示,所述回文排列的序号1对应的比特位是“4”,第4比特位,该第4比特位上需要传输的业务为S1,且对应一个时隙,则在时隙1中配置的业务为S1(即时隙1用于传输业务S1)。According to the palindrome arrangement of the bits shown in FIG. 10c and the correspondence between each service and the bit in FIG. 10d, the correspondence between the services S1, S2, and S3 and the time slot resources is obtained. As shown in Figure 10e, the bit corresponding to the sequence number 1 of the palindrome arrangement is "4", the fourth bit, and the service that needs to be transmitted on the fourth bit is S1, and corresponds to a time slot. The service configured in slot 1 is S1 (that is, slot 1 is used to transmit service S1).
同理地,对于所述比特位的回文排列的序号2所对应的比特位是“3”,则根据上述图10d所示的对应关系,在第3比特位上需要配置的业务有S2和S3,每个业务对应一个时隙,则时隙2用于传输业务S2,时隙3用于传输业务S3。类似地,对于第2比特位需要传输的业务只有S2,所以第2比特位所对应的时隙6和时隙17用于传输业务S2;对于第1比特位需要传输的业务有S1和S2,则在每个第2比特位上需要占用两个时隙资源来传输业务S1和S2,例如,第1比特位指示的时隙包括时隙15和时隙16,则时隙15用于传输业务S1,时隙16用于传输业务S2。In the same way, the bit corresponding to the sequence number 2 of the palindrome arrangement of the bit is "3", then according to the corresponding relationship shown in FIG. 10d, the services that need to be configured on the third bit are S2 and S3, each service corresponds to a time slot, then time slot 2 is used to transmit service S2, and time slot 3 is used to transmit service S3. Similarly, there is only S2 for the service that needs to be transmitted for the second bit, so the time slot 6 and time slot 17 corresponding to the second bit are used to transmit the service S2; for the service that needs to be transmitted for the first bit, there are S1 and S2. Therefore, two time slot resources need to be occupied on each second bit to transmit services S1 and S2. For example, if the time slot indicated by the first bit includes time slot 15 and time slot 16, then time slot 15 is used to transmit services S1, time slot 16 is used to transmit service S2.
最终,发送端在20个资源中为每个业务分配一定的资源,得到所有业务的复用方案,完成对时隙资源的分配。Finally, the sender allocates a certain resource for each service among the 20 resources, obtains a multiplexing scheme for all services, and completes the allocation of time slot resources.
本实施例提供的实现方法,先利用计数器建立比特位的回文排列,然后再根据比特位的回文排列建立每个业务与各个业务所在资源的对应关系,从而完成L个资源中对每个业务的资源分配。In the implementation method provided in this embodiment, a counter is used to establish a palindrome arrangement of bits, and then a correspondence relationship between each service and the resource where each service is located is established according to the palindrome arrangement of bits, so as to complete each of the L resources. Business resource allocation.
另外,需要说明的是,在本实施例的上述“第1步”在生成比特序列时是按照比特位从低到高的顺序排序,此外,还可以按照比特位从高到低的顺序排序。即第k比特位,第k-1比特位,……,第2比特位,第1比特位。然后剩余的过程与本实施例的“第2步”和“第3步”相同,此处不再赘述。In addition, it should be noted that in the above-mentioned “step 1” of this embodiment, when generating the bit sequence, the bit sequence is sorted from low to high. In addition, the bit sequence can also be sorted from high to low. That is, the kth bit, the k-1th bit, ..., the 2nd bit, the 1st bit. Then the rest of the process is the same as "Step 2" and "Step 3" of this embodiment, and will not be repeated here.
概况地,本实施例生成所述第一序列为比特位的回文排列,该比特位的回文排列中由2 k-1个组号i,其中,组号i为第1至第k比特位中的任意一个比特位。进一步地,所述2 k-1个单元组成的序列号中,以序列号为2 k-1为第一中心,所述第一中心的左边序列号所对应的比特位序列与右边序列号所对应的比特位序列关于所述第一中心对称;在第一中心的左边序列号,以序列号为2 k-2为第二中心,所述第二中心的左边序列号所对应的比特位序列与右边序列号所对应的比特位序列关于所述第二中心对称;在以序列号为2 k-(k-1)为第k-1中心,所述第k-1中心的左边序列号所对应的比特位序列与右边序列号所对应的比特位序列关于第k-1中心对称。 In summary, this embodiment generates a palindrome in which the first sequence is a bit position, and the palindrome of the bit position consists of 2 k -1 group numbers i, where the group number i is the 1st to the kth bit Any one of the bits. Further, in the sequence number composed of 2 k -1 units, the sequence number is 2 k-1 as the first center, and the bit sequence corresponding to the left sequence number of the first center is the same as the right sequence number. The corresponding bit sequence is symmetrical about the first center; the sequence number on the left of the first center, with the sequence number 2 k-2 as the second center, the bit sequence corresponding to the sequence number on the left of the second center The bit sequence corresponding to the sequence number on the right is symmetric about the second center; the sequence number is 2 k-(k-1) as the k-1 center, and the left sequence number of the k-1 center is The corresponding bit sequence and the bit sequence corresponding to the sequence number on the right are symmetric about the k-1th center.
例如,以图10c所示的比特位的回文排列:4 3 4 2 4 3 4 1 4 3 4 2 4 3 4为例。第一中心为序列号8的第1比特位,在第1比特位的左边序列4 3 4 2 4 3 4与第1比特位的右边序列4 3 4 2 4 3 4对称;在所述第1比特位的左边序列中,以序列号4的第2比特位为中心,即第二中心,关于该第二中心的左边序列4 3 4与右边序列4 3 4对称;在第2比特位的左边序列4 3 4中关于第三中心(即第3比特位)左右两边对称。For example, take the palindrome arrangement of bits shown in Figure 10c: 4 3 4 2 4 3 4 1 4 3 4 2 4 3 4 as an example. The first center is the first bit of sequence number 8, and the sequence 4 3 4 2 4 3 4 to the left of the first bit is symmetrical with the sequence 4 3 4 2 4 3 4 to the right of the first bit. In the left sequence of bits, the second bit of sequence number 4 is the center, that is, the second center. The left sequence 4 3 4 of the second center is symmetrical to the right sequence 4 3 4; it is on the left of the second bit In sequence 4 3 4, the left and right sides are symmetric about the third center (that is, the 3rd bit).
本实施例中通过生成的第一序列为比特位的回文排列,使得各个比特位关于中心比特位对称,将每组的资源分配单位拆分成交织排列,从而降低业务资源的抖动性,并提高了资源分配的灵活性。In this embodiment, the first sequence generated is a palindrome arrangement of bits, so that each bit is symmetrical about the center bit, and the resource allocation units of each group are split and arranged in order to reduce the jitter of service resources, and Improve the flexibility of resource allocation.
可选的,本申请还可以通过其他方式来获取所述第一序列,具体地,Optionally, this application may also obtain the first sequence in other ways, specifically,
第二种实现方式,按照比特位从低到高的顺序,从第1比特位开始到第k比特位所代表的资源数分别为1,2,…,2 k-1。将k个比特位作为k个业务,业务编号分别为S1,S2,…,Sk,那么每个业务所需的资源数分别是C1=1,C2=2,…,Ck=2 k-1,资源总数P=2 k-1。例如,在k=4时,Ck=2 4-1=8,资源总数P=2 4-1=15,表示比特位从次序从1至15总共15个比特位。 In the second implementation manner, according to the order of the bits from low to high, the number of resources represented by the first bit to the k-th bit is 1, 2, ..., 2 k-1 respectively . Taking k bits as k services, the service numbers are respectively S1, S2,..., Sk, then the number of resources required for each service is C1=1, C2=2,..., Ck=2 k-1 , The total number of resources P=2 k -1. For example, when k=4, Ck=2 4-1 =8, and the total number of resources P=2 4 -1=15, which means that the order of the bits is from 1 to 15 and a total of 15 bits.
在二进制规则中,由于业务所需资源数是按照2的倍数递增,所以可利用间插和递归的方式生成一种比特位的回文排列,具体地,所述方法包括:先确定中间位置的比特位,然后再以该中间位置的比特位向两边排插比特位。In the binary rule, since the number of resources required by the business is increased by a multiple of 2, the interleaving and recursive methods can be used to generate a palindrome arrangement of bits. Specifically, the method includes: first determining the intermediate position Bit position, and then insert the bit position on both sides with the bit position in the middle position.
进一步地,本实施例中,以所述比特位位宽k等于4为例,如图11所示,生成比特位的回文排列的方法包括:Further, in this embodiment, taking the bit width k equal to 4 as an example, as shown in FIG. 11, the method for generating a palindrome arrangement of bits includes:
第一步,按照比特位从第1至第k比特位的次序,将第1比特位的序列编号放在中间。In the first step, the sequence number of the first bit is placed in the middle according to the order of the bits from the 1st to the kth bit.
第二步,将两个第2比特位的序列编号分别放置在所述第1比特位序列编号的两边。In the second step, the two sequence numbers of the second bit are placed on both sides of the sequence numbers of the first bit.
第三步,将至少两个第3比特位的序列编号分别插在每个所述第1比特位和所述第2比特位的序列编号之间,包括在两个所述第2比特位的序列编号的两端位置。The third step is to insert at least two sequence numbers of the third bit between each of the sequence numbers of the first bit and the second bit, including the two sequence numbers of the second bit. The two ends of the serial number.
第四步,以此类推,直至将至少两个第4(k=4)比特位的序列编号排插在每两个比特位的序列编号之间,以及两端位置时为止,得到比特位的回文排列。The fourth step, and so on, until at least two sequence numbers of the 4th bit (k=4) are inserted between the sequence numbers of every two bits, and the two ends of the sequence number. Palindrome arrangement.
例如,在3、2、3、1、3、2、3之间以及两端位置分别插入第4比特,得到所述比特位的回文排列,如图10c所示为:4 3 4 2 4 3 4 1 4 3 4 2 4 3 4。For example, insert the 4th bit between 3, 2, 3, 1, 3, 2, 3 and at the two ends respectively to obtain the palindrome arrangement of the bits, as shown in Figure 10c: 4 3 4 2 4 3 4 1 4 3 4 2 4 3 4.
最后,根据所述比特位的回文排列,如图10c所示,以及每个比特位所对应的业务编号,如图10d所示,确定每个业务与其所在时隙的对应关系,如图10e所示,即在3个业务S1、S2和S3所对应的资源数C1、C2和C3分别为C1=9,C2=7,C3=4,资源总数为20的情况下,确定从时隙1至时隙20所对应的业务依次分别是:S1、S2、S3、S1、S2、S1、S2、S3、S1、S1、S2、S1、S2、S3、S1、S2、S1、S2、S3、S1。Finally, according to the palindrome arrangement of the bits, as shown in Figure 10c, and the service number corresponding to each bit, as shown in Figure 10d, determine the correspondence between each service and its time slot, as shown in Figure 10e As shown, that is, when the number of resources C1, C2, and C3 corresponding to the three services S1, S2, and S3 are C1=9, C2=7, C3=4, and the total number of resources is 20, determine the slave slot 1. The services corresponding to time slot 20 are: S1, S2, S3, S1, S2, S1, S2, S3, S1, S1, S2, S1, S2, S3, S1, S2, S1, S2, S3, S1.
具体的实现过程与前述实施例的步骤相似,本实施例对此不再赘述。The specific implementation process is similar to the steps in the foregoing embodiment, which is not repeated in this embodiment.
可选的,在本实施方式中,对于图10c所示比特位的回文排列,还可以对中间不相邻的两个不同的比特位调换位置。例如,将图10c中的序列号4与6的比特位互相调换,调换后序列号4的比特位为第3比特,序列号6的比特位为第2比特;同理地,还可以将序列号10和12上的比特位互相调换,如图12所示,调换后得到比特位的回文排列为:4 3 4 3 4 2 4 1 4 2 4 3 4 3 4。Optionally, in this embodiment, for the palindrome arrangement of the bits shown in FIG. 10c, the positions of two different bits that are not adjacent in the middle may be exchanged. For example, the bit positions of serial numbers 4 and 6 in Figure 10c are interchanged. After the exchange, the bit position of serial number 4 becomes the third bit, and the bit position of serial number 6 becomes the second bit; similarly, you can also change the sequence The bits on numbers 10 and 12 are exchanged, as shown in Figure 12, the palindrome of the bits obtained after the exchange is arranged as: 4 3 4 3 4 2 4 1 4 2 4 3 4 3 4.
第三种实现方式,本实现方式利用奇偶条件来生成比特位的回文排列,具体地该方法包括:In the third implementation manner, this implementation manner uses parity conditions to generate a palindrome arrangement of bits. Specifically, the method includes:
第一步,确定所述比特位位宽k。具体的确定方法与前述实施例相同,不再赘述。In the first step, the bit width k is determined. The specific determination method is the same as the foregoing embodiment, and will not be described again.
第二步,对2 k个比特序列进行排序。具体过程与前述实施例相同,不再赘述。 The second step is to sort the 2 k bit sequence. The specific process is the same as the foregoing embodiment, and will not be repeated here.
在一示例中,以k=4为例,即包含4个比特位,总共有16(2 4)个比特序列,按照从比特值全0开始到所述比特值全1依次列出,所述比特位次序按照从低到高排序,如图10a所示。其中,16个比特序列的序号用w表示,按照从小到大的顺序排序为:0、1、2、……、14、15。 In an example, take k=4 as an example, that is, 4 bits are included, and there are a total of 16 (2 4 ) bit sequences, which are listed in order from the bit value of all 0 to the bit value of all 1. The bit order is sorted from low to high, as shown in Figure 10a. Among them, the serial number of the 16 bit sequence is represented by w, which are sorted in ascending order: 0, 1, 2, ..., 14, 15.
第三步,计数器每计数一次,输出一个比特位位置,所述比特位位置满足k-j,记录 计数器输出的所有计数单位的比特位位置,统计生成比特位的回文排列。In the third step, each time the counter counts, a bit position is output, and the bit position satisfies k-j, the bit positions of all counting units output by the counter are recorded, and the palindrome arrangement of the bits is generated by statistics.
其中,k为比特位位宽,j为2的指数幂,即2的j次方,且0≤j<k。进一步地,一种确定j的方法包括:Among them, k is the bit width, j is an exponential power of 2, that is, 2 to the power of j, and 0≤j<k. Further, a method for determining j includes:
在满足第一关系式: 商为a,余数为b(mod b)的情况下,判断在满足所有a为奇数的情况下的j值中,j取最小值。也即判断a为奇数,b为0时所对应的j值。 In satisfying the first relation: When the quotient is a and the remainder is b (mod b), it is judged that j takes the minimum value among the j values in the case where all a is an odd number. That is, it is judged that a is an odd number, and the value of j corresponding to b is 0.
在一示例中,w取任一值,比如w=8,当j=0时,根据所述第一关系式得到a=8,b=0,商b为偶数,不满足条件;当j=1时,根据所述第一关系式得到a=4,商为偶数,不满足条件;当j=2时,根据所述第一关系式得到a=2,商为偶数,不满足条件;当j=3时,得到a=1,商为奇数,b=0,余数为0,满足条件;当j=4时,得到a=0,商为偶数,不满足条件;所以在上述j取值为0,1,2,3和4中,只有j=3时满足判断条件,因此确定j=3。输出的比特位为k-j=4-3=1,所以在w=8时,对应的比特位为“1”,即第1比特位。In an example, w takes any value, such as w=8. When j=0, a=8 and b=0 are obtained according to the first relational expression, and the quotient b is an even number, which does not satisfy the condition; when j= When 1, a=4 is obtained according to the first relational expression, and the quotient is an even number, and the condition is not satisfied; when j=2, a=2 is obtained according to the first relational expression, and the quotient is an even number, and the condition is not satisfied; When j=3, we get a=1, the quotient is odd, b=0, the remainder is 0, and the condition is met; when j=4, we get a=0, the quotient is an even number, and the condition is not met; so take the value of j above Among 0, 1, 2, 3, and 4, only j=3 satisfies the judgment condition, so it is determined that j=3. The output bit is k-j=4-3=1, so when w=8, the corresponding bit is "1", that is, the first bit.
在另一示例中,比如w=7,当j=0~3时,所对应的商a和余数b的值。具体见表2所示,In another example, such as w=7, when j=0 to 3, the corresponding values of the quotient a and the remainder b. See Table 2 for details,
表2Table 2
由上表2可见,只有j取值为0、1、2时,满足商a为奇数的条件,且在这3个商为奇数的范围中,选取余数b为0所对应的j值,或者选取满足3个a为奇数条件下的j的最小值,即j为0,此时输出比特位为k-0=4。It can be seen from Table 2 above that only when the value of j is 0, 1, and 2, the condition that the quotient a is an odd number is satisfied, and in the range where the three quotients are odd numbers, select the value of j corresponding to 0 for the remainder b, or Select the minimum value of j that satisfies 3 conditions where a is an odd number, that is, j is 0, and the output bit position is k-0=4.
同理地,按照上述方法,确定w取其它值时所对应的输出比特位,最后组成比特位的回文排列。本实施例中,按照图10a所示的比特位序号经过所述第一关系式得到的商和余数比较后,生成所述比特位回文排列为:4 3 4 2 4 3 4 1 4 3 4 2 4 3 4。Similarly, according to the above method, determine the corresponding output bits when w takes other values, and finally form a palindrome arrangement of bits. In this embodiment, after comparing the quotient and remainder obtained by the first relational expression according to the bit sequence number shown in Figure 10a, the bit palindrome arrangement is generated as: 4 3 4 2 4 3 4 1 4 3 4 2 4 3 4.
此外,本实施例还提供一种方法获取所述第一序列,该方法利用Sigma/Delta算法生成所述第一序列,该第一序列又称比特位序列。具体地,该比特位序列的生成方法包括:将k组资源数的k个资源分配单位N,或比特位位宽k作为k个业务,然后利用预设算法建立所述k个业务与所述k个业务组成的资源总数之间的对应关系,最后根据所述对应关系生成所述第一序列。其中,所述预设算法为Sigma/Delta算法。In addition, this embodiment also provides a method for obtaining the first sequence. The method uses the Sigma/Delta algorithm to generate the first sequence, and the first sequence is also called a bit sequence. Specifically, the method for generating the bit sequence includes: taking k resource allocation units N of the number of k groups of resources, or bit width k as k services, and then using a preset algorithm to establish the k services and the The corresponding relationship between the total number of resources composed of k services, and finally the first sequence is generated according to the corresponding relationship. Wherein, the preset algorithm is the Sigma/Delta algorithm.
具体过程包括:从第1比特位开始到第k比特位所代表的资源数分别为1,2,…,2 k-1。将比特位位宽k作为k个业务,业务编号分别为S1,S2,…,Sk,那么每个业务所需的资源数用B表示,比如B1,B2,…,Bk,其中Bk=2 k-1,资源总数P=2 k-1。 The specific process includes: starting from the 1st bit to the kth bit, the number of resources represented by 1, 2, ..., 2 k-1 respectively . Take the bit width k as k services, and the service numbers are respectively S1, S2,..., Sk, then the number of resources required by each service is denoted by B, such as B1, B2,..., Bk, where Bk=2 k -1 , the total number of resources P=2 k -1.
例如,当k=4时,即包含4个业务,对应4个比特位,从第1比特位至第4比特位所需的资源数B1,B2,B3,B4分别为1,2,4,8;资源总数P=2 4-1=15,表示比特位从次序(序号)从1至15总共15个。 For example, when k=4, it includes 4 services, corresponding to 4 bits, and the number of resources B1, B2, B3, and B4 required from the first bit to the fourth bit are 1, 2, 4, respectively. 8; The total number of resources P=2 4 -1=15, which means that there are 15 bits in the order (serial number) from 1 to 15.
选取参数Q,且Q≥Max{B1,B2,B3,B4}=Max{1,2,4,8}=8。Select the parameter Q, and Q≥Max{B1, B2, B3, B4}=Max{1, 2, 4, 8}=8.
利用Sigma/Delta算法对4个业务(4个比特位)进行资源分配,所述Sigma/Delta算法可以表示为:l×B modQ,The Sigma/Delta algorithm is used to allocate resources for 4 services (4 bits). The Sigma/Delta algorithm can be expressed as: l×B modQ,
其中,l为常数,l取值范围从1到8;B表示每个业务所需的资源数,B的取值范围为B1到Bk;Q为选取参数,mod表示取余数运算,l×B modQ,表示l×B除以Q所得的商取余数。Among them, l is a constant, the value of l ranges from 1 to 8; B represents the number of resources required for each business, and the value range of B is from B1 to Bk; Q is the selected parameter, mod represents the remainder operation, l×B modQ, which means that the quotient obtained by dividing l×B by Q takes the remainder.
如图13a所示,为一种利用Sigma/Delta算法来确定比特位排列的示意图。以B=B1,Q=8为例,l×B1 modQ取余数,l的取值范围是1至8,得到的余数分别为1,2,3,4,5,6,7,0。同理地,当B=B2=2时,l的取值范围从1至8,得到的余数分别为2,4,6,0,2,4,6,0。当B=B3=4时,l的取值范围从1至8,得到的余数分别为4,0,4,0,4,0,4,0。当B=B4=8时,l的取值范围从1至8,得到的余数分别为全部都是0,因为都能被8整除。将所有余数为0的位置标记为需要分配资源的比特位。As shown in Figure 13a, it is a schematic diagram of using the Sigma/Delta algorithm to determine the bit arrangement. Taking B=B1 and Q=8 as an example, l×B1 modQ takes the remainder, the value of l ranges from 1 to 8, and the obtained remainders are 1, 2, 3, 4, 5, 6, 7, 0, respectively. Similarly, when B=B2=2, the value of l ranges from 1 to 8, and the remainders obtained are 2, 4, 6, 0, 2, 4, 6, 0, respectively. When B=B3=4, the value of l ranges from 1 to 8, and the remainders obtained are 4, 0, 4, 0, 4, 0, 4, 0, respectively. When B=B4=8, the value of l ranges from 1 to 8, and the remainders obtained are all 0, because they can be divisible by 8. Mark all positions with a remainder of 0 as bits that need to be allocated resources.
如图13b所示,按照l的取值范围从1至8,在l取值为1时,需要分配的业务对应第4比特位;在l取值为2时,需要分配的业务对应第3和第4比特位;在l取值为3时,需要分配的业务对应第4比特位;当l取值为4时,需要分配的业务对应第2至第4比特位;在l取值为5时,需要分配的业务对应第4比特位;在l取值为6时,需要分配的业务对应第3和第4比特位;在l取值为7时,需要分配的业务对应第4比特位;在l取值为8时,需要分配的业务对应第1至第4比特位,最后得到所述比特位序列为:4 3 4 4 2 3 4 4 3 4 4 1 2 3 4。As shown in Figure 13b, according to the value range of l from 1 to 8, when the value of l is 1, the service that needs to be allocated corresponds to the fourth bit; when the value of l is 2, the service that needs to be allocated corresponds to the third bit. And the 4th bit; when the value of l is 3, the service that needs to be allocated corresponds to the 4th bit; when the value of l is 4, the service that needs to be allocated corresponds to the 2nd to 4th bit; the value of l is At 5, the service to be allocated corresponds to the 4th bit; when the value of l is 6, the service to be allocated corresponds to the 3rd and 4th bits; when the value of l is 7, the service to be allocated corresponds to the 4th bit When the value of l is 8, the service to be allocated corresponds to the first to fourth bits, and the final bit sequence is: 4 3 4 4 2 3 4 4 3 4 4 1 2 3 4.
该比特位序列对应的序列号为从1至15,然后,根据每个比特位为与业务编号之间的对应关系,比如图10d所示的对应关系,得到3个业务所对应的20个资源的复用方案。例如,如图13c所示,在3个业务S1、S2和S3所对应的资源数C1、C2和C3分别为C1=9,C2=7,C3=4,资源总数为20的情况下,确定从时隙1至时隙20所对应的业务复用方案为:S1、S2、S3、S1、S1、S2、S2、S3、S1、S1、S2、S3、S1、S1、S1、S2、S2、S2、S3、S1。The sequence number corresponding to this bit sequence is from 1 to 15. Then, according to the corresponding relationship between each bit and the service number, such as the corresponding relationship shown in Figure 10d, 20 resources corresponding to 3 services are obtained. The reuse plan. For example, as shown in Figure 13c, when the number of resources C1, C2, and C3 corresponding to the three services S1, S2, and S3 are C1=9, C2=7, C3=4, and the total number of resources is 20, determine The corresponding service multiplexing schemes from time slot 1 to time slot 20 are: S1, S2, S3, S1, S1, S2, S2, S3, S1, S1, S2, S3, S1, S1, S1, S2, S2 , S2, S3, S1.
本方法,采用Sigma/Delta算法得到第一序列,然后按照二进制比特位进行资源分配,最后得到业务复用方案可以降低了资源分配方法的抖动性。In this method, the Sigma/Delta algorithm is used to obtain the first sequence, and then resource allocation is performed according to binary bits, and finally the service multiplexing scheme is obtained, which can reduce the jitter of the resource allocation method.
应理解,本实施例中仅举例了获取第一序列的四种实现方式,包括三种生成比特位的回文排列的方法,和,一种生成比特位序列的方法,此外还可以包括在上述各种实现方式基础上改进的其他实现方式,本实施例不进行限制。It should be understood that this embodiment only exemplifies four implementation methods for obtaining the first sequence, including three methods for generating a palindrome of bits, and one method for generating a bit sequence, which may also be included in the foregoing Other implementation manners improved on the basis of various implementation manners are not limited in this embodiment.
需要说明的是,上述各个实施例的各个方法步骤主要针对发送端设备,即发送端设备根据业务参数生成第一序列,并按照第一序列生成业务资源的复用方案,并根据复用方案对各个业务所对应的资源进行分配。同样地,还可以应用于接收端设备,即接收端获取k组资源数后,根据该k组资源数确定L个资源中的解复用方案,最后再根据该解复用方案对发送端传输的复用数据流进行解复用操作,恢复出m个业务。由于接收端和发送端采用一致的规则,所以接收端可以得到与发送端的复用方案一致的解复用方案。更进一步地,接收端根据k组资源数确定L个资源解复用方案的过程,与前述发送端生 成L个资源的复用方案的过程相同,参见上述各实施例的描述,本实施例不再赘述。It should be noted that each method step in each of the above embodiments is mainly aimed at the sending end device, that is, the sending end device generates the first sequence according to the service parameters, and generates the multiplexing plan of the service resources according to the first sequence, and pairs according to the multiplexing plan. The resources corresponding to each business are allocated. Similarly, it can also be applied to the receiving end device, that is, after the receiving end obtains the number of k sets of resources, it determines the demultiplexing scheme in the L resources according to the number of k sets of resources, and finally transmits to the transmitting end according to the demultiplexing scheme. The multiplexed data stream is demultiplexed, and m services are recovered. Since the receiving end and the sending end adopt the same rules, the receiving end can obtain a demultiplexing scheme consistent with the multiplexing scheme of the sending end. Furthermore, the process of determining L resource demultiplexing schemes at the receiving end according to the number of k sets of resources is the same as the process of generating L resource multiplexing schemes at the transmitting end. Refer to the description of the foregoing embodiments. This embodiment does not Go into details again.
本实施例提供的资源分配方法,可用于多路业务的复用或解复用过程。基于k组资源数的资源分配方法,可直接根据业务所需的资源分配单位的大小确定该业务在传输管道所占用的资源,简单直接,不需要任何计算,且易于扩展。The resource allocation method provided in this embodiment can be used in the multiplexing or demultiplexing process of multiple services. The resource allocation method based on the number of k sets of resources can directly determine the resources occupied by the service in the transmission pipeline according to the size of the resource allocation unit required by the service, which is simple and straightforward, does not require any calculation, and is easy to expand.
另外,在资源分配粒度较小时,通过发送端和接收端两端一致的规则,使得发送端只需发送业务分配的复用方案,不必将冗余的资源配置表发送给接收端,从而减小了原发送较长的资源配置表的资源开销。另外,本方法还实现了资源的自动分配,解决了FlexE对小粒度业务以及非整数时隙粒度业务分配资源不灵活的问题。In addition, when the granularity of resource allocation is small, through the same rules on both the sender and the receiver, the sender only needs to send the multiplexing scheme of the service allocation instead of sending the redundant resource configuration table to the receiver, thereby reducing This reduces the resource overhead of sending a long resource configuration table. In addition, this method also realizes the automatic allocation of resources, and solves the problem of inflexible allocation of resources by FlexE for small-granularity services and non-integer time slot granular services.
此外,在上述各个实施例中,所述方法还包括:发送端利用开销帧发送业务个数m和所述m个资源数。其中,所述该具体步骤包括:发送端发送业务参数,所述业务参数包括所述业务个数m和所述m个资源数。所述业务参数通过开销帧来携带和传输,具体包括以下实现方式:In addition, in each of the foregoing embodiments, the method further includes: the sending end uses the overhead frame to send the number m of services and the number of m resources. Wherein, the specific step includes: the sending end sends service parameters, and the service parameters include the number of services m and the number of m resources. The service parameters are carried and transmitted through overhead frames, which specifically include the following implementation modes:
第一种实现方式,在OIF标准中以FlexE开销帧(FlexE Overhead frame)的结构为基础,通过改变原标准中定义的FlexE开销帧中某些字段,使得修改后的FlexE开销帧中携带所述业务参数。The first implementation method is based on the structure of the FlexE overhead frame in the OIF standard. By changing some fields in the FlexE overhead frame defined in the original standard, the modified FlexE overhead frame carries the Business parameters.
具体地,在FlexE标准中,100Gbps的FlexE接口被划分成20个时隙,每个时隙带宽为5Gpbs。FlexE标准中定义的时隙配置表(Calendar)中一共包含20个表项,每个表项对应一个时隙资源,表项中所填写的业务编号(service ID)用于说明每个时隙属于哪个业务。并且若一个业务需要多个时隙时,所述时隙配置表中两个或两个以上表项对应同一个业务ID。Specifically, in the FlexE standard, a 100Gbps FlexE interface is divided into 20 time slots, and each time slot has a bandwidth of 5Gpbs. The time slot configuration table (Calendar) defined in the FlexE standard contains a total of 20 entries, and each entry corresponds to a time slot resource. The service ID filled in the table entry is used to indicate that each time slot belongs to Which business. And if a service requires multiple time slots, two or more entries in the time slot configuration table correspond to the same service ID.
如图14a所示,为一种FlexE开销帧和复帧的示意图,包括66bit的帧头,其中字段“SH”表示同步头,占用2bit。FlexE帧头包含8个码块(block)组成,按顺序编号为码块1(block 1)至码块8(block 8)。其中,block 3中第2bit至第33bit用于传输业务参数。进一步地,第2bit至第17bit用于传输时隙配置表A的业务参数(英文:service parameters for A);第18bit至第33bit用于传输时隙配置表B的业务参数(英文:service parameters for B)。时隙配置表B和时隙配置表A互为备份。As shown in Figure 14a, it is a schematic diagram of a FlexE overhead frame and a multi-frame, including a 66-bit frame header, where the field "SH" represents a synchronization header and occupies 2 bits. The FlexE frame header consists of 8 code blocks, which are numbered in sequence from block 1 to block 8. Among them, the 2nd to 33rd bits in block 3 are used to transmit service parameters. Further, the 2nd to 17th bits are used to transmit the service parameters of the time slot configuration table A (English: service parameters for A); the 18th to the 33th bits are used to transmit the service parameters of the time slot configuration table B (English: service parameters for B). Time slot configuration table B and time slot configuration table A are mutual backups.
下表3中示出了图14a所示的帧结构中所包含的内容的中文释义。Table 3 below shows the Chinese interpretation of the content contained in the frame structure shown in FIG. 14a.
表3table 3
其中,业务参数为时隙配置表A的业务ID(英文:Service ID for A),例如Service 1 ID for A表示配置表A的业务1所对应的业务编号(ID)。同理地,每个帧中携带一个时隙的业务表项,传输20个业务的表项则需要20个开销帧。其余的第21帧至第32帧则用于传输每个业务ID所对应的资源数。The service parameter is the service ID (English: Service ID for A) of time slot configuration table A, for example, Service 1 ID for A represents the service number (ID) corresponding to service 1 of configuration table A. Similarly, each frame carries a service entry of a time slot, and transmission of 20 service entries requires 20 overhead frames. The remaining 21st to 32nd frames are used to transmit the number of resources corresponding to each service ID.
具体地,一种实施方法是,发送端通过32个灵活以太网FlexE开销帧发送所述业务参数。如图14b所示,第1至第20个FlexE开销帧用于携带业务参数中对应的所有所述业务编号,第21至第27个FlexE开销帧用于携带所述业务参数中的所述资源数,比如“C1 for A”表示时隙配置表A的业务编号(Service ID)1所对应的资源数是C1,“C2 for A”表示时隙配置表A的业务编号(Service ID)2所对应的资源数是C2,以此类推。且每个16bit码块中可以携带3个业务的资源数指示信息,每个资源数的指示信息占用5bit,比如第21帧中携带C1、C2和C3共3种业务的资源数,占用15bit,剩余1bit为保留字段(Reserved)。此外,第28至第32个FlexE开销帧用于传输保留字段,所述保留字段用于配置保留资源。Specifically, an implementation method is that the sending end sends the service parameters through 32 flexible Ethernet FlexE overhead frames. As shown in Figure 14b, the 1st to 20th FlexE overhead frames are used to carry all the corresponding service numbers in the service parameters, and the 21st to 27th FlexE overhead frames are used to carry the resources in the service parameters For example, "C1 for A" represents the service ID (Service ID) 1 of the time slot configuration table A and the corresponding resource number is C1, and "C2 for A" represents the service ID (Service ID) 2 of the time slot configuration table A. The corresponding resource number is C2, and so on. And each 16-bit code block can carry the resource number indicator information of 3 services, and the indicator information of each resource number occupies 5 bits. For example, the 21st frame carries the resource number of C1, C2, and C3, which occupies 15 bits. The remaining 1 bit is a reserved field (Reserved). In addition, the 28th to 32nd FlexE overhead frames are used to transmit reserved fields, and the reserved fields are used to configure reserved resources.
其中,在每个所述FlexE开销帧中的版本标识(Version,VER)字段中配置的内容为第一标识,所述第一标识用于指示所述FlexE开销帧所携带的所述业务编号或所述资源数为当前使用的业务参数。比如,第一标识用比特值“1”表示,当VER字段指示比特值为“1”时,表示FlexE开销帧传输的是本实施例定义的业务参数;当VER字段指示比特值为“0”时,表示FlexE开销帧传输的是标准定义的参数。Wherein, the content configured in the version identifier (Version, VER) field in each FlexE overhead frame is a first identifier, and the first identifier is used to indicate the service number or the service number carried in the FlexE overhead frame. The number of resources is currently used service parameters. For example, the first identifier is represented by the bit value "1". When the VER field indicates the bit value is "1", it means that the FlexE overhead frame transmits the service parameters defined in this embodiment; when the VER field indicates the bit value is "0" When, it means that the FlexE overhead frame transmits the parameters defined by the standard.
本实施例利用资源分配方法生成FlexE的时隙配置表,从而实现了时隙资源的自动配置。In this embodiment, a resource allocation method is used to generate a FlexE time slot configuration table, thereby realizing automatic configuration of time slot resources.
由于“第一种实现方式”仅适用于包含20个时隙资源的时隙配置表,不适用于更多业务的资源配置,所以在此基础上,设计第二种实现方式,来传输更多业务和资源数的业务参数。Since the "first implementation method" is only applicable to the time slot configuration table containing 20 time slot resources, it is not applicable to the resource configuration of more services, so on this basis, the second implementation method is designed to transmit more Business parameters of the number of services and resources.
第二种实现方式,参见图14c,拓展了一种FlexE开销码块中Calendar字段,用于传递所需的业务参数,包括业务个数m,m个业务所需的资源数总和P,或称总资源数, 每个业务的业务编号S1、S2、…、Sm,以及每个业务所需的资源数C1、C2、…、Cm。The second implementation mode, see Figure 14c, expands the Calendar field in a FlexE overhead code block to transmit required service parameters, including the number of services m, the sum of the number of resources required by m services P, or The total number of resources, the service number S1, S2,..., Sm of each business, and the number of resources C1, C2,..., Cm required by each business.
例如对于一个100Gbps接口,若以2Mbps为资源粒度,则总资源是数P=50000,每个资源数需要二进制的16个比特位表示;最多支持的业务个数m=50000,并且业务编号也需要16比特位表示,所以传输的业务个数和资源数均较多时,可以采用如下方法发送所述业务参数。For example, for a 100Gbps interface, if the resource granularity is 2Mbps, the total resource number is P=50,000, and each resource number needs to be represented by 16 bits in binary; the maximum number of supported services m=50,000, and the service number is also required 16-bit representation, so when the number of transmitted services and the number of resources are large, the following method can be used to send the service parameters.
如图14c所示,发送端发送第一开销帧,所述第一个开销帧中包括所述资源数总和P;在具体的字段中表示为时隙配置表A的总资源数P,英文为Rescource number(P)for A。As shown in Figure 14c, the sending end sends a first overhead frame, and the first overhead frame includes the total number of resources P; in a specific field, it is expressed as the total number of resources P in the time slot configuration table A, which is in English Rescource number(P) for A.
发送第二开销帧,所述第二个开销帧中包括业务个数m,具体地,在该第二开销帧的一个字段中表示为时隙配置表A的业务个数m,英文为Service number(m)for A。Send a second overhead frame, the second overhead frame includes the number of services m, specifically, a field of the second overhead frame is expressed as the number of services m in the time slot configuration table A, which is Service number in English (m) for A.
发送第3至第m+2开销帧,所述第3至第m+2开销帧中的m个开销帧用于传输m个所述业务编号,其中m个开销帧中每个开销帧中包括一个业务编号。例如m=3,表示第三开销帧发送业务1所对应的业务编号(ID)。Sending the 3rd to m+2th overhead frames, the m overhead frames in the 3rd to m+2th overhead frames are used to transmit m said service numbers, wherein each of the m overhead frames includes A business number. For example, m=3, which represents the service number (ID) corresponding to service 1 of the third overhead frame transmission.
发送第m+3至第2m+2开销帧,所述第m+3至第2m+2开销帧中的m个开销帧用于传输所述m个资源数,其中每个所述开销帧中携带一个业务所需的资源数。例如,在第m+3帧中传输业务ID 1所需的资源数,在具体的字段中表示为:Service 1 resource required for A。若每次发送指示一个业务的资源数,则m个业务总共需要m个帧来传输资源数,且最后一个开销帧为第2m+2开销帧。The m+3 to 2m+2th overhead frames are sent, and m overhead frames in the m+3 to 2m+2th overhead frames are used to transmit the m number of resources, wherein each of the overhead frames The number of resources required to carry a business. For example, the number of resources required to transmit the service ID 1 in the m+3 frame is expressed in a specific field as: Service 1 resource required for A. If each transmission indicates the number of resources for one service, m services require a total of m frames to transmit the number of resources, and the last overhead frame is the 2m+2th overhead frame.
此外,在每个开销帧中,还将FlexE开销码块的第1个开销码块中第12bit作为FlexE开销码块的版本标识(VER),VER字段的指示为“1”时表示使用新的版本,传递的是资源分配方法所需的业务参数。具体地,FlexE开销码块的第3个开销码块中原先Calendar字段重新定义,通过2m+2个帧传递资源分配方法所需的参数。In addition, in each overhead frame, the 12th bit in the first overhead code block of the FlexE overhead code block is used as the version identifier (VER) of the FlexE overhead code block. When the indication of the VER field is "1", it means to use the new Version, which passes the business parameters required by the resource allocation method. Specifically, the original Calendar field in the third overhead code block of the FlexE overhead code block is redefined, and the parameters required by the resource allocation method are transferred through 2m+2 frames.
本实施例基于资源分配方法,将FlexE接口进行了扩展,不再受制于原先100Gbps接口最多只能支持20个业务资源分配的限制;扩展后的FlexE接口,可根据业务需要定义资源粒度,从而确定总资源数,以及每个业务所需的资源数,进而实现多路业务的带宽灵活分配。并且保证接收端能够对复用的数据流进行解复用。This embodiment expands the FlexE interface based on the resource allocation method, and is no longer subject to the limitation that the original 100Gbps interface can only support a maximum of 20 service resource allocations; the expanded FlexE interface can define resource granularity according to business needs to determine The total number of resources, as well as the number of resources required by each service, to achieve flexible bandwidth allocation for multiple services. And to ensure that the receiving end can demultiplex the multiplexed data stream.
本实施例扩展了FlexE接口,支持更多的业务以及更灵活的带宽分配。This embodiment expands the FlexE interface to support more services and more flexible bandwidth allocation.
上述两种实现方式均采用了标准FlexE定义的帧格式,由于标准FlexE帧格式具有固定周期,每帧所对应的码块数量是固定的,所以在对多路业务进行复用时,必然受制于FlexE帧格式大小,所以无法满足支持更多业务,更细的资源粒度的需求。The above two implementations both use the frame format defined by the standard FlexE. Because the standard FlexE frame format has a fixed period, the number of code blocks corresponding to each frame is fixed, so when multiplexing services are multiplexed, they are bound to be restricted. The size of the FlexE frame format cannot meet the needs of supporting more services and finer resource granularity.
本申请提供了第三种实现方式,本实现方式中定义一种新的帧结构,用于传输所述业务参数。比如第一帧,并且通过发送第一帧一次性地传输所述业务参数给接收端。This application provides a third implementation manner. In this implementation manner, a new frame structure is defined for transmitting the service parameters. For example, the first frame, and the service parameters are transmitted to the receiving end at one time by sending the first frame.
具体地,如图15a所示,发送端利用开销帧发送业务参数,所述业务参数包括业务个数m和所述m个资源数。其中,所述开销帧包括一个控制码块和Y个数据码块,Y≥2且Y为正整数,所述控制码块用于定位和传输所述业务个数m,所述Y个数据码块用于传输所述m个资源数。Specifically, as shown in FIG. 15a, the sending end uses an overhead frame to send service parameters, where the service parameters include the number of services m and the number of m resources. Wherein, the overhead frame includes a control code block and Y data code blocks, Y≥2 and Y is a positive integer, the control code block is used to locate and transmit the number of services m, and the Y data codes The block is used to transmit the m number of resources.
可选的,所述控制码块可通过“U”表示,所述控制码块U的类型为0x4B与0xE的结合,其中,0x4B表示64B/66B码块为O码,0xE表示所述O码的类型。Optionally, the control code block may be represented by "U", and the type of the control code block U is a combination of 0x4B and 0xE, where 0x4B indicates that the 64B/66B code block is an O code, and 0xE indicates the O code type.
可选的,Y个数据码块中的每个数据码块可通过“D”(Data)表示。Optionally, each of the Y data code blocks may be represented by "D" (Data).
进一步地,如图15b所示,所述控制码块U为一个66bit的码块,该控制码块U中包括第一指示字段和第二指示字段,所述第一指示字段用于指示所述总资源数P;所述 第二指示字段用于指示所述业务个数m。其中,所述第一指示字段长度为16bit,从第9bit至第24bit;所述第二指示字段长度为8bit,从第25bit至第32bit。Further, as shown in FIG. 15b, the control code block U is a 66-bit code block, and the control code block U includes a first indication field and a second indication field, and the first indication field is used to indicate the The total number of resources P; the second indication field is used to indicate the number of services m. Wherein, the length of the first indication field is 16 bits, ranging from the 9th bit to the 24th bit; and the length of the second indication field is 8 bits, ranging from the 25th bit to the 32nd bit.
此外,所述Y个数据码块中包括至少一个第一码块,其中,可以通过一个第一码块承载所述m个资源数,或者,通过m个第一码块承载所述m个资源数。具体地,如图15c所示,S0表示所述第一码块,每个所述第一码块用于传输一个业务的资源数。比如,第一码块S0中携带时隙配置表A的业务编号1和业务编号1所需的资源数C1,以及时隙配置表B的业务编号1和业务编号1所需的资源数C1。In addition, the Y data code blocks include at least one first code block, where one first code block may be used to carry the m number of resources, or the m first code blocks may be used to carry the m resources number. Specifically, as shown in FIG. 15c, S0 represents the first code block, and each first code block is used to transmit the number of resources for one service. For example, the first code block S0 carries the number of resources C1 required for service number 1 and service number 1 of time slot configuration table A, and the number of resources C1 required for service number 1 and service number 1 of time slot configuration table B.
具体地,第一码块S0(C1)中所包含的指示信息为:对于时隙配置表A的业务编号S1,其所需的资源数C1,和,对于时隙配置表B的业务编号S1,其所需的资源数C1。同理地,对于第一码块S0(C2)中所包含的指示信息为:对于时隙配置表A的业务编号S2,其所需的资源数C2,和对于时隙配置表B的业务编号S2,其所需的资源数C2;以此类推,对于第一码块S0(Cm)中所包含的指示信息为:对于时隙配置表A和B的业务编号Sm和其所需的资源数Cm。且总共包含m个第一码块,承载m个业务的业务编号和资源数。Specifically, the indication information contained in the first code block S0 (C1) is: the service number S1 of the time slot configuration table A, the number of resources C1 required, and the service number S1 of the time slot configuration table B , The number of required resources C1. Similarly, the indication information contained in the first code block S0 (C2) is: the service number S2 of the time slot configuration table A, the required resource number C2, and the service number of the time slot configuration table B S2, the number of required resources C2; and so on, the indication information contained in the first code block S0(Cm) is: for the service numbers Sm of the time slot configuration tables A and B and the number of resources required Cm. And it contains a total of m first code blocks, carrying service numbers and resource numbers of m services.
本实施例定义了一种新的帧格式,该帧格式可随着复用业务的变化而变化,因此能承载的业务更加灵活,具有更强的灵活性。另外,m个业务所对应的m个业务参数同只通过一次发送就可以将所有业务参数都传输给接收端,提高了传输效率。This embodiment defines a new frame format, which can change with the change of multiplexing services, so the services that can be carried are more flexible and have stronger flexibility. In addition, the m service parameters corresponding to the m services can be transmitted to the receiving end with only one transmission, which improves the transmission efficiency.
参见图16,为本申请实施例提供的一种资源分配装置的结构示意图。该装置可以是前述任意实施例中的接收端,或者也可以是发送端,用于实现前述各个实施例中的方法步骤。Refer to FIG. 16, which is a schematic structural diagram of a resource allocation device provided by an embodiment of this application. The device may be the receiving end in any of the foregoing embodiments, or may also be the sending end, and may be used to implement the method steps in each of the foregoing embodiments.
如图16所示,该装置可以包括:获取单元161,处理单元162和发送单元163,此外,所述装置还可以包括更多或更少的部件,例如存储单元等,本实施例对此不进行限定。As shown in FIG. 16, the device may include: an acquiring unit 161, a processing unit 162, and a sending unit 163. In addition, the device may also include more or fewer components, such as a storage unit, etc., which is not included in this embodiment. Qualify.
进一步地,获取单元161,用于获取m个业务的k组资源数,每组资源数对应一个资源分配单位N,每组资源数包括每个业务对应的系数a,所述系数a表示一个业务包括的资源分配单位的个数,所述资源分配单位N表示一个资源分配单位包括的资源的个数,k≥1,N≥1且k,N均为正整数;处理单元162,用于根据所述k组资源数在L个资源中确定所述m个业务对应的资源。Further, the obtaining unit 161 is configured to obtain the number of k groups of resources for m services, each group of resource numbers corresponds to a resource allocation unit N, and each group of resource numbers includes a coefficient a corresponding to each service, and the coefficient a represents a service The number of resource allocation units included, where the resource allocation unit N represents the number of resources included in a resource allocation unit, k≥1, N≥1, and k and N are all positive integers; the processing unit 162 is configured to The number of the k sets of resources determines the resources corresponding to the m services among the L resources.
可选的,在本实施例的一种具体的实施方式中,获取单元161,具体用于获取所述m个业务所对应的m个资源数,每个所述资源数按照第一进制表示,m≥1;以及,将每个所述按照第一进制表示的资源数通过第二进制表示后得到所述k组资源数,所述第二进制包括二进制、八进制、十进制和十六进制等。Optionally, in a specific implementation manner of this embodiment, the obtaining unit 161 is specifically configured to obtain the number of m resources corresponding to the m services, and each of the resource numbers is expressed in the first base system. , M≥1; and, after each resource number expressed in the first base system is expressed in a second binary system, the number of resources in the k groups is obtained, and the second binary system includes binary, octal, decimal, and hexadecimal, etc. .
可选的,在本实施例的另一种具体的实施方式中,处理单元162,具体用于将所述k组资源数按照第1组至第k组的顺序,在所述L个资源中确定所述m个业务对应的资源,其中每组分配的资源数为m个业务的系数a之和与所述每组对应的资源分配单位N的乘积。Optionally, in another specific implementation manner of this embodiment, the processing unit 162 is specifically configured to arrange the number of the k groups of resources in the order of the first group to the k-th group, among the L resources The resources corresponding to the m services are determined, where the number of resources allocated in each group is the product of the sum of the coefficient a of the m services and the resource allocation unit N corresponding to each group.
可选的,在本实施例的又一种具体的实施方式中,处理单元162,具体用于按照所述第1组至第k组的顺序,如果所述第1组至第k组中的任意一组分配的资源包含两个或两个以上业务,则对包含所述两个或两个以上业务的组按照业务编号的顺序、或者按 照业务编号交织的顺序分配每个业务对应的资源。Optionally, in another specific implementation manner of this embodiment, the processing unit 162 is specifically configured to follow the order of the first group to the kth group, if the first group to the kth group If any group of allocated resources contains two or more services, the resources corresponding to each service are allocated to the group containing the two or more services in the order of service numbers or in the order of interleaving the service numbers.
可选的,在本实施例的又一种具体的实施方式中,处理单元162,具体用于获取第一序列,根据所述k组资源数和所述第一序列,在L个资源中确定所述m个业务对应的资源;所述第一序列用于指示所述k组资源数的资源分配单位N之间的位置关系。Optionally, in another specific implementation manner of this embodiment, the processing unit 162 is specifically configured to obtain a first sequence, and determine among L resources according to the number of k sets of resources and the first sequence Resources corresponding to the m services; the first sequence is used to indicate the positional relationship between the resource allocation units N of the number of resources of the k groups.
其中,所述第一序列包括k个第一单元,不同的第一单元对应不同的组资源数。Wherein, the first sequence includes k first units, and different first units correspond to different numbers of group resources.
例如,第i组为第1组至第k组中的任意一组,在i组资源数中,第1组资源数对应的资源分配单位N为2 0,第2组资源数对应的资源分配单位N为2 1,第3组资源数对应的资源分配单位N为2 2,第i组资源数对应的资源分配单位N为2 i-1;所述第一序列指示i组资源数的资源分配单位N之间的位置关系为,第1组的2 0个、第2组的2 1个、第3组的2 2个、第i组的2 i-1个资源。 For example, the i-th group of the first group to the k-th group to either group number i set of resources, the first group number of resources corresponding to the resource allocation unit N is 20, the second group number of resources corresponding to the resource allocation The unit N is 2 1 , the resource allocation unit N corresponding to the number of resources in the third group is 2 2 , and the resource allocation unit N corresponding to the number of resources in the ith group is 2 i-1 ; the first sequence indicates the resources of the number of resources in the i group the positional relationship between the distribution units is N, 0 2 of the first group, the second group 21, third two groups 2, group i 2 i-1 resources.
可选的,所述第一序列包括z个第二单元,不同的第二单元对应不同的组资源数,至少一个第二单元对应至少两个组资源数,z<k,z为正整数且z≥2。Optionally, the first sequence includes z second units, different second units correspond to different group resource numbers, at least one second unit corresponds to at least two group resource numbers, z<k, z is a positive integer and z≥2.
可选的,所述第一序列包括p个第三单元,一个组资源数在所述第一序列中对应N个不同的第三单元。其中N为资源分配单元。Optionally, the first sequence includes p third units, and a group resource number corresponds to N different third units in the first sequence. Where N is the resource allocation unit.
进一步地,p=2 k-1,在所述2 k-1个第三单元中,每个所述第三单元对应一个组号i,i为1至k中的任一个,第i组资源数在所述第一序列中对应2 i-1个第三单元,p为正整数且p≥2。 Further, p=2 k -1, in the 2 k -1 third units, each third unit corresponds to a group number i, i is any one of 1 to k, and the i-th group of resources The number corresponds to 2 i-1 third units in the first sequence, and p is a positive integer and p≥2.
在一种可能的实施方式中,第i组资源数对应的资源分配单位N为2 i-1,第i+1组资源数对应的资源分配单位N为2 i+1-1,其中,所述2 i-1个资源中包括第i组的第一资源,第2 i+1-1个资源中包括第i+1组的第一资源和第i+1组的第二资源;所述第一序列用于指示所述第i组的第一资源在L个资源中位于所述第i+1组的第一资源和所述第i+1组的第二资源之间。 In a possible implementation, the resource allocation unit N corresponding to the number of resources in the i group is 2 i-1 , and the resource allocation unit N corresponding to the number of resources in the i+1 group is 2 i+1-1 , where Said 2i-1 resources include the first resource of the i-th group, and the 2i+1-1th resources include the first resource of the i+1th group and the second resource of the i+1th group; The first sequence is used to indicate that the first resource of the i-th group is located between the first resource of the i+1-th group and the second resource of the i+1-th group among the L resources.
例如,i=3,第3组资源数对应的资源分配单位N为4,在所述第3组的一个资源分配单位中包括第3组的第一资源、第二资源、第三资源和第四资源。处理单元162,具体用于在所述第3组的四个资源对应第一业务和第二业务的情况下,通过所述第一序列指示将所述第3组的第一资源和第3组的第二资源分配给所述第一业务;将所述第3组的第三资源和第3组的第四资源分配给所述第二业务;或者,将所述第3组的第一资源和第3组的第三资源分配给所述第一业务;将所述第3组的第二资源和第3组的第四资源分配给所述第二业务。For example, i=3, the resource allocation unit N corresponding to the number of resources in the third group is 4, and one resource allocation unit in the third group includes the first resource, the second resource, the third resource, and the third resource in the third group. Four resources. The processing unit 162 is specifically configured to, when the four resources of the third group correspond to the first service and the second service, use the first sequence to indicate that the first resource of the third group and the third group Allocate the second resource of the third group to the first service; allocate the third resource of the third group and the fourth resource of the third group to the second service; or allocate the first resource of the third group And the third resource of the third group are allocated to the first service; the second resource of the third group and the fourth resource of the third group are allocated to the second service.
可选的,在本实施例的又一种具体的实施方式中,当k=4时,所述k组资源数中,第1组资源数和第2组资源数为第一大组资源数,第3组资源数和第4组资源数为第二大组资源数;所述第一序列用于指示所述第一大组资源数和所述第二大组资源数之间的位置关系。Optionally, in another specific implementation manner of this embodiment, when k=4, among the number of k groups of resources, the number of resources in the first group and the number of resources in the second group are the number of resources in the first large group. , The number of resources in the third group and the number of resources in the fourth group are the number of resources in the second largest group; the first sequence is used to indicate the positional relationship between the number of resources in the first largest group and the number of resources in the second largest group .
在另一种可能的实施方式中,所述第一序列包含2 k-1个单元,每个单元对应一个组号i,i为1至k中的任一个;所述第一序列用于指示每个所述单元所对应的组号i,处理单元162,具体用于根据所述k组资源数和所述第一序列指示的每个单元所对应的组号i,确定所述m个业务对应的资源。 In another possible implementation manner, the first sequence includes 2 k -1 units, and each unit corresponds to a group number i, where i is any one of 1 to k; the first sequence is used to indicate The group number i corresponding to each unit, the processing unit 162, is specifically configured to determine the m services according to the number of k groups of resources and the group number i corresponding to each unit indicated by the first sequence Corresponding resources.
可选的,所述第一序列为比特位的回文排列,所述组号i为第1至第k比特位中的任意一个比特位。所述2 k-1个单元组成的序列号中,以序列号为2 k-1为第一中心,所述第一中心的左边序列号所对应的比特位序列与右边序列号所对应的比特位序列关于所述 第一中心对称;在所述第一中心的左边序列号,以序列号为2 k-2为第二中心,所述第二中心的左边序列号所对应的比特位序列与右边序列号所对应的比特位序列关于所述第二中心对称;在以序列号为2 k-(k-1)为第k-1中心,所述第k-1中心的左边序列号所对应的比特位序列与右边序列号所对应的比特位序列关于所述第k-1中心对称。 Optionally, the first sequence is a palindrome arrangement of bits, and the group number i is any one of the 1st to the kth bits. In the serial number composed of 2 k -1 units, the serial number is 2 k-1 as the first center, and the bit sequence corresponding to the left serial number of the first center and the bit corresponding to the right serial number are The bit sequence is symmetrical about the first center; the sequence number on the left of the first center, with the sequence number 2 k-2 as the second center, the bit sequence corresponding to the sequence number on the left of the second center and The bit sequence corresponding to the sequence number on the right is symmetrical about the second center; in the sequence number 2 k-(k-1) as the k-1 center, the left sequence number of the k-1 center corresponds to The bit sequence of and the bit sequence corresponding to the sequence number on the right are symmetric about the k-1th center.
可选的,在本实施例的又一种具体的实施方式中,处理单元162,具体用于对每组资源数由二进制表示的比特值从全0开始到比特值全1依次列出,共计2 k个计数单位;每生成一个计数单位,比较当前计数单位与前一个计数单位的比特值变化,确定出发生跳变的比特位,所述发生跳变是指同一比特位上的比特值从所述前一个计数单位的0在所述当前计数单位变成1;对确定的2 k-1个计数单位所对应的所有所述发生跳变的比特位进行排序,生成所述第一序列。 Optionally, in another specific implementation manner of this embodiment, the processing unit 162 is specifically configured to list the bit values of each group of resource numbers expressed in binary from all 0s to all 1s in order, totaling 2 k count units; each time a count unit is generated, the bit value change of the current count unit and the previous count unit is compared to determine the bit that has jumped. The jumped change means that the bit value on the same bit changes from The 0 of the previous count unit becomes 1 in the current count unit; all of the transitioned bits corresponding to the determined 2 k -1 count units are sorted to generate the first sequence.
可选的,在本实施例的又一种具体的实施方式中,处理单元162,具体用于将所述k组资源数的k个资源分配单位作为k个业务,利用预设算法建立所述k个业务与所述k个业务组成的资源总数之间的对应关系,根据所述对应关系生成所述第一序列。Optionally, in another specific implementation manner of this embodiment, the processing unit 162 is specifically configured to use the k resource allocation units of the k sets of resource numbers as k services, and use a preset algorithm to establish the The corresponding relationship between the k services and the total number of resources composed of the k services, and the first sequence is generated according to the corresponding relationship.
其中,所述预设算法为:l×B modQ,l为常数,l的取值范围从1到Q;B为k个业务表示的第1至第k个业务中的任一个所需的资源数,Q≥Max{B1,B2,B3,……,Bk};mod表示取余数运算,l×B modQ表示l×B除以Q所得的余数。Wherein, the preset algorithm is: l×B modQ, l is a constant, and the value of l ranges from 1 to Q; B is the resource required by any one of the first to kth services represented by k services Number, Q≥Max{B1, B2, B3,..., Bk}; mod represents the remainder operation, l×B modQ represents the remainder obtained by dividing l×B by Q.
此外,在本实施例的又一种具体的实施方式中,发送单元163,用于利用开销帧发送业务参数,所述业务参数包括业务个数m、m个业务编号和m个资源数。In addition, in another specific implementation manner of this embodiment, the sending unit 163 is configured to use an overhead frame to send service parameters, where the service parameters include the number of services m, the number of m services, and the number of m resources.
进一步地,发送单元163,具体用于通过32个灵活以太网FlexE开销帧发送所述业务参数;其中,第1至第20个FlexE开销帧用于携带所述m个业务对应的m个业务编号,第21至第27个FlexE开销帧用于携带所述m个资源数,第28至第32个FlexE开销帧用于承载保留资源;并且在每个所述FlexE开销帧中的版本标识VER字段上配置有第一标识,所述第一标识用于指示所述FlexE开销帧所携带的业务编号或资源数为当前使用的业务参数。Further, the sending unit 163 is specifically configured to send the service parameters through 32 flexible Ethernet FlexE overhead frames; wherein the 1st to 20th FlexE overhead frames are used to carry m service numbers corresponding to the m services , The 21st to 27th FlexE overhead frames are used to carry the number of m resources, the 28th to 32nd FlexE overhead frames are used to carry reserved resources; and the version identification VER field in each FlexE overhead frame A first identifier is configured on it, and the first identifier is used to indicate that the service number or the number of resources carried in the FlexE overhead frame is a currently used service parameter.
可选的,在又一种可能的实施方式中,发送单元163,具体用于发送2m+2个开销帧来传输所述业务参数;其中,所述2m+2个开销帧中包括第1开销帧、第2开销帧、第3开销帧至第2m+2开销帧,所述第1开销帧中包括m个资源数的资源数总和,所述第2开销帧中包括所述业务个数m,所述第3至第m+2开销帧中的m个开销帧中包括m个业务编号,第m+3至第2m+2开销帧中的m个开销帧中包括所述m个资源数,并且在每个开销帧中的版本标识VER字段上配置有第一标识,所述第一标识用于指示所述开销帧所携带的业务编号或资源数为当前使用的业务参数。Optionally, in another possible implementation manner, the sending unit 163 is specifically configured to send 2m+2 overhead frames to transmit the service parameters; wherein, the 2m+2 overhead frames include the first overhead Frame, the second overhead frame, the third overhead frame to the 2m+2 overhead frame, the first overhead frame includes the sum of m resource numbers, and the second overhead frame includes the service number m , M overhead frames in the 3rd to m+2th overhead frames include m service numbers, and m overhead frames in the m+3 to 2m+2th overhead frames include the m resource numbers And a first identifier is configured on the version identifier VER field in each overhead frame, and the first identifier is used to indicate that the service number or the number of resources carried in the overhead frame is the currently used service parameter.
可选的,在本实施例所述的发送单元163用于利用开销帧发送业务参数的过程中,又一种可能的实施方式是,所述开销帧包括一个控制码块和Y个数据码块,Y≥2且Y为正整数,所述控制码块用于定位和传输所述业务个数m,所述Y个数据码块用于传输所述m个资源数。Optionally, in the process in which the sending unit 163 described in this embodiment is used to send service parameters using an overhead frame, another possible implementation manner is that the overhead frame includes one control code block and Y data code blocks. , Y≥2 and Y is a positive integer, the control code block is used to locate and transmit the number of services m, and the Y data code blocks are used to transmit the number of m resources.
进一步地,所述Y个数据码块中包括至少一个第一码块,所述至少一个第一码块中包括所述m个资源数。更进一步地,一个第一码块用于承载所述m个资源数,或者所述至少一个第一码块中的m个第一码块用于承载所述m个资源数。Further, the Y data code blocks include at least one first code block, and the at least one first code block includes the m resource numbers. Furthermore, one first code block is used to carry the m resource numbers, or the m first code blocks in the at least one first code block are used to carry the m resource numbers.
在一个具体硬件实施例中,如图17所示,本实施例还提供了一种网络系统,该网络系统可以是前述实施例中的以太网(Ethernet)、灵活以太网FlexE、泛在以太网X-E等, 所述网络系统中包括发送端10和接收端20,进一步地,所述发送端10中包括存储器1001、处理器1002和通信接口1003。可选的,所述通信接口1003为FlexE接口,用于获取业务参数。此外,该发送端10中还可以包括更多或更少的部件,或者组合某些部件,或者不同的部件布置,本申请对此不进行限定。In a specific hardware embodiment, as shown in FIG. 17, this embodiment also provides a network system. The network system may be the Ethernet, flexible Ethernet FlexE, and ubiquitous Ethernet in the foregoing embodiment. XE, etc., the network system includes a sending end 10 and a receiving end 20, and further, the sending end 10 includes a memory 1001, a processor 1002, and a communication interface 1003. Optionally, the communication interface 1003 is a FlexE interface for obtaining service parameters. In addition, the sending end 10 may also include more or fewer components, or a combination of some components, or a different component arrangement, which is not limited in this application.
具体地,处理器1002为发送端10的控制中心,通过运行或执行存储在存储器1001内的软件程序和/或单元模块,以及调用存储在存储器1001内的数据,以执行复用过程中的各种功能。Specifically, the processor 1002 is the control center of the sending end 10, and executes each of the multiplexing process by running or executing software programs and/or unit modules stored in the memory 1001, and calling data stored in the memory 1001. Kind of function.
所述处理器1002可以由集成电路(integrated circuit,IC)组成,例如可以由单颗封装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器可以仅包括CPU,数字信号处理器(digital signal processor,DSP)以及控制芯片的组合。The processor 1002 can be composed of an integrated circuit (IC), for example, can be composed of a single packaged IC, or can be composed of multiple packaged ICs with the same function or different functions. For example, the processor may only include a combination of a CPU, a digital signal processor (digital signal processor, DSP), and a control chip.
存储器1001用于存储执行本申请技术方案的程序代码,并由处理器1002来控制执行。具体地,处理器1002用于执行所述存储器1001中存储的计算机程序代码,实现上述各实施例中的资源分配方法。The memory 1001 is used to store program codes for executing the technical solutions of the present application, and is controlled by the processor 1002 to execute. Specifically, the processor 1002 is configured to execute the computer program code stored in the memory 1001 to implement the resource allocation method in the foregoing embodiments.
进一步地,存储器1001可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,也可以和处理器集成在一起。Further, the memory 1001 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), or can store information and instructions Other types of dynamic storage devices can also be Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory, CD-ROM or other optical disk storage , CD storage (including compressed CDs, laser disks, CDs, digital universal CDs, Blu-ray CDs, etc.), disk storage media or other magnetic storage devices, or can be used to carry or store desired program codes in the form of instructions or data structures and Any other medium that can be accessed by the computer, but not limited to this. The memory can exist independently or integrated with the processor.
此外,当所述存储器1001为一种计算机存储介质时,该计算机存储介质可存储有程序,该程序执行时可包括本申请实施例提供的资源分配方法的部分或全部步骤。并且,在上述实施例中,可以全部或部分通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。In addition, when the memory 1001 is a computer storage medium, the computer storage medium may store a program, and the program may include part or all of the steps of the resource allocation method provided in the embodiment of the present application when the program is executed. Moreover, in the above-mentioned embodiments, all or part of it may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product in whole or in part.
所述计算机程序产品包括一个或多个计算机指令。在计算机加载和执行所述计算机程序时,全部或部分地产生按照本申请上述各个实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。The computer program product includes one or more computer instructions. When the computer loads and executes the computer program, all or part of the processes or functions described in the foregoing embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
通信接口1003中可以包括收发芯片,或接收机、发射机与天线等部件,用于接收业务参数,比如k组资源数,以及数据码流,比如复用后的数据流。另外,还用于发送业务参数和所述数据码流。进一步地,所述通信接口1003中可以包括无线局域网模块、蓝牙模块、基带(base band)模块等通信模块,以及该通信模块对应的射频(radio frequency,RF)电路,用于进行无线局域网络通信、蓝牙通信、红外线通信及/或蜂窝式通信系统通信。此外,通信接口1003还可以支持直接内存存取(direct memory access)。The communication interface 1003 may include transceiver chips, or components such as receivers, transmitters, and antennas, for receiving service parameters, such as the number of k sets of resources, and data streams, such as multiplexed data streams. In addition, it is also used to send service parameters and the data code stream. Further, the communication interface 1003 may include communication modules such as a wireless local area network module, a Bluetooth module, a baseband module, and a radio frequency (RF) circuit corresponding to the communication module, which is used for wireless local area network communication. , Bluetooth communication, infrared communication and/or cellular communication system communication. In addition, the communication interface 1003 may also support direct memory access (direct memory access).
在本申请的不同实施方式中,通信接口1003中的各种收发芯片可以以集成电路芯片(integrated circuit chip)的形式出现,并可进行选择性组合,而不必包括所有收发模块及对应的天线组。例如,可以仅包括基带芯片、射频芯片以及相应的天线以在一个蜂窝通信系统中提供通信功能。In different embodiments of the present application, the various transceiver chips in the communication interface 1003 can appear in the form of integrated circuit chips, and can be selectively combined without including all transceiver modules and corresponding antenna groups. . For example, it may only include a baseband chip, a radio frequency chip, and a corresponding antenna to provide communication functions in a cellular communication system.
示例性地,在本申请图16所示的资源分配装置实施例中,获取单元161和发送单元 163所要实现的功能可以由所述发送端10的通信接口1003来实现,或者由处理器1002控制所述通信接口1003实现;所述处理单元162所要实现的功能则可以由处理器1002来实现。Exemplarily, in the embodiment of the resource allocation device shown in FIG. 16 of the present application, the functions to be implemented by the acquiring unit 161 and the sending unit 163 may be implemented by the communication interface 1003 of the sending end 10, or controlled by the processor 1002. The communication interface 1003 is implemented; the functions to be implemented by the processing unit 162 can be implemented by the processor 1002.
例如,通信接口1003用于获取m个业务的k组资源数,每组资源数对应一个资源分配单位N,每组资源数包括每个业务对应的系数a,所述系数a表示一个业务包括的资源分配单位的个数,所述资源分配单位N表示一个资源分配单位包括的资源的个数,k≥1,N≥1且k,N均为正整数;处理器1002用于根据所述k组资源数在L个资源中确定所述m个业务对应的资源。For example, the communication interface 1003 is used to obtain the number of k groups of resources for m services, and each group of resources corresponds to a resource allocation unit N, and each group of resources includes a coefficient a corresponding to each service, and the coefficient a represents the number of resources included in a service. The number of resource allocation units, where the resource allocation unit N represents the number of resources included in a resource allocation unit, k≥1, N≥1, and k, and N are all positive integers; the processor 1002 is configured to The number of group resources determines the resources corresponding to the m services among the L resources.
同理地,在图17所示的系统中,接收端20中包括存储器2001、处理器2002和通信接口2003等部件。具体地,该存储器2001、处理器2002和通信接口2003中的各个部件的功能与前述所述存储器1001、处理器1002和通信接口1003的结构和功能相同,本实施例此处不再赘述。Similarly, in the system shown in FIG. 17, the receiving end 20 includes components such as a memory 2001, a processor 2002, and a communication interface 2003. Specifically, the functions of the components in the memory 2001, the processor 2002, and the communication interface 2003 are the same as the structures and functions of the aforementioned memory 1001, the processor 1002, and the communication interface 1003, which will not be repeated in this embodiment.
其中,通信接口2003用于接收来自发送端10的业务参数和复用后的数据流,所述业务参数包括k组资源数,并根据该业务参数对复用后的数据流进行解复用,得到k组资源数所对应的m个业务,例如业务1、业务2至业务m。The communication interface 2003 is used to receive service parameters and multiplexed data streams from the sending end 10, where the service parameters include the number of k groups of resources, and demultiplex the multiplexed data streams according to the service parameters. Obtain m services corresponding to the number of k groups of resources, for example, service 1, service 2 to service m.
此外,本实施例所述存储器1001或存储器2001中用于存储一种计算机程序产品,所述计算机程序产品包括一个或多个计算机指令,例如资源分配指令。在计算机加载和执行所述计算机程序时,全部或部分地产生按照本申请上述实施例所述的方法流程或功能。In addition, the memory 1001 or the memory 2001 in this embodiment is used to store a computer program product, and the computer program product includes one or more computer instructions, such as resource allocation instructions. When the computer loads and executes the computer program, the method flow or function according to the above-mentioned embodiment of the present application is generated in whole or in part.
本实施例提供了一种开销帧,所述开销帧包括一个控制码块和Y个数据码块,Y≥2且为正整数,所述控制码块用于定位和传输所述业务个数m,所述Y个数据码块用于传输所述m个资源数。其中,所述Y个数据码块中包括至少一个第一码块,所述至少一个第一码块中的一个或多个第一码块用于承载所述m个资源数。通过该开销帧可以一次性地发送m个业务所对应的业务参数,并且该开销帧可以随着复用业务的变化而变化,从而使得承载的业务更加灵活。This embodiment provides an overhead frame. The overhead frame includes a control code block and Y data code blocks, Y≥2 and a positive integer, and the control code block is used to locate and transmit the number of services m , The Y data code blocks are used to transmit the m resource numbers. Wherein, the Y data code blocks include at least one first code block, and one or more first code blocks in the at least one first code block are used to carry the m resource numbers. The service parameters corresponding to the m services can be sent at one time through the overhead frame, and the overhead frame can be changed with the change of the multiplexed service, thereby making the carried service more flexible.
本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solutions in the embodiments of the present invention can be embodied in the form of software products, which can be stored in a storage medium, such as ROM/RAM. , Magnetic disks, optical disks, etc., including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiment of the present invention.
本说明书中各个实施例之间相同相似的部分互相参见即可。尤其,对于一种码块生成装置、接收装置、分组承载设备和系统的实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例中的说明即可。The same or similar parts in the various embodiments in this specification can be referred to each other. In particular, for an embodiment of a code block generation device, a receiving device, a packet bearing device, and a system, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant details, please refer to the description in the method embodiment. can.
此外,在本申请的描述中,除非另有说明,“多个”是指两个或多于两个。另外,为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In addition, in the description of this application, unless otherwise specified, "plurality" means two or more than two. In addition, in order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same items or similar items that have substantially the same function and effect. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and order of execution, and words such as "first" and "second" do not limit the difference.
以上所述的本申请实施方式并不构成对本申请保护范围的限定。The implementation manners of the application described above do not constitute a limitation on the protection scope of the application.
Claims (36)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911175248.0 | 2019-11-26 | ||
| CN201911175248.0A CN112866138A (en) | 2019-11-26 | 2019-11-26 | Resource allocation method, device and equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021104168A1 true WO2021104168A1 (en) | 2021-06-03 |
Family
ID=75984942
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/130424 Ceased WO2021104168A1 (en) | 2019-11-26 | 2020-11-20 | Resource allocation method, apparatus, and device |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN112866138A (en) |
| WO (1) | WO2021104168A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2023066170A1 (en) * | 2021-10-20 | 2023-04-27 | 华为技术有限公司 | Time slot consistency verification method and related device |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115883689B (en) * | 2021-09-23 | 2025-02-07 | 苏州盛科通信股份有限公司 | Code block transmission method, device and storage medium |
| CN116996157A (en) * | 2022-04-24 | 2023-11-03 | 华为技术有限公司 | A time slot allocation method and related equipment |
| CN117221849B (en) * | 2022-05-30 | 2025-11-28 | 华为技术有限公司 | Time slot allocation method and communication device |
| CN116663854B (en) * | 2023-07-24 | 2023-10-17 | 匠人智慧(江苏)科技有限公司 | Resource scheduling management method, system and storage medium based on intelligent park |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107888516A (en) * | 2016-09-29 | 2018-04-06 | 中兴通讯股份有限公司 | A kind of method, apparatus and system of bearer service |
| CN108011702A (en) * | 2016-10-28 | 2018-05-08 | 华为技术有限公司 | A kind of transmission of data, method of reseptance and system |
| CN109995455A (en) * | 2017-12-29 | 2019-07-09 | 华为技术有限公司 | Data transmission method, communication equipment and storage medium |
| US20190281145A1 (en) * | 2016-10-24 | 2019-09-12 | Huawei Technologies Co., Ltd. | Data Transmission Method in Flexible Ethernet and Device |
-
2019
- 2019-11-26 CN CN201911175248.0A patent/CN112866138A/en active Pending
-
2020
- 2020-11-20 WO PCT/CN2020/130424 patent/WO2021104168A1/en not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107888516A (en) * | 2016-09-29 | 2018-04-06 | 中兴通讯股份有限公司 | A kind of method, apparatus and system of bearer service |
| US20190281145A1 (en) * | 2016-10-24 | 2019-09-12 | Huawei Technologies Co., Ltd. | Data Transmission Method in Flexible Ethernet and Device |
| CN108011702A (en) * | 2016-10-28 | 2018-05-08 | 华为技术有限公司 | A kind of transmission of data, method of reseptance and system |
| CN109995455A (en) * | 2017-12-29 | 2019-07-09 | 华为技术有限公司 | Data transmission method, communication equipment and storage medium |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2023066170A1 (en) * | 2021-10-20 | 2023-04-27 | 华为技术有限公司 | Time slot consistency verification method and related device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112866138A (en) | 2021-05-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2021104168A1 (en) | Resource allocation method, apparatus, and device | |
| US11082199B2 (en) | Data transmission method in optical network and optical network device | |
| KR100567326B1 (en) | SONET / SDH, PDH, and Ethernet switching / transmission device and method thereof | |
| CN106453028B9 (en) | Method and apparatus for transmitting data | |
| KR102383297B1 (en) | Method and device for transparently transmitting service frequencies | |
| CN102439923B (en) | Device and method for transporting Universal service transport transitional encoding | |
| US11451325B2 (en) | Block generation method and apparatus, and block receiving method and apparatus | |
| WO2024032269A1 (en) | Communication method, related apparatus and computer-readable storage medium | |
| EP1574108B1 (en) | System, method and device for time slot status messaging among sonet nodes | |
| WO2021115215A1 (en) | Data transmission method, communication device and storage medium | |
| CN116264587A (en) | A data transmission method and related device | |
| WO2024040884A1 (en) | Service processing method, apparatus and system | |
| CN120167112A (en) | Bandwidth adjustment method and device | |
| US7558260B2 (en) | Byte-timeslot-synchronous, dynamically switched multi-source-node data transport bus system | |
| JP4586379B2 (en) | Wireless transmission apparatus and method | |
| JPWO2010110413A1 (en) | Multiplex transmission system, multiplexer, demultiplexer, and multiplex transmission method | |
| CN116112452A (en) | Message transmission method and communication device | |
| CN117221768B (en) | Business data processing methods and apparatus | |
| CN116418455B (en) | Method and device for transmitting packet signal, storage medium and electronic device | |
| WO2023231764A1 (en) | Service data processing method and device | |
| CN117221768A (en) | Business data processing methods and devices | |
| WO2021027749A1 (en) | Method and apparatus for transmitting service data | |
| WO2020107298A1 (en) | Device and method for universal service transport transitional encoding |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20893039 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20893039 Country of ref document: EP Kind code of ref document: A1 |