WO2023207378A1 - 一种时隙分配方法及相关设备 - Google Patents

一种时隙分配方法及相关设备 Download PDF

Info

Publication number
WO2023207378A1
WO2023207378A1 PCT/CN2023/081247 CN2023081247W WO2023207378A1 WO 2023207378 A1 WO2023207378 A1 WO 2023207378A1 CN 2023081247 W CN2023081247 W CN 2023081247W WO 2023207378 A1 WO2023207378 A1 WO 2023207378A1
Authority
WO
WIPO (PCT)
Prior art keywords
time slots
time slot
service
total number
base
Prior art date
Application number
PCT/CN2023/081247
Other languages
English (en)
French (fr)
Inventor
杨春生
钟其文
汪仁磊
Original Assignee
华为技术有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023207378A1 publication Critical patent/WO2023207378A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/16Time-division multiplex systems in which the time allocation to individual channels within a transmission cycle is variable, e.g. to accommodate varying complexity of signals, to vary number of channels transmitted
    • H04J3/1694Allocation of channels in TDM/TDMA networks, e.g. distributed multiplexers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/16Time-division multiplex systems in which the time allocation to individual channels within a transmission cycle is variable, e.g. to accommodate varying complexity of signals, to vary number of channels transmitted

Definitions

  • Embodiments of the present application relate to the field of communications, and in particular, to a time slot allocation method and related equipment.
  • time slot division is used to carry services, and time slots are automatically assigned to each service.
  • one allocation result may be allocated to 0 or more time slots.
  • the number of time slots increases hardware overhead.
  • Embodiments of the present application provide a time slot allocation method and related equipment to reduce hardware overhead. Embodiments of the present application also provide corresponding systems, computer equipment, computer-readable storage media, etc.
  • a first aspect of this application provides a time slot allocation method, which includes: obtaining a first total number of time slots and a first number of time slots required for a first service; determining a first palindrome sequence based on the first total number of time slots, and A palindrome sequence includes a plurality of first bases with the same number as the first total number of time slots, and each first base among the plurality of first bases is used to represent a first base time slot number; according to the first time slot number Allocate time slots to the first service.
  • the number of first time slots is represented by the sum of the products of each first base and the corresponding first base coefficient.
  • the first base coefficient is used to determine the first base time slot that the first service needs to occupy. number.
  • the vehicle-mounted gateway in a vehicle-mounted gateway of the vehicle-mounted network, provides a communication interface, and the communication interface uses a time slot division method to divide P 1 time slots, that is, the first total number of time slots is P 1 .
  • the first business implements data interaction and communication through the communication interface.
  • the first palindrome sequence in this application can be understood as being intercepted from a binary palindrome sequence generated based on a binary representation.
  • the number of bases in the palindrome sequence is the same as the total number of available time slots, that is, the length of the palindrome sequence is the same as the total number of time slots.
  • the time slot allocation result based on the palindrome sequence is the same as the total number of time slots.
  • the above step of: determining the first palindrome sequence according to the first total number of time slots includes: enabling a binary counter to count from zero to the first total number of time slots; according to the binary counter The carry result or jump result outputs multiple first bases to obtain the first palindrome sequence.
  • the first palindrome sequence can be determined specifically through a binary counter, which improves the realizability of the solution.
  • the above step of: determining the first palindrome sequence according to the first total number of time slots includes: obtaining a preset time slot sequence comparison table, and the time slot sequence comparison table includes the first total number of time slots.
  • the mapping relationship between the number of time slots and the first palindrome sequence; the first palindrome sequence is determined based on the first total number of time slots and the mapping relationship.
  • the first palindrome sequence can be determined through a preset time slot sequence comparison table, which improves the realizability of the solution.
  • the method further includes: obtaining the second total number of time slots and the number of times required for the second service.
  • the second number of time slots, the second total number of time slots is the difference between the first total number of time slots and the first number of time slots;
  • the second palindrome sequence is determined based on the second total number of time slots, and the second palindrome sequence includes the number A plurality of second bases that are the same as the second total number of time slots.
  • Each second base among the plurality of second bases is used to represent a second base time slot number; allocate time slots to the second service according to the second time slot number.
  • slots, and the number of second time slots is represented by the sum of the products of each second basis and the corresponding second basis coefficient.
  • the second basis coefficient is used to determine the number of second basis time slots that the second service needs to occupy.
  • the time slot allocation method can be applied to the time slot allocation of multiple services, and realizes the time slot allocation of multiple services based on the serial architecture, avoiding competition between multiple services for the same
  • the issue of time slot resources is conducive to the implementation of time slot allocation hardware.
  • the method further includes: sequentially judging whether the first service and/or the second service occupies the time slot corresponding to the current clock signal based on different clock signals; and sequentially judging based on the result of the judgment. Output the services carried by each time slot.
  • a pipeline structure is used to sequentially output the time slot allocation results, which can ensure that each clock outputs the services allocated to the current time slot, thereby improving user experience.
  • a second aspect of this application provides a time slot allocation method, which includes: obtaining the total number of time slots, the first number of time slots required for the first service, and the second number of time slots required for the second service; according to the total number of time slots Determine the palindrome sequence.
  • the palindrome sequence includes a plurality of bases whose number is greater than or equal to the maximum number of time slots.
  • the maximum number of time slots is the maximum of the first number of time slots and the second number of time slots.
  • Each base in the plurality of bases Used to represent the number of time slots in a base; time slots are allocated to the first service and the second service according to the first time slot number and the second time slot number.
  • the first time slot number and the second time slot number are determined by each base and corresponding The sum of the products of the base coefficients is used to determine the number of base time slots that the first service and the second service need to occupy.
  • the vehicle-mounted gateway provides a communication interface, and the communication interface uses a time slot division method to divide P time slots, that is, the total number of time slots is P.
  • the first service and the second service realize data interaction and communication through the communication interface.
  • the time slot allocation method is based on a parallel architecture to achieve even resource allocation of multiple services.
  • the palindrome sequence in this application can be understood as being intercepted from a binary palindrome sequence generated based on binary representation, and the first service and the second service share a palindrome sequence.
  • the number of multiple bases in the palindrome sequence is greater than or equal to the maximum number of time slots
  • the time slot allocation result obtained based on the palindrome sequence does not It is necessary to introduce idle services to reduce the hardware overhead when allocating time slots.
  • determining the palindrome sequence based on the total number of time slots includes: enabling a binary counter to count from zero to the total number of time slots; based on the carry result or transition of the binary counter As a result, multiple bases are output and a palindrome sequence is obtained.
  • the palindrome sequence can be determined through a binary counter, which improves the realizability of the solution.
  • the above step of: determining the palindrome sequence based on the total number of time slots includes: obtaining a preset time slot sequence comparison table, the time slot sequence comparison table includes the total number of time slots and the palindrome The mapping relationship of the sequence; determine the palindrome sequence based on the total number of time slots and the mapping relationship.
  • the palindrome sequence can be determined through a preset time slot sequence comparison table, which improves the realizability of the solution.
  • a third aspect of this application provides a time slot allocation system for performing the method in the above first aspect or any possible implementation of the first aspect.
  • the computer device includes modules or units for performing the method in the above-mentioned first aspect or any possible implementation of the first aspect, such as: a time slot acquisition unit, a sequence determination unit, a time slot allocation unit and a time slot judgment unit.
  • a fourth aspect of the present application provides a time slot allocation system for performing the method in the above second aspect or any possible implementation of the second aspect.
  • the computer device includes modules or units for performing the method in the above-mentioned second aspect or any possible implementation of the second aspect, such as: a time slot acquisition unit, a sequence determination unit and a time slot allocation unit.
  • a fifth aspect of the present application provides a computer device.
  • the computer device includes a processor, a communication interface and a memory.
  • the memory is used to store program code
  • the processor is used to call the program code in the memory to cause the processor to execute the first aspect or the first aspect.
  • a sixth aspect of the present application provides a computer device.
  • the computer device includes a processor, a communication interface and a memory.
  • the memory is used to store program code
  • the processor is used to call the program code in the memory to cause the processor to execute the second aspect or the second aspect.
  • a seventh aspect of the present application provides a computer-readable storage medium that stores one or more computer-executable instructions.
  • the processor executes the above-mentioned first aspect or any one of the possible methods of the first aspect. Ways to implement it.
  • An eighth aspect of the present application provides a computer-readable storage medium that stores one or more computer-executable instructions.
  • the processor executes the above second aspect or any one of the possible methods of the second aspect. Ways to implement it.
  • a ninth aspect of the present application provides a computer program product that stores one or more computer execution instructions.
  • the processor executes the above first aspect or any possible implementation of the first aspect. way method.
  • a tenth aspect of the present application provides a computer program product that stores one or more computer execution instructions.
  • the processor executes the above second aspect or any of the possible implementations of the second aspect. Methods.
  • the chip system includes at least one processor and an interface.
  • the interface is used to receive data and/or signals.
  • the at least one processor is used to support a computer device to implement the above first aspect or the third aspect.
  • the chip system may also include a memory, which is used to store necessary program instructions and data for the computer device.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • a twelfth aspect of the present application provides a chip system.
  • the chip system includes at least one processor and an interface.
  • the interface is used to receive data and/or signals.
  • the at least one processor is used to support computer equipment to implement the above second aspect or the third aspect.
  • the chip system may also include a memory, which is used to store necessary program instructions and data for the computer device.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the number of bases in the palindrome sequence is the same as the total number of available time slots, that is, the length of the palindrome sequence is the same as the total number of time slots.
  • the time slot allocation result obtained based on the palindrome sequence is the same as the total number of time slots.
  • the numbers are corresponding, and there is no need to introduce idle services or queuing mechanisms, which reduces the hardware overhead when allocating time slots.
  • Figure 1 is an application architecture diagram of a vehicle network provided by an embodiment of the present application
  • Figure 2 is a schematic diagram of an embodiment of the time slot allocation method provided by the embodiment of the present application.
  • Figure 3 is a schematic diagram of a binary palindrome sequence provided by an embodiment of the present application.
  • Figure 4 is a schematic diagram of a first palindrome sequence provided by an embodiment of the present application.
  • Figure 5 is a schematic diagram of a binary counter determining a first palindrome sequence provided by an embodiment of the present application
  • Figure 6 is a schematic diagram of a time slot allocation result provided by an embodiment of the present application.
  • Figure 7 is a schematic diagram of all possible time slot allocation results under a fixed first total number of time slots provided by the embodiment of the present application.
  • Figure 8 is a schematic diagram of a binary palindrome module provided by an embodiment of the present application.
  • Figure 9 is a schematic diagram of another embodiment of the time slot allocation method provided by the embodiment of the present application.
  • Figure 10 is a schematic diagram of a time slot allocation result provided by an embodiment of the present application.
  • Figure 11 is a schematic diagram of a binary palindrome serial architecture provided by an embodiment of the present application.
  • Figure 12 is a schematic diagram of an embodiment of the output time slot allocation result provided by the embodiment of the present application.
  • Figure 13 is a schematic diagram of another embodiment of the time slot allocation method provided by the embodiment of the present application.
  • Figure 14 is a schematic diagram of a binary palindrome parallel architecture provided by an embodiment of the present application.
  • Figure 15 is a schematic diagram of an embodiment of the time slot allocation system provided by the embodiment of the present application.
  • Figure 16 is a schematic diagram of another embodiment of the time slot allocation system provided by the embodiment of the present application.
  • Figure 17 is a schematic diagram of an embodiment of a computer device provided by an embodiment of the present application.
  • exemplary means "serving as an example, example, or illustrative.” Any embodiment described herein as “exemplary” is not necessarily to be construed as superior or superior to other embodiments.
  • Embodiments of the present application provide a time slot allocation method and related equipment to reduce hardware overhead. Embodiments of the present application also provide corresponding systems, computer equipment, computer-readable storage media, etc. Each is explained in detail below.
  • the ring network structure of the vehicle network 100 composed of multiple vehicle gateways 110 and devices carries all the services of vehicle communication.
  • the vehicle network 100 connects the vehicle's on-board devices through the communication interface provided by the distributed vehicle gateways 110.
  • Signals such as electronic control unit (ECU) and sensors are transmitted to intelligent cockpit system 120 (CDC), vehicle domain controller 130 (vehicle domain controller, VDC) and mobile data center 140 (mobile data center, MDC) and other calculations.
  • control center and forward signals from these computing control centers to corresponding equipment such as electronic control units and sensors.
  • equipment such as vehicle-mounted T-BOX can also be connected.
  • the vehicle network 100 is a relatively static network.
  • the number and bandwidth of the services carried by the vehicle network 100 will not change, and they have been determined at the beginning of the vehicle design. Especially when the car is in a driving state, the in-vehicle business will not require dynamic adjustment of the business. Therefore, the services carried by the vehicle network 100 are fixed and static. At the same time, in order to ensure safe driving, the vehicle network 100 must ensure sufficient safety and reliability.
  • time slot division is used to carry services, and different hard pipes are established for different services. This improves the reliability of the vehicle network and minimizes the implementation cost of the vehicle gateway while ensuring business bandwidth and delay. .
  • the time slot division method is used to carry services. Specifically, the communication interface bandwidth is divided into a certain number of time slots according to the time slot granularity, and the service determines the required number of time slots based on the bandwidth. For example, in the 10Gbps communication interface provided by the vehicle gateway, 1000 time slots can be divided according to the granularity of 10Mbps. For 10Mbps business, only 1 time slot is needed, for 100Mbps business, 10 time slots are needed, and for 1000Mbps business, 10 time slots are needed. 100 time slots.
  • the 10Gbps interface needs to carry multiple services, allocate enough time slots to each service, and ensure that the allocated time slots are even, which will help reduce implementation costs.
  • an embodiment of the time slot allocation method provided by the embodiment of the present application includes:
  • the vehicle-mounted gateway provides a communication interface, and the communication interface uses a time slot division method to divide P 1 time slots, that is, the first total number of time slots is P 1 .
  • the first service realizes data interaction and communication through the communication interface. When allocating time slots of the communication interface to the first service, it is also necessary to obtain the first time slot number C 1 required by the first service.
  • the first palindrome sequence is determined based on the first total number of time slots P 1 , where the first palindrome sequence can be understood as being intercepted from a binary palindrome sequence generated based on binary representation.
  • the first palindrome sequence includes a plurality of first bases, the number of the plurality of first bases is the same as the first total number of time slots, and each first base in the plurality of first bases is used to represent a first base time Number of gaps.
  • This binary representation naturally divides the number of time slots required for the service into n bases.
  • the palindrome sequence is to arrange the number of time slots corresponding to n parts according to the palindrome to form a uniform sequence. Because the number of time slots corresponding to each part is twice that of the previous part, this palindrome sequence can also be called a binary palindrome sequence.
  • the binary palindrome sequence is generated based on binary representation.
  • the length Q′ 2 n -1 of the binary palindrome sequence generated based on the binary representation, and the length Q of the first palindrome sequence needs to be equal to the first total number of time slots P 1 , so there is Q ⁇ In the case of 2 n -1, for this purpose, the first palindrome sequence can be determined by intercepting the binary palindrome sequence generated based on the binary representation.
  • the first palindrome sequence is a binary palindrome sequence generated based on binary representation, which is equivalent to the binary palindrome sequence generated based on binary representation. Intercept all the palindromic sequences to obtain the first palindromic sequence.
  • the binary counter When determining the first palindrome sequence, enable the binary counter to count from zero to the first total time slot number, and output multiple first bases according to the carry result or transition result of the binary counter to obtain the first palindrome sequence,
  • the binary counter may be preset in the system for executing the time slot allocation method provided by the embodiment of the present application.
  • the binary number of the binary counter is set to zero.
  • the binary counter accumulates the binary number once and determines whether the binary number generates a carry. If a carry occurs, the The i-th bit determines the base ⁇ i . If there is no carry, the base is determined to be the highest bit number of the binary number.
  • the binary counter accumulates to P 1 expressed in binary, the binary number of the binary counter is set to zero, and the obtained multiple first bases are arranged to generate a sequence, that is, the first palindrome sequence is obtained.
  • the time slot sequence comparison table includes the mapping relationship between the first total time slot number and the first palindrome sequence, and is based on the first total time slot number and the first palindrome sequence. The mapping relationship determines the first palindrome sequence.
  • the first palindrome sequence corresponding to each possible first total number of time slots is predetermined and stored in the time slot sequence comparison table.
  • the first palindrome sequence By inputting the first total number of time slots, the corresponding first palindrome sequence can be obtained directly.
  • the number of first base time slots represented by each first base among the plurality of first bases can be determined.
  • P 1 10
  • the number of first base time slots represented by ⁇ 4 is 5
  • the number of first base time slots represented by ⁇ 3 is 3
  • the number of first base time slots represented by ⁇ 2 is 1
  • the number of first base time slots represented by ⁇ 1 is 1.
  • the number of slots in a base is 1.
  • the number of first time slots is represented by the sum of the products of each first base and the corresponding first base coefficient.
  • the first base coefficient is used to determine the number of first base time slots that the first service needs to occupy, that is, in When allocating time slots to the first service, it is necessary to determine the binary representation of the first total time slot number P 1 based on the first time slot number, that is, to represent the first time slot by the sum of the products of each first basis and the corresponding first basis coefficient.
  • the number of time slots After determining the number of time slots of the first base, it is possible to determine how many time slots are occupied by the service when it occupies one base. Based on this, the first base coefficient is determined, and the time slots of the first service can be completed. distribute.
  • steps S202 and S203 can be executed at the same time, and the embodiment of the present application does not limit the order in which the steps are executed.
  • the time slot allocation method is implemented in a binary palindrome module.
  • the binary palindrome module includes a binary counter and an AND gate, based on the input service bandwidth, that is, the first total time slot number and the first The number of time slots determines the first number of time slots based on the binary representation of the first total number of time slots.
  • the binary counter simultaneously outputs the first base based on the first total number of time slots.
  • the AND operation is implemented through the AND gate, thereby determining that the first service is in the first Occupancy in palindromic sequences.
  • the number of bases in the palindrome sequence is the same as the total number of available time slots, that is, the length of the palindrome sequence is the same as the total number of time slots.
  • the binary palindrome sequence and the total number of resources cannot be solved one by one.
  • the corresponding problem expands the application scope of the binary palindrome algorithm.
  • the time slot allocation result obtained based on the palindrome sequence corresponds to the total number of time slots. There is no need to introduce idle services or queuing mechanisms, which reduces the time slot allocation. Hardware overhead.
  • another embodiment of the time slot allocation method provided by the embodiment of the present application includes:
  • the vehicle-mounted gateway provides a communication interface, and the communication interface uses a time slot division method to divide P 1 time slots, that is, the first total number of time slots is P 1 .
  • the first service realizes data interaction and communication through the communication interface. When allocating time slots of the communication interface to the first service, it is also necessary to obtain the first time slot number C 1 required by the first service.
  • the first palindrome sequence includes a plurality of first bases with the same number as the first total number of time slots, and each first base among the plurality of first bases is used to represent a first base time slot number.
  • the number of first time slots is represented by the sum of the products of each first basis and the corresponding first basis coefficient, and the first basis coefficient is used to determine the number of first basis time slots that the first service needs to occupy.
  • steps S901 to S903 in the embodiment of the present application, reference can be made to the time slot allocation method as shown in Figure 2, which will not be described again in the embodiment of the present application.
  • the second service In addition to the first service realizing data interaction and communication through the communication interface, the second service also realizes data interaction and communication through the communication interface, completing the allocation of the time slot of the communication interface for the first service and the allocation of the communication for the second service.
  • the time slots of the interface it is also necessary to obtain the second number of time slots C 2 and the second total number of time slots P 2 required for the second service.
  • the second total number of time slots is the same as the first total number of time slots.
  • This embodiment of the present application adopts a serial architecture to achieve even distribution of time slots for multiple services, that is, allocating time slots to each service in turn according to the order of services.
  • the total number of time slots provided by the communication interface is P, and a total of N
  • the number of time slots required for services (S 1 , S 2 ,..., S N ) are C 1 , C 2 ,..., C N respectively, where S 1 is the first service, and S 2 to S N are N-1
  • the number of second time slots C i required for each second service Si can be determined based on the binary representation of the second total time slot number Pi , and the corresponding second total time slots The second palindrome sequence of the number Pi is then completed to complete the time slot allocation for the second service Si .
  • the second palindrome sequence includes a plurality of second bases with the same number as the second total number of time slots, and each second base among the plurality of second bases is used to represent a second base time slot number.
  • the number of second time slots is represented by the sum of the products of each second basis and the corresponding second basis coefficient, and the second basis coefficient is used to determine the number of second basis time slots that the second service needs to occupy.
  • steps S905 to S906 in the embodiment of the present application, reference can be made to the time slot allocation method as shown in Figure 2, which will not be described again in the embodiment of the present application.
  • a time slot is allocated to the first service S 1 first, and then a time slot is allocated to the second service S 2 .
  • the second service S2 occupies time slots with second resource numbers 1, 3, 4, and 5, corresponding to time slots 2, 5, 10, and 12 in the first resource number.
  • the occupancy of the services in the palindrome sequence can also be determined while generating the palindrome sequence, thereby achieving real-time allocation of time slots.
  • the binary palindrome serial architecture includes a plurality of binary palindrome modules as shown in Figure 8.
  • the total number of time slots is P
  • This The process can be implemented through software using preset lookup tables.
  • Each service corresponds to a binary palindrome module, which allocates time slots according to the clock and enable signal.
  • the clock tracking time slots correspond to one-to-one.
  • the enable signal is determined by the binary palindrome module of the previous service. If the previous service If the current time slot is occupied, the enable signal is invalid. If the previous service does not occupy the current time slot, the enable signal is valid.
  • the time slot occupied by each service is finally determined and output through a data selector (multiplexer, Mux).
  • S907 Based on different clock signals, determine whether the first service and/or the second service occupies the time slot corresponding to the current clock signal.
  • S908 Output the services carried by each time slot in sequence according to the judgment result.
  • the time slot allocation result needs to be output. Specifically, based on different clock signals, it is judged in turn whether the first service and/or the second service occupy the same time slot as the current one. The time slot corresponding to the clock signal, and the services carried by each time slot are output in sequence according to the judgment result.
  • a pipeline form is used to ensure that each clock outputs the service carried by the current time slot, as shown in Figure 12.
  • N 4 services (S 1 , S 2 , S 3 , S 4 ), in the 1st
  • service S 1 determines whether to occupy the time slot with resource number 1; at the second clock, service S 1 determines whether to occupy the time slot with resource number 2, and service S 2 determines whether to occupy the time slot with resource number 1.
  • service S 1 determines whether to occupy the time slot with resource number 3, service S 2 determines whether to occupy the time slot with resource number 2, and service S 3 determines whether to occupy the time slot with resource number 1 ;
  • service S 1 determines whether to occupy the time slot with resource number 4, service S 2 determines whether to occupy the time slot with resource number 3, service S 3 determines whether to occupy the time slot with resource number 2, and Service S 4 determines whether to occupy the time slot with resource number 1;
  • service S 1 determines whether to occupy the time slot with resource number 5, and service S 2 determines whether to occupy the time slot with resource number 4.
  • Service S 3 determines whether to occupy the time slot with resource number 3, and service S 4 determines whether to occupy the time slot with resource number 2, thus forming a pipeline structure.
  • the time slot allocation result of service S1 is delayed by 3 clock outputs
  • the time slot allocation result of service S2 is delayed by 2 clock outputs
  • the time slot allocation result of service S3 is delayed by 1 clock output.
  • the time slot allocation result of S 4 is delayed by 0 clock outputs, thus ensuring that each clock outputs the services carried by the current time slot.
  • the time slot allocation method can be applied to the time slot allocation of multiple services, and realizes the time slot allocation of multiple services based on the serial architecture, avoiding competition between multiple services for the same time slot. Resource issues are conducive to the implementation of time slot allocation hardware.
  • the pipeline structure is used to sequentially output the time slot allocation results, which ensures that each clock outputs the services assigned to the current time slot, improving user experience.
  • another embodiment of the time slot allocation method provided by the embodiment of the present application includes:
  • S1302. Determine the palindrome sequence based on the total number of time slots.
  • the palindrome sequence includes multiple bases whose number is greater than or equal to the maximum number of time slots.
  • the maximum number of time slots is the maximum of the first number of time slots and the second number of time slots.
  • Each base among the multiple bases is used to represent A base slot number.
  • the number of first time slots and the number of second time slots are represented by the sum of the products of each base and the corresponding base coefficient.
  • the base coefficient is used to determine the number of base time slots that the first service and the second service need to occupy.
  • a binary palindrome parallel architecture is used to achieve uniform resource allocation of multiple services.
  • the specific implementation method can refer to the aforementioned embodiments.
  • the embodiments of this application will not be described in detail here.
  • the differences are The condition is that the first service and the second service share a palindrome sequence, and the number of multiple bases in the palindrome sequence is greater than or equal to the maximum number of time slots. Because it is a parallel architecture, the structure is simpler than the architecture shown in Figure 11.
  • the difference is that a time slot allocation result may require multiple time slots, so a queuing mechanism needs to be introduced in the binary palindrome parallel architecture. That is, a buffer is introduced without an enable signal. After each binary palindrome module completes time slot allocation, the order in which multiple services enter the buffer is determined based on the allocation results, and finally the results of multiple service time slot allocations are output.
  • the binary palindrome parallel architecture in the embodiment of this application can realize some special requirements in a more flexible way. For example, when the number of multiple bases in the palindrome sequence is equal to the maximum number of time slots, it can be guaranteed that in each time slot allocation result, the time slot corresponding to each base in the palindrome sequence is allocated to the service, avoiding the introduction of Idle business.
  • the binary counter is enabled to count from zero to the total number of time slots, and multiple bases are output according to the carry result or transition result of the binary counter to obtain a palindrome sequence.
  • a preset time slot sequence comparison table is obtained, where the time slot sequence comparison table includes the mapping relationship between the total number of time slots and the palindrome sequence, and then the palindrome sequence is determined based on the total number of time slots and the mapping relationship.
  • the number of multiple bases in the palindrome sequence is greater than or equal to the maximum number of time slots
  • the time slot allocation result obtained based on the palindrome sequence is not It is necessary to introduce idle services to reduce the hardware overhead when allocating time slots.
  • time slot allocation method provided by the embodiment of the present application has been introduced above.
  • the method provided by the embodiment of the present application will be introduced below with reference to the accompanying drawings. time slot allocation system.
  • an embodiment of the time slot allocation system 1500 provided by the embodiment of this application includes:
  • the time slot acquisition unit 1501 is configured to obtain the first total number of time slots and the first number of time slots required for the first service; the time slot acquisition unit 1501 may perform step S201 in the above method embodiment.
  • the sequence determining unit 1502 determines a first palindrome sequence according to the first total number of time slots.
  • the first palindrome sequence includes a plurality of first bases with the same number as the first total number of time slots. Each of the plurality of first bases The first base is used to represent a first base slot number; the sequence determination unit 1502 may perform step S202 in the above method embodiment.
  • the time slot allocation unit 1503 is configured to allocate time slots to the first service according to the first time slot number.
  • the first time slot number is represented by the sum of the products of each first base and the corresponding first base coefficient.
  • the first base coefficient Used to determine the number of first base time slots that the first service needs to occupy.
  • the time slot allocation unit 1503 may perform step S203 in the above method embodiment.
  • the number of bases in the palindrome sequence is the same as the total number of available time slots, that is, the length of the palindrome sequence is the same as the total number of time slots.
  • the time slot allocation result obtained based on the palindrome sequence is the same as the total number of time slots.
  • the numbers are corresponding, and there is no need to introduce idle services or queuing mechanisms, which reduces the hardware overhead when allocating time slots.
  • sequence determination unit 1502 is specifically configured to enable the binary counter to count from zero to the first total number of time slots; to output multiple first bases according to the carry result or transition result of the binary counter to obtain the first palindrome sequence. .
  • the sequence determination unit 1502 is specifically configured to obtain a preset time slot sequence comparison table.
  • the time slot sequence comparison table includes the mapping relationship between the first total time slot number and the first palindrome sequence; according to the first total time slot number And the mapping relationship determines the first palindrome sequence.
  • the time slot acquisition unit 1501 is also configured to obtain the second total number of time slots and the second number of time slots required for the second service.
  • the second total number of time slots is the first total number of time slots and the first time slot number.
  • the difference between the numbers; the sequence determination unit 1502 is also configured to determine a second palindrome sequence according to the second total number of time slots.
  • the second palindrome sequence includes a plurality of second bases with the same number as the second total number of time slots, and a plurality of second bases. Each second base in the two bases is used to represent a second base time slot number;
  • the time slot allocation unit 1503 is also used to allocate time slots to the second service according to the second time slot number, and the second time slot number is determined by each second base.
  • the sum of the products of the second basis and the corresponding second basis coefficient indicates that the second basis coefficient is used to determine the number of second basis time slots that the second service needs to occupy.
  • the time slot allocation system 1500 also includes:
  • the time slot determination unit 1504 is used to determine whether the first service and/or the second service occupies the time slot corresponding to the current clock signal according to different clock signals; and output the services carried by each time slot in sequence according to the judgment result.
  • the time slot allocation system 1500 provided by the embodiment of the present application can be understood by referring to the corresponding content of the foregoing time slot allocation method embodiment, and the details will not be repeated here.
  • FIG. 16 another embodiment of the time slot allocation system 1600 provided by the embodiment of this application includes:
  • the time slot acquisition unit 1601 is used to obtain the total number of time slots, the first number of time slots required for the first service, and the second number of time slots required for the second service; the time slot acquisition unit 1601 can execute the above method embodiments Step S1301 in .
  • Sequence determination unit 1602 configured to determine a palindrome sequence based on the total number of time slots.
  • the palindrome sequence includes a plurality of bases whose number is greater than or equal to the maximum number of time slots.
  • the maximum number of time slots is the first number of time slots and the second number of time slots.
  • the maximum value in the sequence determination unit 1602 may perform step S1302 in the above method embodiment.
  • the time slot allocation unit 1603 is used to allocate time slots to the first service and the second service according to the first time slot number and the second time slot number.
  • the number of first time slots and the number of second time slots are represented by the sum of the products of each base and the corresponding base coefficient.
  • the base coefficient is used to determine the number of base time slots that the first service and the second service need to occupy.
  • the time slot allocation unit 1603 may perform step S1303 in the above method embodiment.
  • the time slot allocation result obtained based on the palindrome sequence is There is no need to introduce idle services, which reduces the hardware overhead when allocating time slots.
  • sequence determination unit 1602 is specifically configured to enable the binary counter to count from zero to the total number of time slots; to output multiple bases according to the carry result or transition result of the binary counter to obtain a palindrome sequence.
  • the sequence determination unit 1602 is specifically configured to obtain a preset time slot sequence comparison table.
  • the time slot sequence comparison table includes the mapping relationship between the total time slot number and the palindrome sequence; determine the palindrome according to the total time slot number and the mapping relationship. sequence.
  • Computer device 1700 includes: processor 1701, communication interface 1702, storage system 1703, and bus 1704.
  • the processor 1701, the communication interface 1702, and the storage system 1703 are connected to each other through a bus 1704.
  • the processor 1701 is used to control and manage the actions of the computer device 1700.
  • the processor 1701 is used to execute the time slots described in some embodiments of Figures 2 to 12, or Figures 13 to 14. Allocation method.
  • the communication interface 1702 is used to support the computer device 1700 to communicate.
  • Storage system 1703 used to store program codes and data of computer device 1700.
  • the processor 1701 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various illustrative logical blocks, modules, and circuits described in connection with this disclosure.
  • the processor 1701 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on.
  • the bus 1704 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • a computer-readable storage medium is also provided.
  • Computer-executable instructions are stored in the computer-readable storage medium.
  • the device executes the above figure. 2 to Figure 12, or the time slot allocation method described in some embodiments of Figures 13 to 14.
  • a computer program product in another embodiment, includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium; at least one processor of the device can obtain data from a computer-readable storage medium. Reading the storage medium reads the computer execution instructions, and at least one processor executes the computer execution instructions to cause the device to execute the time slot allocation method described in some embodiments of FIG. 2 to FIG. 12 or FIG. 13 to FIG. 14 .
  • a chip system in another embodiment, is also provided.
  • the chip system includes at least one processor and an interface, the interface is used to receive data and/or signals, and at least one processor is used to support the implementation of the above-mentioned Figures 2 to 2.
  • the time slot allocation method is described in some embodiments of Figure 12, or Figures 13 to 14.
  • the chip system may also include a memory, which is used to store necessary program instructions and data for the computer device.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the disclosed system, system and method can be implemented in other ways.
  • the system embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or can be integrated into another system, or some features can be ignored, or not implemented.
  • the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of the system or unit, which may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing unit, each unit can exist physically alone, or two or more units can be integrated into one unit.
  • the above integrated units can be implemented in the form of hardware or software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), magnetic disk or optical disk and other media that can store program code. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请实施例公开了一种时隙分配方法及相关设备,应用于承载业务固定的网络。该时隙分配方法包括:基于可用的总时隙数确定回文序列,该回文序列中基底的数量和可用的总时隙数相同,即回文序列的长度和总时隙数相同,基于该回文序列得到的时隙分配结果与总时隙数是对应的,不需要引入空闲业务或排队机制,减少了分配时隙时的硬件开销。

Description

一种时隙分配方法及相关设备
本申请要求于2022年4月24日提交中国国家知识局、申请号为202210454858.X、发明名称为“一种时隙分配方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信领域,尤其涉及一种时隙分配方法及相关设备。
背景技术
在承载的业务固定的网络(例如车载网络)中,为了保证业务并行的同时降低网络的实现代价,采用时隙划分的方式承载业务,自动为每个业务分配时隙。
通过业务带宽配置表和时隙分配算法可以实现时隙的自动分配,具体的,时隙分配算法采用二进制回文并行算法,根据业务所需时隙数的二进制表示确定出n个基底,其中第n个基底表示的时隙数βn=2n-1,然后将βn按照回文进行排列得到长度为Q=2n-1的二进制回文序列,从而确定出每个时隙所属的业务,完成时隙的自动分配。
但是采用上述方案得到的时隙分配结果中,一次分配结果可能分配到0个或多个时隙,在硬件实现时,就需要引入一个空闲业务或排队机制来保证所分配的时隙正好等于总时隙数,增加了硬件开销。
发明内容
本申请实施例提供一种时隙分配方法及相关设备,用于减少硬件开销。本申请实施例还提供了相应的系统、计算机设备及计算机可读存储介质等。
本申请第一方面提供一种时隙分配方法,包括:获取第一总时隙数和第一业务所需的第一时隙数;根据第一总时隙数确定第一回文序列,第一回文序列包括数量和第一总时隙数相同的多个第一基底,多个第一基底中的每种第一基底用于表示一个第一基底时隙数;根据第一时隙数为第一业务分配时隙,第一时隙数由每种第一基底与对应的第一基底系数的乘积之和表示,第一基底系数用于确定第一业务需要占用的第一基底时隙数。
本申请中,在车载网络的一个车载网关中,该车载网关提供一个通信接口,该通信接口采用时隙划分的方式划分出P1个时隙,即第一总时隙数为P1。第一业务通过该通信接口实现数据的交互和通信。
本申请中的第一回文序列可以理解为从基于二进制表示生成的二进制回文序列中截取的。
本申请中,在为第一业务分配时隙时,需要确定第一时隙数基于第一总时隙数P1的二进制表示,即通过每种第一基底与对应的第一基底系数的乘积之和来表示第一时隙数,确定第一基底时隙数后,就可以确定业务占用一个基底时,具体占用了多少个时隙,据此来确定第一基底系数,就可以完成对第一业务的时隙分配。
该第一方面,回文序列中基底的数量和可用的总时隙数相同,即回文序列的长度和总时隙数相同,基于该回文序列得到的时隙分配结果与总时隙数是对应的,不需要引入空闲业务或排队机制,减少了分配时隙时的硬件开销。
在第一方面的一种可能的实现方式中,上述步骤:根据第一总时隙数确定第一回文序列包括:使能二进制计数器从零开始计数至第一总时隙数;根据二进制计数器的进位结果或跳变结果输出多个第一基底,得到第一回文序列。
该种可能的实现方式中,具体可以通过二进制计数器确定第一回文序列,提升了方案的可实现性。
在第一方面的一种可能的实现方式中,上述步骤:根据第一总时隙数确定第一回文序列包括:获取预设的时隙序列对照表,时隙序列对照表包括第一总时隙数和第一回文序列的映射关系;根据第一总时隙数和映射关系确定第一回文序列。
该种可能的实现方式中,具体可以通过预设的时隙序列对照表确定第一回文序列,提升了方案的可实现性。
在第一方面的一种可能的实现方式中,上述步骤:根据第一时隙数为第一业务分配时隙之后,该方法还包括:获取第二总时隙数和第二业务所需的第二时隙数,第二总时隙数为第一总时隙数与为第一时隙数之差;根据第二总时隙数确定第二回文序列,第二回文序列包括数量和第二总时隙数相同的多个第二基底,多个第二基底中的每种第二基底用于表示一个第二基底时隙数;根据第二时隙数为第二业务分配时隙,第二时隙数由每种第二基底与对应的第二基底系数的乘积之和表示,第二基底系数用于确定第二业务需要占用的第二基底时隙数。
该种可能的实现方式中,该时隙分配方法可以应用于多个业务的时隙分配,并基于串行的架构实现对多个业务的时隙分配,避免了多个业务之间竞争同一个时隙资源的问题,有利于时隙分配硬件的实现。
在第一方面的一种可能的实现方式中,该方法还包括:根据不同的时钟信号依次判断第一业务和/或第二业务是否占用与当前时钟信号对应的时隙;根据判断的结果依次输出每个时隙承载的业务。
该种可能的实现方式中,采用流水线的结构依次输出时隙分配结果,可以保证每个时钟都输出当前时隙所分配的业务,提升了用户体验。
本申请第二方面提供一种时隙分配方法,包括:获取总时隙数、第一业务所需的第一时隙数和第二业务所需的第二时隙数;根据总时隙数确定回文序列,回文序列包括数量大于或等于最大时隙数的多个基底,最大时隙数为第一时隙数和第二时隙数中最大值,多个基底中的每种基底用于表示一个基底时隙数;根据第一时隙数和第二时隙数为第一业务和第二业务分配时隙,第一时隙数和第二时隙数由每种基底与对应的基底系数的乘积之和表示,基底系数用于确定第一业务和第二业务需要占用的基底时隙数。
本申请中,在车载网络的一个车载网关中,该车载网关提供一个通信接口,该通信接口采用时隙划分的方式划分出P个时隙,即总时隙数为P。第一业务和第二业务通过该通信接口实现数据的交互和通信。
本申请中,时隙分配方法基于并行架构实现多个业务的资源均匀分配。
本申请中的回文序列可以理解为从基于二进制表示生成的二进制回文序列中截取的,且第一业务和第二业务共用一个回文序列。
该第二方面,回文序列中多个基底的数量大于或等于最大时隙数,回文序列的长度Q没有Q=2n-1的限制,基于该回文序列得到的时隙分配结果不需要引入空闲业务,减少了分配时隙时的硬件开销。
在第二方面的一种可能的实现方式中,上述步骤:根据总时隙数确定回文序列包括:使能二进制计数器从零开始计数至总时隙数;根据二进制计数器的进位结果或跳变结果输出多个基底,得到回文序列。
该种可能的实现方式中,具体可以通过二进制计数器确定回文序列,提升了方案的可实现性。
在第二方面的一种可能的实现方式中,上述步骤:根据总时隙数确定回文序列包括:获取预设的时隙序列对照表,时隙序列对照表包括总时隙数和回文序列的映射关系;根据总时隙数和映射关系确定回文序列。
该种可能的实现方式中,具体可以通过预设的时隙序列对照表确定回文序列,提升了方案的可实现性。
本申请第三方面,提供了一种时隙分配系统,用于执行上述第一方面或第一方面的任意可能的实现方式中的方法。具体地,该计算机设备包括用于执行上述第一方面或第一方面的任意可能的实现方式中的方法的模块或单元,如:时隙获取单元、序列确定单元、时隙分配单元和时隙判断单元。
本申请第四方面,提供了一种时隙分配系统,用于执行上述第二方面或第二方面的任意可能的实现方式中的方法。具体地,该计算机设备包括用于执行上述第二方面或第二方面的任意可能的实现方式中的方法的模块或单元,如:时隙获取单元、序列确定单元和时隙分配单元。
本申请第五方面提供一种计算机设备,该计算机设备包括处理器、通信接口和存储器,存储器用于存储程序代码,处理器用于调用存储器中的程序代码以使得处理器执行第一方面或第一方面的任意可能的实现方式中的方法。
本申请第六方面提供一种计算机设备,该计算机设备包括处理器、通信接口和存储器,存储器用于存储程序代码,处理器用于调用存储器中的程序代码以使得处理器执行第二方面或第二方面的任意可能的实现方式中的方法。
本申请第七方面提供一种存储一个或多个计算机执行指令的计算机可读存储介质,当计算机执行指令被处理器执行时,处理器执行如上述第一方面或第一方面任意一种可能的实现方式的方法。
本申请第八方面提供一种存储一个或多个计算机执行指令的计算机可读存储介质,当计算机执行指令被处理器执行时,处理器执行如上述第二方面或第二方面任意一种可能的实现方式的方法。
本申请第九方面提供一种存储一个或多个计算机执行指令的计算机程序产品,当计算机执行指令被处理器执行时,处理器执行如上述第一方面或第一方面任意一种可能的实现 方式的方法。
本申请第十方面提供一种存储一个或多个计算机执行指令的计算机程序产品,当计算机执行指令被处理器执行时,处理器执行如上述第二方面或第二方面任意一种可能的实现方式的方法。
本申请第十一方面提供了一种芯片系统,该芯片系统包括至少一个处理器和接口,该接口用于接收数据和/或信号,至少一个处理器用于支持计算机设备实现上述第一方面或第一方面任意一种可能的实现方式中所涉及的功能。在一种可能的设计中,芯片系统还可以包括存储器,存储器,用于保存计算机设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
本申请第十二方面提供了一种芯片系统,该芯片系统包括至少一个处理器和接口,该接口用于接收数据和/或信号,至少一个处理器用于支持计算机设备实现上述第二方面或第二方面任意一种可能的实现方式中所涉及的功能。在一种可能的设计中,芯片系统还可以包括存储器,存储器,用于保存计算机设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
本申请实施例中,回文序列中基底的数量和可用的总时隙数相同,即回文序列的长度和总时隙数相同,基于该回文序列得到的时隙分配结果与总时隙数是对应的,不需要引入空闲业务或排队机制,减少了分配时隙时的硬件开销。
附图说明
图1为本申请实施例提供的车载网络的应用架构图;
图2为本申请实施例提供的时隙分配方法一个实施例示意图;
图3为本申请实施例提供的一种二进制回文序列的示意图;
图4为本申请实施例提供的一种第一回文序列的示意图;
图5为本申请实施例提供的二进制计数器确定第一回文序列的示意图;
图6为本申请实施例提供的一种时隙分配结果的示意图;
图7为本申请实施例提供的固定的第一总时隙数下所有可能的时隙分配结果的示意图;
图8为本申请实施例提供的一种二进制回文模块的示意图;
图9为本申请实施例提供的时隙分配方法另一实施例示意图;
图10为本申请实施例提供的一种时隙分配结果的示意图;
图11为本申请实施例提供的一种二进制回文串行架构的示意图;
图12为本申请实施例提供的输出时隙分配结果的一实施例示意图;
图13为本申请实施例提供的时隙分配方法另一实施例示意图;
图14为本申请实施例提供的一种二进制回文并行架构的示意图;
图15为本申请实施例提供的时隙分配系统一个实施例示意图;
图16为本申请实施例提供的时隙分配系统另一实施例示意图;
图17为本申请实施例提供的计算机设备一实施例示意图。
具体实施方式
下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着技术发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
另外,为了更好的说明本申请,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本申请同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本申请的主旨。
本申请实施例提供一种时隙分配方法及相关设备,用于减少硬件开销。本申请实施例还提供了相应的系统、计算机设备及计算机可读存储介质等。以下分别进行详细说明。
下面对本申请实施例的应用场景进行举例说明。
如图1所示,由多个车载网关110和设备构成的车载网络100的环网结构承载着汽车通信的所有业务,车载网络100通过分布式的车载网关110提供的通信接口,将车上的电子控制单元(electronic control unit,ECU)和传感器等信号传输给智能座舱系统120(CDC)、整车控制器130(vehicle domain controller,VDC)和移动数据中心140(mobile data center,MDC)等计算控制中心,并将这些计算控制中心的信号转发给电子控制单元和传感器等相应的设备,在多个车载网关110构成的环网中还可以接入车载T-BOX等设备。与一般通信网络比较,车载网络100是一个相对静态的网络。在整个生命周期,车载网络100所承载的业务,在数量和带宽方面均不会发生变化,在车辆的设计之初就已经确定。尤其是车处于行驶状态,车载业务不会出现动态调整业务的诉求。因此车载网络100所承载业务是固定的、静态的,同时为了保证安全驾驶,车载网络100必须保证足够的安全可靠。
基于车载网络的需求,采用时隙划分的方式承载业务,为不同的业务建立不同的硬管道,在保证业务带宽和时延情况下,提高车载网络的可靠性,并尽量降低车载网关的实现代价。采用时隙划分的方式承载业务,具体是将通信接口带宽按照时隙粒度,划分出一定数量的时隙,业务根据带宽确定所需的时隙数量。例如车载网关提供的10Gbps的通信接口中,按照10Mbps的粒度,可划分出1000个时隙,对于10Mbps业务,只需要1个时隙,100Mbps业务,则需要10个时隙,1000Mbps业务,则需要100个时隙。10Gbps接口需要承载多个业务,为每个业务分配足够的时隙,同时保证所分配的时隙均匀,有利于降低实现代价。
下面结合上述应用场景对本申请实施例的提供的时隙分配方法流程进行举例说明。
如图2所示,本申请实施例提供的时隙分配方法的一实施例包括:
S201、获取第一总时隙数和第一业务所需的第一时隙数。
在车载网络的一个车载网关中,该车载网关提供一个通信接口,该通信接口采用时隙划分的方式划分出P1个时隙,即第一总时隙数为P1。第一业务通过该通信接口实现数据的交互和通信,在为第一业务分配该通信接口的时隙时,还需要获取到第一业务所需的第一时隙数C1
S202、根据第一总时隙数确定第一回文序列。
获取到第一总时隙数P1后,根据第一总时隙数P1确定出第一回文序列,其中第一回文序列可以理解为从基于二进制表示生成的二进制回文序列中截取的,第一回文序列包括多个第一基底,多个第一基底的数量和第一总时隙数相同,多个第一基底中的每种第一基底用于表示一个第一基底时隙数。
其中,任意业务所需的时隙数为Ci,采用二进制可表示为Ci=ai,1+ai,2×2+…+ai,n×2n-1,其中系数ai,n∈{0,1}。这种二进制表示将业务所需的时隙数自然分成n个基底,每个基底对应的时隙数为β1=202=21,…,βn=2n-1,其系数ai,n=0表示不占用该基底的时隙,ai,n=1表示占用该基底的时隙。例如一个业务所需的时隙数为Ci=9=1+0×2+0×22+1×23=1×β1+0×β2+0×β3+1×β4,该时隙数可分为n=4个基底,每个基底对应的时隙数为β1=1,β2=2,β3=4,β4=8。回文序列是将n个部分对应的时隙数按照回文进行排列,构成一种均匀的序列。因每个部分对应的时隙数是前一个部分的2倍,因此这种回文序列也可称之为二进制回文序列,该二进制回文序列是基于二进制表示生成的。如图3所示,n=4的二进制回文序列中,2个β2插入β1前后,4个β3间插到β1和β2之间,8个β4间插到β1、β2和β3之间。
由上可知,基于二进制表示生成的二进制回文序列中,其长度Q′=2n-1,而第一回文序列的长度Q需要和第一总时隙数P1相等,因此存在Q≠2n-1的情况,为此可以通过从基于二进制表示生成的二进制回文序列中进行截取的思路,确定出第一回文序列。当Q≠2n-1时,那么必然存一个n,使得Q<Q′=2n-1,长度为Q的回文序列为Q′=2n-1长度的回文序列中的一段,即从长度为Q′的回文序列中截取一段长度Q的回文序列,得到第一回文序列,第一回文序列包括多个第一基底,多个第一基底为长度为Q′的回文序列中的 部分基底,多个第一基底的数量和第一总时隙数P1相同,即Q=P1
需要说明的是,当第一总时隙数P1=Q=2n-1时,第一回文序列就为基于二进制表示生成的二进制回文序列,相当于从基于二进制表示生成的二进制回文序列中截取全部,得到第一回文序列。
示例性的,如图4所示,以n=4为例,从长度Q′=15的回文序列中,从第一个基底开始连续截取出长度为Q=P1=10的第一回文序列,需要说明的是,截取可以是从第一个基底开始连续截取,也可以是从第二个、第三个基底开始连续截取,还可以是非连续的截取,只需要保证截取的长度Q=10=P1即可,本申请实施例对此不作限制。
可选的,在实际确定第一回文序列的过程中,具体有两种可选实现方式,以下分别进行说明:
一、通过二进制计数器确定:
在确定第一回文序列时,使能二进制计数器从零开始计数至第一总时隙数,并根据二进制计数器的进位结果或跳变结果输出多个第一基底,得到第一回文序列,其中二进制计数器可以预设在用于执行本申请实施例提供的时隙分配方法的系统中。
具体的,如图5所示,将二进制计数器的二进制数置零,在每次时钟下,二进制计数器对二进制数做一次累加,同时判断该二进制数是否产生进位,若产生进位,根据产生进位的第i位确定出基底βi,若没有进位,确定基底为二进制数的最高比特位数。当二进制计数器累加到用二进制表示的P1时,将二进制计数器的二进制数置零,并将得到的多个第一基底排列生成序列,即得到第一回文序列。
二、通过对照表确定:
在确定第一回文序列时,获取预设的时隙序列对照表,时隙序列对照表包括第一总时隙数和第一回文序列的映射关系,并根据第一总时隙数和映射关系确定第一回文序列。
具体的,如表1所示,每个可能的第一总时隙数对应的第一回文序列都预先确定好,并保存在时隙序列对照表中,在确定第一回文序列时,输入第一总时隙数就可以直接得到对应的第一回文序列。
表1

得到第一回文序列后,还需要根据第一总时隙数确定多个第一基底中每种第一基底所表示的第一基底时隙数。
可选的,将第一回文序列转换成系数都为1的二进制表示,即P1=1×β1+1×β2+…+1×βn,通过公式:
就可以确定多个第一基底中每种第一基底所表示的第一基底时隙数。
示例性的,P1=10, 从而输出β4所表示的第一基底时隙数为5,β3所表示的第一基底时隙数为3,β2所表示的第一基底时隙数为1,β1所表示的第一基底时隙数为1。
S203、根据第一时隙数为第一业务分配时隙。
其中,第一时隙数由每种第一基底与对应的第一基底系数的乘积之和表示,第一基底系数用于确定第一业务需要占用的所述第一基底时隙数,即在为第一业务分配时隙时,需要确定第一时隙数基于第一总时隙数P1的二进制表示,即通过每种第一基底与对应的第一基底系数的乘积之和来表示第一时隙数,确定第一基底时隙数后,就可以确定业务占用一个基底时,具体占用了多少个时隙,据此来确定第一基底系数,就可以完成对第一业务的时隙分配。
具体的,在确定第一回文序列后进行多次迭代来确定出第一时隙数基于第一总时隙数P1的二进制表示,从而实现对第一业务的时隙分配,示例性的,假设第一总时隙数为P,业务所需时隙数为C,比特位数为n,记P1=P,C1=C,在第1次迭代,计算P2=P1n若C1n,an=1,C2=C1n,若C1n,an=0,C2=C1;在第2次迭代,计算P3=P2n-1,若C2n-1,an-1=1,C3=C2n-1,若C2n-1,an-1=0,C3=C2;如此共迭代n次,即可得到C值基于第一总时隙数P1的二进制表示,即C=a1×β1+a2×β2+…+an×βn。最终,根据每种第一基底所表示的第一基底时隙数和第一时隙数,确定出每个第一基底系数a1,a2,…,an,即可确定第一业务的时隙分配。
示例性的,第一总时隙数P1=10,第一回文序列如图4所示,其包括10个第一基底,每种第一基底对应的第一基底时隙数分别为β1=1,β2=1,β3=3,β4=5,该第一回文序列可分配的时隙数量可表示为C=a1×β1+a2×β2+a3×β3+a4×β4。若第一业务所需的第一时隙数C1=6,其二进制可表示为C1=6=0×β1+1×β2+0×β3+1×β4,或C1=6=1×β1+0×β2+0×β3+1×β4,以第一种情况为例,如图6所示,根据第一基底系数可以确定该第一业务占用第一回文序列中,第一基底β2和β4所对应的第一基底时隙数,从而可以确定为第一业务分配第一基底β2和β4的第一基底时隙数。
进一步的,如图7所示,在第一总时隙数P1=10对应的第一回文序列中,不同的第一业务所需的第一时隙数不同时,都可以根据上述方法完成分配。
可选的,上述步骤S202和步骤S203可以同时执行,本申请实施例对步骤执行的先后顺序不作限制。
具体的,如图8所示,该时隙分配方法在二进制回文模块中实现,该二进制回文模块包括二进制计数器和与门,基于输入的业务带宽,即第一总时隙数和第一时隙数确定第一时隙数基于第一总时隙数的二进制表示,二进制计数器基于第一总时隙数同时输出第一基底,通过与门实现AND操作,从而确定第一业务在第一回文序列中的占用情况。
示例性的,当第一总时隙数P1=10,第一业务所需的第一时隙数C1=6,进行多次迭代来确定出第一时隙数基于第一总时隙数P1的二进制表示:C1=6=0×β1+1×β2+0×-β3+1×β4,取其系数,C1可简化为C1=1010;再通过二进制计数器累加,一个时钟输出一个第一基底;当二进制计数器从0000累加到0001,没有进位,第一基底为最高比特位,即R=β4=0×β1+0×β2+0×β3+1×β4,可简化为R=1000;通过R AND C=1000 AND 1010=1000,可知第一业务占用第一回文序列中的第1个第一基底对应的时隙;当二进制计数器从0001累加到0010,有进位,此时R=0100;通过R AND C=0100 AND 1010=0000,可知第一业务不占用第一回文序列中的第2个第一基底对应的时隙;当二进制计数器从0010累加到0011,没有进位,R=1000;通过R AND C=1000 AND 1010=1000,可知第一业务占用第一回文序列中的第3个第一基底 对应的时隙;当二进制计数器从0011累加到0100,有进位,R=0010;通过R AND C=0010 AND 1010=0010,可知第一业务占用第一回文序列中的第4个第一基底对应的时隙;如此迭代直至二进制计数器从1001累加到P1对应的二进制数1010,有进位,R=0100;通过R AND C=0100 AND 1010=0000,可知第一业务不占用第一回文序列中的第10个第一基底对应的时隙,同时将二进制计数器的二进制数置为0000,从而在确定第一回文序列的同时确定出第一业务在第一回文序列中的占用情况,完成对第一业务的时隙分配。
本申请实施例中,回文序列中基底的数量和可用的总时隙数相同,即回文序列的长度和总时隙数相同,从原理上解决二进制回文序列与总资源数无法一一对应的问题,扩展了二进制回文算法的应用范围,基于该回文序列得到的时隙分配结果与总时隙数是对应的,不需要引入空闲业务或排队机制,减少了分配时隙时的硬件开销。
如图9所示,在如图2所示的实施例的基础上,本申请实施例提供的时隙分配方法的另一实施例包括:
S901、获取第一总时隙数和第一业务所需的第一时隙数。
在车载网络的一个车载网关中,该车载网关提供一个通信接口,该通信接口采用时隙划分的方式划分出P1个时隙,即第一总时隙数为P1。第一业务通过该通信接口实现数据的交互和通信,在为第一业务分配该通信接口的时隙时,还需要获取到第一业务所需的第一时隙数C1
S902、根据第一总时隙数确定第一回文序列。
其中,第一回文序列包括数量和第一总时隙数相同的多个第一基底,多个第一基底中的每种第一基底用于表示一个第一基底时隙数。
S903、根据第一时隙数为第一业务分配时隙。
其中,第一时隙数由每种第一基底与对应的第一基底系数的乘积之和表示,第一基底系数用于确定第一业务需要占用的第一基底时隙数。
本申请实施例中的步骤S901-步骤S903的具体实现方式可以参照如图2所示的时隙分配方法,本申请实施例在此不再赘述。
S904、获取第二总时隙数和第二业务所需的第二时隙数。
除了第一业务通过该通信接口实现数据的交互和通信,第二业务也通过该通信接口实现数据的交互和通信,完成为第一业务分配该通信接口的时隙,为第二业务分配该通信接口的时隙时,还需要获取到第二业务所需的第二时隙数C2以及第二总时隙数P2,第二总时隙数为第一总时隙数与为第一业务分配的时隙数之差,即P2=P1-C1
可选的,第二业务为多个,本申请实施例采用串行架构实现多个业务的时隙均匀分配,即按照业务顺序,依次为每个业务分配时隙。假设该通信接口提供的总时隙数为P,总共N个 业务(S1,S2,…,SN)所需的时隙数分别为C1,C2,…,CN,其中S1为第一业务,S2至SN为N-1个第二业务,那么第一业务S1可分配的时隙数,即第一总时隙数为P1=P,第二业务S2可分配的时隙数,即第二总时隙数P2=P1-C1,…,第二业务SN可分配的时隙数,即第二总时隙数PN=PN-1-CN-1
根据如图2所示的时隙分配方法,可以确定每个第二业务Si所需第二时隙数Ci基于第二总时隙数Pi的二进制表示,以及对应第二总时隙数Pi的第二回文序列,进而完成对该第二业务Si的时隙分配。
需要说明的是,因车载网络是静态的,每个业务所使用的通信接口都是提前被规划好的,因此在规划时就设计满足P1≥C1+C2+…+CN,不存在PN=PN-1-CN-1<0的情况。
S905、根据第二总时隙数确定第二回文序列。
其中,第二回文序列包括数量和第二总时隙数相同的多个第二基底,多个第二基底中的每种第二基底用于表示一个第二基底时隙数。
S906、根据第二时隙数为第二业务分配时隙。
其中,第二时隙数由每种第二基底与对应的第二基底系数的乘积之和表示,第二基底系数用于确定第二业务需要占用的第二基底时隙数。
本申请实施例中的步骤S905-步骤S906的具体实现方式可以参照如图2所示的时隙分配方法,本申请实施例在此不再赘述。
示例性的,如图10所示,第二业务为1个,通信接口提供的总时隙数P=15,第一业务和第二业务所需的时隙数分别为:第一时隙数C1=9,C2=4,那么第一业务S1可分配的第一总时隙数P1=P=15,第二业务S2可分配的第二总时隙数P2=P1-C1=6。先为第一业务S1分配时隙,再为第二业务S2分配时隙。根据如图3所示的时隙分配方法,第一业务S1的第一时隙数C1值可表示为C1=1001,因此第一业务S1占用第一资源编号为1、3、5、7、8、9、11、13、15的时隙。剩余的第二总时隙数P2=6的第二回文序列可表示为{β434243},其第二基底表示的第二基底时隙数分别为β4=3,β3=2,β2=1,β1=0,那么第二业务S2的第二时隙数C2值可表示为C2=1010,因此第二业务S2占用第二资源编号为1、3、4、5的时隙,对应第一资源编号中的2、5、10、12时隙。
可选的,如图11所示,在为多个业务分配时隙时,也可以在生成回文序列的同时确定出业务在回文序列中的占用情况,从而实现时隙的实时分配,具体为基于二进制回文串行架构按照资源顺序和业务顺序确定时隙的分配,该二进制回文串行架构包括多个如图8所示的二进制回文模块。
示例性的,总时隙数为P,N=10个业务(S1,S2,…,SN)所需的时隙数分别为BW1,BW2,…,BWN。由此可确定第一业务S1对应的第一总时隙数P1=P,第二业务S2对应的第二总时隙数P2=P1-BW1,…,第二业务S10对应的第二总时隙数P10=P9-BW9。根据如图3所示的时隙分配方法,可将N=10个业务的所需的时隙数转换为基于对应的总时隙数的二进制表示C1,C2,…,C10,此过程可通过软件使用预设的对照表实现。每个业务都对应有一个二进制回文模块,跟据时钟和使能信号进行时隙分配,时钟跟踪时隙一一对应,使能信号由上一个业务的二进制回文模块决定,若上一个业务占用当前时隙,则使能信号无效,若上一个业务不占用当前时隙,则使能信号有效,最后确定出每个业务占用的时隙,经过数据选择器(multiplexer,Mux)输出。
S907、根据不同的时钟信号依次判断第一业务和/或第二业务是否占用与当前时钟信号对应的时隙。
S908、根据判断的结果依次输出每个时隙承载的业务。
进一步的,在为第一业务和第二业务分配好时隙后,需要对时隙分配结果进行输出,具体的,根据不同的时钟信号依次判断第一业务和/或第二业务是否占用与当前时钟信号对应的时隙,并根据判断的结果依次输出每个时隙承载的业务。
示例性的,采用流水线的形式,保证每个时钟输出当前时隙承载的业务,如图12所示,对于N=4个业务(S1,S2,S3,S4),在第1个时钟,业务S1确定是否占用资源编号为1的时隙;在第2个时钟,业务S1确定是否占用资源编号为2的时隙,且业务S2确定是否占用资源编号为1的时隙;在第3个时钟,业务S1确定是否占用资源编号为3的时隙,业务S2确定是否占用资源编号为2的时隙,且业务S3确定是否占用资源编号为1的时隙;在第4个时钟,业务S1确定是否占用资源编号为4的时隙,业务S2确定是否占用资源编号为3的时隙,业务S3确定是否占用资源编号为2的时隙,且业务S4确定是否占用资源编号为1的时隙;在第5个时钟,业务S1确定是否占用资源编号为5的时隙,业务S2确定是否占用资源编号为4的时隙,业务S3确定是否占用资源编号为3的时隙,业务S4确定是否占用资源编号为2的时隙,如此形成流水线的结构。在输出时,因总业务数为4,经过3个时钟后才能确定资源编号为1的时隙所分 配的业务,因此最后将业务S1的时隙分配结果延迟3个时钟输出,业务S2的时隙分配结果延迟2个时钟输出,业务S3的时隙分配结果延迟1个时钟输出,业务S4的时隙分配结果延迟0个时钟输出,这样就可以保证每个时钟输出当前时隙承载的业务。
本申请实施例中,该时隙分配方法可以应用于多个业务的时隙分配,并基于串行的架构实现对多个业务的时隙分配,避免了多个业务之间竞争同一个时隙资源的问题,有利于时隙分配硬件的实现。此外,采用流水线的结构依次输出时隙分配结果,可以保证每个时钟都输出当前时隙所分配的业务,提升了用户体验。
如图13所示,本申请实施例提供的时隙分配方法的另一实施例包括:
S1301、获取总时隙数、第一业务所需的第一时隙数和第二业务所需的第二时隙数。
S1302、根据总时隙数确定回文序列。
其中,回文序列包括数量大于或等于最大时隙数的多个基底,最大时隙数为第一时隙数和第二时隙数中最大值,多个基底中的每种基底用于表示一个基底时隙数。
S1303、根据第一时隙数和第二时隙数为第一业务和第二业务分配时隙。
其中,第一时隙数和第二时隙数由每种基底与对应的基底系数的乘积之和表示,基底系数用于确定第一业务和第二业务需要占用的基底时隙数。
本实施例中,如图14所示,采用二进制回文并行架构实现多个业务的资源均匀分配,其具体的实现方式可以参照前述实施例,本申请实施例在此不再赘述,其不同之处在于,第一业务和第二业务共用一个回文序列,且该回文序列中多个基底的数量大于或等于最大时隙数。因为是并行架构,与图11所示的架构相比,结构更加简单,其不同之处在于,一次时隙分配结果可能需要多个时隙,因此需要在二进制回文并行架构中引入排队机制,即引入缓冲器,且无需使能信号,在每个二进制回文模块完成时隙分配后,基于该分配结果确定多个业务进入缓冲器的顺序,最后输出多个业务时隙分配的结果。
本申请实施例中的二进制回文并行架构可更灵活的方式实现一些特殊需求。例如当回文序列中的为多个基底的数量等于最大时隙数时,可以保证每次的时隙分配结果中,回文序列中每个基底对应的时隙都分配到了业务,避免了引入空闲业务。
可选的,在实际确定回文序列的过程中,具体有两种可选实现方式,即通过二进制计数器确定和通过对照表确定。具体的,通过二进制计数器确定时,使能二进制计数器从零开始计数至总时隙数,并根据二进制计数器的进位结果或跳变结果输出多个基底,得到回文序列。通过对照表确定时,获取预设的时隙序列对照表,其中时隙序列对照表包括总时隙数和回文序列的映射关系,然后根据总时隙数和映射关系确定回文序列。其具体的实现方式可以参照本申请实施例中图6和图7所对应的描述,本申请实施例在此不再赘述。
本申请实施例,回文序列中多个基底的数量大于或等于最大时隙数,回文序列的长度Q没有Q=2n-1的限制,基于该回文序列得到的时隙分配结果不需要引入空闲业务,减少了分配时隙时的硬件开销。
以上介绍了本申请实施例提供的时隙分配方法,下面结合附图介绍本申请实施例提供 的时隙分配系统。
如图15所示,本申请实施例提供的时隙分配系统1500的一实施例包括:
时隙获取单元1501,用于获取第一总时隙数和第一业务所需的第一时隙数;该时隙获取单元1501可以执行上述方法实施例中的步骤S201。
序列确定单元1502,根据第一总时隙数确定第一回文序列,第一回文序列包括数量和第一总时隙数相同的多个第一基底,多个第一基底中的每种第一基底用于表示一个第一基底时隙数;该序列确定单元1502可以执行上述方法实施例中的步骤S202。
时隙分配单元1503,用于根据第一时隙数为第一业务分配时隙,第一时隙数由每种第一基底与对应的第一基底系数的乘积之和表示,第一基底系数用于确定第一业务需要占用的第一基底时隙数。该时隙分配单元1503可以执行上述方法实施例中的步骤S203。
本申请实施例中,回文序列中基底的数量和可用的总时隙数相同,即回文序列的长度和总时隙数相同,基于该回文序列得到的时隙分配结果与总时隙数是对应的,不需要引入空闲业务或排队机制,减少了分配时隙时的硬件开销。
可选的,序列确定单元1502具体用于使能二进制计数器从零开始计数至第一总时隙数;根据二进制计数器的进位结果或跳变结果输出多个第一基底,得到第一回文序列。
可选的,序列确定单元1502具体用于获取预设的时隙序列对照表,时隙序列对照表包括第一总时隙数和第一回文序列的映射关系;根据第一总时隙数和映射关系确定第一回文序列。
可选的,时隙获取单元1501还用于获取第二总时隙数和第二业务所需的第二时隙数,第二总时隙数为第一总时隙数与第一时隙数之差;序列确定单元1502还用于根据第二总时隙数确定第二回文序列,第二回文序列包括数量和第二总时隙数相同的多个第二基底,多个第二基底中的每种第二基底用于表示一个第二基底时隙数;时隙分配单元1503还用于根据第二时隙数为第二业务分配时隙,第二时隙数由每种第二基底与对应的第二基底系数的乘积之和表示,第二基底系数用于确定第二业务需要占用的第二基底时隙数。
可选的,该时隙分配系统1500还包括:
时隙判断单元1504,用于根据不同的时钟信号依次判断第一业务和/或第二业务是否占用与当前时钟信号对应的时隙;根据判断的结果依次输出每个时隙承载的业务。
本申请实施例提供的时隙分配系统1500可以参阅前述时隙分配方法实施例部分的相应内容进行理解,此处不再重复赘述。
如图16所示,本申请实施例提供的时隙分配系统1600的另一实施例包括:
时隙获取单元1601,用于获取总时隙数、第一业务所需的第一时隙数和第二业务所需的第二时隙数;该时隙获取单元1601可以执行上述方法实施例中的步骤S1301。
序列确定单元1602,用于根据总时隙数确定回文序列,回文序列包括数量大于或等于最大时隙数的多个基底,最大时隙数为第一时隙数和第二时隙数中最大值,多个基底中的每种基底用于表示一个基底时隙数;该序列确定单元1602可以执行上述方法实施例中的步骤S1302。
时隙分配单元1603,用于根据第一时隙数和第二时隙数为第一业务和第二业务分配时 隙,第一时隙数和第二时隙数由每种基底与对应的基底系数的乘积之和表示,基底系数用于确定第一业务和第二业务需要占用的基底时隙数。该时隙分配单元1603可以执行上述方法实施例中的步骤S1303。
本申请实施例中,回文序列中多个基底的数量大于或等于最大时隙数,回文序列的长度Q没有Q=2n-1的限制,基于该回文序列得到的时隙分配结果不需要引入空闲业务,减少了分配时隙时的硬件开销。
可选的,序列确定单元1602具体用于使能二进制计数器从零开始计数至总时隙数;根据二进制计数器的进位结果或跳变结果输出多个基底,得到回文序列。
可选的,序列确定单元1602具体用于获取预设的时隙序列对照表,时隙序列对照表包括总时隙数和回文序列的映射关系;根据总时隙数和映射关系确定回文序列。
如图17所示,为本申请的实施例提供的计算机设备1700的一种可能的逻辑结构示意图。计算机设备1700包括:处理器1701、通信接口1702、存储系统1703以及总线1704。处理器1701、通信接口1702以及存储系统1703通过总线1704相互连接。在本申请的实施例中,处理器1701用于对计算机设备1700的动作进行控制管理,例如,处理器1701用于执行图2至图12,或图13至图14部分实施例所描述时隙分配方法。通信接口1702用于支持计算机设备1700进行通信。存储系统1703,用于存储计算机设备1700的程序代码和数据。
其中,处理器1701可以是中央处理器单元,通用处理器,数字信号处理器,专用集成电路,现场可编程门阵列或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器1701也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理器和微处理器的组合等等。总线1704可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图17中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
在本申请的另一实施例中,还提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,当设备的至少一个处理器执行该计算机执行指令时,设备执行上述图2至图12,或图13至图14部分实施例所描述时隙分配方法。
在本申请的另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括计算机执行指令,该计算机执行指令存储在计算机可读存储介质中;设备的至少一个处理器可以从计算机可读存储介质读取该计算机执行指令,至少一个处理器执行该计算机执行指令使得设备执行上述图2至图12,或图13至图14部分实施例所描述时隙分配方法。
在本申请的另一实施例中,还提供一种芯片系统,该芯片系统包括至少一个处理器和接口,该接口用于接收数据和/或信号,至少一个处理器用于支持实现上述图2至图12,或图13至图14部分实施例所描述时隙分配方法。在一种可能的设计中,芯片系统还可以包括存储器,存储器,用于保存计算机设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,系 统和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,系统和方法,可以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,系统或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,read-only memory)、随机存取存储器(RAM,random access memory)、磁碟或者光盘等各种可以存储程序代码的介质。

Claims (19)

  1. 一种时隙分配方法,其特征在于,包括:
    获取第一总时隙数和第一业务所需的第一时隙数;
    根据所述第一总时隙数确定第一回文序列,所述第一回文序列包括数量和所述第一总时隙数相同的多个第一基底,所述多个第一基底中的每种第一基底用于表示一个第一基底时隙数;
    根据所述第一时隙数为所述第一业务分配时隙,所述第一时隙数由所述每种第一基底与对应的第一基底系数的乘积之和表示,所述第一基底系数用于确定所述第一业务需要占用的所述第一基底时隙数。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第一总时隙数确定第一回文序列包括:
    使能二进制计数器从零开始计数至所述第一总时隙数;
    根据所述二进制计数器的进位结果或跳变结果输出所述多个第一基底,得到所述第一回文序列。
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述第一总时隙数确定第一回文序列包括:
    获取预设的时隙序列对照表,所述时隙序列对照表包括所述第一总时隙数和所述第一回文序列的映射关系;
    根据所述第一总时隙数和所述映射关系确定所述第一回文序列。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述根据所述第一时隙数为所述第一业务分配时隙之后,所述方法还包括:
    获取第二总时隙数和第二业务所需的第二时隙数,所述第二总时隙数为所述第一总时隙数与所述第一时隙数之差;
    根据所述第二总时隙数确定第二回文序列,所述第二回文序列包括数量和所述第二总时隙数相同的多个第二基底,所述多个第二基底中的每种第二基底用于表示一个第二基底时隙数;
    根据所述第二时隙数为所述第二业务分配时隙,所述第二时隙数由所述每种第二基底与对应的第二基底系数的乘积之和表示,所述第二基底系数用于确定所述第二业务需要占用的所述第二基底时隙数。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    根据不同的时钟信号依次判断所述第一业务和/或所述第二业务是否占用与当前所述时钟信号对应的时隙;
    根据所述判断的结果依次输出每个所述时隙承载的业务。
  6. 一种时隙分配方法,其特征在于,包括:
    获取总时隙数、第一业务所需的第一时隙数和第二业务所需的第二时隙数;
    根据所述总时隙数确定回文序列,所述回文序列包括数量大于或等于最大时隙数的多个基底,所述最大时隙数为所述第一时隙数和所述第二时隙数中最大值,所述多个基底中 的每种基底用于表示一个基底时隙数;
    根据所述第一时隙数和所述第二时隙数为所述第一业务和第二业务分配时隙,所述第一时隙数和所述第二时隙数由所述每种基底与对应的基底系数的乘积之和表示,所述基底系数用于确定所述第一业务和所述第二业务需要占用的所述基底时隙数。
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述总时隙数确定回文序列包括:
    使能二进制计数器从零开始计数至所述总时隙数;
    根据所述二进制计数器的进位结果或跳变结果输出所述多个基底,得到所述回文序列。
  8. 根据权利要求6所述的方法,其特征在于,所述根据所述总时隙数确定回文序列包括:
    获取预设的时隙序列对照表,所述时隙序列对照表包括所述总时隙数和所述回文序列的映射关系;
    根据所述总时隙数和所述映射关系确定所述回文序列。
  9. 一种时隙分配系统,其特征在于,包括:
    时隙获取单元,用于获取第一总时隙数和第一业务所需的第一时隙数;
    序列确定单元,根据所述第一总时隙数确定第一回文序列,所述第一回文序列包括数量和所述第一总时隙数相同的多个第一基底,所述多个第一基底中的每种第一基底用于表示一个第一基底时隙数;
    时隙分配单元,用于根据所述第一时隙数为所述第一业务分配时隙,所述第一时隙数由所述每种第一基底与对应的第一基底系数的乘积之和表示,所述第一基底系数用于确定所述第一业务需要占用的所述第一基底时隙数。
  10. 根据权利要求9所述的系统,其特征在于,所述序列确定单元具体用于使能二进制计数器从零开始计数至所述第一总时隙数;根据所述二进制计数器的进位结果或跳变结果输出所述多个第一基底,得到所述第一回文序列。
  11. 根据权利要求9所述的系统,其特征在于,所述序列确定单元具体用于获取预设的时隙序列对照表,所述时隙序列对照表包括所述第一总时隙数和所述第一回文序列的映射关系;根据所述第一总时隙数和所述映射关系确定所述第一回文序列。
  12. 根据权利要求9-11中任一项所述的系统,其特征在于,
    所述时隙获取单元还用于获取第二总时隙数和第二业务所需的第二时隙数,所述第二总时隙数为所述第一总时隙数与所述第一时隙数之差;
    所述序列确定单元还用于根据所述第二总时隙数确定第二回文序列,所述第二回文序列包括数量和所述第二总时隙数相同的多个第二基底,所述多个第二基底中的每种第二基底用于表示一个第二基底时隙数;
    所述时隙分配单元还用于根据所述第二时隙数为所述第二业务分配时隙,所述第二时隙数由所述每种第二基底与对应的第二基底系数的乘积之和表示,所述第二基底系数用于确定所述第二业务需要占用的所述第二基底时隙数。
  13. 根据权利要求12所述的系统,其特征在于,所述系统还包括:
    时隙判断单元,用于根据不同的时钟信号依次判断所述第一业务和/或所述第二业务是否占用与当前所述时钟信号对应的时隙;根据所述判断的结果依次输出每个所述时隙承载的业务。
  14. 一种时隙分配系统,其特征在于,包括:
    时隙获取单元,用于获取总时隙数、第一业务所需的第一时隙数和第二业务所需的第二时隙数;
    序列确定单元,用于根据所述总时隙数确定回文序列,所述回文序列包括数量大于或等于最大时隙数的多个基底,所述最大时隙数为所述第一时隙数和所述第二时隙数中最大值,所述多个基底中的每种基底用于表示一个基底时隙数;
    时隙分配单元,用于根据所述第一时隙数和所述第二时隙数为所述第一业务和第二业务分配时隙,所述第一时隙数和所述第二时隙数由所述每种基底与对应的基底系数的乘积之和表示,所述基底系数用于确定所述第一业务和所述第二业务需要占用的所述基底时隙数。
  15. 根据权利要求14所述的系统,其特征在于,所述序列确定单元具体用于使能二进制计数器从零开始计数至所述总时隙数;根据所述二进制计数器的进位结果或跳变结果输出所述多个基底,得到所述回文序列。
  16. 根据权利要求14所述的系统,其特征在于,所述序列确定单元具体用于获取预设的时隙序列对照表,所述时隙序列对照表包括所述总时隙数和所述回文序列的映射关系;根据所述总时隙数和所述映射关系确定所述回文序列。
  17. 一种计算机设备,包括:处理器、通信接口和存储器,所述存储器用于存储程序代码,所述处理器用于调用所述存储器中的程序代码以使得所述处理器执行如权利要求1-5或6-8中任一项所述的方法。
  18. 一种计算机可读存储介质,其上存储有计算机执行指令,其特征在于,所述计算机执行指令被处理器执行时实现如权利要求1-5或6-8中任一项所述的方法。
  19. 一种芯片系统,其特征在于,包括至少一个处理器和接口,所述接口用于接收数据和/或信号,所述至少一个处理器被配置为用于执行如权利要求1-5或6-8中任一项所述的方法。
PCT/CN2023/081247 2022-04-24 2023-03-14 一种时隙分配方法及相关设备 WO2023207378A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210454858.XA CN116996157A (zh) 2022-04-24 2022-04-24 一种时隙分配方法及相关设备
CN202210454858.X 2022-04-24

Publications (1)

Publication Number Publication Date
WO2023207378A1 true WO2023207378A1 (zh) 2023-11-02

Family

ID=88517249

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/081247 WO2023207378A1 (zh) 2022-04-24 2023-03-14 一种时隙分配方法及相关设备

Country Status (2)

Country Link
CN (1) CN116996157A (zh)
WO (1) WO2023207378A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327391A (zh) * 2018-12-17 2020-06-23 深圳市中兴微电子技术有限公司 一种时分复用方法及装置、系统、存储介质
WO2020147661A1 (zh) * 2019-01-14 2020-07-23 中兴通讯股份有限公司 信号传输方法及装置、网络设备及计算机可读存储介质
CN112866138A (zh) * 2019-11-26 2021-05-28 华为技术有限公司 一种资源分配方法、装置和设备
CN114095950A (zh) * 2020-08-24 2022-02-25 华为技术有限公司 资源配置方法和通信装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327391A (zh) * 2018-12-17 2020-06-23 深圳市中兴微电子技术有限公司 一种时分复用方法及装置、系统、存储介质
WO2020147661A1 (zh) * 2019-01-14 2020-07-23 中兴通讯股份有限公司 信号传输方法及装置、网络设备及计算机可读存储介质
CN112866138A (zh) * 2019-11-26 2021-05-28 华为技术有限公司 一种资源分配方法、装置和设备
CN114095950A (zh) * 2020-08-24 2022-02-25 华为技术有限公司 资源配置方法和通信装置

Also Published As

Publication number Publication date
CN116996157A (zh) 2023-11-03

Similar Documents

Publication Publication Date Title
US9367499B2 (en) System on chip for enhancing quality of service and method of controlling the same
WO2019085816A1 (zh) 业务数据传输方法及装置
TWI430102B (zh) 網路卡資源配置方法、儲存媒體、及電腦
CN107172131A (zh) 文件上传方法和装置
US7152136B1 (en) Implementation of PCI express
WO2021254330A1 (zh) 内存管理方法、系统、客户端、服务器及存储介质
CN107766267B (zh) 一种i2c总线的仲裁方法及系统
US11789771B2 (en) Method and apparatus for a step-enabled workflow
TWI717373B (zh) 用於通用序列匯流排2.0頻寬保留之方法及系統
JP6408747B1 (ja) 統合メモリ管理ユニット(mmu)を使用したメモリ管理機能の提供
KR101478939B1 (ko) 비-포트형 제너릭 디바이스 (소프트웨어 관리형 제너릭 디바이스)
CN112202600B (zh) 一种多节点单主机与多主机通信自动切换装置及方法
WO2023207378A1 (zh) 一种时隙分配方法及相关设备
US11296969B2 (en) Methods and devices for energy saving in communication network
JP4940478B2 (ja) 同期シリアルtdmaバス上のフロー制御方法
WO2019060526A1 (en) MEMORY MANAGEMENT UNIT TRANSACTION DISTRIBUTOR
US20180018296A1 (en) Flow control protocol for an audio bus
WO2023231792A1 (zh) 一种时隙分配方法及通信装置
CN109656169A (zh) 多重调度表切换方法、装置、计算机设备及存储介质
WO2021135763A1 (zh) 数据处理方法和装置、存储介质及电子装置
US20240070095A1 (en) Data transmission power optimization
CN115051780B (zh) 物理资源块分配方法、装置、设备及存储介质
CN110601784B (zh) Tdm接口扩展方法及装置、设备、可读存储介质
WO2023246339A1 (zh) 资源调度方法及使用方法、网络设备、终端设备及介质
WO2024113448A1 (zh) 灵活以太网数据块处理方法、装置、存储介质及电子设备

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: 23794814

Country of ref document: EP

Kind code of ref document: A1