Terminal time slot allocation method and device, computer equipment and storage medium
By determining the allocation weight value according to the terminal type, service type and service type level, building a weight value array and selecting the target terminal for time slot allocation, it solves the problem that EPON, 10G-EPON and 50G-PON systems cannot share the same ODN wave division in the prior art. The poor user experience caused by coexistence and terminal uplink rate differences have achieved the effect of improving terminal network speed and leveraging the advantages of 50G-PON ultra-high rate.
Patent Information
- Application Number
- CN202411432532.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-07
AI Technical Summary
The existing technology cannot realize the coexistence of the third generation EPON, 10G-EPON and 50G-PON systems with the same ODN wave division coexistence. Due to the large difference in the uplink rate of the terminal, it is difficult to leverage the advantages of 50G-PON ultra-high rate when using the uplink time division scheme, resulting in users Poor experience.
By determining the allocation weight value based on the terminal type, service type and service type level, building a weight value array, and selecting the target terminal from it for time slot allocation, ensuring that the terminal with higher priority of time slot allocation has a higher probability of being selected as the target terminal.
It effectively improves the terminal network speed, ensures that the ultra-high rate advantage of 50G-PON can be fully utilized, and improves the user experience.
Smart Images

Figure CN119402775A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of optical communication technology, and in particular to a terminal time slot allocation method, device, computer equipment and storage medium. Background Art
[0002] The upstream wavelength of EPON (Ethernet Passive Optical Network) terminals is defined according to the IEEE (Institute of Electrical and Electronics Engineers) standard. Most upstream wavelengths are in the range of 1260 to 1360 nanometers, which conflicts with the upstream and downstream wavelength ranges defined in the 50G-PON (50G-Passive Optical Network) standard. As a result, the existing technology cannot achieve the same ODN wavelength division coexistence of EPON (Ethernet Passive Optical Network), 10G-EPON (10Gigabit Ethernet Passive Optical Network) and 50G-PON three-generation systems; while the upstream time division coexistence solution is technically feasible.
[0003] However, due to the huge difference in uplink rates among the three generations of ONU terminals, EPON, 10G-EPON and 50G-PON, if the uplink time-division scheme is adopted without reasonable uplink time slot resource allocation for the terminal, it will result in poor user experience and make it difficult to give full play to the ultra-high rate advantage of 50GPON. Summary of the invention
[0004] Based on this, it is necessary to provide a terminal time slot allocation method, device, computer equipment and storage medium that can effectively improve the terminal network rate in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for allocating terminal time slots. The method comprises:
[0006] Determine the allocation weight value corresponding to each terminal to be allocated according to parameters such as the terminal type of at least one terminal to be allocated, the service type carried by the terminal, and the level of the service type carried by the terminal;
[0007] According to the allocation weight values corresponding to the terminals to be allocated, a weight value array is constructed; wherein the total number of candidate array elements in the weight value array is greater than or equal to the sum of the allocation weight values; and the number of candidate array elements corresponding to each terminal to be allocated in the weight value array is equal to the allocation weight value corresponding to the terminal to be allocated;
[0008] Selecting a target array element from the weight value array, and using the terminal to be assigned corresponding to the target array element as the target terminal;
[0009] A time slot is allocated to the target terminal.
[0010] In one of the embodiments, determining the allocation weight value corresponding to each terminal to be allocated according to the terminal type of at least one terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal, includes:
[0011] For each terminal to be allocated, determining a type weight value of the terminal to be allocated according to the terminal type of the terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal;
[0012] An allocation weight value corresponding to the terminal to be allocated is determined according to the type weight value.
[0013] In one embodiment, determining the allocation weight value corresponding to the terminal to be allocated according to the type weight value includes:
[0014] Perform a ratio operation on the type weight value of the terminal to be allocated and the weight sum value to obtain the weight proportion corresponding to the terminal to be allocated; wherein the weight sum value is the sum of the type weight values corresponding to each terminal to be allocated;
[0015] Performing a product operation on the weight proportion and the maximum number of terminals to be allocated that are allowed to access, to obtain a product operation result;
[0016] The product operation result is rounded up to obtain the allocation weight value corresponding to the terminal to be allocated.
[0017] In one of the embodiments, determining the type weight value of the terminal to be allocated according to the terminal type of the terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal includes:
[0018] Taking the terminal type of the terminal to be allocated, the service type carried by the terminal and the service type level carried by the terminal as indexes, searching from the mapping relationship between candidate types and candidate weight values to obtain a reference type that is the same as the service type of the terminal;
[0019] The candidate weight value corresponding to the reference type in the mapping relationship is used as the type weight value of the terminal to be allocated.
[0020] In one embodiment, constructing a weight value array according to the allocation weight values corresponding to the terminals to be allocated includes:
[0021] Constructing an initial array; wherein the total number of candidate array elements in the initial array is greater than or equal to the sum of the assigned weight values;
[0022] The allocation weight values corresponding to the terminals to be allocated are mapped to the initial array to obtain a weight value array.
[0023] In one embodiment, mapping the allocation weight values corresponding to the terminals to be allocated to the initial array to obtain the weight value array includes:
[0024] Determining the arrangement order of the terminals to be allocated;
[0025] According to the arrangement order, the allocation weight value corresponding to each of the terminals to be allocated is mapped to the initial array to obtain a weight value array.
[0026] In a second aspect, the present application also provides a terminal time slot allocation device. The device includes:
[0027] A determination module, configured to determine an allocation weight value corresponding to each terminal to be allocated according to a terminal type of at least one terminal to be allocated, a service type carried by the terminal, and a level of the service type carried by the terminal;
[0028] A construction module, configured to construct a weight value array according to the allocation weight values corresponding to each of the terminals to be allocated; wherein the total number of candidate array elements in the weight value array is greater than or equal to the sum of the allocation weight values; and the number of candidate array elements corresponding to each terminal to be allocated in the weight value array is equal to the allocation weight value corresponding to the terminal to be allocated;
[0029] A selection module, used for selecting a target array element from the weight value array, and taking the terminal to be assigned corresponding to the target array element as the target terminal;
[0030] The allocation module is used to allocate time slots to the target terminal.
[0031] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0032] Determine, according to the terminal type of at least one terminal to be allocated, the service type carried by the terminal, and the level of the service type carried by the terminal, an allocation weight value corresponding to each terminal to be allocated;
[0033] According to the allocation weight values corresponding to the terminals to be allocated, a weight value array is constructed; wherein the total number of candidate array elements in the weight value array is greater than or equal to the sum of the allocation weight values; and the number of candidate array elements corresponding to each terminal to be allocated in the weight value array is equal to the allocation weight value corresponding to the terminal to be allocated;
[0034] Selecting a target array element from the weight value array, and using the terminal to be assigned corresponding to the target array element as the target terminal;
[0035] A time slot is allocated to the target terminal.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0037] Determine, according to the terminal type of at least one terminal to be allocated, the service type carried by the terminal, and the level of the service type carried by the terminal, an allocation weight value corresponding to each terminal to be allocated;
[0038] According to the allocation weight values corresponding to the terminals to be allocated, a weight value array is constructed; wherein the total number of candidate array elements in the weight value array is greater than or equal to the sum of the allocation weight values; and the number of candidate array elements corresponding to each terminal to be allocated in the weight value array is equal to the allocation weight value corresponding to the terminal to be allocated;
[0039] Selecting a target array element from the weight value array, and using the terminal to be assigned corresponding to the target array element as the target terminal;
[0040] A time slot is allocated to the target terminal.
[0041] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0042] Determine, according to the terminal type of at least one terminal to be allocated, the service type carried by the terminal, and the level of the service type carried by the terminal, an allocation weight value corresponding to each terminal to be allocated;
[0043] According to the allocation weight values corresponding to the terminals to be allocated, a weight value array is constructed; wherein the total number of candidate array elements in the weight value array is greater than or equal to the sum of the allocation weight values; and the number of candidate array elements corresponding to each terminal to be allocated in the weight value array is equal to the allocation weight value corresponding to the terminal to be allocated;
[0044] Selecting a target array element from the weight value array, and using the terminal to be assigned corresponding to the target array element as the target terminal;
[0045] A time slot is allocated to the target terminal.
[0046] The terminal time slot allocation method, device, computer equipment and storage medium described above determine the allocation weight value corresponding to each terminal to be allocated, and construct a weight value array according to the allocation weight value corresponding to each terminal to be allocated, and then select a target array element from the weight value array, and use the terminal to be allocated corresponding to the target array element as the target terminal; so as to achieve time slot allocation to the target terminal; according to the above content, it can be seen that when the present application selects a target terminal for time slot allocation from at least one terminal to be allocated, it selects a target array element from the weight value array to achieve using the terminal to be allocated corresponding to the target array element as the target terminal, because the weight value array is constructed according to the allocation weight value corresponding to each terminal to be allocated, and the allocation weight value corresponding to each terminal to be allocated The allocation weight value corresponds to the equipment requirements and actual applications of each terminal to be allocated. Therefore, in the process of selecting the terminal to be allocated according to the weight value array, the present application can fully combine the time slot allocation priority of each terminal to be allocated, ensuring that the terminal to be allocated with a higher time slot allocation priority has a higher probability of being selected as the target terminal for time slot allocation, and because the allocation weight values corresponding to different terminals to be allocated may be different, the number of candidate array elements corresponding to different terminals to be allocated in the weight value array may also be different, resulting in the process of selecting the target array element from the candidate array elements corresponding to different terminals to be allocated. The probability of the candidate array elements corresponding to each terminal to be allocated being selected may also be different, thereby realizing reasonable time slot allocation for the terminal to be allocated. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 An application environment diagram of a terminal time slot allocation method provided in an embodiment of the present application;
[0048] Figure 2 A schematic diagram of a flow chart of a first method for allocating terminal time slots provided in an embodiment of the present application;
[0049] Figure 3 A schematic diagram of a flow chart of a second method for allocating terminal time slots provided in an embodiment of the present application;
[0050] Figure 4 A schematic diagram of a flow chart of a third method for allocating terminal time slots provided in an embodiment of the present application;
[0051] Figure 5 A schematic diagram of a weight value array provided in an embodiment of the present application;
[0052] Figure 6A schematic diagram of a fourth method for allocating terminal time slots provided in an embodiment of the present application;
[0053] Figure 7 A structural block diagram of a terminal time slot allocation device provided in an embodiment of the present application;
[0054] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0056] The terminal time slot allocation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. By determining the allocation weight value corresponding to each terminal to be allocated, and constructing a weight value array according to the allocation weight value corresponding to each terminal to be allocated, and then selecting the target array element from the weight value array, and the terminal to be allocated corresponding to the target array element is used as the target terminal; so as to realize the time slot allocation to the target terminal. Among them, the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0057] In one embodiment, Figure 2 As shown, a terminal time slot allocation method is provided, and the method is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included:
[0058] S201, determining an allocation weight value corresponding to each terminal to be allocated according to a terminal type of at least one terminal to be allocated, a service type carried by the terminal, and a level of the service type carried by the terminal.
[0059] It should be noted that the allocation weight value is used to characterize the priority of time slot allocation for the terminal to be allocated; specifically, if the allocation weight value of a terminal to be allocated is higher, it means that the terminal to be allocated has a higher time slot allocation priority; if the allocation weight value of a terminal to be allocated is lower, it means that the terminal to be allocated has a lower time slot allocation priority.
[0060] To further illustrate, when it is necessary to determine the allocation weight value corresponding to each terminal to be allocated, the time slot allocation priority corresponding to each terminal to be allocated can be determined based on the terminal type of at least one terminal to be allocated, the service type carried by the terminal and the level of the service type carried by the terminal, and then, based on the time slot allocation priorities corresponding to different terminals to be allocated, the allocation weight value corresponding to each terminal to be allocated can be determined.
[0061] In one embodiment of the present application, when it is necessary to determine the allocation weight value corresponding to the terminal to be allocated, a first mapping relationship and a second mapping relationship can be pre-defined, and the first mapping relationship records the different time slot allocation priorities corresponding to the terminal types of different terminals to be allocated, the service types carried by the terminals, and the service type levels carried by the terminals, and the second mapping relationship records the different allocation weight values corresponding to different time slot allocation priorities. After determining the terminal type of the terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal, the time slot allocation priority corresponding to the terminal to be allocated is determined according to the first mapping relationship and the terminal type of the terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal, and the time slot allocation priority corresponding to the terminal to be allocated is determined, and the allocation weight value corresponding to each terminal to be allocated is determined according to the time slot allocation priority and the second mapping relationship.
[0062] In another embodiment of the present application, when it is necessary to determine the allocation weight value corresponding to the terminal to be allocated, the type weight value of the terminal to be allocated can be determined in advance based on the terminal type of the terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal, and then, based on the type weight value, the allocation weight value corresponding to the terminal to be allocated is determined.
[0063] S202: construct a weight value array according to the allocation weight value corresponding to each terminal to be allocated.
[0064] Among them, the total number of candidate array elements in the weight value array is greater than or equal to the sum of the allocation weight values; the number of candidate array elements corresponding to each terminal to be allocated in the weight value array is equal to the allocation weight value corresponding to the terminal to be allocated.
[0065] It should be noted that when it is necessary to construct a weight value array, an initial array can be set in advance, wherein the total number of candidate array elements contained in the initial array is greater than or equal to the sum of the assigned weight values, and then, each candidate array element in the initial array is assigned according to the assigned weight value corresponding to each terminal to be assigned, and then, a weight value array is obtained.
[0066] As an example, an initial array is set in advance. If the allocation weight value corresponding to a terminal to be assigned is 3, then 3 candidate array elements in the initial array are used as candidate array elements corresponding to the terminal to be assigned; if the allocation weight value corresponding to a terminal to be assigned is 10, then 10 candidate array elements in the initial array are used as candidate array elements corresponding to the terminal to be assigned; in this way, the operation of constructing the weight value array is completed.
[0067] To further illustrate, when selecting candidate array elements corresponding to the terminal to be assigned from the initial array, the candidate array elements that do not have corresponding terminals to be assigned and have forward element positions can be selected as candidate array elements corresponding to the terminal to be assigned in the selection order preset in the initial array (for example, from left to right, or, if the initial array contains the position number of each candidate array element, then in order from small to large position numbers).
[0068] S203, selecting a target array element from the weight value array, and taking the terminal to be assigned corresponding to the target array element as the target terminal.
[0069] It should be noted that in order to ensure that the target terminal can be determined smoothly according to the weight value array and to ensure that each terminal to be assigned has the possibility of being selected as the target terminal through the weight value array, it is necessary to ensure randomness when selecting the target array element from the weight value array, so that each candidate array element in the weight value array has the possibility of being used as the target array element.
[0070] In one embodiment of the present application, when it is necessary to determine the target array element, the maximum number of candidate array elements in the weight value array that have a corresponding relationship with at least one terminal to be assigned can be determined in advance, and then the target value is randomly determined based on the maximum number of candidate array elements, and the value of the target value is less than the maximum number of candidate array elements and is a non-zero integer; the target value is used as the position number corresponding to the target array element in the weight value array, and then, the target array element is selected from the weight value array according to the target value.
[0071] To further illustrate, after the target array element is determined, the terminal to be allocated corresponding to the target array element may be used as the target terminal according to the corresponding relationship between each candidate array element in the weight value array and the terminal to be allocated.
[0072] S204, allocating time slots to the target terminal.
[0073] In one embodiment of the present application, when it is necessary to allocate time slots to a target terminal, the following contents may be included: determining communication requirements and the terminal service type of the target terminal; wherein the communication requirements may include but are not limited to: data transmission volume, real-time requirements, reliability requirements, etc. The characteristics and requirements of the communication system, defining the length and number of time slots and the relationship between them; evaluating available resources, and according to a pre-set allocation strategy, allocating available resources to time slots according to communication requirements, so as to implement the operation of allocating time slots to the target terminal.
[0074] It should be noted that after completing the time slot allocation for the target terminal, in the process of selecting a new target terminal, the operation of selecting the target array element from the weight value array and using the terminal to be allocated corresponding to the target array element as the target terminal can be returned to, until each terminal to be allocated corresponding to the weight value array is allocated a time slot position, or, the operation of determining the allocation weight value corresponding to each terminal to be allocated based on the terminal type of at least one terminal to be allocated, the service type carried by the terminal, and the level of the service type carried by the terminal can be returned to, the weight value array is determined, and the new target terminal is determined based on the new weight value array.
[0075] The above-mentioned terminal time slot allocation method determines the allocation weight value corresponding to each terminal to be allocated, and constructs a weight value array according to the allocation weight value corresponding to each terminal to be allocated, and then selects the target array element from the weight value array, and uses the terminal to be allocated corresponding to the target array element as the target terminal; so as to realize time slot allocation to the target terminal; according to the above content, it can be known that when the present application selects the target terminal for time slot allocation from at least one terminal to be allocated, it selects the target array element in the weight value array to realize using the terminal to be allocated corresponding to the target array element as the target terminal, because the weight value array is constructed according to the allocation weight value corresponding to each terminal to be allocated, and the allocation weight value corresponding to each terminal to be allocated is the same as that of each terminal to be allocated. The device requirements of the allocated terminal and the actual application correspond to each other. Therefore, in the process of selecting the terminal to be allocated according to the weight value array, the present application can fully combine the time slot allocation priority of each terminal to be allocated, thereby ensuring that the terminal to be allocated with a higher time slot allocation priority has a higher probability of being selected as the target terminal for time slot allocation, and because the allocation weight values corresponding to different terminals to be allocated may be different, the number of candidate array elements corresponding to different terminals to be allocated in the weight value array may also be different, resulting in the process of selecting the target array element from the candidate array elements corresponding to different terminals to be allocated. The probability of the candidate array elements corresponding to each terminal to be allocated being selected may also be different, thereby realizing reasonable time slot allocation for the terminal to be allocated.
[0076] In one embodiment, if Figure 3 As shown, when it is necessary to determine the allocation weight value corresponding to each terminal to be allocated according to the terminal type of at least one terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal, the following contents may be specifically included:
[0077] S301 : for each terminal to be allocated, determine a type weight value of the terminal to be allocated according to the terminal type of the terminal to be allocated, the service type carried by the terminal, and the level of the service type carried by the terminal.
[0078] It should be noted that when it is necessary to determine the type weight value of the terminal to be assigned based on the terminal type of the terminal to be assigned, the service type carried by the terminal and the level of the service type carried by the terminal, it may specifically include the following contents: using the terminal type of the terminal to be assigned, the service type carried by the terminal and the level of the service type carried by the terminal as indexes, searching from the mapping relationship between candidate types and candidate weight values to obtain a reference type that is the same as the terminal service type; and then, using the candidate weight value corresponding to the reference type in the mapping relationship as the type weight value of the terminal to be assigned.
[0079] In one embodiment of the present application, candidate types may include: EPON ONU, asymmetric 10G-EPON ONU, symmetric 10G-EPON ONU, 50G PON ONU with 12.5G uplink, 50G PON ONU with 25G uplink, 50G PONONU with 50G uplink and registered windowed time slots, and the candidate weight values may be set to Wa, Wb, Wc, Wd, We, Wf, and Wg respectively; therefore, the mapping relationship between the candidate types and the candidate weight values may be shown in the following table.
[0080] Candidate Type Candidate weight value EPONONU Wa Asymmetric 10G-EPONONU Wb Symmetrical 10G-EPONONU W 50G PONONU with 12.5G uplink Wd 50G PONONU with 25G uplink We 50G PONONU with 0G uplink W Register window time slot W
[0081] S302: Determine the allocation weight value corresponding to the terminal to be allocated according to the type weight value.
[0082] It should be noted that when it is necessary to determine the allocation weight value corresponding to the terminal to be allocated based on the type weight value, it may specifically include the following contents: perform a ratio operation on the type weight value of the terminal to be allocated and the weight sum value to obtain the weight ratio corresponding to the terminal to be allocated; wherein the weight sum value is the sum of the type weight values corresponding to each terminal to be allocated; perform a product operation on the weight ratio and the maximum number of terminals to be allocated allowed to access to obtain a product operation result; round up the product operation result to obtain the allocation weight value corresponding to the terminal to be allocated.
[0083] In summary, when it is necessary to determine the allocation weight value corresponding to the terminal to be allocated, the operation of determining the allocation weight value corresponding to the terminal to be allocated can be implemented by calculating formula (1), wherein the calculation formula (1) is as follows:
[0084]
[0085] Among them, Ai refers to the allocation weight value corresponding to the terminal to be allocated; Wi refers to the type weight value corresponding to the terminal to be allocated; N refers to the maximum number of terminals to be allocated that are allowed to access the PON port.
[0086] The above-mentioned terminal time slot allocation method determines the type weight value of the terminal to be allocated; so as to determine the allocation weight value corresponding to the terminal to be allocated according to the type weight value, thereby ensuring that a weight value array can be smoothly constructed according to the allocation weight value corresponding to each terminal to be allocated; and provides a data basis for the subsequent determination of the target terminal, thereby ensuring the smooth progress of the terminal time slot allocation process.
[0087] In one embodiment, if Figure 4 As shown, when it is necessary to construct a weight value array according to the allocation weight values corresponding to each terminal to be allocated, the following contents may be specifically included:
[0088] S401, constructing an initial array.
[0089] The total number of candidate array elements in the initial array is greater than or equal to the sum of the assigned weight values.
[0090] It should be noted that each candidate array element in the initial array may be set with an initial value. After the terminal to be assigned corresponding to the candidate array element is subsequently determined, the candidate array element may be set from the initial value to a preset value corresponding to the terminal to be assigned.
[0091] Further explanation, due to the plus-one effect of the ceiling function, the range of the weight value is calculated as shown in formula (2):
[0092]
[0093] Among them, Wi refers to the type weight value corresponding to the terminal to be allocated; N refers to the maximum number of terminals to be allocated that are allowed to access the PON port.
[0094] Furthermore, from the weight calculation method of each terminal to be allocated and the range of the allocated weight value, it can be known that the sum of the weight values of all terminals to be allocated under a PON port satisfies calculation formula (3), where calculation formula (3) is as follows:
[0095]
[0096] Among them, Ai refers to the allocation weight value corresponding to the terminal to be allocated; Wi refers to the type weight value corresponding to the terminal to be allocated; N refers to the maximum number of terminals to be allocated that are allowed to access the PON port.
[0097] S402, mapping the allocation weight value corresponding to each terminal to be allocated to the initial array to obtain a weight value array.
[0098] It should be noted that when it is necessary to map the allocation weight values corresponding to each terminal to be allocated to the initial array to obtain a weight value array, it may specifically include the following contents: determine the arrangement order of each terminal to be allocated; then, according to the arrangement order, map the allocation weight values corresponding to each terminal to be allocated to the initial array to obtain a weight value array.
[0099] To further illustrate, when it is necessary to determine the arrangement order of the terminals to be allocated, the arrangement order of each terminal to be allocated may be determined randomly, or a rule may be set according to a predetermined order to determine the arrangement order of each terminal to be allocated.
[0100] There are many types of sequence setting rules. As an example, the sequence setting rule may be: determine the arrangement order of each terminal to be allocated according to the descending order of the serial numbers corresponding to the terminals to be allocated; specifically, if there are 3 terminals to be allocated, namely, terminal 1 to be allocated, terminal 2 to be allocated and terminal 3 to be allocated, and the serial numbers corresponding to the 3 terminals to be allocated are 22, 23 and 24 respectively, then according to the serial numbers of the 3 terminals to be allocated, the arrangement order of the 3 terminals to be allocated is determined as: terminal 1 to be allocated to terminal 2 to terminal 3 to be allocated; and the allocation weight value of terminal 1 to be allocated is 1, the allocation weight value of terminal 2 to be allocated is 2, and the allocation weight value of terminal 3 to be allocated is 3, and it is predetermined that the preset value corresponding to terminal 1 to be allocated is a, the preset value corresponding to terminal 2 to be allocated is b, and the preset value corresponding to terminal 3 to be allocated is c; then the constructed weight value array is as follows: Figure 5 shown.
[0101] The above-mentioned terminal time slot allocation method, by constructing an initial array; to realize mapping the allocation weight value corresponding to each terminal to be allocated to the initial array, to obtain a weight value array, ensures that the target array element can be successfully selected from the weight value array in the subsequent process, and the terminal to be allocated corresponding to the target array element is used as the target terminal; it provides a data basis for the subsequent time slot allocation to the target terminal, and ensures the smooth progress of the terminal time slot allocation process.
[0102] In one embodiment, if Figure 6 As shown, when time slot allocation is required for the target terminal, the following contents may be specifically included:
[0103] S601, using the terminal type of the terminal to be allocated, the service type carried by the terminal and the service type level carried by the terminal as indexes, searching from the mapping relationship between candidate types and candidate weight values to obtain a reference type that is the same as the terminal service type.
[0104] S602: Use the candidate weight value corresponding to the reference type in the mapping relationship as the type weight value of the terminal to be allocated.
[0105] S603: Perform a ratio operation on the type weight value of the terminal to be allocated and the weight sum value to obtain the weight proportion corresponding to the terminal to be allocated.
[0106] S604, performing a product operation on the weight proportion and the maximum number of terminals to be allocated that are allowed to access, to obtain a product operation result.
[0107] S605, rounding up the product operation result to obtain the allocation weight value corresponding to the terminal to be allocated.
[0108] S606, constructing an initial array.
[0109] S607: Determine the arrangement order of the terminals to be allocated.
[0110] S608, mapping the allocation weight value corresponding to each terminal to be allocated to the initial array according to the arrangement order, to obtain a weight value array.
[0111] S609, selecting a target array element from the weight value array, and taking the terminal to be assigned corresponding to the target array element as the target terminal.
[0112] S610, allocating time slots to the target terminal.
[0113] The above-mentioned terminal time slot allocation method determines the allocation weight value corresponding to each terminal to be allocated, and constructs a weight value array according to the allocation weight value corresponding to each terminal to be allocated, and then selects the target array element from the weight value array, and uses the terminal to be allocated corresponding to the target array element as the target terminal; so as to realize time slot allocation to the target terminal; according to the above content, it can be known that when the present application selects the target terminal for time slot allocation from at least one terminal to be allocated, it selects the target array element in the weight value array to realize using the terminal to be allocated corresponding to the target array element as the target terminal, because the weight value array is constructed according to the allocation weight value corresponding to each terminal to be allocated, and the allocation weight value corresponding to each terminal to be allocated is the same as that of each terminal to be allocated. The device requirements of the allocated terminal and the actual application correspond to each other. Therefore, in the process of selecting the terminal to be allocated according to the weight value array, the present application can fully combine the time slot allocation priority of each terminal to be allocated, thereby ensuring that the terminal to be allocated with a higher time slot allocation priority has a higher probability of being selected as the target terminal for time slot allocation, and because the allocation weight values corresponding to different terminals to be allocated may be different, the number of candidate array elements corresponding to different terminals to be allocated in the weight value array may also be different, resulting in the process of selecting the target array element from the candidate array elements corresponding to different terminals to be allocated. The probability of the candidate array elements corresponding to each terminal to be allocated being selected may also be different, thereby realizing reasonable time slot allocation for the terminal to be allocated.
[0114] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0115] Based on the same inventive concept, the embodiment of the present application also provides a terminal time slot allocation device for implementing the terminal time slot allocation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more terminal time slot allocation device embodiments provided below can refer to the limitations of the terminal time slot allocation method above, and will not be repeated here.
[0116] In one embodiment, Figure 7As shown, a terminal time slot allocation device is provided, comprising: a determination module 10, a construction module 20, a selection module 30 and an allocation module 40, wherein:
[0117] The determination module 10 is used to determine the allocation weight value corresponding to each terminal to be allocated according to the terminal type of at least one terminal to be allocated, the service type carried by the terminal and the service type level carried by the terminal.
[0118] The construction module 20 is used to construct a weight value array according to the allocation weight value corresponding to each terminal to be allocated; wherein the total number of candidate array elements in the weight value array is greater than or equal to the sum of the allocation weight values; and the number of candidate array elements corresponding to each terminal to be allocated in the weight value array is equal to the allocation weight value corresponding to the terminal to be allocated.
[0119] The selection module 30 is used to select a target array element from the weight value array, and use the terminal to be assigned corresponding to the target array element as the target terminal.
[0120] The allocation module 40 is used to allocate time slots to the target terminal.
[0121] In one embodiment, for each terminal to be allocated, a type weight value of the terminal to be allocated is determined according to the terminal type of the terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal;
[0122] According to the type weight value, the allocation weight value corresponding to the terminal to be allocated is determined.
[0123] In one embodiment, a ratio operation is performed on the type weight value of the terminal to be allocated and the weight sum value to obtain the weight proportion corresponding to the terminal to be allocated; wherein the weight sum value is the sum of the type weight values corresponding to each terminal to be allocated;
[0124] The weight ratio is multiplied by the maximum number of terminals to be allocated that are allowed to access, to obtain a product result;
[0125] The product operation result is rounded up to obtain the allocation weight value corresponding to the terminal to be allocated.
[0126] In one embodiment, the terminal type of the terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal are used as indexes, and a search is performed from the mapping relationship between the candidate types and the candidate weight values to obtain a reference type that is the same as the terminal service type;
[0127] The candidate weight value corresponding to the reference type in the mapping relationship is used as the type weight value of the terminal to be allocated.
[0128] In one embodiment, an initial array is constructed; wherein the total number of candidate array elements in the initial array is greater than or equal to the sum of the assigned weight values;
[0129] The allocation weight values corresponding to the terminals to be allocated are mapped to the initial array to obtain a weight value array.
[0130] In one embodiment, determining the arrangement order of the terminals to be allocated;
[0131] According to the arrangement order, the allocation weight value corresponding to each terminal to be allocated is mapped to the initial array to obtain a weight value array.
[0132] The above-mentioned terminal time slot allocation device determines the allocation weight value corresponding to each terminal to be allocated, and constructs a weight value array according to the allocation weight value corresponding to each terminal to be allocated, and then selects the target array element from the weight value array, and uses the terminal to be allocated corresponding to the target array element as the target terminal; so as to realize time slot allocation to the target terminal; according to the above content, it can be known that when the present application selects the target terminal for time slot allocation from at least one terminal to be allocated, it selects the target array element in the weight value array to realize the terminal to be allocated corresponding to the target array element as the target terminal, because the weight value array is constructed according to the allocation weight value corresponding to each terminal to be allocated, and the allocation weight value corresponding to each terminal to be allocated is the same as that of each terminal to be allocated. The device requirements of the allocated terminal and the actual application correspond to each other. Therefore, in the process of selecting the terminal to be allocated according to the weight value array, the present application can fully combine the time slot allocation priority of each terminal to be allocated, thereby ensuring that the terminal to be allocated with a higher time slot allocation priority has a higher probability of being selected as the target terminal for time slot allocation, and because the allocation weight values corresponding to different terminals to be allocated may be different, the number of candidate array elements corresponding to different terminals to be allocated in the weight value array may also be different, resulting in the process of selecting the target array element from the candidate array elements corresponding to different terminals to be allocated. The probability of the candidate array elements corresponding to each terminal to be allocated being selected may also be different, thereby realizing reasonable time slot allocation for the terminal to be allocated.
[0133] Each module in the above-mentioned terminal time slot allocation device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.
[0134] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a terminal time slot allocation method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0135] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0136] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0137] Determine an allocation weight value corresponding to each terminal to be allocated according to a terminal type of at least one terminal to be allocated, a service type carried by the terminal, and a level of the service type carried by the terminal;
[0138] According to the allocation weight values corresponding to each terminal to be allocated, a weight value array is constructed; wherein the total number of candidate array elements in the weight value array is greater than or equal to the sum of the allocation weight values; and the number of candidate array elements corresponding to each terminal to be allocated in the weight value array is equal to the allocation weight value corresponding to the terminal to be allocated;
[0139] Select a target array element from the weight value array, and use the terminal to be assigned corresponding to the target array element as the target terminal;
[0140] Allocate time slots to target terminals.
[0141] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0142] For each terminal to be allocated, determining a type weight value of the terminal to be allocated according to the terminal type of the terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal;
[0143] According to the type weight value, the allocation weight value corresponding to the terminal to be allocated is determined.
[0144] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0145] Perform a ratio operation on the type weight value of the terminal to be allocated and the weight sum value to obtain the weight proportion corresponding to the terminal to be allocated; wherein the weight sum value is the sum of the type weight values corresponding to each terminal to be allocated;
[0146] The weight ratio is multiplied by the maximum number of terminals to be allocated that are allowed to access, to obtain a product result;
[0147] The product operation result is rounded up to obtain the allocation weight value corresponding to the terminal to be allocated.
[0148] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0149] Using the terminal type of the terminal to be allocated, the service type carried by the terminal and the service type level carried by the terminal as indexes, searching from the mapping relationship between the candidate types and the candidate weight values, and obtaining a reference type that is the same as the terminal service type;
[0150] The candidate weight value corresponding to the reference type in the mapping relationship is used as the type weight value of the terminal to be allocated.
[0151] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0152] Constructing an initial array; wherein the total number of candidate array elements in the initial array is greater than or equal to the sum of the assigned weight values;
[0153] The allocation weight values corresponding to the terminals to be allocated are mapped to the initial array to obtain a weight value array.
[0154] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0155] Determine the arrangement order of each terminal to be allocated;
[0156] According to the arrangement order, the allocation weight value corresponding to each terminal to be allocated is mapped to the initial array to obtain a weight value array.
[0157] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0158] Determine an allocation weight value corresponding to each terminal to be allocated according to a terminal type of at least one terminal to be allocated, a service type carried by the terminal, and a level of the service type carried by the terminal;
[0159] According to the allocation weight values corresponding to each terminal to be allocated, a weight value array is constructed; wherein the total number of candidate array elements in the weight value array is greater than or equal to the sum of the allocation weight values; and the number of candidate array elements corresponding to each terminal to be allocated in the weight value array is equal to the allocation weight value corresponding to the terminal to be allocated;
[0160] Select a target array element from the weight value array, and use the terminal to be assigned corresponding to the target array element as the target terminal;
[0161] Allocate time slots to target terminals.
[0162] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0163] For each terminal to be allocated, determining a type weight value of the terminal to be allocated according to the terminal type of the terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal;
[0164] According to the type weight value, the allocation weight value corresponding to the terminal to be allocated is determined.
[0165] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0166] Perform a ratio operation on the type weight value of the terminal to be allocated and the weight sum value to obtain the weight proportion corresponding to the terminal to be allocated; wherein the weight sum value is the sum of the type weight values corresponding to each terminal to be allocated;
[0167] The weight ratio is multiplied by the maximum number of terminals to be allocated that are allowed to access, to obtain a product result;
[0168] The product operation result is rounded up to obtain the allocation weight value corresponding to the terminal to be allocated.
[0169] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0170] Using the terminal type of the terminal to be allocated, the service type carried by the terminal and the service type level carried by the terminal as indexes, searching from the mapping relationship between the candidate types and the candidate weight values, and obtaining a reference type that is the same as the terminal service type;
[0171] The candidate weight value corresponding to the reference type in the mapping relationship is used as the type weight value of the terminal to be allocated.
[0172] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0173] Constructing an initial array; wherein the total number of candidate array elements in the initial array is greater than or equal to the sum of the assigned weight values;
[0174] The allocation weight values corresponding to the terminals to be allocated are mapped to the initial array to obtain a weight value array.
[0175] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0176] Determine the arrangement order of each terminal to be allocated;
[0177] According to the arrangement order, the allocation weight value corresponding to each terminal to be allocated is mapped to the initial array to obtain a weight value array.
[0178] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0179] Determine an allocation weight value corresponding to each terminal to be allocated according to a terminal type of at least one terminal to be allocated, a service type carried by the terminal, and a level of the service type carried by the terminal;
[0180] According to the allocation weight values corresponding to each terminal to be allocated, a weight value array is constructed; wherein the total number of candidate array elements in the weight value array is greater than or equal to the sum of the allocation weight values; and the number of candidate array elements corresponding to each terminal to be allocated in the weight value array is equal to the allocation weight value corresponding to the terminal to be allocated;
[0181] Select a target array element from the weight value array, and use the terminal to be assigned corresponding to the target array element as the target terminal;
[0182] Allocate time slots to target terminals.
[0183] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0184] For each terminal to be allocated, determining a type weight value of the terminal to be allocated according to the terminal type of the terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal;
[0185] According to the type weight value, the allocation weight value corresponding to the terminal to be allocated is determined.
[0186] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0187] Perform a ratio operation on the type weight value of the terminal to be allocated and the weight sum value to obtain the weight proportion corresponding to the terminal to be allocated; wherein the weight sum value is the sum of the type weight values corresponding to each terminal to be allocated;
[0188] The weight ratio is multiplied by the maximum number of terminals to be allocated that are allowed to access, to obtain a product result;
[0189] The product operation result is rounded up to obtain the allocation weight value corresponding to the terminal to be allocated.
[0190] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0191] Using the terminal type of the terminal to be allocated, the service type carried by the terminal and the service type level carried by the terminal as indexes, searching from the mapping relationship between the candidate types and the candidate weight values, and obtaining a reference type that is the same as the terminal service type;
[0192] The candidate weight value corresponding to the reference type in the mapping relationship is used as the type weight value of the terminal to be allocated.
[0193] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0194] Constructing an initial array; wherein the total number of candidate array elements in the initial array is greater than or equal to the sum of the assigned weight values;
[0195] The allocation weight values corresponding to the terminals to be allocated are mapped to the initial array to obtain a weight value array.
[0196] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0197] Determine the arrangement order of each terminal to be allocated;
[0198] According to the arrangement order, the allocation weight value corresponding to each terminal to be allocated is mapped to the initial array to obtain a weight value array.
[0199] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0200] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processors involved in each embodiment provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., but are not limited thereto.
[0201] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0202] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for allocating terminal time slots, characterized in that: The method comprises: Determine, according to the terminal type of at least one terminal to be allocated, the service type carried by the terminal, and the level of the service type carried by the terminal, an allocation weight value corresponding to each terminal to be allocated; According to the allocation weight values corresponding to the terminals to be allocated, a weight value array is constructed; wherein the total number of candidate array elements in the weight value array is greater than or equal to the sum of the allocation weight values; and the number of candidate array elements corresponding to each terminal to be allocated in the weight value array is equal to the allocation weight value corresponding to the terminal to be allocated; Selecting a target array element from the weight value array, and using the terminal to be assigned corresponding to the target array element as the target terminal; A time slot is allocated to the target terminal.
2. The method according to claim 1, characterized in that The step of determining, according to the terminal type of at least one terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal, the allocation weight value corresponding to each terminal to be allocated comprises: For each terminal to be allocated, determining a type weight value of the terminal to be allocated according to the terminal type of the terminal to be allocated, the service type carried by the terminal, and the service type level carried by the terminal; An allocation weight value corresponding to the terminal to be allocated is determined according to the type weight value.
3. The method according to claim 2, characterized in that The determining, according to the type weight value, an allocation weight value corresponding to the terminal to be allocated includes: Perform a ratio operation on the type weight value of the terminal to be allocated and the weight sum value to obtain the weight proportion corresponding to the terminal to be allocated; wherein the weight sum value is the sum of the type weight values corresponding to each terminal to be allocated; Performing a product operation on the weight proportion and the maximum number of terminals to be allocated that are allowed to access, to obtain a product operation result; The product operation result is rounded up to obtain the allocation weight value corresponding to the terminal to be allocated.
4. The method according to claim 2, characterized in that: The determining the type weight value of the terminal to be allocated according to parameters such as the terminal type of the terminal to be allocated, the service type carried by the terminal, and the level of the service type carried by the terminal includes: Taking the terminal type of the terminal to be allocated, the service type carried by the terminal and the service type level carried by the terminal as indexes, searching from the mapping relationship between candidate types and candidate weight values to obtain a reference type that is the same as the terminal service type; The candidate weight value corresponding to the reference type in the mapping relationship is used as the type weight value of the terminal to be allocated.
5. The method according to claim 1, characterized in that The step of constructing a weight value array according to the allocation weight values corresponding to the terminals to be allocated comprises: Constructing an initial array; wherein the total number of candidate array elements in the initial array is greater than or equal to the sum of the assigned weight values; The allocation weight values corresponding to the terminals to be allocated are mapped to the initial array to obtain a weight value array.
6. The method according to claim 5, characterized in that The step of mapping the allocation weight values corresponding to the terminals to be allocated to the initial array to obtain a weight value array includes: Determining the arrangement order of the terminals to be allocated; According to the arrangement order, the allocation weight value corresponding to each of the terminals to be allocated is mapped to the initial array to obtain a weight value array.
7. A terminal time slot allocation device, characterized in that: The device comprises: A determination module, configured to determine an allocation weight value corresponding to each terminal to be allocated according to a terminal type of at least one terminal to be allocated, a service type carried by the terminal, and a level of the service type carried by the terminal; A construction module, configured to construct a weight value array according to the allocation weight values corresponding to each of the terminals to be allocated; wherein the total number of candidate array elements in the weight value array is greater than or equal to the sum of the allocation weight values; and the number of candidate array elements corresponding to each terminal to be allocated in the weight value array is equal to the allocation weight value corresponding to the terminal to be allocated; A selection module, used for selecting a target array element from the weight value array, and taking the terminal to be assigned corresponding to the target array element as the target terminal; The allocation module is used to allocate time slots to the target terminal.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.