WO2022188592A1 - 一种服务器的选择方法、装置、设备及介质 - Google Patents

一种服务器的选择方法、装置、设备及介质 Download PDF

Info

Publication number
WO2022188592A1
WO2022188592A1 PCT/CN2022/076103 CN2022076103W WO2022188592A1 WO 2022188592 A1 WO2022188592 A1 WO 2022188592A1 CN 2022076103 W CN2022076103 W CN 2022076103W WO 2022188592 A1 WO2022188592 A1 WO 2022188592A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
target
area set
group
area
Prior art date
Application number
PCT/CN2022/076103
Other languages
English (en)
French (fr)
Inventor
姜焰
王光
方文豪
Original Assignee
百果园技术(新加坡)有限公司
姜焰
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 百果园技术(新加坡)有限公司, 姜焰 filed Critical 百果园技术(新加坡)有限公司
Publication of WO2022188592A1 publication Critical patent/WO2022188592A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/10Architectures or entities
    • H04L65/1063Application servers providing network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • H04L65/403Arrangements for multi-party communication, e.g. for conferences

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a method, apparatus, device, and medium for selecting a server.
  • the Internet has shortened the distance between people, so that people from all over the world can make audio and video calls with multiple people through the Internet. Behind these calls, data is forwarded through a large number of servers set up around the world.
  • the quality of audio and video calls is also closely related to the choice of the server, especially in the group call scenario, because every time a group call is initiated, how many group members join and when they join are uncertain.
  • the server selection for group calls brings great challenges, especially in the data forwarding architecture based on the central server, the selection of the central server is particularly strict.
  • Embodiments of the present application provide a method, apparatus, device, and medium for selecting a server, so as to solve the existing problem that the central server cannot be accurately and quickly determined.
  • the embodiment of the present application provides a method for selecting a server, and the method includes:
  • An embodiment of the present application provides an apparatus for selecting a server, and the apparatus includes:
  • a receiving unit configured to receive a group call request sent by a calling party of a target group; wherein, the group call request carries the information of the first target area of each session member in the target group;
  • the processing unit is configured to, if it is determined that the first area set including each of the first target areas matches any pre-stored second area set, then according to the general server corresponding to the matched second area set, determine the The central server for the target group to make group calls.
  • An embodiment of the present application provides an electronic device, the electronic device includes at least a processor and a memory, and the processor is configured to implement the steps of the above-mentioned server selection method when executing a computer program stored in the memory.
  • An embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, implements the steps of the above-mentioned server selection method.
  • the general server corresponding to each second area set is predetermined, and after receiving the group call request sent by the calling party of the target group, the target group For the information of the first target area of each session member in the group, the first area set including each first target area is matched with each pre-saved second area set.
  • the central server for the target group to conduct group calls is determined according to the general server corresponding to the matched second area set, so that the central server can be quickly and accurately determined, which simplifies routing
  • the process of the server determining the central server greatly reduces the pressure of the routing server to determine the central server in real time each time, improves the efficiency of determining the central server, and reduces the delay in determining the routing result.
  • FIG. 1 is a schematic diagram of a selection process of a server according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a scenario of a second area set and a corresponding general server provided by an embodiment of the present application;
  • FIG. 3 is a schematic diagram of a scenario of a second area set and a third area set corresponding to the second area set provided by an embodiment of the present application;
  • FIG. 4 is a schematic diagram of a method for saving a universal server provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a determination process of a general server provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a selection process of a specific server provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a specific real-time determination of a central server provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an apparatus for selecting a server according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • embodiments of the present application provide a server selection method, apparatus, device, and medium.
  • the central server is the server responsible for session management, session member information maintenance and statistics, congestion control and anti-packet loss in the group call scenario. All data packets in group calls must be processed or forwarded by the central server.
  • the platform software for group calls is pre-installed on the user's user equipment, and the platform software is registered on the platform software.
  • account for the convenience of description, denoted as the first account
  • log in A request to establish a group with each other user's account (denoted as the second account for convenience of description) is then input through the user device.
  • the user may input by voice, or by operating a virtual button displayed on the user display interface.
  • the specific method of inputting the request for establishing a group can be flexibly set according to actual needs, which is not specifically limited here.
  • the user equipment After the user equipment receives the request input by the user to establish a group with each second account, it generates a group joining request and sends it to each user equipment that logs in to the second account, so as to realize that each group communication needs to be performed.
  • a second account is invited to the same group.
  • the group joining request will carry the identification information of each second account.
  • the second account is a session member in the group.
  • a request for establishing a group call can be input through the user equipment.
  • the user equipment After receiving the request for establishing a group call, the user equipment generates a group call request and sends it to an electronic device for determining a central server, such as a routing server, so as to assign the central server to the group through the electronic device.
  • the user equipment of the session member who initiates the group call is the calling party of the group.
  • the electronic device after receiving the group call request sent by the calling party of the target group, performs corresponding processing based on the group call request to determine the route selection result, that is, to determine the follow-up call to the group call request.
  • the central server that processes the data during the group call and the link for data transmission.
  • the routing result determined by the electronic device each time is only applicable to the current group call of the target group.
  • the route selection result of (for the convenience of description, it is recorded as the historical route selection result) cannot provide a reference for the next call of the target group.
  • the historical routing results cannot provide a reference for the next call of the target group.
  • the electronic device needs to determine the routing result in real time, and the overhead of determining the routing result each time is usually relatively large, especially when the number of candidate servers that can be determined as the central server is particularly large, the load pressure of the electronic device and the routing delay. will be bigger.
  • embodiments of the present application provide a method, apparatus, device, and medium for selecting a server. Because in the embodiment of the present application, the general server corresponding to each second area set is predetermined, and after receiving the group call request sent by the calling party of the target group, the target group For the information of the first target area of each session member in the group, the first area set including each first target area is matched with each pre-saved second area set.
  • the central server for the target group to conduct group calls is determined according to the general server corresponding to the matched second area set, so that the central server can be quickly and accurately determined, which simplifies routing
  • the process of the server determining the central server greatly reduces the pressure of the routing server to determine the central server in real time each time, improves the efficiency of determining the central server, and reduces the delay in determining the routing result.
  • FIG. 1 is a schematic diagram of a server selection process according to an embodiment of the present application, and the process includes:
  • S101 Receive a group call request sent by a calling party of a target group; wherein, the group call request carries information of a first target area of each conversation member in the target group.
  • the server selection method provided by the embodiments of the present application is applied to an electronic device that provides background services.
  • the electronic device may be a smart device for providing background services, or a server that provides background services, such as a routing server.
  • the caller of the target group will send a group call request to the electronic device, and the group call request will carry the current group information of each session member's area (for the convenience of description, marked as the target area), and the first identification information.
  • the first identification information is used to identify that the group call request is sent by the calling party of the group call.
  • the electronic device After receiving the group call request of the target group, the electronic device parses the group call request, and if the first identification information carried in the group call request is parsed, it is determined that the group call request is the target group The group call request sent by the caller of the group. The electronic device needs to allocate a central server for the call of the target group, so that the data generated during the call can be subsequently transmitted and managed through the central server. The electronic device performs corresponding processing based on the information of the target area of each session member in the target group carried in the group call request, thereby determining the central server for the target group to conduct the group call.
  • the area may be a geographical area of any size, such as a province, city, county, state, country, etc., or may be a certain geographical area divided by yourself.
  • the cell where a certain member is located is determined as an area etc.
  • the target area of each session member may be a geographical area of different levels.
  • the target area of session member A is a certain cell
  • the target area of session member B is a certain county.
  • how to set the target area of the session member can be flexibly set according to requirements, which is not specifically limited here.
  • the division may be made in consideration of the regional distribution of each session member. For example, if there are many session members in a certain cell, and the demand for data communication is large, the cell can be determined as an area, and the target area of the session members in this cell is all this cell, and there are few session members in a certain province. If the demand for data communication is not large, the province can be determined as a region, and the target regions of the session members of the province are all the province.
  • the information of the target area includes identification information of the target area, so as to distinguish each different area.
  • the identification information of the target area may be numbers, letters, special symbols, character strings, etc., and may also be in other forms, as long as the target area can be uniquely identified, it can be used as the identification information of the target area in this embodiment of the present application.
  • the area set including each first target area is determined according to the information of each first target area (for the purpose of For convenience of description, it is recorded as the first area set). Based on the first area set, corresponding processing is performed to determine a central server for the target group to conduct group calls.
  • the electronic device needs to integrate the load and Real-time route selection is performed based on the detection result of the path quality of the data communication between the user equipments of each session member in the target group.
  • the routing results determined for each group call of each group are generally only applicable to this group.
  • the group's current group call cannot provide guidance for determining the route selection result of the group's next group call, nor can it provide guidance for determining the route selection result of other groups' group calls.
  • a general server with low latency for data communication with the user equipment of each session member may be determined in advance based on the regional distribution of each session member in the group , so that the central server for the group to conduct the group call can be directly determined according to the pre-determined general server corresponding to a certain group in the future.
  • a region set (for convenience of description, denoted as a second region set) containing information about the region of each session member in the group is determined, based on the second region set, perform corresponding processing, determine the general server corresponding to the second area set, and store the determined identification information of the general server and the second area set correspondingly.
  • the first area set of the target is obtained based on the above embodiment, the first area set is respectively matched with the second area set in which the general server has been configured, and according to the matching result, it is determined whether the group has been configured general server.
  • the matching between the first area set and the second area set means that the information of each first target area included in the first area set is the same as the information of each area included in the second area set.
  • the general server of the target group has been pre-configured, then according to the matching second area set The corresponding general server performs corresponding processing to determine the central server for the target group to conduct the group call.
  • the general server corresponding to the matched second area set may be directly determined as the central server for the target group to conduct the group call.
  • the general server of the target group is not configured, and each first target area needs to be based on information, perform corresponding processing, and determine in real time the central server for the target group to conduct group calls.
  • the general server corresponding to each second area set is predetermined, and after receiving the group call request sent by the calling party of the target group, the target group For the information of the first target area of each session member in the group, the first area set including each first target area is matched with each pre-saved second area set.
  • the central server for the target group to conduct group calls is determined according to the general server corresponding to the matched second area set, so that the central server can be quickly and accurately determined, which simplifies routing
  • the process of the server determining the central server greatly reduces the pressure of the routing server to determine the central server in real time each time, improves the efficiency of determining the central server, and reduces the delay in determining the routing result.
  • the method further includes:
  • the server For each server in the preconfigured candidate set, determine the maximum delay upper limit of the data communication between the server and the user equipment in each of the second target areas, if the maximum delay upper limit meets the preset first communication requirement , the server is determined as a candidate server;
  • a general server corresponding to a second set of regions including each of the second target regions is determined.
  • the group is determined as a historical group, based on the The regional distribution of each session member of , determine the general server corresponding to the regional distribution.
  • a candidate set is predetermined, and each server that can be determined as a central server is included in the candidate set, so that a general server can be determined from the candidate set later.
  • the group call request is parsed, and the information of each session member in the historical group carried in the group call request is obtained.
  • the information of the target area (denoted as the second target area for the convenience of description), that is, the area distribution of the session members in the historical group is obtained.
  • corresponding processing is performed to determine the corresponding second area set containing each second target area. Universal server.
  • the maximum delay upper limit of the data communication between the server and the user equipment in each second target area determines whether the server is likely to be a candidate server.
  • the general server corresponding to the second area set can be determined from the determined candidate server.
  • the delay time for the server to perform data communication with the user equipment in each second target area (for convenience of description, denoted as the first delay time). Based on each first delay time period, a maximum delay upper limit corresponding to the server is determined.
  • the maximum delay upper limit corresponding to the server may be determined based on the maximum value of each first delay duration corresponding to the server.
  • determining the maximum delay upper limit corresponding to the first server may be determined by the following formula:
  • max(RTT j ) is the maximum delay upper limit corresponding to server j
  • max(RTT ji ) is the maximum value of the first delay durations during which the server j performs data communication with the user equipment in each second target area
  • RTT ji is the first delay duration for the server j to perform data communication with the user equipment in the i-th second target area.
  • a communication requirement is preset (for convenience of description, it is recorded as the first communication requirement).
  • the first communication requirement may be the minimum value of the maximum delay upper limit, or the maximum delay upper limit may be smaller than a preset delay threshold (for convenience of description, it is denoted as the first delay threshold).
  • the server After determining the maximum delay upper limit corresponding to any server based on the foregoing embodiment, it is determined whether the maximum delay upper limit is smaller than the preset first delay threshold. When it is determined that the maximum delay upper limit is less than the preset first delay threshold, the server is determined as a candidate server; it is also possible to determine the maximum delay limit corresponding to each server based on the above-mentioned embodiment, and then determine each server in sequence or randomly. Whether the maximum delay upper limit corresponding to the server is smaller than the preset first delay threshold, when it is determined that the maximum delay upper limit corresponding to any server is smaller than the preset first delay threshold, the server can be determined as a candidate server.
  • the first delay threshold when setting the first delay threshold, different values can be set according to different scenarios. If there are strict requirements on the delay time of the central server, the first delay threshold can be set lower; if in order to To avoid that the general server corresponding to the second area set cannot be determined, the first delay threshold may be set higher.
  • each obtained maximum delay upper limit corresponding to each server is sorted in descending order of the maximum delay upper limit.
  • a set number of servers in the top ranking are determined as candidate servers.
  • the number of candidate servers determined based on the method in the foregoing embodiment may be 0, may be 1, or may be at least 2.
  • the number of determined candidate servers it means that the general server corresponding to the second area set including each second target area cannot be determined.
  • the candidate server can be directly determined as the general server corresponding to the second area set including each second target area.
  • any candidate server may be determined as a general server corresponding to the second area set including each second target area, or the candidate server may be determined as a general server corresponding to the second area set including each second target area.
  • the candidate server corresponding to the minimum value of the maximum delay upper limit is determined as the general server corresponding to the second area set including each second target area.
  • the general server corresponding to the second area set including each of the second target areas is determined based on each of the candidate servers ,include:
  • For each of the candidate servers determine the average delay time for the candidate server to perform data communication with the user equipments in each of the second target areas respectively;
  • the general server corresponding to the second area set is determined according to the average delay time corresponding to each candidate server.
  • the average delay duration of data communication between the candidate server and the user equipment in each second target area is determined, so as to be based on each candidate server.
  • the average delay time corresponding to each candidate server and the corresponding maximum delay upper limit respectively, and the general server corresponding to the second area set is comprehensively determined.
  • each candidate server determines the delay time for the candidate server to perform data communication with the user equipment in each second target area (for convenience of description, denoted as the second delay time), according to each second Delay time, determine the average delay time corresponding to the candidate server.
  • the average delay duration corresponding to the candidate server is determined according to the second delay duration of the data communication between the candidate server and the target user equipment in each second target area, which can be determined by the following formula:
  • avg(RTT j ) is the average delay time corresponding to the candidate server j
  • N represents the number of areas included in the second area set
  • RTT ji is the target user equipment between the candidate server j and the i-th second target area. Second delay duration for data communication.
  • the determining the general server corresponding to the second area set according to the average delay time corresponding to each candidate server includes:
  • For each candidate server determine the comprehensive delay duration according to the average delay duration of the candidate server and its corresponding first weight value, the maximum delay upper limit of the candidate server and its corresponding second weight value;
  • Any candidate server whose comprehensive delay duration meets the preset second communication requirement is determined as a general server corresponding to the second area set.
  • the average delay time corresponding to the candidate server and the corresponding maximum delay upper limit may be combined to determine the general server corresponding to the second area set .
  • the weight value corresponding to the average delay duration (denoted as the first weight value for the convenience of description) and the weight value corresponding to the maximum delay upper limit (denoted as the second weight value for the convenience of description) are preconfigured.
  • the second weight value determines the comprehensive delay time.
  • the comprehensive delay time length corresponding to the candidate server the general server corresponding to the second area set is determined.
  • the average delay time corresponding to the candidate server and the first weight value corresponding to the preconfigured average delay time and the maximum delay limit corresponding to the candidate server and the preconfigured maximum delay limit corresponding to The second weight value to determine the comprehensive delay duration can be determined by the following formula:
  • mul(RTT j ) avg(RTT j )* ⁇ 1 +max(RTT j )* ⁇ 2 ;
  • mul(RTT j ) is the comprehensive delay time corresponding to candidate server j
  • avg(RTT j ) is the average delay time corresponding to candidate server j
  • ⁇ 1 is the first weight value
  • max(RTT j ) is the corresponding value of candidate server j
  • the maximum delay upper limit of , ⁇ 2 is the second weight value.
  • a communication requirement is preset (for convenience of description, it is denoted as a second communication requirement).
  • the server that meets the second communication requirement may be the server with the smallest comprehensive delay time, or any candidate server whose comprehensive delay time is less than the delay threshold corresponding to the second area set (denoted as the second delay threshold for convenience of description).
  • the comprehensive delay time corresponding to any candidate server is obtained based on the above embodiment, it is determined whether the obtained comprehensive delay time meets the preset second communication requirement, and the comprehensive delay time meets any one of the preset second communication requirements.
  • the candidate server is determined as a general server corresponding to the second area set.
  • the server is determined as a candidate server; it is also possible to determine the comprehensive delay duration corresponding to each server based on the above-mentioned embodiment, and then sequentially or randomly Respectively judge whether the comprehensive delay time corresponding to each server is less than the second delay threshold corresponding to the second area set, and when it is determined that the comprehensive delay time corresponding to any server is less than the second delay threshold corresponding to the second area set, you can use This server is determined to be a candidate server.
  • the second delay threshold corresponding to any second area set is determined according to any comprehensive delay duration corresponding to the second area set and a pre-configured fluctuation value, or is determined according to the second area set Any corresponding comprehensive delay duration and a pre-configured ratio are determined.
  • the any integrated delay duration may be a minimum value, a maximum value, etc. of each integrated delay duration corresponding to the second region set.
  • the second delay threshold corresponding to any second area set is determined according to the minimum value of each comprehensive delay duration corresponding to the second area set and the pre-configured fluctuation value
  • the second area set corresponds to The minimum value of the comprehensive delay duration is 100ms, and the pre-configured fluctuation value is 50ms
  • the second delay threshold corresponding to the second area set is 150ms
  • the second delay threshold corresponding to any second area set is based on the
  • the minimum value of each comprehensive delay duration corresponding to the second area set is determined by the pre-configured ratio, if the minimum value of the comprehensive delay duration corresponding to the second area set is 100 ms and the pre-configured ratio is 20%, then the The second delay threshold corresponding to the second area set is 120 ms.
  • the integrated delay duration is in descending order of the integrated delay duration. , rank each candidate server, and determine the set number of candidate servers ahead of the ranking as the general servers corresponding to the second area set.
  • FIG. 2 is a schematic diagram of a scenario of a second area set and a corresponding general server provided by an embodiment of the present application.
  • the second area set C is ⁇ c 1 , c 2 , c 3 ⁇ .
  • the second target including each conversation member in a historical group conversation can be The second area set of the area, select the server that can ensure the maximum delay time of the historical group to make calls within the acceptable range as the general server and record it, and then determine the same as the regional distribution of session members in the historical group.
  • the determined general server is determined as the selection scheme of the central server, so as to minimize the delay caused by real-time routing and the pressure on the electronic equipment that provides routing services.
  • the target group After receiving the group call request sent by the calling party of the target group, firstly check whether the regional distribution of each session member in the target group is the same as the regional distribution of the pre-configured general server, that is, determine whether the Whether the first area set of the information of the first target area of each session member in the target group matches any of the pre-configured second area sets, so as to reduce the delay caused by real-time routing and the electronic equipment that provides routing services pressure.
  • the method further includes:
  • the second area set, the general server corresponding to the second area set, and the third area set are stored correspondingly.
  • the session members in the group are changed, but the information about the first target area of the session members in the group after the change is the same as the information about the first target area of the session members in the group before the change.
  • Information is inconsistent.
  • the group A before the change contains a session member a whose first target area is China, and a session member b whose first target area is the United States
  • the first area set of the group A before the change is ⁇ China, the United States ⁇
  • the changed group A includes a session member e whose first target area is China, a session member b whose first target area is the United States, and a session member whose first target area is Russia c
  • the first region set of the changed group A is also ⁇ China, the United States, Russia ⁇ .
  • the finalized central server of the group after the change when the group call is performed is the same as the one before the change.
  • the central server of the group is the same when making group calls.
  • the information of the first target area of the conversation members in the two groups is not exactly the same, but the central server when the two groups are finally determined to conduct group calls respectively are the same.
  • the general server corresponding to the second area set including each second target area is determined based on the above embodiment, for other areas except each second target area, Determine the delay time for data communication between the user equipment in the other area and the determined general server (for convenience of description, denoted as the target delay time), for each other area, according to the target delay time corresponding to the other area.
  • the third area set corresponding to the universal server is determined.
  • the information of each area in the third area set is an extension of the area that can use the general server corresponding to the second area set, and the information of at least one area in the third area set is the same as that of the second area set.
  • the area sets formed by the area sets all correspond to the general servers corresponding to the second area set.
  • each other area After obtaining the target delay time corresponding to any other area except each second target area, for each other area, determine whether the target delay time corresponding to the other area is less than the maximum delay limit corresponding to the general server . Specifically, if the target delay time corresponding to the other area is less than the maximum delay limit corresponding to the general server, the other area will be added to the third area set corresponding to the general server; if the target delay corresponding to the other area If the duration is not less than the maximum delay limit corresponding to the general server, the other area will not be added to the third area set corresponding to the general server.
  • FIG. 3 is a schematic diagram of a scenario of a second area set and a third area set provided by an embodiment of the present application.
  • the second area set C is ⁇ c 1 , c 2 , c 3 ⁇ .
  • the third region set C' is determined according to other regions c 4 and c 5 , that is, the third region set C' is determined to be ⁇ c 4 , c 5 ⁇ .
  • the second area set, the third area set and the determined general server corresponding to the second area set are The identification information is stored accordingly.
  • the identification information of the general server corresponding to the determined second area set, the second area set and the third area set are correspondingly stored
  • the identification information of the general server, the second area set and the The information of each area included in the set and the information of each area included in the third area set are stored correspondingly, or the identification information of the second area set and the identification information of the third area set may be determined based on the information of the respectively included areas.
  • the identification information corresponds to the determined identification information of the general server corresponding to the second area set, the identification information of the second area set, and the identification information of the third area set.
  • the information of the area may be the identification information of the area or the name of the area.
  • each area when the identification information of the area set is determined based on the identification information of each area included in the area set, each area is pre-allocated with an exclusive bit (bit), according to each area The number on the bit corresponding to an area determines the identification information of the area.
  • the identification information of the area set is determined according to the sum of the identification information of each area contained in the area set.
  • the pre-allocated bits for the regions China, the United States, and India are the 1st, 2nd, and 3rd bits, respectively
  • the number corresponding to the exclusive bit of China 0000000000000001 is 0x1
  • the United States 0000000000000010 is the exclusive
  • the number corresponding to the bit is 0x2
  • the number corresponding to India 0000000000000100 in its exclusive bit is 0x4
  • the data type of the identification information of each area is long data (long). Since long data has only 64 bits at most, that is, it can only represent 64 areas at most, you can determine how many long data each bit represents the area according to the number of set areas. For example, if the region is a country, and there are more than 200 countries in the world, it is necessary to use 4 long data to represent the identification information of each country.
  • FIG. 4 is a schematic diagram of a method for saving a general server according to an embodiment of the present application.
  • * represents a number
  • CC1_KEY* saves the information of the *th second target area in the second area set C
  • CC2_KEY* saves the *th target in the third area set C' corresponding to the second area set C
  • general_server stores the identification information of the general server corresponding to the second area set C.
  • FIG. 5 is a schematic flowchart of a determination process of a universal server provided by an embodiment of the present application, and the process includes:
  • S501 Acquire information of the second target area of each session member carried in the group call request sent by the calling party of any historical group.
  • S502 Acquire a second area set including each second target area.
  • S503 Determine a candidate server based on the respective maximum delay upper limit corresponding to each server in the preconfigured candidate set.
  • This server For each server in the preconfigured candidate set, determine the maximum delay upper limit of the data communication between the server and the user equipment in each second target area. If the maximum delay upper limit meets the preset first communication requirement, then This server is determined to be a candidate server.
  • S504 Determine whether the number of candidate servers is 0, if so, end, otherwise, execute S505.
  • S505 Determine whether the number of candidate servers is greater than 1, if yes, execute S506, otherwise, execute S507.
  • S506 Determine the general server corresponding to the second area set according to the corresponding average delay duration and the corresponding maximum delay upper limit of each candidate server, and then execute S508.
  • For each candidate server determine the average delay duration of data communication between the candidate server and the user equipment in each second target area respectively;
  • For each candidate server determine the comprehensive delay duration according to the average delay duration of the candidate server and its corresponding first weight value, the maximum delay upper limit of the candidate server and its corresponding second weight value;
  • Any candidate server whose comprehensive delay duration meets the preset second communication requirement is determined as a general server corresponding to the second area set.
  • S507 Determine the candidate server as the general server corresponding to the second area set.
  • each second target area determine the target delay time for the data communication between the user equipment in the other area and the general server;
  • the second area set, the general server corresponding to the second area set, and the third area set are stored correspondingly.
  • the Determining that the first area set containing each of the first target areas matches any of the pre-saved second area sets including:
  • the intersection of the first area set and the second area set is the second area set, and the first area set corresponds to the second area set
  • the intersection of the integrated area sets is the first area set, then it is determined that the first area set matches the second area set, wherein the integrated area set corresponding to the second area set includes the second area set A third area set corresponding to the general server.
  • the first area set including the first target area of each conversation member currently in the group call may contain information about each second target area except for a certain second area set other areas.
  • the comprehensive area set corresponding to any second area set includes the second area set and the third area set corresponding to the general server corresponding to the second area set.
  • the area set determined by any sub-area set of the third area set and the second area set corresponds to the general server corresponding to the second area set.
  • the group call request is parsed, and each first target carried in the group call request is obtained. area information. According to the information of each first target area, the first area set is determined. For each second area set pre-configured with the universal server, if it is determined that the intersection of the first area set and the second area set is the second area set, and the first area set and the second area set correspond to The intersection of the comprehensive area sets is the first area set, then it is determined that the first area set matches the second area set, the general server corresponding to the matched second area set is obtained, and the target group is determined according to the general server.
  • the central server for group calls is
  • the central server for the target group to conduct the group call is determined.
  • the first area set X needs to satisfy the following two conditions:
  • X represents the first area set
  • C represents the second area set matching the first area set
  • C′ represents the third area set corresponding to the universal server corresponding to C.
  • the identification information of the general server corresponding to the second area set, the second area set and the third area set are stored correspondingly in the manner shown in FIG. 4 , in the subsequent practical application process,
  • the following code can be used to match the first area set with any pre-configured second area set, specifically:
  • each bit in the four long data of Long key1, Long key2, Long key3, and Long key4 respectively represents the information of the area.
  • CC1_KEY* saves the information of the *th second target area in the second area set C
  • CC2_KEY* saves the *th target area in the third area set C' corresponding to the general server corresponding to C Others area information.
  • the method before determining the central server for the target group to conduct the group call according to the general server corresponding to the matched second area set, the method further includes:
  • a time duration threshold is preset, that is, the maximum duration that any of the determined second area sets is stored corresponding to the corresponding general server.
  • a timer needs to be started to count the determined duration of the general server.
  • the determined duration corresponding to the general server corresponding to the matched second area set is obtained.
  • the determined duration is compared with a preset duration threshold, and according to the comparison result, it is determined whether to determine the central server for the target group to conduct group calls according to the general server.
  • the duration is less than the preset duration threshold, it means that the general server corresponding to the second area set is still within the validity period, and the center of the group call for the target group can be determined according to the general server. server.
  • the determined duration is greater than the preset duration threshold, it means that the general server corresponding to the second area set is invalid, and the central server for the target group to conduct group calls cannot be determined according to the general server. , then according to the information of each first target area carried in the group call request, determine the central server for the target group to conduct the group call.
  • the general server corresponding to the matched second area set may be directly determined as the central server for the target group to perform group calls.
  • determining the central server for the target group to perform group calls according to the general server corresponding to the matched second area set includes:
  • the universal server is determined as a central server for the target group to conduct a group call.
  • an availability condition is preset, and the availability condition is used to identify status information when the server is available, such as a maximum load threshold when the server is available.
  • the state information of the general server is obtained before the general server corresponding to the matched second area set is determined as the central server for the target group to conduct the group call. It is judged whether the state information of the general server satisfies the preset availability condition, so as to determine whether to perform the subsequent step of determining the general server corresponding to the matched second area set as the central server for the target group to conduct group calls.
  • the status information of the server includes at least one of information such as network status and load status of the server.
  • the general server determines whether the status information of the general server satisfies a preset availability condition, it means that the general server can guarantee the quality of the group call for the target group, that is, the general server is available, then the general server Determines the central server for the target group to conduct group calls; if it is determined that the status information of the general server does not meet the preset availability conditions, it means that the general server cannot guarantee the quality of the group call for the target group, that is, the general server is unavailable , the central server of the current group call is determined based on the information of each first target area.
  • the general server which may also be called a general solution, is a routing result provided for a group whose session members meet the distribution of a specific area.
  • the intersection of the first area set including each first target area and a certain second area set is the second area set
  • the intersection of the first area set and the comprehensive area set corresponding to the second area set is the The first area set, that is, when the first area set matches a second area set with a pre-configured general server
  • the electronic device only needs to check whether the general server corresponding to the matched second area set is available, that is, determine the matching first area set.
  • the electronic device when determining whether the status information of the general-purpose server meets the preset availability condition, that is, when it is determined that the general-purpose server is available, directly determine the general-purpose server as the general-purpose server.
  • the central server for the target group to conduct this group call the electronic device no longer needs to determine the central server for the target group to conduct this group call in real time based on the information of the first target area of each session member in the target group.
  • FIG. 6 is a schematic diagram of a specific server selection process provided by an embodiment of the present application. Taking a group call scenario of an Internet instant messaging scenario as an example, the process includes:
  • S601 Receive a group call request sent by a calling party of the target group.
  • the group call request carries the information of the first target area of each conversation member in the target group.
  • S602 Determine whether the first area set including each first target area matches any of the pre-stored second area sets, and if they match, execute S603, otherwise, execute S605.
  • the first area set including each first target area matches any second area set saved in advance, including:
  • the intersection of the first area set and the second area set is the second area set, and the intersection of the first area set and the comprehensive area set corresponding to the second area set is the first area set, then It is determined that the first area set matches the second area set, wherein the comprehensive area set corresponding to the second area set includes the second area set and the third area set corresponding to the universal server corresponding to the second area set.
  • S603 Determine whether the general server corresponding to the matched second area set is available, if both are available, execute S604, otherwise, execute S605.
  • the state information of the general-purpose server satisfies the preset availability condition, and if so, it is determined that the general-purpose server is available; otherwise, it is determined that the general-purpose server is unavailable.
  • S604 Determine the general server corresponding to the matched second area set as the central server for the target group to conduct group calls.
  • S605 Determine in real time a central server for the target group to conduct group calls.
  • the method for selecting a universal server in the above-mentioned embodiment may be that when a group call request sent by the calling party of the target group is received, and based on the group call request, the central server of the group call is determined in real time, and at the same time, the Determine the target group as a historical group, and determine a general server corresponding to the second area set that includes the second target area of each session member in the historical group; For the group call request of the server, for each group call request, determine a general server corresponding to the second area set including the second target area of each session member in the group call.
  • the optimal caller corresponding to the calling party may be directly The server, that is, among each server directly connected to the calling party, the server with the smallest delay time for data communication with the calling party is determined as the central server of the current group call.
  • the target group is determined to perform the group call
  • the central server is located, it can also be determined in the following ways:
  • the first server corresponding to the first target area is determined according to the third delay duration of data communication between the user equipments in the first target area and the directly connected servers respectively.
  • a screening condition is preset. After obtaining the third delay duration of data communication between the user equipment in the first target area and the directly connected server based on the above embodiment, it is determined whether any obtained third delay duration satisfies the preset screening condition , and a server whose third delay duration satisfies the preset screening condition is determined as the first server corresponding to the first target area.
  • satisfying the screening condition may be the minimum value of the third delay time; in order to avoid excessive cost of group calls after the first server is determined to be the central server, satisfying the screening conditions
  • the condition may be that the third delay duration is less than the delay threshold corresponding to the first target area (for convenience of description, it is denoted as the third delay threshold).
  • each first server is determined based on the above embodiment, in order to ensure the quality of the group call, it is avoided that a server other than each first server has better communication quality than the determined first server.
  • a second server other than a server obtain the delay duration of the data communication between the second server and each first server (for convenience of description, it is recorded as the fourth delay duration), and determine the delay duration according to each fourth delay duration. The total delay time corresponding to the second server.
  • a third communication requirement is preset.
  • satisfying the third communication requirement may be that the total delay duration is the smallest, or the total delay duration is less than a preset delay threshold (for convenience of description, it is denoted as the fourth delay threshold).
  • the fourth delay threshold when setting the fourth delay threshold, different values can be set according to different scenarios. If there are strict requirements on the delay time of the central server, the fourth delay threshold can be set lower; if in order to To avoid missing the second server with better communication quality than the first server corresponding to each first target area, the fourth delay threshold may be set higher. In the specific implementation process, flexible settings can be made according to actual requirements, which are not specifically limited here.
  • each first server is determined based on the above-mentioned embodiment, based on the obtained average delay time of data communication between the first server and the user equipment in each first target area, determine whether the target group will perform a group call. central server.
  • acquiring the average delay duration of the data communication between the first server and the user equipment in each of the first target areas includes:
  • the average delay time corresponding to the first server is determined according to the fifth delay time and the weight value corresponding to each of the first target areas, wherein the fifth delay time corresponding to any first target area is the first server.
  • determining the average delay duration corresponding to the first server according to the fifth delay duration and the weight value corresponding to each of the first target areas including:
  • the average delay duration corresponding to the first server is determined.
  • the average delay duration corresponding to the first server can be determined by the following formula:
  • AVG(RTT i ) is the average delay time corresponding to the i-th first server
  • w j is the weight value corresponding to the j-th target area
  • RTT ji is the fifth delay duration for the i-th first server to perform data communication with the user equipment in the j-th target area.
  • the acquisition of the weight value corresponding to each of the first target areas including:
  • the target group identification information does not match the group identification information for which the weight value has been configured, determine each session member according to the number of session members included in each of the first target areas in the target group weight values corresponding to the first target regions respectively.
  • the target group makes a group call for the first time.
  • the group identification information cannot be matched with each group identification information for which the weight value has been configured.
  • the number of session members included in the target area is determined according to the number of session members included in each first target area to determine a weight value corresponding to each first target area.
  • the unit weight value corresponding to any session member in the group is preconfigured, for example, the target area
  • the unit weight corresponding to any session member in the group is 1.0.
  • the weight value corresponding to each first target area is determined respectively according to the number of session members included in each first target area in the target group and the unit weight value corresponding to any preconfigured session member.
  • the target group is not the first time to make a group call.
  • the target group identification information can be matched with a certain group identification information for which a weight value has been configured, then the weight value corresponding to each area corresponding to the matched group identification information can be obtained, and each first target area can be determined. corresponding weight values.
  • a communication requirement is preset (for convenience of description, it is denoted as the fourth communication requirement).
  • the fourth communication requirement After the average delay time corresponding to each first server is obtained based on the above embodiment, for any obtained average delay time, it can be determined sequentially or randomly whether the average delay time meets the preset fourth communication requirement.
  • the server corresponding to the average delay time can be directly determined as the central server for the target group to conduct group calls; After the average delay durations meet the preset fourth communication requirements, from the average delay durations that meet the preset fourth communication requirements, determine the server corresponding to any average delay duration as the target group for the group call. central server.
  • the server meeting the fourth communication requirement may be the server with the smallest first delay duration; for load balancing, the first server whose average delay duration meets the fourth communication requirement may be based on the average delay In descending order of duration, the first server with the least load will be sorted first among the first servers corresponding to the preset number of average delay durations.
  • flexible settings can be made according to actual requirements, which are not specifically limited here.
  • the method further includes:
  • the second group call request carries target group identification information of the target group
  • the central server According to the central server corresponding to the matched group identification information, determine the central server for the target group to conduct the group call.
  • the method further includes:
  • the target group call request is the first link delay and the second link delay corresponding to the target session member according to the information of the area where the target session member sending the target group call request is located; wherein the target group call request is the first link delay and the second link delay corresponding to the target session member.
  • a group call request, or, for the second group call request, the first link delay is the link delay of the link where the user equipment in the area where the target session member is located directly communicates with the central server
  • the second link delay is the link delay of the link where the user equipment in the area where the target session member is located performs data communication with the central server by means of forwarding by the forwarding server;
  • a link for data communication between the user equipment of the target session member and the central server is determined.
  • the delay of the first link is smaller than the delay of the second link, it is determined that the user equipment of the target session member directly performs data communication with the central server.
  • the delay of the first link is greater than the delay of the second link, it is determined that the user equipment of the target session member performs data communication with the central server by means of forwarding by the forwarding server.
  • the method further includes:
  • the information of the area where the target session member is located is obtained according to the target group call request; wherein, the target group The call request is the first group call request, or the second group call request;
  • the target weight value corresponding to the area where the target session member is located is obtained from the stored weight values corresponding to each of the first target areas of the target group, the target weight value is updated and save.
  • the incremental weight value is preconfigured. According to the information carried in the target group call request, determine the information of the area where the target session member who sent the target group call request is located. Among the stored weight values corresponding to each first target area of the target group, the target weight value corresponding to the area where the target session member is located is determined. According to the sum of the target weight value and the pre-configured incremental weight value, the target weight value is updated and saved.
  • the preconfigured incremental weight value may be any value within the preconfigured value range, or may be a preset fixed value.
  • the method further includes:
  • the group call request Carrying the information of each of the first target areas to determine the number of session members in the area where the target session members are located;
  • the weight value corresponding to the area where the target session member is located is determined and saved.
  • the target when it is determined that the target weight value corresponding to the area where the target session member is located cannot be obtained among the weight values corresponding to each first target area of the saved target group, the target The information of the first target area where each session member of the target group is located in the target group call request sent by the session member; the target group is determined according to the information of each first target area and the information of the area where the target member is located The number of session members in the region where this target session member resides. According to the determined quantity, the weight value corresponding to the area where the target session member is located is determined, and the weight value corresponding to the area where the target session member is located is stored corresponding to the group identification information of the target group.
  • the unit weight value corresponding to any conversation member in the group is preconfigured, for example, the unit weight value corresponding to any conversation member in the target group is 1.0. According to the number of session members in the target group in the area where the target session member is located, and the preconfigured unit weight value corresponding to any session member, the weight value corresponding to the area where the target session member is located is determined respectively.
  • FIG. 7 is a schematic flowchart of a specific real-time determination of a central server provided by an embodiment of the present application, and the process includes:
  • S702 Determine whether the group call request is sent by the calling party, if yes, go to S703, otherwise, go to S709.
  • S703 Determine whether the target group is making a group call for the first time, if so, go to S704, otherwise, go to S705.
  • the target group identification information of the target group may be matched with the saved group identification information of the group call, and if there is matching group identification information, it is determined that the target group is not the first group The group call is performed for the first time; if there is no matching group identification information, it is determined that the target group is the first group call.
  • S706 Determine the first server corresponding to each first target area.
  • S707 For each second server except each first server, obtain the total delay duration of the data communication between the second server and each first server respectively; make the total delay duration meet the preset second communication requirement Any second server is determined to be the first server.
  • S708 For each first server, determine the average delay duration of the data communication between the first server and the user equipment in each first target area; determine any first server whose average delay duration meets the preset fourth communication requirement. The server is determined to be the central server of the current group call, and S710 is executed.
  • S709 According to the target group identification information carried in the group call request and the group identification information on which the central server has been configured, determine the central server for the target group to conduct the group call.
  • S710 Determine whether the target session member sending the group call request joins the current group call for the first time, and if so, execute S711; otherwise, execute S712.
  • the group call request obtain information about the area where the target session member is located;
  • the target weight value corresponding to the area where the target session member is located is obtained from the stored weight values corresponding to each first target area of the target group, the target weight value is updated and saved.
  • the target weight value corresponding to the area where the target session member is located cannot be obtained from the weight values corresponding to each first target area of the saved target group, the The number of session members in the area where the target session member is located is determined; according to the determined number, the weight value corresponding to the area where the target session member is located is determined and saved.
  • S712 Determine the first link delay and the second link delay corresponding to the target session member according to the information of the area where the target session member sending the group call request is located.
  • the first link delay is the link delay of the link where the user equipment in the area where the session member is located directly communicates with the central server
  • the second link delay is the link delay of the user equipment in the area where the target session member is located through the forwarding server.
  • the link delay of the link for data communication with the central server.
  • S713 Determine whether the delay of the first link is less than the delay of the second link, if yes, execute S714, otherwise, execute S715.
  • S714 The user equipment that determines the target session member directly performs data communication with the central server.
  • S715 The user equipment that determines the target session member performs data communication with the central server in the manner of forwarding by the forwarding server.
  • FIG. 8 is a schematic structural diagram of a server selection device provided by an embodiment of the present application.
  • An embodiment of the present application provides a server selection device, and the device includes:
  • a receiving unit 81 configured to receive a group call request sent by a calling party of a target group; wherein, the group call request carries information about the first target area of each session member in the target group;
  • the processing unit 82 is configured to, if it is determined that the first area set including each of the first target areas matches any of the pre-saved second area sets, determine the corresponding general server according to the matched second area set.
  • the central server for group calls to the target group.
  • the implementation of the above-mentioned server selection apparatus may refer to the implementation of the method, and the repetition will not be repeated.
  • the general server corresponding to each second area set is predetermined, and after receiving the group call request sent by the calling party of the target group, the target group For the information of the first target area of each session member in the group, the first area set including each first target area is matched with each pre-saved second area set.
  • the central server for the target group to conduct group calls is determined according to the general server corresponding to the matched second area set, so that the central server can be quickly and accurately determined, which simplifies routing
  • the process of the server determining the central server greatly reduces the pressure of the routing server to determine the central server in real time each time, improves the efficiency of determining the central server, and reduces the delay in determining the routing result.
  • FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the application, the electronic device includes: a processor 91, a communication interface 92, a memory 93, and a communication bus 94, wherein the processor 91, the communication interface 92, and the memory 93 pass through The communication bus 94 completes mutual communication;
  • a computer program is stored in the memory 93, and when the program is executed by the processor 91, the processor 91 is caused to perform the following steps:
  • the implementation of the above electronic device can refer to the implementation of the method, and the repetition will not be repeated.
  • the embodiments of the present application further provide a computer-readable storage medium, where a computer program executable by a processor is stored in the computer-readable storage medium.
  • the processor When running on the processor, the processor implements the following steps when executing:
  • the specific implementation can refer to the implementation of the server selection method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本申请公开了一种服务器的选择方法、装置、设备及介质。由于预先确定了每个第二区域集合所对应的通用服务器,后续接收到目标群组的主叫方发送的群组通话请求之后,根据该群组通话请求中携带的目标群组中每个会话成员的第一目标区域的信息,将包含每个第一目标区域的第一区域集合与预先保存的每个第二区域集合进行匹配,若确定第一区域集合与预先保存的任一第二区域集合匹配,根据匹配的第二区域集合所对应的通用服务器,确定目标群组进行群组通话的中心服务器,从而实现快速且准确地确定中心服务器,简化了选路服务器确定中心服务器的过程,极大地降低选路服务器每次实时确定中心服务器的压力和确定选路结果的延迟,提高确定中心服务器的效率。

Description

一种服务器的选择方法、装置、设备及介质
相关申请的交叉引用
本申请要求在2021年03月09日提交中国专利局、申请号为202110257628.X、申请名称为“一种服务器的选择方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种服务器的选择方法、装置、设备及介质。
背景技术
互联网拉近了人与人之间的距离,使得天南海北的人们都可以通过网络进行多人的音视频通话。在这些通话的背后,都是通过架设在全球各地的大量服务器来转发数据实现的。音视频通话的质量也和服务器的选择密切相关,特别是在群组通话场景下,因为每次发起群组通话,有多少群员加入,在什么时候加入都是不确定的,这就给群组通话的服务器选择带来了很大的挑战,尤其是在基于中心服务器的数据转发架构下,对中心服务器的选择尤为严格。
发明内容
本申请实施例提供了一种服务器的选择方法、装置、设备及介质,用以解决现有无法准确且快速地确定中心服务器的问题。
本申请实施例提供了一种服务器的选择方法,所述方法包括:
接收目标群组的主叫方发送的群组通话请求;其中,所述群组通话请求中携带有所述目标群组中每个会话成员的第一目标区域的信息;
若确定包含每个所述第一目标区域的第一区域集合与预先保存的任一第二区域集合匹配,则根据匹配的第二区域集合所对应的通用服务器,确定所 述目标群组进行群组通话的中心服务器。
本申请实施例提供了一种服务器的选择装置,所述装置包括:
接收单元,用于接收目标群组的主叫方发送的群组通话请求;其中,所述群组通话请求中携带有所述目标群组中每个会话成员的第一目标区域的信息;
处理单元,用于若确定包含每个所述第一目标区域的第一区域集合与预先保存的任一第二区域集合匹配,则根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务器。
本申请实施例提供了一种电子设备,所述电子设备至少包括处理器和存储器,所述处理器用于执行存储器中存储的计算机程序时实现如上述所述服务器的选择方法的步骤。
本申请实施例提供了一种计算机可读存储介质,其存储有计算机程序,所述计算机程序被处理器执行时实现如上述所述服务器的选择方法的步骤。
由于本申请实施例中,预先确定了每个第二区域集合所对应的通用服务器,后续接收到目标群组的主叫方发送的群组通话请求之后,根据该群组通话请求中携带的目标群组中每个会话成员的第一目标区域的信息,将包含每个第一目标区域的第一区域集合与预先保存的每个第二区域集合进行匹配,当确定该第一区域集合与预先保存的任一第二区域集合匹配时,根据匹配的第二区域集合所对应的通用服务器,确定目标群组进行群组通话的中心服务器,从而实现快速且准确地确定中心服务器,简化了选路服务器确定中心服务器的过程,极大地降低选路服务器每次实时确定中心服务器的压力,提高确定中心服务器的效率,降低确定选路结果的延迟。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的 前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种服务器的选择过程示意图;
图2为本申请实施例提供的一种第二区域集合及其对应的通用服务器的场景示意图;
图3为本申请实施例提供的一种第二区域集合以及该第二区域集合对应的第三区域集合的场景示意图;
图4为本申请实施例提供的一种将通用服务器的保存方法的示意图;
图5为本申请实施例提供的一种通用服务器的确定流程示意图;
图6为本申请实施例提供的具体的服务器的选择流程示意图;
图7为本申请实施例提供的具体的实时确定中心服务器的流程示意图;
图8为本申请实施例提供的一种服务器的选择装置的结构示意图;
图9为本申请实施例提供的一种电子设备结构示意图。
具体实施方式
下面将结合附图对本申请作进一步地详细描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本申请保护的范围。
为了准确且快速地确定中心服务器,本申请实施例提供了一种服务器的选择方法、装置、设备及介质。
中心服务器为在群组通话场景下,负责会话管理、会话成员信息维护和统计、拥塞控制和抗丢包等功能的服务器。群组通话中的所有数据包都必须经过中心服务器进行处理或者转发。
在实际应用场景中,当某一用户需要与其他用户进行群组通信时,比如,在线会议等,预先在该用户的用户设备上安装用于群组通话的平台软件,在该平台软件上注册账户(为了方便说明,记为第一账户)并登录。然后通过该用户设备输入与每个其他用户的账户(为了方便说明,记为第二账户)建 立群组的请求。
需要说明的是,输入该建立群组的请求的方式有很多,比如,用户可以通过语音的方式输入,也可以通过操作用户显示界面上显示的虚拟按钮的方式输入。具体的输入建立群组的请求的方式,可以根据实际需求进行灵活设置,在此不做具体限定。
当用户设备接收到用户输入的与每个第二账户建立群组的请求之后,生成群组加入请求并分别发送至每个登录第二账户的用户设备,从而实现将需要进行群组通信的每个第二账户邀请到同一群组内。其中,该群组加入请求中会携带有每个第二账户的标识信息。在本申请实施例中,为了方便描述,当某一第二账户加入到群组中之后,该第二账户即为该群组内的会话成员。
在实际应用过程中,当群组内某一会话成员希望进行群组通话时,可通过该用户设备输入建立群组通话的请求。用户设备接收到该建立群组通话的请求后,生成群组通话请求并发送至用于确定中心服务器的电子设备,比如,选路服务器,以通过该电子设备为该群组分配中心服务器。其中,该发起群组通话的会话成员的用户设备即为该群组的主叫方。
在一种可能的实施方式中,电子设备接收到目标群组的主叫方发送的群组通话请求后,基于该群组通话请求,进行相应的处理,确定选路结果,即确定后续对该群组通话过程中的数据进行处理的中心服务器以及数据传输的链路。
对于该方法,因为网络波动和每个服务器的负载限制等不确定因素,电子设备每次确定的选路结果只适用于目标群组的当前群组通话,目标群组上一次群组通话所确定的选路结果(为了方便描述,记为历史选路结果)无法为目标群组进行下一次通话提供参考。此外,对于群组通话的应用场景来说,因为每次群组通话的会话人员和加入通话时间等因素也都是不确定的,使得历史选路结果更加无法为目标群组下一次通话提供参考,导致电子设备需要实时确定选路结果,且每次确定选路结果的开销通常比较大,尤其是在可被确定为中心服务器的候选服务器的数量特别多时,电子设备的负载压力与选 路延迟会更大。
为了解决上述的问题,本申请实施例提供了一种服务器的选择方法、装置、设备及介质。由于本申请实施例中,预先确定了每个第二区域集合所对应的通用服务器,后续接收到目标群组的主叫方发送的群组通话请求之后,根据该群组通话请求中携带的目标群组中每个会话成员的第一目标区域的信息,将包含每个第一目标区域的第一区域集合与预先保存的每个第二区域集合进行匹配,当确定该第一区域集合与预先保存的任一第二区域集合匹配时,根据匹配的第二区域集合所对应的通用服务器,确定目标群组进行群组通话的中心服务器,从而实现快速且准确地确定中心服务器,简化了选路服务器确定中心服务器的过程,极大地降低选路服务器每次实时确定中心服务器的压力,提高确定中心服务器的效率,降低确定选路结果的延迟。
需要说明的是,上述实施例中所举出的应用场景仅是为了方便说明所提出的示例性的场景,并不是对本申请实施例所提供的一种服务器的选择方法、装置、设备及介质的应用场景的一种限定。本领域技术人员应当知道,本申请实施例所提供的一种服务器的选择方法、装置、设备及介质可以应用到所有需要中心服务器的应用场景中,比如,在线会议,直播网课、互联网即时通讯产品的群组通话场景等。
实施例1:
图1为本申请实施例提供的一种服务器的选择过程示意图,该过程包括:
S101:接收目标群组的主叫方发送的群组通话请求;其中,所述群组通话请求中携带有所述目标群组中每个会话成员的第一目标区域的信息。
本申请实施例提供的服务器的选择方法应用于提供后台服务的电子设备,该电子设备可以为用于提供后台服务的智能设备,也可以是提供后台服务的服务器,比如,选路服务器。
为了方便准确地确定中心服务器,当目标群组需要进行群组通话时,该目标群组的主叫方会向电子设备发送群组通话请求,而该群组通话请求中会携带有当前群组中每个会话成员的区域(为了方便描述,记为目标区域)的 信息,以及第一标识信息。其中,第一标识信息用于标识该群组通话请求为群组通话的主叫方发送的。
电子设备接收到目标群组的群组通话请求之后,对该群组通话请求进行解析,若解析出该群组通话请求中携带的第一标识信息,则确定该群组通话请求为该目标群组的主叫方发送的群组通话请求。电子设备需要为该目标群组的通话分配中心服务器,以便后续通过中心服务器对通话过程中所产生的数据进行传输与管理。电子设备基于该群组通话请求中携带的该目标群组中每个会话成员的目标区域的信息,进行相应的处理,从而确定该目标群组进行群组通话的中心服务器。
在本申请实施例中,区域可以为省、市、县、州、国家等任何大小的地理区域,也可以为自定义划分的某一地理区域,比如,将某一成员的所在的小区确定为一个区域等。其中,每个会话成员的目标区域可以是不同等级的地理区域,比如,会话成员A的目标区域是某小区,会话成员B的目标区域是某县。具体实施过程中,如何设置会话成员的目标区域可以根据需求进行灵活设置,在此不作具体限定。
其中,通过自定义划分地理区域时,可以考虑每个会话成员的区域分布情况进行划分。比如,某一小区的会话成员较多,进行数据通信的需求较大,可以将该小区确定为一个区域,该小区的会话成员的目标区域均为该小区,某一省的会话成员较少,进行数据通信的需求也不大,则可以将该省确定为一个区域,该省的会话成员的目标区域均为该省。
需要说明的是,目标区域的信息包括目标区域的标识信息,用以区分每个不同的区域。该目标区域的标识信息可以是数字、字母、特殊符号、字符串等,也可以为其他形式的,只要能唯一标识该目标区域的均可作为本申请实施例中的目标区域的标识信息。
S102:若确定包含每个所述第一目标区域的第一区域集合与预先保存的任一第二区域集合匹配,则根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务器。
当基于上述实施例获取到了群组通话请求中携带的每个会话成员的第一目标区域的信息之后,根据每个第一目标区域的信息,确定包含每个第一目标区域的区域集合(为了方便描述,记为第一区域集合)。基于第一区域集合,进行相应的处理,确定目标群组进行群组通话的中心服务器。
在群组通话场景下,由于服务器负载限制和网络波动等不确定因素,导致电子设备接收到目标群组的主叫方每次发送的群组通话请求后,都需要综合每个服务器的负载和目标群组中每个会话成员的用户设备之间进行数据通信的路径质量探测结果,进行实时选路。并且由于每个群组之间会话成员的数量,活跃程度和区域分布一般存在着较大的差异,为每个群组的每次群组通话所确定的选路结果,也一般只适用于该群组进行该次的群组通话,无法为确定该群组下一次的群组通话的选路结果提供指导,也无法为确定其他群组进行群组通话的选路结果提供指导。为了准确且快速地确定中心服务器,在本申请实施例中,可以预先基于群组中每个会话成员的区域分布情况,确定一个与每个会话成员的用户设备数据通信的延迟较低的通用服务器,以方便后续可以直接根据预先确定的某一群组对应的通用服务器,确定该群组进行群组通话的中心服务器。
在一种可能的实施方式,针对每个群组,确定包含该群组中的每个会话成员的区域的信息的区域集合(为了方便描述,记为第二区域集合),基于该第二区域集合,进行相应的处理,确定该第二区域集合所对应的通用服务器,并将确定的通用服务器的标识信息以及第二区域集合对应保存。
当基于上述实施例获取到目标去你的第一区域集合之后,将该第一区域集合分别与已配置了通用服务器的第二区域集合进行匹配,根据匹配结果,确定是否已经配置了该群组的通用服务器。
其中,第一区域集合与第二区域集合匹配是指该第一区域集合中包含的每个第一目标区域的信息、与该第二区域集合中包含的每个区域的信息相同。
在一种可能的实施方式中,若确定第一区域集合与预先保存的任一第二区域集合匹配,说明已预先配置了该目标群组的通用服务器,则根据该匹配 的第二区域集合所对应的通用服务器,进行相应的处理,确定该目标群组进行群组通话的中心服务器。
其中,可以直接将匹配的第二区域集合所对应的通用服务器确定为该目标群组进行群组通话的中心服务器。
在另一种可能的实施方式中,若确定第一区域集合与预先保存的每个第二区域集合均不匹配,说明未配置该目标群组的通用服务器,则需要基于每个第一目标区域的信息,进行相应的处理,实时确定该目标群组进行群组通话的中心服务器。
由于本申请实施例中,预先确定了每个第二区域集合所对应的通用服务器,后续接收到目标群组的主叫方发送的群组通话请求之后,根据该群组通话请求中携带的目标群组中每个会话成员的第一目标区域的信息,将包含每个第一目标区域的第一区域集合与预先保存的每个第二区域集合进行匹配,当确定该第一区域集合与预先保存的任一第二区域集合匹配时,根据匹配的第二区域集合所对应的通用服务器,确定目标群组进行群组通话的中心服务器,从而实现快速且准确地确定中心服务器,简化了选路服务器确定中心服务器的过程,极大地降低选路服务器每次实时确定中心服务器的压力,提高确定中心服务器的效率,降低确定选路结果的延迟。
实施例2:
为了准确且快速地确定中心服务器,在上述实施例的基础上,在本申请实施例中,所述方法还包括:
获取任一历史群组的主叫方发送的群组通话请求中携带的每个会话成员的第二目标区域的信息;
针对预先配置的候选集合中的每个服务器,确定该服务器分别与每个所述第二目标区域的用户设备进行数据通信的最大延迟上限,若所述最大延迟上限满足预设的第一通信要求,则将该服务器确定为候选服务器;
基于每个所述候选服务器,确定包含每个所述第二目标区域的第二区域集合所对应的通用服务器。
为了准确地确定通用服务器,在本申请实施例中,当接收到某一群组的主叫方发送的群组通话请求后,便将该群组确定为历史群组,基于该历史群组中的每个会话成员的区域分布情况,确定该区域分布情况所对应的通用服务器。
在本申请实施例中,预先确定了候选集合,该候选集合中包含有可以被确定为中心服务器的每个服务器,以便后续可以从该候选集合中确定通用服务器。具体的,获取到任一历史群组的主叫方发送的群组通话请求后,对该群组通话请求进行解析,获取该群组通话请求中携带的该历史群组中每个会话成员的目标区域(为了方便描述,记为第二目标区域)的信息,即获取该历史群组中的会话成员的区域分布情况。基于该历史群组中每个会话成员的第二目标区域的信息和预先配置的候选集合中的每个服务器,进行相应的处理,确定包含每个第二目标区域的第二区域集合所对应的通用服务器。
具体实施过程中,针对预先配置的候选集合中的每个服务器,确定该服务器分别与每个第二目标区域的用户设备进行数据通信的最大延迟上限,根据获取到的该服务器所对应的最大延迟上限,确定该服务器是否可能为候选服务器。基于上述的实施例确定了候选服务器后,从确定的候选服务器中,可以确定该第二区域集合所对应的通用服务器。
在一种可能的实施方式中,针对预先配置的候选集合中的每个服务器,确定该服务器分别与每个第二目标区域的用户设备进行数据通信的延迟时长(为了方便描述,记为第一延迟时长)。基于每个第一延迟时长,确定该服务器对应的最大延迟上限。
其中,可以基于该服务器对应的每个第一延迟时长中的最大值,确定该服务器对应的最大延迟上限。
在一种可能的实施方式中,基于该服务器对应的每个第一延迟时长中的最大值,确定该第一服务器对应的最大延迟上限可以通过如下公式确定:
max(RTT j)=2*max(RTT ji)
其中,max(RTT j)为服务器j对应的最大延迟上限,max(RTT ji)为该服务 器j分别与每个第二目标区域的用户设备进行数据通信的第一延迟时长中的最大值,RTT ji为该服务器j与第i个第二目标区域的用户设备进行数据通信的第一延迟时长。
在本申请实施例中,为了准确地确定每个候选服务器,预设有通信要求(为了方便描述,记为第一通信要求)。其中,该第一通信要求可以是最大延时上限的最小值,也可以是最大延迟上限小于预设的延迟阈值(为了方便描述,记为第一延迟阈值)。当基于上述的实施例确定了任一服务器对应的最大延迟上限后,判断该最大延迟上限是否满足预设的第一通信要求。若确定该最大延迟上限满足预设的第一通信要求,则可以将该服务器确定为候选服务器。
在一种可能的实施方式中,可以基于上述的实施例确定了任一服务器对应的最大延迟上限后,便判断该最大延迟上限是否小于预设的第一延迟阈值。当确定该最大延迟上限小于预设的第一延迟阈值,便将该服务器确定为候选服务器;也可以基于上述的实施例确定了每个服务器对应的最大延迟上限后,依次或随机分别判断每个服务器对应的最大延迟上限是否小于预设的第一延迟阈值,当确定任一服务器对应的最大延迟上限小于预设的第一延迟阈值,则可以将该服务器确定为候选服务器。
需要说明的是,在设置第一延迟阈值时,可以根据场景的不同,设置不同的值,如果对中心服务器的延迟时长有严格的要求,可以将该第一延迟阈值设置的低一些;如果为了避免无法确定出第二区域集合对应的通用服务器,可以将该第一延迟阈值设置的高一些。
在另一种可能的实施方式中,基于上述的实施例确定了每个服务器对应的最大延迟上限后,按照最大延迟上限从大到小的顺序,将获取到的每个最大延迟上限进行排序,将排序在前的设定数量的服务器确定为候选服务器。
基于上述实施例中的方法所确定的候选服务器可能是0个,可能是1个,也可能是至少2个。当确定的候选服务器为0个时,则说明无法确定包含每个第二目标区域的第二区域集合所对应的通用服务器。当确定的候选服务器 为1个时,则可以直接将该候选服务器确定为包含每个第二目标区域的第二区域集合所对应的通用服务器。
在一种可能的实施方式中,当确定的候选服务器为至少2个时,可以将任一候选服务器确定为包含每个第二目标区域的第二区域集合所对应的通用服务器,也可以将候选服务器中,最大延迟上限的最小值所对应的候选服务器确定为包含每个第二目标区域的第二区域集合所对应的通用服务器。
在另一种可能的实施方式中,若所述候选服务器为至少两个,所述基于每个所述候选服务器,确定包含每个所述第二目标区域的第二区域集合所对应的通用服务器,包括:
针对每个所述候选服务器,确定该候选服务器分别与每个所述第二目标区域的用户设备进行数据通信的平均延迟时长;
根据每个所述候选服务器对应的平均延迟时长,确定所述第二区域集合所对应的通用服务器。
为了进一步保证确定的通用服务器的准确性,在本申请实施例中,针对每个候选服务器,确定该候选服务器分别与每个第二目标区域的用户设备进行数据通信的平均延迟时长,以基于每个候选服务器分别对应的平均延迟时长和对应的最大延迟上限,综合确定出第二区域集合所对应的通用服务器。
具体实施过程中,针对每个候选服务器,确定该候选服务器分别与每个第二目标区域的用户设备进行数据通信的延迟时长(为了方便描述,记为第二延迟时长),根据每个第二延迟时长,确定该候选服务器对应的平均延迟时长。
在一种可能的实施方式中,根据该候选服务器分别与每个第二目标区域的目标用户设备进行数据通信的第二延迟时长,确定该候选服务器对应的平均延迟时长,可以通过如下公式确定:
Figure PCTCN2022076103-appb-000001
其中,avg(RTT j)为候选服务器j对应的平均延迟时长,N代表第二区域 集合中所包含的区域的数量,RTT ji为候选服务器j与第i个第二目标区域的目标用户设备进行数据通信的第二延迟时长。
在一种可能的实施方式中,所述根据每个所述候选服务器对应的平均延迟时长,确定所述第二区域集合所对应的通用服务器,包括:
针对每个所述候选服务器,根据该候选服务器的平均延迟时长及其对应的第一权重值、该候选服务器的最大延迟上限及其对应的第二权重值,确定综合延迟时长;
将综合延迟时长满足预设的第二通信要求的任一候选服务器确定为所述第二区域集合所对应的通用服务器。
为了尽可能的保证目标群组中每个会话成员的通信质量,在本申请实施例中,可以综合候选服务器对应的平均延迟时长以及对应的最大延迟上限,确定第二区域集合所对应的通用服务器。
具体实施过程中,预先配置了平均延迟时长对应的权重值(为了方便描述,记为第一权重值),和最大延迟上限对应的权重值(为了方便描述,记为第二权重值)。对于确定的任一候选服务器,根据该候选服务器对应的平均延迟时长及预先配置的平均延迟时长对应的第一权重值,和该候选服务器对应的最大延迟上限及预先配置的最大延迟上限对应的第二权重值,确定综合延迟时长。根据该候选服务器对应的综合延迟时长,确定第二区域集合对应的通用服务器。
在一种可能的实施方式中,根据该候选服务器对应的平均延迟时长及预先配置的平均延迟时长对应的第一权重值,和该候选服务器对应的最大延迟上限及预先配置的最大延迟上限对应的第二权重值,确定综合延迟时长可以通过如下公式确定:
mul(RTT j)=avg(RTT j)*ω 1+max(RTT j)*ω 2
其中,mul(RTT j)为候选服务器j对应的综合延迟时长,avg(RTT j)为候选服务器j对应的平均延迟时长,ω 1为第一权重值,max(RTT j)为候选服务器j 对应的最大延迟上限,ω 2为第二权重值。
为了准确地确定通用服务器,在本申请实施例中,预设有通信要求(为了方便描述,记为第二通信要求)。满足该第二通信要求可以是综合延迟时长最小的服务器,或,综合延迟时长小于该第二区域集合对应的延迟阈值(为了方便描述,记为第二延迟阈值)的任一候选服务器。当基于上述实施例获取到任一候选服务器对应的综合延迟时长后,判断获取到的综合延迟时长是否满足预设的第二通信要求,将综合延迟时长满足预设的第二通信要求的任一候选服务器确定为第二区域集合所对应的通用服务器。
在一种可能的实施方式中,可以基于上述的实施例确定了任一候选服务器对应的综合延迟时长后,便判断该综合延迟时长是否小于该第二区域集合对应的第二延迟阈值。当确定该综合延迟时长小于该第二区域集合对应的第二延迟阈值,便将该服务器确定为候选服务器;也可以基于上述的实施例确定了每个服务器对应的综合延迟时长后,依次或随机分别判断每个服务器对应的综合延迟时长是否小于该第二区域集合对应的第二延迟阈值,当确定任一服务器对应的综合延迟时长小于该第二区域集合对应的第二延迟阈值,则可以将该服务器确定为候选服务器。
在本申请实施例中,任一第二区域集合对应的第二延迟阈值是根据该第二区域集合对应的任一综合延迟时长以及预先配置的波动值确定的,或者是根据该第二区域集合对应的任一综合延迟时长以及预先配置的比例确定的。其中,该任一综合延迟时长可以为该第二区域集合对应的每个综合延迟时长中的最小值、最大值等。比如,当任一第二区域集合对应的第二延迟阈值是根据该第二区域集合对应的每个综合延迟时长中的最小值和预先配置的波动值确定的时,若该第二区域集合对应的综合延迟时长的最小值为100ms,预先配置的波动值为50ms,则该第二区域集合对应的第二延迟阈值为150ms;当任一第二区域集合对应的第二延迟阈值是根据该第二区域集合对应的每个综合延迟时长中的最小值和预先配置的比例确定的时,若该第二区域集合对应的综合延迟时长的最小值为100ms,预先配置的比例为20%,则该第二区 域集合对应的第二延迟阈值为120ms。
在另一种可能的实施方式中,当满足该第二通信要求是综合延迟时长最小的候选服务器时,获取到每个候选服务器对应的综合延迟时长之后,按照综合延迟时长从大到小的顺序,将每个候选服务器进行排序,将排序在前的设定数量的候选服务器确定为第二区域集合所对应的通用服务器。
图2为本申请实施例提供的一种第二区域集合及其对应的通用服务器的场景示意图。如图2所示,第二区域集合C为{c 1,c 2,c 3},基于上述实施例中的方法,可以根据包含某一历史群组通话中的每个会话成员的第二目标区域的第二区域集合,选择出能够保障该历史群组进行通话的最大延迟时长在可接受范围内的服务器作为通用服务器并记录,后续在确定与该历史群组中会话成员的区域分布情况相同的其他群组进行群组通话的中心服务器时,即包含其他群组中的每个会话成员的第一目标区域的信息的第一区域集合与该第二区域集合C匹配,提供了一个直接将确定的通用服务器确定为中心服务器的选择方案,尽可能减少实时选路所产生的延迟以及提供选路服务的电子设备的压力。
基于上述实施例中的方法,可以在实时选路过程中,基于预先配置的候选集合中的每个服务器分别与每个第二目标区域的用户设备进行数据通信的最大延迟上限,找出能够保证与该历史群组中会话成员的区域分布情况相同的其他群组在群组通话时,会话成员之间的通信延迟在可接受范围内的通用服务器,将该通用服务器与该群组的区域分布情况进行缓存,使得该通用服务器可以作为其他相同的区域分布情况的群组进行群组通话时的通用服务器,仅为根据该通用服务器,确定该群组进行群组通话的中心服务器。
后续接收到目标群组的主叫方发送的群组通话请求后,优先查询该目标群组中的每个会话成员的区域分布情况是否与预先配置了通用服务器的区域分布情况相同,即确定包含目标群组中每个会话成员的第一目标区域的信息的第一区域集合是否与预先配置的任一第二区域集合匹配,从而减少实时选路所产生的延迟以及提供选路服务的电子设备的压力。
实施例3:
为了进一步降低选路服务器每次实时确定当前通话的选路结果的压力,提高确定选路结果的效率,降低选路延迟,在上述各实施例的基础上,在本申请实施例中,所述确定包含每个所述第二目标区域的第二区域集合所对应的通用服务器之后,所述方法还包括:
针对除每个所述第二目标区域之外的其他区域,确定该其他区域的用户设备与所述通用服务器进行数据通信的目标延迟时长;
根据目标延迟时长小于所述通用服务器对应的最大延迟上限的每个目标其他区域,确定第三区域集合;
对应保存所述第二区域集合、所述第二区域集合对应的通用服务器和所述第三区域集合。
在实际应用场景中,可能出现群组中的会话成员发生变更,但变更后的群组中的会话成员的第一目标区域的信息与变更前的群组中的会话成员的第一目标区域的信息是不一致的情况。比如,变更前的群组A中包含有一个第一目标区域为中国的会话成员a,以及一个第一目标区域为美国的会话成员b,该变更前的群组A的第一区域集合为{中国、美国},而变更后的群组A中包含有一个第一目标区域为中国的会话成员e,一个第一目标区域为美国的会话成员b,以及一个第一目标区域为俄罗斯的会话成员c,该变更后的群组A的第一区域集合也为{中国、美国、俄罗斯}。在该种情况下,虽然变更前后的群组中的会话成员的第一目标区域的信息是不一致的,但最终确定的变更后的群组在进行群组通话时的中心服务器,与变更前的群组在进行群组通话时的中心服务器相同。当然,还有可能出现两个群组中的会话成员的第一目标区域的信息并不是完全相同的,但最终确定的两个群组分别进行群组通话时的中心服务器是相同的情况。
基于此,在本申请实施例中,基于上述实施例确定了包含每个第二目标区域的第二区域集合所对应的通用服务器之后,可以针对除每个第二目标区域之外的其他区域,确定该其他区域的用户设备与确定的通用服务器进行数 据通信的延迟时长(为了方便说明,记为目标延迟时长),针对每个其他区域,根据该其他区域对应的目标延迟时长。基于每个其他区域分别对应的目标延迟时长,确定通用服务器对应的第三区域集合。
在本申请实施例中,第三区域集合中的每个区域的信息,是对可以采用第二区域集合对应的通用服务器的区域的扩展,第三区域集合中的至少一个区域的信息与第二区域集合所构成的区域集合均对应该第二区域集合对应的通用服务器。
获取到除每个第二目标区域之外的任一其他区域分别对应的目标延迟时长后,针对每个其他区域,判断该其他区域对应的目标延迟时长是否小于该通用服务器所对应的最大延迟上限。具体的,若该其他区域对应的目标延迟时长小于该通用服务器所对应的最大延迟上限,则将该其他区域添加到该通用服务器所对应的第三区域集合中;若该其他区域对应的目标延迟时长不小于该通用服务器所对应的最大延迟上限,则不将该其他区域添加到该通用服务器所对应的第三区域集合中。
图3为本申请实施例提供的一种第二区域集合以及第三区域集合的场景示意图。如图3所示,第二区域集合C为{c 1,c 2,c 3},基于上述实施例中的方法,确定其他区域c 4和c 5分别对应的目标延迟时长均小于该通用服务器对应的最大延迟上限,根据其他区域c 4和c 5确定第三区域集合C′,即确定第三区域集合C′为{c 4,c 5}。
基于上述实施例的方法,确定第二区域集合所对应的第三区域集合中包含的每个区域后,将第二区域集合、第三区域集合和确定的该第二区域集合对应的通用服务器的标识信息对应保存。
在一种可能的实施方式中,在对应保存确定的该第二区域集合对应的通用服务器的标识信息、第二区域集合以及第三区域集合时,可以是将通用服务器的标识信息、第二区域集合中包含的每个区域的信息以及第三区域集合中包含的每个区域的信息对应保存,也可以是基于分别包含的区域的信息, 确定第二区域集合的标识信息以及第三区域集合的标识信息,对应保存确定的该第二区域集合对应的通用服务器的标识信息、第二区域集合的标识信息以及第三区域集合的标识信息。
需要说明的是,区域的信息可以是该区域的标识信息,也可以是该区域的名称。
在一种可能的实施方式中,当区域集合的标识信息是基于该区域集合中包含的每个区域的标识信息确定的时,预先为每个区域分配有一个独占比特(bit)位,根据每个区域对应的bit位上的数字,确定该区域的标识信息。根据该区域集合内包含的每个区域的标识信息的和,确定该区域集合的标识信息。
比如,假设预先为区域中国、美国、印度所分配的bit位分别是第1、2、3个bit位,则中国0000000000000001在其独占的bit位上对应的数字为0x1、美国0000000000000010在其独占的bit位上对应的数字为0x2、印度0000000000000100在其独占的bit位上对应的数字为0x4,那么区域集合{中国,美国,印度}的标识信息则可以用数字0x7表示,即0x1+0x2+0x4=0x7。
其中,为了尽可能多的用每个bit位表示每个区域,每个区域的标识信息的数据类型为长整数型(long)数据。由于long型数据最多只有64个bit位,即其最多只能代表64个区域,可以根据设置的区域的数量,确定采用多少个long型数据中的每个bit位分别代表区域。比如,区域为国家,而全世界有200多个国家,则需要使用4个long型数据来代表每个国家的标识信息。
图4为本申请实施例提供的一种将通用服务器的保存方法的示意图。其中,*表示数字,CC1_KEY*保存的是第二区域集合C中第*个第二目标区域的信息,CC2_KEY*保存的是第二区域集合C对应的第三区域集合C′中第*个目标其他区域的信息,general_server保存的是第二区域集合C对应的通用服务器的标识信息。
图5为本申请实施例提供的一种通用服务器的确定流程示意图,该流程包括:
S501:获取任一历史群组的主叫方发送的群组通话请求中携带的每个会话成员的第二目标区域的信息。
S502:获取包含每个第二目标区域的第二区域集合。
S503:基于预先配置的候选集合中的每个服务器分别对应的最大延迟上限,确定候选服务器。
针对预先配置的候选集合中的每个服务器,确定该服务器分别与每个第二目标区域的用户设备进行数据通信的最大延迟上限,若该最大延迟上限满足预设的第一通信要求,则将该服务器确定为候选服务器。
S504:判断候选服务器的数量是否为0,若是,则结束,否则,执行S505。
S505:判断候选服务器的数量是否大于1,若是,则执行S506,否则,执行S507。
S506:根据每个候选服务器分别对应的平均延迟时长以及分别对应的最大延迟上限,确定该第二区域集合对应的通用服务器,然后执行S508。
针对每个候选服务器,确定该候选服务器分别与每个第二目标区域的用户设备进行数据通信的平均延迟时长;
针对每个候选服务器,根据该候选服务器的平均延迟时长及其对应的第一权重值、该候选服务器的最大延迟上限及其对应的第二权重值,确定综合延迟时长;
将综合延迟时长满足预设的第二通信要求的任一候选服务器确定为第二区域集合所对应的通用服务器。
S507:将该候选服务器确定为该第二区域集合对应的通用服务器。
S508:确定该通用服务器对应的第三区域集合。
针对除每个第二目标区域之外的其他区域,确定该其他区域的用户设备与通用服务器进行数据通信的目标延迟时长;
根据目标延迟时长小于通用服务器对应的最大延迟上限的每个其他区域,确定第三区域集合;
对应保存第二区域集合、第二区域集合对应的通用服务器和第三区域集 合。
实施例4:
为了进一步降低选路服务器每次实时确定当前通话的选路结果的压力,提高确定选路结果的效率,降低选路延迟,在上述各实施例的基础上,在本申请实施例中,所述确定包含每个所述第一目标区域的第一区域集合与预先保存的任一第二区域集合匹配,包括:
针对每个所述第二区域集合,若所述第一区域集合与所述第二区域集合的交集为所述第二区域集合,且所述第一区域集合与所述第二区域集合对应的综合区域集合的交集为所述第一区域集合,则确定所述第一区域集合与所述第二区域集合匹配,其中,所述第二区域集合对应的综合区域集合包括所述第二区域集合和所述通用服务器对应的第三区域集合。
在实际应用场景中,包括当前进行群组通话中的每个会话成员的第一目标区域的第一区域集合中,可能包含有除了某一第二区域集合中的每个第二目标区域的信息之外的其他区域。获取该第一区域集合所包含的第二区域集合所对应的通用服务器,如果这些其他区域均是该通用服务器所对应的第三区域集合中的区域的话,则该第一区域集合可以理解为是该第二区域集合的一个扩展后的区域集合,且为根据该第二区域集合对应的综合区域集合的一个子集。其中,任一第二区域集合对应的综合区域集合包括该第二区域集合和该第二区域集合对应的通用服务器所对应的第三区域集合。而由该第三区域集合的任一子区域集合和该第二区域集合所确定的区域集合均对应该第二区域集合对应的通用服务器。因此,在本申请实施例中,当接收到目标群组的主叫方发送的群组通话请求后,对该群组通话请求进行解析,获取该群组通话请求中携带的每个第一目标区域的信息。根据每个第一目标区域的信息,确定第一区域集合。针对预先配置了通用服务器的每个第二区域集合,若确定该第一区域集合与该第二区域集合的交集为该第二区域集合,且该第一区域集合与该第二区域集合对应的综合区域集合的交集为该第一区域集合,则确定该第一区域集合与该第二区域集合匹配,获取该匹配的第二区域集合所 对应的通用服务器,根据该通用服务器,确定目标群组进行群组通话的中心服务器。若确定该第一区域集合与该第二区域集合的交集不为该第二区域集合,或,该第一区域集合与该第二区域集合对应的综合区域集合的交集不为该第一区域集合,则确定该第一区域集合与该第二区域集合不匹配,则基于该群组通话请求中携带的每个第一目标区域的信息,确定目标群组进行群组通话的中心服务器。
具体的,确定第一区域集合X与预先保存的任一第二区域集合匹配,需要第一区域集合X满足如下两个条件:
X∩C=C;
X∩(C∪C′)=X;
其中,X表示第一区域集合,C表示与该第一区域集合匹配的第二区域集合,C′表示C对应的通用服务器所对应的第三区域集合。
在一种可能的实施方式中,若按照图4所示的方式对应保存第二区域集合对应的通用服务器的标识信息、第二区域集合和第三区域集合的,则在后续实际应用过程中,可以通过如下代码将第一区域集合与预先配置的任一第二区域集合进行匹配的操作,具体的:
Figure PCTCN2022076103-appb-000002
其中,采用Long key1,Long key2,Long key3,Long key4这4个long型数据中的每个bit位分别代表区域的信息。*表示数字,CC1_KEY*保存的是第二区域集合C中第*个第二目标区域的信息,CC2_KEY*保存的是C对应的通用服务器所对应的第三区域集合C′中第*个目标其他区域的信息。
在一种可能的实施方式中,所述根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务器之前,所述方法还包括:
若确定匹配的第二区域集合所对应的通用服务器对应的确定时长小于预设的时长阈值,则执行后续根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务器的步骤。
因为网络波动和每个服务器的负载限制等不确定因素,比如,可能出现通用服务器的负载发生变化,导致群组中的任一会话成员的用户设备与该通用服务器进行数据通信的质量下降,或者,群组中任意两个会话成员的用户设备进行数据通信的链路发生了变化等情况,使得预先确定的该群组对应的通用服务器无法保证该群组进行群组通话。如果总是根据保存的第二区域集合与通用服务器的对应关系,确定目标群组进行群组通话的中心服务器,则很可能会降低当前群组通话的质量,降低用户体验。因此,在本申请实施例中,预先设置有时长阈值,即确定的任一第二区域集合与对应的通用服务器对应保存的最大时长。在保存某一第二区域集合与该第二区域集合对应的通用服务器时,还需要启动计时器对该通用服务器的确定时长进行计时。当基于上述的实施例,获取到了匹配的第二区域集合后,获取该匹配的第二区域集合所对应的通用服务器对应的确定时长。将该确定时长与预设的时长阈值进行比较,根据比较结果,确定是否根据该通用服务器,确定目标群组进行群组通话的中心服务器。
在一种可能的实施方式中,若确定时长小于预设的时长阈值,说明该第二区域集合对应的通用服务器还在有效期内,可以根据该通用服务器,确定目标群组进行群组通话的中心服务器。
在另一种可能的实施方式中,若确定时长大于预设的时长阈值,说明该第二区域集合对应的通用服务器失效了,无法根据该通用服务器,确定目标群组进行群组通话的中心服务器,则根据该群组通话请求中携带的每个第一目标区域的信息,确定该目标群组进行群组通话的中心服务器。
在某些可能的实施方式中,为了减少失效的通用服务器影响确定中心服务器的效率,在本申请实施例中,当确定某一通用服务器的确定时长达到预设的时长阈值时,可以直接将保存的该第二区域集合与该第二区域集合对应的通用服务器删除。
为了提高确定中心服务器的效率,在本申请实施例中,可以直接将匹配的第二区域集合所对应的通用服务器确定为目标群组进行群组通话的中心服务器。
在实际应用场景中,还可能出现服务器的负载发生变化,导致将预先确定的目标区域集合对应的通用服务器确定为当前群组通话的中心服务器后,群组内的会话成员之间进行数据通信的质量降低的情况。为了避免上述情况的发送,在本申请实施例中,所述根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务器,包括:
若确定所述通用服务器的状态信息满足预设的可用条件,则将所述通用服务器确定为所述目标群组进行群组通话的中心服务器。
为了提高确定的中心服务器的准确性,在本申请实施例中,预设有可用条件,该可用条件用于标识服务器可用时的状态信息,比如,服务器可用时的最大负载阈值等。具体实施过程中,在将匹配的第二区域集合所对应的通用服务器确定为目标群组进行群组通话的中心服务器之前,获取该通用服务器的状态信息。判断该通用服务器的状态信息是否满足预设的可用条件,从而确定是否执行后续将匹配的第二区域集合所对应的通用服务器确定为目标群组进行群组通话的中心服务器的步骤。
其中,服务器的状态信息包括服务器的网络状态、负载情况等信息中的至少一种。
在一种可能的实施方式中,若确定通用服务器的状态信息满足预设的可用条件,说明该通用服务器可以保证目标群组进行群组通话的质量,即该通用服务器可用,则将该通用服务器确定为目标群组进行群组通话的中心服务器;若确定通用服务器的状态信息不满足预设的可用条件,说明该通用服务器无法保证目标群组进行群组通话的质量,即该通用服务器不可用,则基于每个第一目标区域的信息,确定当前群组通话的中心服务器。
基于上述的描述可知,通用服务器,也可称为通用解,是为包含的会话成员满足某一特定区域分布的群组所提供的选路结果。当确定包含每个第一目标区域的第一区域集合与某一第二区域集合的交集为第二区域集合,且该第一区域集合与该第二区域集合对应的综合区域集合的交集为该第一区域集合,即该第一区域集合与预先配置了通用服务器的某一第二区域集合匹配时,电子设备只需检查匹配的第二区域集合对应的通用服务器是否可用,即确定匹配的第二区域集合对应的通用服务器的状态信息是否满足预设的可用条件,在确定该通用服务器的状态信息是否满足预设的可用条件,即确定该通用服务器可用时,直接将该通用服务器确定为该目标群组进行本次群组通话的中心服务器,电子设备无需再基于目标群组内每个会话成员的第一目标区域的信息,实时确定该目标群组进行本次群组通话的中心服务器。
图6为本申请实施例提供的具体的服务器的选择流程示意图,以互联网即时通讯场景的群组通话场景为例,该流程包括:
S601:接收目标群组的主叫方发送的群组通话请求。
其中,该群组通话请求中携带有目标群组中每个会话成员的第一目标区域的信息。
S602:判断包含每个第一目标区域的第一区域集合与预先保存的任一第二区域集合是否匹配,若匹配,则执行S603,否则,执行S605。
具体的,确定包含每个第一目标区域的第一区域集合与预先保存的任一第二区域集合匹配,包括:
针对每个第二区域集合,若第一区域集合与第二区域集合的交集为第二 区域集合,且第一区域集合与第二区域集合对应的综合区域集合的交集为第一区域集合,则确定第一区域集合与第二区域集合匹配,其中,第二区域集合对应的综合区域集合包括第二区域集合和该第二区域集合对应的通用服务器对应的第三区域集合。
S603:确定匹配的第二区域集合对应的通用服务器是否可用,若均为是,则执行S604,否则,执行S605。
具体的,确定通用服务器的状态信息是否满足预设的可用条件,若满足,则确定该通用服务器可用,否则,确定该通用服务器不可用。
S604:将匹配的第二区域集合对应的通用服务器确定为目标群组进行群组通话的中心服务器。
S605:实时确定目群组进行群组通话的中心服务器。
上述实施例中的通用服务器的选择方法,可以是在接收到目标群组的主叫方发送的群组通话请求,基于该群组通话请求,实时确定该群组通话的中心服务器的同时,也将该目标群组确定为历史群组,确定包含该历史群组中的每个会话成员的第二目标区域的第二区域集合对应的通用服务器;也可以是通过缓存的每个已经确定了中心服务器的群组通话请求,针对每个群组通话请求,确定包含该群组通话中的每个会话成员的第二目标区域的第二区域集合对应的通用服务器。
在一种可能的实施方式中,在基于群组通话请求中携带的每个第一目标区域的信息,确定目标群组进行群组通话的中心服务器时,可以直接将主叫方对应的最优服务器,即将与主叫方直连的每个服务器中,与该主叫方进行数据通信的延迟时长最小的服务器,确定为当前群组通话的中心服务器。
在另一种可能的实施方式中,在基于群组通话请求(为了方便描述,记为第一群组通话请求)中携带的每个第一目标区域的信息,确定目标群组进行群组通话的中心服务器时,还可以通过如下方式确定:
首先,针对每个第一目标区域,根据该第一目标区域中的用户设备分别与直连的服务器进行数据通信的第三延迟时长,确定该第一目标区域对应的 第一服务器。
在本申请实施例中,为了准确地确定每个第一目标区域对应的第一服务器,预设有筛选条件。当基于上述实施例获取到该第一目标区域中的用户设备被分别与直连的服务器进行数据通信的第三延迟时长后,判断获取到的任一第三延迟时长是否满足预设的筛选条件,将第三延迟时长满足预设的筛选条件一个服务器确定为该第一目标区域对应的第一服务器。
其中,在设置筛选条件时,可以根据场景的不同,设置不同的筛选条件。为了尽可能地保证后续群组通话的通信质量,满足筛选条件可以是第三延迟时长的最小值;为了避免确定的第一服务器为中心服务器后进行群组通话所花费的成本过多,满足筛选条件可以是第三延迟时长小于该第一目标区域对应的延迟阈值(为了方便描述,记为第三延迟阈值)。
基于上述实施例确定了每个第一服务器之后,为了保证群组通话的质量,避免存在除每个第一服务器之外的服务器比确定的第一服务器的通信质量更好,针对除每个第一服务器之外的第二服务器,获取该第二服务器分别与每个第一服务器进行数据通信的延迟时长(为了方便描述,记为第四延迟时长),根据每个第四延迟时长,确定该第二服务器对应的总延迟时长。
在一种可能的实施方式中,为了进一步提高群组通话的质量,在本申请实施例中,预设有第三通信要求。其中,满足该第三通信要求可以是总延迟时长最小,或,总延迟时长小于预设的延迟阈值(为了方便描述,记为第四延迟阈值)。当基于上述实施例获取到每个第二服务器分别对应的总延迟时长之后,判断获取到的任一总延迟时长是否满足预设的第三通信要求,将总延迟时长满足预设的第三通信要求的任一第二服务器确定为第一服务器。
需要说明的是,在设置第四延迟阈值时,可以根据场景的不同,设置不同的值,如果对中心服务器的延迟时长有严格的要求,可以将该第四延迟阈值设置的低一些;如果为了避免漏掉通信质量比每个第一目标区域分别对应的第一服务器好的第二服务器,可以将该第四延迟阈值设置的高一些。具体实施过程中,可以根据实际需求进行灵活设置,在此不做具体限定。
基于上述的实施例确定了每个第一服务器后,基于获取到的第一服务器分别与每个第一目标区域中的用户设备进行数据通信的平均延迟时长,确定目标群组进行群组通话的中心服务器。
在一种可能的实施方式中,获取所述第一服务器分别与每个所述第一目标区域中的用户设备进行数据通信的平均延迟时长,包括:
获取每个所述第一目标区域分别对应的权重值;
根据每个所述第一目标区域分别对应的第五延迟时长以及权重值,确定所述第一服务器对应的平均延迟时长,其中,任一第一目标区域对应的第五延迟时长为所述第一服务器与该第一目标区域的用户设备进行数据通信的延迟时长。
在一种可能的实施方式中,所述根据每个所述第一目标区域分别对应的第五延迟时长以及权重值,确定所述第一服务器对应的平均延迟时长,包括:
分别确定每个所述第一目标区域分别对应的第五延迟时长与对应的权重值的乘积;
根据每个所述乘积以及每个所述权重值,确定所述第一服务器对应的平均延迟时长。
在一种可能的实施方式中,根据每个第一目标区域分别对应的第五延迟时长以及权重值,确定第一服务器对应的平均延迟时长可以通过如下公式确定:
Figure PCTCN2022076103-appb-000003
其中,AVG(RTT i)为第i个第一服务器对应的平均延迟时长,w j为第j个目标区域对应的权重值,
Figure PCTCN2022076103-appb-000004
为根据n个目标区域分别对应的权重值所确定的权重和,RTT ji为第i个第一服务器与第j个目标区域中的用户设备进行数据通信的第五延迟时长。
在一种可能的实施方式中,若第一群组通话请求中还携带有目标群组的目标群组标识信息,所述获取每个所述第一目标区域分别对应的权重值,包 括:
若所述目标群组标识信息与已配置了权重值的群组标识信息均不匹配,则分别根据所述目标群组中每个所述第一目标区域所包含的会话成员的数量,确定每个所述第一目标区域分别对应的权重值。
在实际应用场景中,可能存在目标群组第一次进行群组通话的情况,则将获取到的目标群组标识信息与已配置了权重值的每个群组标识信息进行匹配后,该目标群组标识信息无法与已配置了权重值的每个群组标识信息匹配,则可以根据第一群组通话请求中携带的每个第一目标区域的信息,确定目标群组中每个第一目标区域所包含的会话成员的数量,根据每个第一目标区域所包含的会话成员的数量,确定每个第一目标区域分别对应的权重值。
在某些可能的实施方式中,为了方便确定每个第一目标区域分别对应的权重值,在本申请实施例中,预先配置了群组内任一会话成员对应的单位权重值,比如,目标群组内任一会话成员对应的单位权重值为1.0。根据目标群组中每个第一目标区域所包含的会话成员的数量以及预先配置的任一会话成员对应的单位权重值,分别确定每个第一目标区域分别对应的权重值。
在实际应用场景中,也可能存在目标群组不是第一次进行群组通话的情况,则将获取到的目标群组标识信息与已配置了权重值的每个群组标识信息进行匹配后,该目标群组标识信息可以与已配置了权重值的某一群组标识信息匹配,则可以获取匹配的群组标识信息所对应的每个区域分别对应的权重值,确定每个第一目标区域分别对应的权重值。
为了准确地确定目标群组进行群组通话的中心服务器,在本申请实施例中,预设有通信要求(为了方便说明,记为第四通信要求)。当基于上述实施例分别获取到了每个第一服务器对应的平均延迟时长后,对于获取到的任一平均延迟时长,可以依次或随机判断该平均延迟时长是否满足预设的第四通信要求。当确定某一平均延迟时长满足预设的第四通信要求时,可以直接将该平均延迟时长所对应的服务器确定为目标群组进行群组通话的中心服务器;也可以分别确定了获取到的每个平均延迟时长是否满足预设的第四通信要求 之后,从满足预设的第四通信要求的平均延迟时长中,将任一平均延迟时长所对应的服务器确定为目标群组进行群组通话的中心服务器。
其中,在设置第四通信要求时,也可以根据场景的不同,设置不同的第四通信要求。为了尽可能地保证群组通话的通信质量,满足第四通信要求的服务器可以是第一延迟时长最小的服务器;为了负载均衡,平均延迟时长满足第四通信要求的第一服务器可以是按照平均延迟时长从大到小的顺序,将排序在前的预设数量的平均延迟时长所对应的第一服务器中,负载最小的第一服务器。具体实施过程中,可以根据实际需求进行灵活设置,在此不做具体限定。
在一种可能的实施方式中,所述方法还包括:
接收所述目标群组的被叫方发送的第二群组通话请求;其中,该第二群组通话请求中携带有所述目标群组的目标群组标识信息;
获取与所述目标群组标识信息匹配的已配置了中心服务器的群组标识信息;
根据匹配的群组标识信息所对应的中心服务器,确定所述目标群组进行群组通话的中心服务器。
当基于上述的实施例确定了目标群组进行群组通话的中心服务器之后,所述方法还包括:
根据发送目标群组通话请求的目标会话成员所在区域的信息,确定所述目标会话成员对应的第一链路延迟和第二链路延迟;其中,所述目标群组通话请求为所述第一群组通话请求,或,所述第二群组通话请求,所述第一链路延迟为所述目标会话成员所在区域的用户设备直接与所述中心服务器进行数据通信的链路的链路延迟,所述第二链路延迟为所述目标会话成员所在区域的用户设备通过转发服务器转发的方式与所述中心服务器进行数据通信的链路的链路延迟;
根据所述第一链路延迟和所述第二链路延迟,确定所述目标会话成员的用户设备与所述中心服务器进行数据通信的链路。
具体实施过程中,若第一链路延迟比第二链路延迟小,则确定目标会话成员的用户设备直接与该中心服务器进行数据通信。
若第一链路延迟比第二链路延迟大,则确定目标会话成员的用户设备通过转发服务器转发的方式与该中心服务器进行数据通信。
在一种可能的实施方式中,所述方法还包括:
若确定发送目标群组通话请求的目标会话成员第一次加入到当前群组通话,则根据所述目标群组通话请求,获取所述目标会话成员所在区域的信息;其中,所述目标群组通话请求为所述第一群组通话请求,或,所述第二群组通话请求;
若在保存的所述目标群组的每个所述第一目标区域分别对应的权重值中,获取到所述目标会话成员所在区域对应的目标权重值,则对所述目标权重值进行更新并保存。
在一种可能的实施方式中,预先配置有增量权重值。根据目标群组通话请求中携带的信息,确定发送该目标群组通话请求的目标会话成员所在区域的信息。在保存的目标群组的每个第一目标区域分别对应的权重值中,确定该目标会话成员所在区域对应的目标权重值。根据该目标权重值与预先配置的增量权重值的和,对目标权重值进行更新并保存。
其中,预先配置的增量权重值以是预先配置的数值范围内的任一数值,也可以是预设的某一固定数值。
在一种可能的实施方式中,所述方法还包括:
若在保存的所述目标群组的每个所述第一目标区域分别对应的权重值中,无法获取到所述目标会话成员所在区域对应的目标权重值,则根据所述群组通话请求中携带的每个所述第一目标区域的信息,确定在所述目标会话成员所在区域的会话成员的数量;
根据所述数量,确定所述目标会话成员所在区域对应的权重值并保存。
在某些可能的实施例中,当确定在保存的目标群组的每个第一目标区域分别对应的权重值中,无法获取到目标会话成员所在区域对应的目标权重值 时,则获取该目标会话成员发送的目标群组通话请求中携带的目标群组中每个会话成员所在第一目标区域的信息;根据每个第一目标区域的信息以及该目标会员所在区域的信息,确定目标群组中在该目标会话成员所在区域的会话成员的数量。根据确定的数量,确定该目标会话成员所在区域对应的权重值,并将该目标会话成员所在区域对应的权重值与目标群组的群组标识信息对应保存。
在一种可能的实施方式中,预先配置了群组内任一会话成员对应的单位权重值,比如,目标群组内任一会话成员对应的单位权重值为1.0。根据目标群组中在该目标会话成员所在区域的会话成员的数量,以及预先配置的任一会话成员对应的单位权重值,分别确定目标会话成员所在区域对应的权重值。
图7为本申请实施例提供的具体的实时确定中心服务器的流程示意图,该流程包括:
S701:接收群组通话请求。
S702:判断该群组通话请求是否为主叫方发送的,若是,执行S703,否则,执行S709。
具体的判断该群组通话请求是否为主叫方发送的方法已在上述实施例中进行描述,重复之处不做赘述。
S703:判断该目标群组是否为第一次进行群组通话,若是,执行S704,否则,执行S705。
具体的,可以将该目标群组的目标群组标识信息与保存的已进行群组通话的群组标识信息进行匹配,若存在匹配的群组标识信息,则确定该目标群组不为第一次进行群组通话;若不存在匹配的群组标识信息,则确定该目标群组为第一次进行群组通话。
S704:基于群组通话请求中携带的群组内每个会话成员的第一目标区域的信息,确定每个第一目标区域分别对应的权重值。
S705:获取保存的每个第一目标区域对应的权重值。
S706:确定每个第一目标区域对应的第一服务器。
具体的确定过程已在上述实施例中进行描述,重复之处不做赘述。
S707:针对除每个第一服务器之外的每个第二服务器,获取该第二服务器分别与每个第一服务器进行数据通信的总延迟时长;将总延迟时长满足预设的第二通信要求的任一第二服务器确定为第一服务器。
具体的,已在上述实施例中进行描述,重复之处不做赘述。
S708:针对每个第一服务器,确定第一服务器分别与每个第一目标区域中的用户设备进行数据通信的平均延迟时长;将平均延迟时长满足预设的第四通信要求的任一第一服务器确定为当前群组通话的中心服务器,执行S710。
S709:根据该群组通话请求中携带的目标群组标识信息,以及已配置了中心服务器的群组标识信息,确定目标群组进行群组通话的中心服务器。
具体的,已在上述实施例中进行描述,重复之处不做赘述。
S710:判断发送该群组通话请求的目标会话成员是否第一次加入到当前的群组通话中,若是,执行S711,否则,执行S712。
S711:更新并保存该目标会话成员所在区域对应的权重值。
具体的,根据群组通话请求,获取目标会话成员所在区域的信息;
若在保存的目标群组的每个第一目标区域分别对应的权重值中,获取到目标会话成员所在区域对应的目标权重值,则对目标权重值进行更新并保存。
若在保存的目标群组的每个第一目标区域分别对应的权重值中,无法获取到目标会话成员所在区域对应的目标权重值,则根据群组通话请求中携带的每个第一目标区域的信息,确定在目标会话成员所在区域的会话成员的数量;根据确定的数量,确定目标会话成员所在区域对应的权重值并保存。
S712:根据发送群组通话请求的目标会话成员所在区域的信息,确定目标会话成员对应的第一链路延迟和第二链路延迟。
其中,第一链路延迟为该会话成员所在区域的用户设备直接与中心服务器进行数据通信的链路的链路延迟,第二链路延迟为目标会话成员所在区域的用户设备通过转发服务器转发的方式与中心服务器进行数据通信的链路的链路延迟。
S713:判断第一链路延迟是否小于第二链路延迟,若是,执行S714,否则,执行S715。
S714:确定目标会话成员的用户设备直接与该中心服务器进行数据通信。
S715:确定目标会话成员的用户设备通过转发服务器转发的方式与该中心服务器进行数据通信。
实施例5:
图8为本申请实施例提供的一种服务器的选择装置的结构示意图,本申请实施例提供了一种服务器的选择装置,该装置包括:
接收单元81,用于接收目标群组的主叫方发送的群组通话请求;其中,所述群组通话请求中携带有所述目标群组中每个会话成员的第一目标区域的信息;
处理单元82,用于若确定包含每个所述第一目标区域的第一区域集合与预先保存的任一第二区域集合匹配,则根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务器。
由于上述服务器的选择装置解决问题的原理与服务器的选择方法相似,因此上述服务器的选择装置的实施可以参见方法的实施,重复之处不再赘述。
由于本申请实施例中,预先确定了每个第二区域集合所对应的通用服务器,后续接收到目标群组的主叫方发送的群组通话请求之后,根据该群组通话请求中携带的目标群组中每个会话成员的第一目标区域的信息,将包含每个第一目标区域的第一区域集合与预先保存的每个第二区域集合进行匹配,当确定该第一区域集合与预先保存的任一第二区域集合匹配时,根据匹配的第二区域集合所对应的通用服务器,确定目标群组进行群组通话的中心服务器,从而实现快速且准确地确定中心服务器,简化了选路服务器确定中心服务器的过程,极大地降低选路服务器每次实时确定中心服务器的压力,提高确定中心服务器的效率,降低确定选路结果的延迟。
实施例6:
图9为本申请实施例提供的一种电子设备结构示意图,该电子设备,包 括:处理器91、通信接口92、存储器93和通信总线94,其中,处理器91,通信接口92,存储器93通过通信总线94完成相互间的通信;
所述存储器93中存储有计算机程序,当所述程序被所述处理器91执行时,使得所述处理器91执行如下步骤:
接收目标群组的主叫方发送的群组通话请求;其中,所述群组通话请求中携带有所述目标群组中每个会话成员的第一目标区域的信息;
若确定包含每个所述第一目标区域的第一区域集合与预先保存的任一第二区域集合匹配,则根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务器。
由于上述电子设备解决问题的原理与服务器的选择方法相似,因此上述电子设备的实施可以参见方法的实施,重复之处不再赘述。
实施例7:
在上述各实施例的基础上,本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有可由处理器执行的计算机程序,当所述程序在所述处理器上运行时,使得所述处理器执行时实现如下步骤:
接收目标群组的主叫方发送的群组通话请求;其中,所述群组通话请求中携带有所述目标群组中每个会话成员的第一目标区域的信息;
若确定包含每个所述第一目标区域的第一区域集合与预先保存的任一第二区域集合匹配,则根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务器。
由于计算机可读存储介质解决问题的原理与上述实施例中的服务器的选择方法相似,因此具体实施可以参见服务器的选择方法的实施。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (11)

  1. 一种服务器的选择方法,其特征在于,所述方法包括:
    接收目标群组的主叫方发送的群组通话请求;其中,所述群组通话请求中携带有所述目标群组中每个会话成员的第一目标区域的信息;
    若确定包含每个所述第一目标区域的第一区域集合与预先保存的任一第二区域集合匹配,则根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务器。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    获取任一历史群组的主叫方发送的群组通话请求中携带的每个会话成员的第二目标区域的信息;
    针对预先配置的候选集合中的每个服务器,确定该服务器分别与每个所述第二目标区域的用户设备进行数据通信的最大延迟上限,若所述最大延迟上限满足预设的第一通信要求,则将该服务器确定为候选服务器;
    基于每个所述候选服务器,确定包含每个所述第二目标区域的第二区域集合所对应的通用服务器。
  3. 根据权利要求2所述的方法,其特征在于,若所述候选服务器为至少两个,所述基于每个所述候选服务器,确定包含每个所述第二目标区域的第二区域集合所对应的通用服务器,包括:
    针对每个所述候选服务器,确定该候选服务器分别与每个所述第二目标区域的用户设备进行数据通信的平均延迟时长;
    根据每个所述候选服务器对应的平均延迟时长,确定所述第二区域集合所对应的通用服务器。
  4. 根据权利要求3所述的方法,其特征在于,所述根据每个所述候选服务器对应的平均延迟时长,确定所述第二区域集合所对应的通用服务器,包括:
    针对每个所述候选服务器,根据该候选服务器的平均延迟时长及其对应 的第一权重值、该候选服务器的最大延迟上限及其对应的第二权重值,确定综合延迟时长;
    将综合延迟时长满足预设的第二通信要求的任一候选服务器确定为所述第二区域集合所对应的通用服务器。
  5. 根据权利要求2所述的方法,其特征在于,所述确定包含每个所述第二目标区域的第二区域集合所对应的通用服务器之后,所述方法还包括:
    针对除每个所述第二目标区域之外的其他区域,确定该其他区域的用户设备与所述通用服务器进行数据通信的目标延迟时长;
    根据目标延迟时长小于所述通用服务器对应的最大延迟上限的每个目标其他区域,确定第三区域集合;
    对应保存所述第二区域集合、所述第二区域集合对应的通用服务器和所述第三区域集合。
  6. 根据权利要求5所述的方法,其特征在于,所述确定包含每个所述第一目标区域的第一区域集合与预先保存的任一第二区域集合匹配,包括:
    针对每个所述第二区域集合,若所述第一区域集合与所述第二区域集合的交集为所述第二区域集合,且所述第一区域集合与所述第二区域集合对应的综合区域集合的交集为所述第一区域集合,则确定所述第一区域集合与所述第二区域集合匹配,其中,所述第二区域集合对应的综合区域集合包括所述第二区域集合和所述通用服务器对应的第三区域集合。
  7. 根据权利要求1所述的方法,其特征在于,所述根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务器之前,所述方法还包括:
    若确定匹配的第二区域集合所对应的通用服务器对应的确定时长小于预设的时长阈值,则执行后续根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务器的步骤。
  8. 根据权利要求1或7所述的方法,其特征在于,所述根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务 器,包括:
    若确定所述通用服务器的状态信息满足预设的可用条件,则将所述通用服务器确定为所述目标群组进行群组通话的中心服务器。
  9. 一种服务器的选择装置,其特征在于,所述装置包括:
    接收单元,用于接收目标群组的主叫方发送的群组通话请求;其中,所述群组通话请求中携带有所述目标群组中每个会话成员的第一目标区域的信息;
    处理单元,用于若确定包含每个所述第一目标区域的第一区域集合与预先保存的任一第二区域集合匹配,则根据匹配的第二区域集合所对应的通用服务器,确定所述目标群组进行群组通话的中心服务器。
  10. 一种电子设备,其特征在于,所述电子设备至少包括处理器和存储器,所述处理器用于执行存储器中存储的计算机程序时实现如权利要求1-8任一所述服务器的选择方法的步骤。
  11. 一种计算机可读存储介质,其特征在于,其存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-8任一所述服务器的选择方法的步骤。
PCT/CN2022/076103 2021-03-09 2022-02-11 一种服务器的选择方法、装置、设备及介质 WO2022188592A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110257628.X 2021-03-09
CN202110257628.XA CN112822221B (zh) 2021-03-09 2021-03-09 一种服务器的选择方法、装置、设备及介质

Publications (1)

Publication Number Publication Date
WO2022188592A1 true WO2022188592A1 (zh) 2022-09-15

Family

ID=75862599

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/076103 WO2022188592A1 (zh) 2021-03-09 2022-02-11 一种服务器的选择方法、装置、设备及介质

Country Status (2)

Country Link
CN (1) CN112822221B (zh)
WO (1) WO2022188592A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055460B (zh) * 2021-03-09 2024-04-19 百果园技术(新加坡)有限公司 一种服务器的选择方法、装置、设备及介质
CN112822221B (zh) * 2021-03-09 2023-01-06 百果园技术(新加坡)有限公司 一种服务器的选择方法、装置、设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580431A (zh) * 2014-12-27 2015-04-29 北京奇虎科技有限公司 一种通讯群组的配置方法和装置
CN106664534A (zh) * 2015-05-22 2017-05-10 华为技术有限公司 一种mcptt群组的呼叫处理方法、系统及相关设备
CN111010744A (zh) * 2018-10-08 2020-04-14 华为技术有限公司 建立会话的方法和装置以及发送报文的方法和装置
US20200177683A1 (en) * 2018-12-03 2020-06-04 At&T Intellectual Property I, L.P. Group communication and service optimization system
CN112822221A (zh) * 2021-03-09 2021-05-18 百果园技术(新加坡)有限公司 一种服务器的选择方法、装置、设备及介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7031700B1 (en) * 2001-11-14 2006-04-18 Sprint Spectrum L.P. Method and system for location-based group conference initiation
US20040203907A1 (en) * 2002-12-30 2004-10-14 Hiller Thomas Lloyd One to many wireless network communications with receiving members selected based on geographic location
CN100477862C (zh) * 2005-04-27 2009-04-08 华为技术有限公司 一种确定集中控制服务器的方法及系统
CN111757040B (zh) * 2020-06-24 2022-06-07 维沃移动通信有限公司 通讯方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580431A (zh) * 2014-12-27 2015-04-29 北京奇虎科技有限公司 一种通讯群组的配置方法和装置
CN106664534A (zh) * 2015-05-22 2017-05-10 华为技术有限公司 一种mcptt群组的呼叫处理方法、系统及相关设备
CN111010744A (zh) * 2018-10-08 2020-04-14 华为技术有限公司 建立会话的方法和装置以及发送报文的方法和装置
US20200177683A1 (en) * 2018-12-03 2020-06-04 At&T Intellectual Property I, L.P. Group communication and service optimization system
CN112822221A (zh) * 2021-03-09 2021-05-18 百果园技术(新加坡)有限公司 一种服务器的选择方法、装置、设备及介质

Also Published As

Publication number Publication date
CN112822221A (zh) 2021-05-18
CN112822221B (zh) 2023-01-06

Similar Documents

Publication Publication Date Title
WO2022188592A1 (zh) 一种服务器的选择方法、装置、设备及介质
EP3890240B1 (en) User plane function method, user plane function entity, computer program and system
US20200213367A1 (en) Device service capability discovery
US9661151B2 (en) Method, apparatus and system for determining policy and charging rule function entity
US8705381B2 (en) Communication embodiments and low latency path selection in a multi-topology network
WO2016095516A1 (zh) 一种复杂事件处理方法、装置及系统
US9451502B2 (en) Service control method and system, evolved nodeB, and packet data network gateway
CN106330718B (zh) 组播报文转发方法及装置
WO2022188591A1 (zh) 一种服务器的选择方法、装置、设备及介质
CN109548063B (zh) 处理报文的方法、装置、设备及存储介质
US9894600B1 (en) Providing adaptive network access
EP3179687A1 (en) Network flow information statistics method and apparatus
CN112751780B (zh) 数据传输方法、装置、系统和计算机可读存储介质
US20220109621A1 (en) IP-Based Matching System
US20080301230A1 (en) Instant message (im) routing to a virtual user consisting of a group of possible sub-users associated with a common im identity
US10511494B2 (en) Network control method and apparatus
US20170034227A1 (en) System and methods for an online conference session
EP3892037B1 (en) Method and device for establishing a multi-domain network slice
US10104018B2 (en) Method, apparatus, and system for controlling forwarding of service data in virtual network
US9942823B2 (en) Communication terminal, communication method, and communication program
JP6264928B2 (ja) 通信システム、通信方法および通信プログラム
US20140181307A1 (en) Routing apparatus and method
CN111953855B (zh) Voip通话方法、装置、系统、设备及可读存储介质
US20230269188A1 (en) Application request processing method, system, electronic device and storage medium
KR102514520B1 (ko) 서비스 기능 체이닝 제어 방법, 장치, 컴퓨터 판독 가능한 기록매체 및 컴퓨터 프로그램

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22766118

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22766118

Country of ref document: EP

Kind code of ref document: A1