A network resource allocation method, device, terminal equipment and storage medium

By obtaining network environment detection reports in real time and calculating network quality scores, and dynamically selecting target computer rooms and servers, the problem of poor data transmission quality when network status changes in the existing technology is solved, and a stable data transmission effect is achieved.

CN115426285BActive Publication Date: 2025-01-03SHANGHAI JIUCHI NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211022919.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-25
Publication Date
2025-01-03
Estimated Expiration
2042-08-25

AI Technical Summary

Technical Problem

The existing network resource allocation method cannot be dynamically adjusted when the network state changes, resulting in poor data transmission quality.

Method used

By obtaining the client's network environment detection report in real time, calculate the network quality scores of the main control client and the controlled client through the transit room and the secondary forwarding room, select the target room and determine the target server to achieve dynamic adjustment.

Benefits of technology

Ensures the stability of data transmission quality, and even when the network state changes, the target server with better communication effects can be selected, avoiding the decline in service availability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115426285B_ABST
    Figure CN115426285B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a network resource allocation method, apparatus, terminal equipment and storage medium. After obtaining the network detection report of the network environment in real time, the embodiment of the present invention respectively calculates the first target network quality score of the master client and the controlled client when transmitting data through the transfer computer room according to the network detection report, and calculates the second target network quality score of the master client and the controlled client when transmitting data through the secondary forwarding computer room, and finally selects the target computer room according to the first target network quality score and the second target network quality score, and selects the target server used by the master client and the controlled client for data transmission in the target computer room. Even when the network state suddenly changes, the embodiment of the present invention can determine the target server with better communication effect, thereby ensuring the data transmission quality of the master client and the controlled client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the network field, and in particular, to a network resource allocation method, apparatus, terminal device and storage medium. Background Art

[0002] At present, with the popularization of mobile devices and the development of 5G technology, emerging mobile applications such as computing-intensive or delay-sensitive applications are constantly emerging and quickly gaining favor among users, such as virtual reality, augmented reality, and live video. In the above mobile applications, the terminal generally collects data of images, videos, and interactive information and uploads them to the cloud. The cloud then processes the received data, such as video resource scheduling, real-time rendering, and compression encoding. Finally, the processed data is sent back to the terminal, which is decoded and displayed on the terminal.

[0003] With the continuous growth of the above-mentioned Internet media services and video traffic content, in order to pursue lower latency, better user experience and lower costs, using edge computing to process data in the cloud has gradually become an effective solution. When allocating network resources for edge computing, traditional methods generally allocate them based on static allocation schemes such as distance. However, this network resource allocation method cannot be dynamically adjusted when the network status suddenly changes, resulting in poor data transmission quality. Summary of the invention

[0004] The embodiments of the present invention provide a network resource allocation method, apparatus, terminal device and storage medium, which solve the technical problem that the existing network resource allocation method cannot be dynamically adjusted when the network status suddenly changes, resulting in poor data transmission quality.

[0005] In a first aspect, an embodiment of the present invention provides a network resource allocation method, including:

[0006] Obtaining in real time a network detection report of the network environment in which the client is located, the network detection report including network parameters when data is transmitted between the client and different computer rooms, and network parameters when data is transmitted between different computer rooms, the client including a master client and a controlled client, and the computer room including a transfer computer room and a secondary forwarding computer room;

[0007] According to the detection report, a first target network quality score is calculated when the master client and the controlled client perform data transmission through the transfer room, and a second target network quality score is calculated when the master client and the controlled client perform data transmission through the secondary forwarding room;

[0008] Selecting a target computer room according to the first target network quality score and the second target network quality score;

[0009] In the target computer room, a target server used by the master client and the controlled client for data transmission is determined.

[0010] In a second aspect, an embodiment of the present invention provides a network resource allocation device, including:

[0011] A report acquisition module is used to acquire in real time a network detection report of the network environment in which the client is located, wherein the network detection report includes network parameters when data is transmitted between the client and different computer rooms, and network parameters when data is transmitted between different computer rooms, wherein the client includes a master control client and a controlled client, and the computer room includes a transfer computer room and a secondary forwarding computer room;

[0012] A quality score calculation module, used to calculate, according to the detection report, a first target network quality score when the master client and the controlled client perform data transmission through the transfer computer room, and a second target network quality score when the master client and the controlled client perform data transmission through the secondary forwarding computer room;

[0013] A target computer room determination module, selecting a target computer room according to the first target network quality score and the second target network quality score;

[0014] The allocation result determination module is used to determine the target server used by the master client and the controlled client for data transmission in the target computer room.

[0015] In a third aspect, an embodiment of the present invention provides a terminal device, wherein the terminal device includes a processor and a memory;

[0016] The memory is used to store a computer program and transmit the computer program to the processor;

[0017] The processor is used to execute a network resource allocation method as described in the first aspect according to instructions in the computer program.

[0018] In a fourth aspect, an embodiment of the present invention provides a storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute a network resource allocation method as described in the second aspect.

[0019] As described above, after the embodiment of the present invention obtains the network detection report of the network environment in real time, it calculates the first target network quality score of the master client and the controlled client when transmitting data through the transit computer room according to the network detection report, and calculates the second target network quality score of the master client and the controlled client when transmitting data through the secondary forwarding computer room. Finally, according to the first target network quality score and the second target network quality score, the target computer room is selected, and the target server used by the master client and the controlled client for data transmission is selected in the target computer room.

[0020] The embodiment of the present invention can determine the target server used by the master client and the controlled client for data transmission based on the network detection report obtained in real time, so that the target server used can be dynamically adjusted in real time according to the current network status. Even when the network status changes suddenly, the target server with better communication effect can be determined, which ensures the data transmission quality of the master client and the controlled client, and solves the technical problem that the existing allocation method cannot be dynamically adjusted when the network status changes suddenly, resulting in poor data transmission quality. In addition, when selecting the target computer room, the application supports two types of load restrictions, namely the number of subscriptions and the uplink bandwidth, which can better protect the computer room and avoid the decrease in service availability due to exceeding the load limit. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A method flow chart of a network resource allocation method provided by an embodiment of the present invention.

[0022] Figure 2 A schematic diagram of an application scenario of a network resource allocation method provided by an embodiment of the present invention.

[0023] Figure 3 A schematic diagram of a client performing data transmission through a transfer room and performing data transmission through a secondary forwarding room provided in an embodiment of the present invention.

[0024] Figure 4 A method flow chart of another network resource allocation method provided by an embodiment of the present invention.

[0025] Figure 5 A schematic diagram of the structure of a network resource allocation device provided by an embodiment of the present invention.

[0026] Figure 6 A schematic diagram of the structure of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following description and accompanying drawings fully illustrate the specific embodiments of the present application so that those skilled in the art can practice them. The examples represent possible variations only. Unless explicitly required, separate components and functions are optional, and the order of operation can vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. The scope of the embodiments of the present application includes the entire scope of the claims, and all available equivalents of the claims. In this article, each embodiment may be represented individually or generally by the term "invention", which is only for convenience, and if more than one invention is disclosed in fact, it is not intended to automatically limit the scope of the application to any single invention or inventive concept. In this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, without requiring or implying any actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed. The various embodiments are described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. As for the structures, products, etc. disclosed in the embodiments, since they correspond to the parts disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0028] like Figure 1 As shown, Figure 1 A flowchart of a network resource allocation method provided by an embodiment of the present invention. The network resource allocation method provided by an embodiment of the present invention can be executed by a terminal device, which can be implemented by software and / or hardware. The terminal device can be composed of two or more physical entities, or can be composed of one physical entity. For example, the terminal device can be a computer, a host computer, a server, and other devices. The method includes the following steps:

[0029] Step 101, obtain in real time a network detection report of the network environment where the client is located, the network detection report includes network parameters when data is transmitted between the client and different computer rooms, and network parameters when data is transmitted between different computer rooms. The client includes a master client and a controlled client, and the computer room includes a transit computer room and a secondary forwarding computer room.

[0030] In this embodiment, when allocating network resources, it is first necessary to obtain in real time a network detection report of the network environment in which the client is located, wherein the client includes a master client and a controlled client. The master client is generally installed on the user terminal, while the controlled client is generally installed in the business system. The master client and the controlled client transmit data through the network. The user can send instructions to the controlled client through the master client, thereby realizing data transmission between the user terminal and the business system. For example, the master client sends a data acquisition instruction to the controlled client, so that the controlled client sends the data collected by the business system to the user terminal. In one embodiment, when the master client sends a connection request to the controlled client, the controlled client can send a network resource allocation request to the terminal device, so that the terminal device starts to execute the steps in the network resource allocation method.

[0031] When obtaining a network detection report of the network environment, it can be collected through the detection service installed on the master client. Exemplarily, after the master client sends a detection instruction to the detection service, the detection service detects the computer room in the network environment, thereby obtaining a network detection report when the master client and the computer room are transmitting data, a network detection report when the controlled client and the computer room are transmitting data, and a network detection report when data is transmitted between computer rooms. In this embodiment, the network parameters in the detection report include packet loss rate, latency, and jitter. After collecting the network detection report, the detection service can also send the network detection report to the Redis database for storage, so that the terminal device can obtain the network detection report in the Redis database, such as Figure 2 As shown, Figure 2 A schematic diagram of an application scenario of a network resource allocation method provided by an embodiment of the present invention. In addition, the length of time detected by the detection service can be set according to actual needs, for example, the detection service detects network parameters within one minute, or network parameters within five minutes, etc. In another embodiment, the server in the computer room is also installed with a forwarding service, which is used to report the status information of the server (such as the type of server, remaining computing power, workload, etc.) to the Redis database for storage.

[0032] In this embodiment, the computer room includes a transfer computer room and a secondary forwarding computer room. Among them, the transfer computer room refers to the computer room used for one forwarding service during data transmission, and the secondary forwarding computer room refers to two computer rooms used for two forwarding services during data transmission. Exemplarily, as shown in Figure 3, when the master client and the controlled client transmit data through the transfer computer room, the transfer computer room only needs to forward the data once; and when the master client and the controlled client transmit data through the secondary forwarding computer room, two secondary forwarding computer rooms are required to forward the data twice.

[0033] In one embodiment, the terminal device can also obtain static routing information, information about the continent to which the computer room is connected, IP address binding information, computer room information, and server information in the computer room from the configuration center. After the terminal device obtains the network detection report, if there is a computer room of unknown type (unknown regional location or unknown operator type) or there is no corresponding detection report in the computer room, a three-line computer room (a computer room with three types of operators) is used by default during the data transmission process, and the corresponding detection report of the three-line computer room is obtained. When the type of the computer room in the network environment is a cross-border connection computer room, an overseas connection computer room, or an IP user is bound to the computer room, a computer room with a statically allocated route is used by default during the data transmission process, and the corresponding detection report of the computer room is obtained, so that this embodiment can be applied to resource allocation in various special situations.

[0034] On the basis of the above embodiment, after obtaining the network detection report of the network environment where the client is located in real time, it also includes:

[0035] Step 1011: Filter the network detection report in real time according to the availability of the server in the computer room.

[0036] In one embodiment, after obtaining the network detection report, the network detection report can be further filtered to eliminate invalid network detection reports. Specifically, the network detection report can be filtered in real time according to the availability of the server in the computer room. For example, after obtaining the network detection report of each computer room, the computer room that no longer exists and the computer room where there are no available servers are further determined based on the status information of the server obtained from the Redis database. Among them, the computer room where there are no available servers refers to the computer room where there are no servers of the required type (for example, there are no servers for media forwarding or data forwarding), the server in the computer room is overloaded or has no heartbeat, and the client actively excludes the server. It should be further explained that the load of the server in the computer room is too high, which means that the number of client subscriptions is greater than the maximum number of server subscriptions in the pre-set computer room, or the client application uplink bandwidth is greater than the maximum bandwidth of the server in the pre-set computer room.

[0037] After determining the non-existent computer room and the computer room without available servers, the detection reports corresponding to the non-existent computer room and the detection reports of the computer room without available servers can be eliminated to avoid affecting the subsequent selection of the target computer room.

[0038] Step 102: Calculate the first target network quality score when the master client and the controlled client perform data transmission through the transfer room according to the detection report, and calculate the second target network quality score when the master client and the controlled client perform data transmission through the secondary forwarding room.

[0039] After obtaining the detection report, the first target network quality score when the master client and the controlled client perform data transmission through the transit computer room can be calculated based on the detection report. The first target network quality score is used to measure the quality of the network during data transmission. It can be understood that the better the network quality score, the better the network quality. Exemplarily, the network parameters when the master client and the transit computer room perform data transmission, as well as the network parameters when the controlled client and the transit computer room perform data transmission, can be obtained in the detection report, so as to calculate the first target network quality score when the master client and the controlled client perform data transmission through the transit computer room. Similarly, the second target network quality score when the master client and the controlled client perform data transmission through the secondary forwarding computer room can be calculated based on the network parameters when the master client and the secondary forwarding computer room perform data transmission in the detection report, as well as the network parameters when the controlled client and the secondary forwarding computer room perform data transmission.

[0040] Step 103: Select a target computer room according to the first target network quality score and the second target network quality score.

[0041] After obtaining the first target network quality score and the second target network quality score, a target computer room is selected from all transit computer rooms and all secondary forwarding computer rooms based on the first target network quality score and the second target network quality score, so that data transmission between the master client and the controlled client can be realized through the target computer room in the future. It can be understood that when the target computer room is a secondary forwarding computer room, there are two target computer rooms.

[0042] Step 104: In the target computer room, determine the target server used by the master client and the controlled client for data transmission.

[0043] After selecting the target computer room, you can further select the target server in the target computer room, and use the target server to transmit data between the master client and the controlled client to complete the allocation of network resources. In one embodiment, after obtaining the target server, you can further obtain relevant information of the target server, such as obtaining server information corresponding to the target server, which includes the IP address and address location of the target server, and then generate the final resource allocation result. Finally, the terminal device sends the resource allocation result to the master client and the controlled client, so that the master client and the controlled client can perform data transmission through the target server.

[0044] As described above, after the embodiment of the present invention obtains the network detection report of the network environment in real time, it calculates the first target network quality score of the master client and the controlled client when transmitting data through the transit computer room according to the network detection report, and calculates the second target network quality score of the master client and the controlled client when transmitting data through the secondary forwarding computer room. Finally, according to the first target network quality score and the second target network quality score, the target computer room is selected, and the target server used by the master client and the controlled client for data transmission is selected in the target computer room.

[0045] The embodiment of the present invention can determine the target server used by the master client and the controlled client for data transmission based on the network detection report obtained in real time, so that the target server used can be dynamically adjusted in real time according to the current network status. Even when the network status changes suddenly, the target server with better communication effect can be determined, which ensures the data transmission quality of the master client and the controlled client, and solves the technical problem that the existing allocation method cannot be dynamically adjusted when the network status changes suddenly, resulting in poor data transmission quality. In addition, when selecting the target computer room, the application supports two types of load restrictions, namely the number of subscriptions and the uplink bandwidth, which can better protect the computer room and avoid the decrease in service availability due to exceeding the load limit.

[0046] like Figure 4 As shown, Figure 4 A flowchart of another network resource allocation method provided by an embodiment of the present invention is provided. Figure 4 The network resource allocation method shown is a specific implementation of the above network resource allocation method. The network resource allocation method provided in this embodiment includes:

[0047] Step 201, obtain in real time a network detection report of the network environment in which the client is located, the network detection report including network parameters when data is transmitted between the client and different computer rooms, and network parameters when data is transmitted between different computer rooms, the client includes a master client and a controlled client, and the computer room includes a transit computer room and a secondary forwarding computer room.

[0048] Step 202: Obtain the first network parameter when the master control client performs data transmission with the transfer room from the detection report.

[0049] In this embodiment, it is first necessary to obtain the first network parameters when the main control client and the transit room perform data transmission from the detection report. The first network parameters include parameters such as packet loss rate, delay and jitter when the main control client and the transit room perform data transmission.

[0050] Step 203: Obtain the second network parameter when the controlled client performs data transmission with the transfer room from the detection report.

[0051] Similarly, it is necessary to obtain the packet loss rate, delay, jitter and other parameters when the controlled client transmits data to the transit room in the detection report. It should be further explained that if the network used by the master client and the controlled client belongs to the same operator, the single-line server (server that only supports one operator) in the transit room is used, otherwise the multi-line server (server that supports multiple operators) is used.

[0052] Step 204: Calculate a first target network quality score when the master client and the controlled client perform data transmission through different transfer rooms according to the first network parameter and the second network parameter.

[0053] After obtaining the first network parameter and the second network parameter, the first target network quality score is first calculated when the master client and the controlled client perform data transmission through different transfer rooms. In one embodiment, the calculation formula for calculating the first target network quality score is as follows:

[0054]

[0055] Among them, f(client, computer room) is the network quality score between the client and the computer room, rtt represents the delay, loss represents the packet loss rate, jitter represents the jitter, α is the amplification factor, k loss is the packet loss rate weight coefficient, k jitter is the network jitter weight coefficient, b 同运营商 Fixed constants for non-cross-carriers.

[0056]

[0057] Among them, f(client 主 , computer room) represents the network quality score when the main control client and the transfer computer room perform data transmission, f(client 被 , computer room) represents the network quality score when the controlled client and the transit computer room perform data transmission, rtt 主 Represents the delay in data transmission between the main control client and the transfer room, loss 主 Represents the packet loss rate when the main control client and the transfer room transmit data, jitter 主 Represents the jitter during data transmission between the main control client and the transfer room. rtt 被 Represents the delay in data transmission between the controlled client and the transit room, loss 被 Represents the packet loss rate when data is transmitted between the controlled client and the transit room, jitter 被 Represents the jitter during data transmission between the controlled client and the transit room.

[0058] First, the delay, jitter and packet loss rate in the first network parameter corresponding to the same transfer room, and the delay, jitter and packet loss rate in the second network parameter corresponding to the same transfer room are substituted into formula (2) to obtain the calculation result of formula (2), and then the calculation result of formula (2) is substituted into formula (1) to obtain the first target network quality score when the master client and the controlled client transmit data through the same transfer room. After traversing all transfer rooms, the first target network quality score when the master client and the controlled client transmit data through different transfer rooms can be obtained.

[0059] Step 205: Determine the first secondary forwarding room with the best network quality when the master control client performs data transmission with different secondary forwarding rooms.

[0060] Afterwards, the first secondary forwarding room with the best network quality when the master control client transmits data with different secondary forwarding rooms is further determined. Exemplarily, when the first secondary forwarding room is determined, the third network parameter when the master control client transmits data with different secondary forwarding rooms can be substituted into formula (1) to calculate the network quality score, and the network quality score with the largest value is selected, and the room corresponding to the network quality score with the largest value is determined as the first secondary forwarding room.

[0061] Step 206: Determine the second secondary forwarding room with the best network quality when the controlled client performs data transmission with different secondary forwarding rooms.

[0062] Similarly, in this embodiment, a method similar to step 205 may be used to determine the second secondary forwarding room.

[0063] Step 207: Obtain from the detection report the third network parameter when the master client performs data transmission with the first secondary forwarding room, the fourth network parameter when the controlled client performs data transmission with the second secondary forwarding room, and the fifth network parameter when the first secondary forwarding room performs data transmission with the second secondary forwarding room.

[0064] After the first and second forwarding rooms are determined, the third network parameters when the master client performs data transmission with the first and second forwarding rooms, the fourth network parameters when the controlled client performs data transmission with the second and second forwarding rooms, and the fifth network parameters when the first and second forwarding rooms perform data transmission with the second and second forwarding rooms can be further obtained. It can be understood that if the third and fourth network parameters are obtained in steps 205 and 206, only the fifth network parameters need to be obtained in this step.

[0065] Step 208: Calculate a second target network quality score when the master client and the controlled client perform data transmission through the first secondary forwarding room and the second secondary forwarding room according to the third network parameter, the fourth network parameter and the fifth network parameter.

[0066] Afterwards, the second target network quality score when the master client and the controlled client perform data transmission through the secondary forwarding room can be calculated according to the third network parameter, the fourth network parameter and the fifth network parameter. Specifically, the third network parameter, the fourth network parameter and the fifth network parameter can be respectively substituted into formula (3) to calculate the second target network quality score r (client) when the master client and the controlled client perform data transmission through the first secondary forwarding room and the second secondary forwarding room. 主 , Client 被 ), as follows:

[0067] r(client 主 , Client 被 ) = f max (Client 主 ,engine room 主控最佳 )+f max (Client 被 ,engine room 被控最佳 )+f max (engine room 主控最佳 ,engine room 被控最佳 ) (3)

[0068] Among them, f max (Client 主 ,engine room 主控最佳 ) represents the network quality score when the master client transmits data to the first and second forwarding rooms, f max (Client 被 ,engine room 被控最佳 ) represents the network quality score when the controlled client and the second secondary forwarding room transmit data, f max (Client 被 ,engine room 被控最佳 ) represents the network quality score when the first secondary forwarding room and the second secondary forwarding room perform data transmission. In addition, in the process of adding formula (3), it is necessary to follow the calculation rules corresponding to formula (2). For example, in calculating f max (Client 主 ,engine room 主控最佳 )+f max (Client 被 ,engine room 被控最佳 ), the third network parameter and the fourth network parameter need to be substituted into formula (2) for calculation, that is, the delay in the third network parameter is used as rtt in formula (2) 主, the packet loss rate in the third network parameter is used as the loss in formula (2) 主 , the jitter in the third network parameter is taken as the jitter in formula (2) 主 , the delay in the fourth network parameter is used as rtt in formula (2) 被 , the packet loss rate in the fourth network parameter is used as the loss in formula (2) 被 , the jitter in the fourth network parameter is taken as the jitter in formula (2) 被 After the calculation result is obtained, the calculation result and the fifth network parameter are substituted into formula (2) to obtain the final calculation result, and the final calculation result is substituted into formula (1) to calculate the second network quality score. The specific calculation process will not be repeated in this embodiment.

[0069] Step 209: Filter the target network score from the first target network quality score according to a preset filtering rule.

[0070] Afterwards, the target network score is further screened out from the first target network quality score according to a preset quality score threshold. Exemplarily, in one embodiment, the target network score can be screened out according to formula (4), as follows:

[0071] (f≥k×f max ∧f≥f low-threshold )∨(f≥f up-threshold ) (4)

[0072] Where f is the first target network quality score, k is the allowed quality degradation threshold coefficient, and f low-threshold is the lower limit threshold of network quality score, f up-threshold is the network quality score upper threshold, f max It is the maximum value among the first target network quality scores.

[0073] Step 210: Determine whether a secondary forwarding condition is met according to the second target network quality score.

[0074] Afterwards, it is further determined whether the secondary forwarding condition is met according to the second target network quality score. Specifically, in one embodiment, it is determined whether the secondary forwarding condition is met according to formula (5), which is as follows:

[0075] k×r(client 主 , Client 被 )>f max (5)

[0076] Step 211: If yes, then select the first secondary forwarding computer room and the second secondary forwarding computer room as the target computer room.

[0077] Step 212: If not, select a target computer room from the transfer computer rooms corresponding to the target network score.

[0078] If formula (5) holds true, the first secondary forwarding computer room and the second secondary forwarding computer room are selected as the target computer room. If not, the target computer room is selected from the transfer computer room corresponding to the target network score. In one embodiment, when the target computer room is selected from the transfer computer room corresponding to the target network score, the target computer room is randomly selected by proportional weighting according to the remaining computing power of the server in the transfer computer room.

[0079] Step 213: According to the remaining computing power of the servers in the target computer room, a target server used by the master client and the controlled client for data transmission is selected by weighted random method.

[0080] Finally, the target server used by the master client and the controlled client for data transmission can be selected randomly and weighted according to the remaining computing power of the server in the target computer room. The remaining computing power of the server includes the remaining licode subscription number and the remaining bandwidth. The remaining licode subscription number is calculated by subtracting the current server licode subscription number from the maximum allowed licode subscription number of a single server, and the remaining bandwidth is calculated by subtracting the licode uplink bandwidth and the forward uplink bandwidth from the maximum allowed bandwidth of a single server. Exemplarily, in one embodiment, when there are servers A and B in the target computer room, the remaining computing power of server A is 10%, and the remaining computing power of server B is 20%. After weighting, the probability of selecting server A as the target server is 33.3%, and the probability of selecting server B as the target server is 66.6%.

[0081] As described above, the embodiment of the present invention can determine the target server used by the master client and the controlled client for data transmission based on the network detection report obtained in real time, so that the target server used can be dynamically adjusted according to the current network status in real time. Even when the network status changes suddenly, the target server with better communication effect can be determined, thereby ensuring the data transmission quality of the master client and the controlled client, and at the same time making the allocation result of network resources more in line with the needs of network-sensitive users, solving the technical problem that the existing allocation method cannot be dynamically adjusted when the network status changes suddenly, resulting in poor data transmission quality.

[0082] like Figure 5 As shown, Figure 5 A schematic diagram of the structure of a network resource allocation device provided in an embodiment of the present invention includes:

[0083] The report acquisition module 301 is used to obtain in real time a network detection report of the network environment where the client is located. The network detection report includes network parameters when data is transmitted between the client and different computer rooms, and network parameters when data is transmitted between different computer rooms. The client includes a master client and a controlled client, and the computer room includes a transfer computer room and a secondary forwarding computer room.

[0084] The quality score calculation module 302 is used to calculate the first target network quality score when the master client and the controlled client perform data transmission through the transfer room, and the second target network quality score when the master client and the controlled client perform data transmission through the secondary forwarding room according to the detection report;

[0085] A target computer room determination module 303 selects a target computer room according to the first target network quality score and the second target network quality score;

[0086] The allocation result determination module 304 is used to determine the target server used by the master client and the controlled client for data transmission in the target computer room.

[0087] Based on the above embodiment, a report filtering module is further included, which is used to filter the network detection report according to the availability of the server in the computer room in real time after obtaining the network detection report of the network environment where the client is located in real time.

[0088] Based on the above embodiment, the quality score calculation module 302 includes:

[0089] A first parameter acquisition submodule is used to acquire a first network parameter when the master control client performs data transmission with the transfer room from the detection report;

[0090] The second parameter acquisition submodule is used to obtain the second network parameter when the controlled client performs data transmission with the transfer room from the detection report;

[0091] The first score calculation submodule is used to calculate a first target network quality score when the master client and the controlled client perform data transmission through different transfer rooms according to the first network parameter and the second network parameter.

[0092] Based on the above embodiment, the quality score calculation module 302 includes:

[0093] The first computer room determination submodule is used to determine the first secondary forwarding computer room with the best network quality when the master control client performs data transmission with different secondary forwarding computer rooms;

[0094] The second computer room determination submodule is used to determine the second secondary forwarding computer room with the best network quality when the controlled client performs data transmission with different secondary forwarding computer rooms;

[0095] The network parameter acquisition submodule is used to obtain, from the detection report, a third network parameter when the master client performs data transmission with the first secondary forwarding room, a fourth network parameter when the controlled client performs data transmission with the second secondary forwarding room, and a fifth network parameter when the first secondary forwarding room performs data transmission with the second secondary forwarding room;

[0096] The second score calculation submodule is used to calculate the second target network quality score when the master client and the controlled client perform data transmission through the first secondary forwarding room and the second secondary forwarding room according to the third network parameter, the fourth network parameter and the fifth network parameter.

[0097] Based on the above embodiment, the target computer room determination module 303 includes:

[0098] A score screening submodule, configured to screen out a target network score from the first target network quality score according to a preset filtering rule;

[0099] A condition judgment submodule, used to judge whether the secondary forwarding condition is met according to the second target network quality score;

[0100] The computer room selection submodule is used to select the first secondary forwarding computer room and the second secondary forwarding computer room as the target computer room if yes; if no, select the target computer room from the transfer computer rooms corresponding to the target network scores.

[0101] Based on the above embodiment, the condition judgment submodule is specifically used to select the first network score with the largest value from the target network scores; judge whether the product of the quality degradation threshold coefficient and the second target network quality score is greater than the first network score; if so, the secondary forwarding condition is met.

[0102] On the basis of the above embodiment, the allocation result determination module 304 is specifically used to randomly select the target server used by the master client and the controlled client for data transmission according to the remaining computing power of the server in the target computer room.

[0103] As described above, the embodiment of the present invention can determine the target server used by the master client and the controlled client for data transmission based on the network detection report obtained in real time, so that the target server used can be dynamically adjusted according to the current network status in real time. Even when the network status changes suddenly, the target server with better communication effect can be determined, thereby ensuring the data transmission quality of the master client and the controlled client, and at the same time making the allocation result of network resources more in line with the needs of network-sensitive users, solving the technical problem that the existing allocation method cannot be dynamically adjusted when the network status changes suddenly, resulting in poor data transmission quality.

[0104] This embodiment also provides a terminal device, such as Figure 6 As shown, a terminal device 40 includes a processor 400 and a memory 401;

[0105] The memory 401 is used to store a computer program 402 and transmit the computer program 402 to the processor;

[0106] The processor 400 is configured to execute the steps in the above-mentioned embodiment of a network resource allocation method according to the instructions in the computer program 402 .

[0107] Exemplarily, the computer program 402 may be divided into one or more modules / units, which are stored in the memory 401 and executed by the processor 400 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 402 in the terminal device 40.

[0108] The terminal device 40 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device 40 may include, but is not limited to, a processor 400 and a memory 401. Those skilled in the art will appreciate that Figure 6 It is only an example of the terminal device 40 and does not constitute a limitation of the terminal device 40. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device 40 may also include input and output devices, network access devices, buses, etc.

[0109] The processor 400 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0110] The memory 401 may be an internal storage unit of the terminal device 40, such as a hard disk or memory of the terminal device 40. The memory 401 may also be an external storage device of the terminal device 40, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 40. Further, the memory 401 may also include both an internal storage unit of the terminal device 40 and an external storage device. The memory 401 is used to store the computer program and other programs and data required by the terminal device 40. The memory 401 may also be used to temporarily store data that has been output or is to be output.

[0111] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0112] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0113] 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 distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0114] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0115] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, 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 a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store computer programs.

[0116] An embodiment of the present invention further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a network resource allocation method when executed by a computer processor, the method comprising the following steps:

[0117] Obtaining in real time a network detection report of the network environment in which the client is located, the network detection report including network parameters when data is transmitted between the client and different computer rooms, and network parameters when data is transmitted between different computer rooms, the client including a master client and a controlled client, and the computer room including a transfer computer room and a secondary forwarding computer room;

[0118] According to the detection report, a first target network quality score is calculated when the master client and the controlled client perform data transmission through the transfer room, and a second target network quality score is calculated when the master client and the controlled client perform data transmission through the secondary forwarding room;

[0119] Selecting a target computer room according to the first target network quality score and the second target network quality score;

[0120] In the target computer room, a target server used by the master client and the controlled client for data transmission is determined.

[0121] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the embodiments of the present invention are not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention are described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.

Claims

1. A network resource allocation method, characterized in that: include: Obtaining in real time a network detection report of the network environment in which the client is located, the network detection report including network parameters when data is transmitted between the client and different computer rooms, and network parameters when data is transmitted between different computer rooms, the client including a master client and a controlled client, and the computer room including a transfer computer room and a secondary forwarding computer room; According to the detection report, a first target network quality score is calculated when the master client and the controlled client perform data transmission through the transit computer room, and a second target network quality score is calculated when the master client and the controlled client perform data transmission through the secondary forwarding computer room; wherein, according to the detection report, the first target network quality score is calculated when the master client and the controlled client perform data transmission through the transit computer room, including: obtaining a first network parameter when the master client and the transit computer room perform data transmission from the detection report, obtaining a second network parameter when the controlled client and the transit computer room perform data transmission from the detection report, and calculating the first target network quality score when the master client and the controlled client perform data transmission through different transit computer rooms according to the first network parameter and the second network parameter; Selecting a target computer room according to the first target network quality score and the second target network quality score; In the target computer room, a target server used by the master client and the controlled client for data transmission is determined.

2. A network resource allocation method according to claim 1, characterized in that: After obtaining the network detection report of the network environment where the client is located in real time, the method further includes: The network detection report is filtered in real time according to the availability of the server in the computer room.

3. A network resource allocation method according to claim 1, characterized in that: The calculating, according to the detection report, a second target network quality score when the master client and the controlled client perform data transmission through the secondary forwarding room comprises: Determine the first secondary forwarding room with the best network quality when the master control client performs data transmission with different secondary forwarding rooms; Determine the second secondary forwarding room with the best network quality when the controlled client performs data transmission with different secondary forwarding rooms; From the detection report, obtain a third network parameter when the master client performs data transmission with the first secondary forwarding room, a fourth network parameter when the controlled client performs data transmission with the second secondary forwarding room, and a fifth network parameter when the first secondary forwarding room performs data transmission with the second secondary forwarding room; A second target network quality score is calculated when the master client and the controlled client perform data transmission through the first secondary forwarding room and the second secondary forwarding room according to the third network parameter, the fourth network parameter and the fifth network parameter.

4. A network resource allocation method according to claim 3, characterized in that: The selecting a target computer room according to the first target network quality score and the second target network quality score includes: According to a preset filtering rule, filtering out a target network score from the first target network quality score; Determining whether a secondary forwarding condition is met according to the second target network quality score; If yes, then selecting the first secondary forwarding machine room and the second secondary forwarding machine room as target machine rooms; If not, the target computer room is selected from the transfer computer rooms corresponding to the target network score.

5. A network resource allocation method according to claim 4, characterized in that: The determining whether the secondary forwarding condition is met includes: Selecting a first network score with the largest value from the target network scores; Determine whether a product of a quality degradation threshold coefficient and the second target network quality score is greater than the first network score; If so, the secondary forwarding condition is met.

6. A network resource allocation method according to claim 1, characterized in that: Determining, in the target computer room, a target server used by the master client and the controlled client for data transmission includes: The target server used by the master client and the controlled client for data transmission is selected by weighted random method according to the remaining computing power of the server in the target computer room.

7. A network resource allocation device, characterized in that: include: A report acquisition module is used to acquire in real time a network detection report of the network environment in which the client is located, wherein the network detection report includes network parameters when data is transmitted between the client and different computer rooms, and network parameters when data is transmitted between different computer rooms, wherein the client includes a master control client and a controlled client, and the computer room includes a transfer computer room and a secondary forwarding computer room; A quality score calculation module is used to calculate, according to the detection report, a first target network quality score when the master client and the controlled client perform data transmission through the transit computer room, and a second target network quality score when the master client and the controlled client perform data transmission through the secondary forwarding computer room. The quality score calculation module is specifically used to: obtain from the detection report a first network parameter when the master client and the transit computer room perform data transmission, obtain from the detection report a second network parameter when the controlled client and the transit computer room perform data transmission, and calculate, according to the first network parameter and the second network parameter, a first target network quality score when the master client and the controlled client perform data transmission through different transit computer rooms; A target computer room determination module, selecting a target computer room according to the first target network quality score and the second target network quality score; The allocation result determination module is used to determine the target server used by the master client and the controlled client for data transmission in the target computer room.

8. A terminal device, characterized in that: The terminal device includes a processor and a memory; The memory is used to store a computer program and transmit the computer program to the processor; The processor is used to execute a network resource allocation method according to any one of claims 1 to 6 according to instructions in the computer program.

9. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to execute a network resource allocation method according to any one of claims 1 to 6.