CN112738153B - Gateway selection method, system, device, server and medium in service system - Google Patents

Gateway selection method, system, device, server and medium in service system Download PDF

Info

Publication number
CN112738153B
CN112738153B CN202011382538.5A CN202011382538A CN112738153B CN 112738153 B CN112738153 B CN 112738153B CN 202011382538 A CN202011382538 A CN 202011382538A CN 112738153 B CN112738153 B CN 112738153B
Authority
CN
China
Prior art keywords
gateway
target
online
server
gateway server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011382538.5A
Other languages
Chinese (zh)
Other versions
CN112738153A (en
Inventor
李倩倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Feixun Digital Technology Co ltd
Original Assignee
Beijing Feixun Digital Technology Co ltd
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 Beijing Feixun Digital Technology Co ltd filed Critical Beijing Feixun Digital Technology Co ltd
Priority to CN202011382538.5A priority Critical patent/CN112738153B/en
Publication of CN112738153A publication Critical patent/CN112738153A/en
Application granted granted Critical
Publication of CN112738153B publication Critical patent/CN112738153B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a gateway selection method, a system, a device, a server and a medium in a service system. The method comprises the following steps: acquiring a service request of a target client aiming at target external equipment, wherein the service system comprises a plurality of external equipment and a plurality of gateway servers, and each gateway server is in communication connection with each external equipment; determining a target gateway server matched with target external equipment according to the first online gateway list, and recording the current online gateway server in the service system in the first online gateway list in real time; and sending the service request to a target gateway server so that the target client accesses the target external equipment through the target gateway server. In the method, the relevance between the normal use of the external equipment and the gateway server is weak, the probability of the normal use of the external equipment can be improved, the gateway server can be matched for the external equipment according to the service request, and the service request is convenient for a user.

Description

Gateway selection method, system, device, server and medium in service system
Technical Field
The embodiments of the present invention relate to the field of communications technologies, and in particular, to a method, a system, an apparatus, a server, and a medium for selecting a gateway in a service system.
Background
When the client performs audio and video calling or meeting and the like on the external equipment, communication needs to be realized through the gateway server. The external equipment is configured and registered by a gateway server, and a single gateway server is responsible for managing the external equipment to which the gateway server belongs. After the gateway server is successfully registered, the affiliated external device can be on line, and the client subscribing the state of the external device can make a service request for the on-line external device.
Fig. 1 is a flowchart of a video/audio call and a conference service performed by a client to an external device in the prior art. As shown in fig. 1, a service request from a client to an external device is sent to a signaling server, and forwarded to an application server by the signaling server. And the application server sends the data corresponding to the service to an initially appointed preset gateway server for service processing. The gateway server pushes the video and audio stream of the external equipment through the media unit and the coding unit.
In the process shown in fig. 1, if the gateway server is abnormal or fails, the external device registration information configured on the gateway server goes offline. The state of the external equipment displayed on the client side is changed into an off-line state, and the client side cannot carry out operations such as audio and video calling or a conference on the external equipment. The relevance between the normal use of the external equipment and the gateway server is very strong, and once the gateway server is abnormal or fails, the connected external equipment cannot be used, so that great inconvenience is brought to the use of a user.
Disclosure of Invention
Embodiments of the present invention provide a method, a system, an apparatus, a server, and a medium for selecting a gateway in a service system, which can reduce the relevance between an external device and a gateway server and improve the probability of normal use of the external device.
In a first aspect, an embodiment of the present invention provides a method for selecting a gateway in a service system, where the method includes:
acquiring a service request of a target client aiming at target external equipment, wherein the service system comprises a plurality of external equipment and a plurality of gateway servers, and each gateway server is in communication connection with each external equipment;
determining a target gateway server matched with the target external equipment according to a first online gateway list, and recording a gateway server in an online state currently in the service system in real time in the first online gateway list;
and sending the service request to the target gateway server so that the target client accesses the target external device through the target gateway server.
In a second aspect, an embodiment of the present invention further provides a service system, where the service system includes: the system comprises an application server, a signaling server, at least one gateway server and at least one external device;
the application server is in communication connection with the signaling server, the signaling server is in communication connection with each gateway server, each external device is in communication connection with the application server and the signaling server, and each gateway server is in communication connection with each external device;
the application server is used for realizing the gateway selection method in the service system provided by any embodiment of the invention;
the signaling server is used for receiving the online registration information of the gateway server, determining the online state of the gateway server according to the online registration information and sending the online state to the application server;
the signaling server is also used for receiving a service request of a target client to the target external equipment and sending the service request to the application server;
and the gateway server is used for realizing the service request of the target client to the target external equipment.
In a third aspect, an embodiment of the present invention further provides a gateway selection apparatus in a service system, where the apparatus includes:
the service system comprises a plurality of external devices and a plurality of gateway servers, wherein each gateway server is in communication connection with each external device;
the target gateway server determining module is used for determining a target gateway server matched with the target external device according to a first online gateway list, and the first online gateway list records the gateway server currently in an online state in the service system in real time;
and the service request sending module is used for sending the service request to the target gateway server so that the target client accesses the target external equipment through the target gateway server.
In a fourth aspect, an embodiment of the present invention further provides a server, where the apparatus includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement a gateway selection method in a business system according to any embodiment of the present invention.
In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a gateway selection method in a service system according to any embodiment of the present invention.
According to the technical scheme of the embodiment of the invention, a service request of a target client aiming at target external equipment is obtained; determining a target gateway server matched with the target external equipment according to the first online gateway list; the service request is sent to the target gateway server, so that the target client accesses the target external device through the target gateway server, the selection problem when the gateway servers are stacked and deployed is solved, the relevance between the external device and the gateway server is reduced, the normal use probability of the external device is improved, the external device can be matched with the gateway server according to the service request, and the effect of facilitating the service request of a user is achieved.
Drawings
Fig. 1 is a flow chart of a video-audio call and a conference service performed by a client to an external device in the prior art;
fig. 2 is a flowchart of a gateway selection method in a service system according to an embodiment of the present invention;
fig. 3a is a flowchart of a gateway selection method in a service system according to a second embodiment of the present invention;
fig. 3b is a schematic diagram illustrating an implementation manner of a gateway selection method in a service system according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a service system according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a gateway selection apparatus in a service system according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a server according to a fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some structures related to the present invention are shown in the drawings, not all of them.
Example one
Fig. 2 is a flowchart of a gateway selection method in a service system according to an embodiment of the present invention, where the method is applicable to a situation where a gateway is selected to improve audio/video accessibility of an external device when the gateways are stacked and deployed in an audio/video conference, the method may be executed by a gateway selection device in the service system, the device may be implemented in a software or hardware manner, and the device may be integrated in a server, such as an application server in the service system. As shown in fig. 2, the method specifically includes:
and step 110, acquiring a service request of the target client aiming at the target external equipment.
The service system comprises a plurality of external devices and a plurality of gateway servers, and each gateway server is in communication connection with each external device.
The target client may initiate a service request for the external device. The service request can be audio and video conference, call and the like to the target external device. In the service system, the gateway server, the external device, the signaling server and the application server may be deployed in the main platform server to jointly implement the service request of the client. In the embodiment of the present invention, the main platform server may implement information configuration of the external device and the gateway server, such as type information and registration information. The main platform server can realize that each gateway server establishes communication connection with each external device. The signaling server may receive a service request initiated by the target client and forward the service request to the application server.
And step 120, determining a target gateway server matched with the target external device according to the first online gateway list.
And recording the current online gateway server in the service system in real time in the first online gateway list. Any gateway server in the first online gateway list that is currently online may be determined as a target gateway server that matches the target peripheral device.
In order to reduce the load of a single gateway server, in an implementation manner of the embodiment of the present invention, optionally, determining, according to the first online gateway list, a target gateway server that matches the target external device includes: and according to the service request, determining a target gateway server matched with the target external equipment from the first online gateway list in a polling index mode.
The polling index is used for scheduling the gateway servers in sequence according to the sequence of the gateway servers in the first online gateway list, and if the current gateway server is scheduled, scheduling the next gateway server; when all gateway servers are scheduled, the first gateway server may be scheduled from the head. According to the technical scheme of the embodiment of the invention, the target gateway server is determined from the first online gateway list in a polling index mode, so that the problem of large load of a single gateway server caused by repeated and single calling of the gateway server can be avoided.
In order to accurately determine whether the gateway server is online, in an implementation manner of the embodiment of the present invention, optionally, when it is detected that the first gateway server in the service system is converted from the offline state to the online state, the first gateway server is added to the first online gateway list; and when detecting that the second gateway server in the service system is converted from the online state to the offline state, removing the second gateway server from the first online gateway list.
The gateway server may initiate registration to a signaling server in the service system, and the signaling server may send registration on-line information of the gateway server to the application server. The application server may add the first gateway server to the first online gateway list when there is a first gateway server in an online state. When the second gateway server is offline, the signaling server may send offline information of the second gateway server to the application server, and the application server may remove the second gateway server from the first online gateway list. The first online gateway list can record the current online gateway server according to the real-time online or offline state of the gateway server, so that an available gateway server can be determined for the target external device conveniently. The off-line of the gateway server may be caused by various reasons, for example, an abnormality, a failure, or a registered off-line of the gateway server.
And step 130, sending the service request to a target gateway server so that the target client accesses the target external device through the target gateway server.
When the application server matches the target gateway server for the target external device according to the first online gateway list, the application server may send a service request of the target client to the target external device to the target gateway server. When the service request is an audio and video conference or a call, the target gateway server can perform operations such as encoding and decoding on audio and video streams shot by the target external device, push the audio and video streams of the target external device to the target client, and achieve communication between the target client and the target external device.
On the basis of the foregoing embodiment, optionally, the method further includes: when detecting that the first online gateway list is switched from a blank state to a state with gateway information, uniformly simulating online all the external equipment, and informing a client subscribing the external equipment to update the state so as to indicate the client to initiate a service request aiming at the external equipment simulating online; and/or
When the first online gateway list is detected to be switched to a blank state from a state with gateway information, all the external devices are subjected to unified simulation offline, and a client subscribing the external devices is informed to perform state updating so as to indicate the client to stop initiating a service request aiming at the external devices subjected to simulation offline.
In a specific implementation manner of the embodiment of the present invention, based on the configuration of the host platform server to the external device and the gateway servers, each gateway server may establish a communication connection with each external device. When the gateway server is on line, namely the first on-line gateway list is not in a blank state, and when the gateway information state of the gateway server exists, all the external devices can be uniformly simulated on line. When determining that the gateway information state exists in the first online gateway list according to the signaling server, the application server may notify the client subscribing to the state information of the external device, and the external device simulates online. The client can update the state of the external device to be online and can initiate a service request to the online external device. The simulation online may mean that a gateway server may provide communication connection for the external device, and the external device may be accessed. The simulated presence may be a non-real presence and may be converted to a real presence after determining the gateway server and establishing the communication connection.
In another specific implementation manner of the embodiment of the present invention, when the application server determines that the first online gateway list does not have the gateway information status according to the status of the gateway server sent by the signaling server, and the first online gateway list is in a blank status, the application server may determine that the external device is a simulated offline, and may notify the client subscribing to the external device status information that the external device is a simulated offline. When the external device is off-line, the client cannot make service requests, such as video calls, conferences and the like, for the external device. The simulation offline may mean that no gateway server exists and can provide communication connection for the external device, and the external device cannot be accessed. The simulated offline state can be a non-real offline state, and when the main platform server determines that the external device is offline, the simulated offline state can be determined as a real offline state.
According to the technical scheme of the embodiment, a service request of a target client aiming at target external equipment is obtained; determining a target gateway server matched with the target external equipment according to the first online gateway list; the service request is sent to the target gateway server, so that the target client accesses the target external equipment through the target gateway server, the selection problem of the gateway server during stacking and deployment is solved, the relevance between the external equipment and the gateway server is reduced, the normal use probability of the external equipment is improved, the external equipment can be matched with the gateway server according to the service request, and the service request is convenient for a user; and the load of a single gateway server is reduced, and the online state of the gateway server is updated in real time, so that accurate information support is provided for realizing the service request.
Example two
Fig. 3a is a flowchart of a gateway selection method in a service system according to a second embodiment of the present invention. The present embodiment is a further refinement of the above technical solutions, and the technical solutions in the present embodiment may be combined with various alternatives in one or more of the above embodiments. As shown in fig. 3a, the method specifically includes:
and step 210, acquiring a service request of the target client to the target external device.
The service system comprises a plurality of external devices and a plurality of gateway servers, and each gateway server is in communication connection with each external device.
Step 220, copying the gateway servers in the first online gateway list and the corresponding weight values into a second online gateway list of the local thread.
The method comprises the steps that a gateway server in an online state currently in a service system is recorded in a first online gateway list in real time; and recording a weight value corresponding to the gateway server in the online state in real time in the first online gateway list. The weight value may be determined according to the service processing paths that the gateway server may simultaneously support, for example, the higher the service processing paths that the gateway server may simultaneously support, the larger the weight value. For example, the gateway server may simultaneously support 16, 8, or 2 paths of traffic processing, and the corresponding weight value may be 16, 8, or 2, and the like.
The gateway servers recorded in the first online gateway list are dynamically changed, for example, when the gateway servers are online, offline or abnormally down, the first online gateway list is changed. In the embodiment of the application, the gateway server in the first online gateway list and the corresponding weight value are copied in the second online gateway list of the local thread, so that the online gateway list according to which the local thread is matched with the target gateway server for the target external device according to the service request is static can be ensured. It is also possible to avoid that the first online gateway list is modified by multiple threads.
For example, a local variable serverSet may be newly created to copy the gateway server and the corresponding weight value in the first online gateway list to the local thread, so as to implement static locking on the first online gateway list.
In an implementation manner of the embodiment of the present invention, optionally, when it is detected that a first gateway server in a service system is converted from an offline state to an online state, the first gateway server is added to a first online gateway list; and when detecting that the second gateway server in the service system is converted from the online state to the offline state, removing the second gateway server from the first online gateway list.
When the gateway server updates in the first online gateway list, the corresponding weight value may be updated synchronously. For example, when a first gateway server is added to the first online gateway list, the weight value of the first gateway server may be added synchronously; when the second gateway server is removed from the first online gateway list, the weight value of the second gateway server may be removed synchronously. The weight value may be configured in the main platform server in advance according to the hardware performance of the gateway server.
And step 230, determining the number of the service processing paths of each gateway server according to the gateway servers in the second online gateway list and the corresponding weight values.
The application server may convert the weight value into the number of the service processing channels according to a mapping relationship or an operation relationship between the weight value in the second online gateway list and the number of the service processing channels. Illustratively, the weight value is 16, and the number of traffic processing channels is 16.
And 240, generating a third online gateway list according to the number of the service processing paths of each gateway server.
And the third online gateway list records the sequencing of each gateway server and the corresponding service processing path. In this embodiment, the service processing paths corresponding to the number of service processing paths of each gateway server may be sorted according to the order of the gateway servers in the second online gateway list, so as to generate a third online gateway list. Or, the gateway servers in the second online gateway list may be reordered according to the descending order according to the number of the service processing paths, and if the number of the service processing paths is the same, the gateway servers in the second online gateway list may be reordered according to the order in the second online gateway list; and sequencing the service processing channels of the gateway servers according to the reordered gateway servers and the number of the corresponding service processing channels to generate a third online gateway list. The latter way of generating the third online gateway list may facilitate the gateway server with good hardware performance to preferentially obtain the service request, process the service request in time, and facilitate quick execution of the service request.
And step 250, according to the service request, determining a target gateway server matched with the target external device and a target service processing path from the third online gateway list in a polling index manner.
The manner of polling index is the same as that of the previous embodiment, and is not described herein again. The difference between this embodiment and the foregoing embodiment is that the polling index of this embodiment is the gateway server and the corresponding traffic processing path.
Illustratively, service request 1 requires 8 traffic processing paths, and service request 2 requires 8 traffic processing paths. In the third online gateway list, there are 1-16 paths for traffic processing by the gateway server a and 1-8 paths for traffic processing by the gateway server B. According to the specific situation of the polling index, 1-8 traffic processing paths of the gateway server a can be allocated to the traffic request 1, and 9-16 traffic processing paths of the gateway server a can be allocated to the traffic request 2. In the next service request, the service processing path of the gateway server B may be allocated.
In an implementation manner of the embodiment of the present invention, optionally, determining, according to the service request, a target gateway server and a target service processing path that are matched with the target external device from the third online gateway list in a polling index manner, includes: and performing polling index by adopting an atomic operation class, and determining a target gateway server matched with the target external equipment and a target service processing path from the third online gateway list according to the service request.
The atomic operation (atomiciInteger) class can ensure that when multiple threads access shared data concurrently, the shared data is only used by one or some threads at the same time, and can ensure the concurrency security when the threads perform polling indexing.
And step 260, sending the service request to a target gateway server so that the target client accesses the target external device through the target gateway server.
On the basis of the foregoing embodiment, optionally, the method further includes: when the first online gateway list is detected to be switched from a blank state to a state with gateway information, performing unified simulation online on all external equipment, and notifying a client subscribing the external equipment to perform state updating so as to indicate the client to initiate a service request aiming at the external equipment simulating online; and/or
When the first online gateway list is detected to be switched from the state with the gateway information to the blank state, all the external devices are subjected to unified simulated offline, and the client subscribing the external devices is informed to perform state updating so as to indicate the client to stop initiating the service request aiming at the external devices subjected to simulated offline.
According to the technical scheme of the embodiment of the invention, a service request of a target client aiming at target external equipment is obtained; copying the gateway server in the first online gateway list and the corresponding weight value into a second online gateway list of the local thread; determining the number of service processing paths of each gateway server according to the gateway servers in the second online gateway list and the corresponding weight values; generating a third online gateway list according to the number of service processing paths of each gateway server; according to the service request, determining a target gateway server matched with the target external equipment and a target service processing path from the third online gateway list in a polling index mode; the service request is sent to the target gateway server, so that the target client accesses the target external device through the target gateway server, the selection problem when the gateway servers are stacked and deployed is solved, the matching of the external device with the gateway server according to the service request is realized, the processing capacity of the gateway server is fully utilized, and the effect of ensuring the safety of concurrent service requests is achieved.
Fig. 3b is a schematic diagram illustrating an implementation manner of a gateway selection method in a service system according to a second embodiment of the present invention. As shown in fig. 3b, the gateway server may initiate gateway registration with the signaling server, and the gateway server may be on-line after successful registration. The signaling server may send the on-line of the gateway server to the application server. When the client initiates a service request for the external device, the signaling server may forward the service request to the application server. The application server can determine a target gateway server according to the online state of the gateway server and send the service request to the target gateway processor.
Illustratively, as shown in fig. 3B, there are a gateway server a and a gateway server B, and when the gateway server a and the gateway server B are online, the application server may send the service request to the gateway server a according to the polling index of the AtomicInteger class. When the gateway server a logs off and the client initiates the service request again, the application server may send the service request to the gateway server B. The target gateway server can be determined to process the service between the client and the external equipment according to the real-time online updating condition of the gateway server, so that the success rate of service processing is improved, and the user experience is improved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a service system provided in a third embodiment of the present invention, and as shown in fig. 4, the service system includes: an application server 310, a signaling server 320, at least one gateway server 330, and at least one peripheral device 340.
The application server 310 is in communication connection with the signaling server 320, the signaling server 320 is in communication connection with the gateway servers 330, the external devices 340 are in communication connection with the application server 310 and the signaling server 320, and each gateway server 330 is in communication connection with each external device 340.
The application server 310 is configured to implement the gateway selection method in the service system provided in any embodiment of the present invention. The signaling server 320 is configured to receive the online registration information of the gateway server 330, determine an online status of the gateway server 330 according to the online registration information, and send the online status to the application server 310. The signaling server 320 is further configured to receive a service request of the target client to the target external device 340, and send the service request to the application server 310. And the gateway server 330 is configured to implement a service request of the target client to the target external device.
In the embodiment of the invention, the service system is realized through the main platform server. The application server 310, the signaling server 320, and the gateway server 330 may all be part of a primary platform server. The gateway server 330 and the peripheral device 340 may be configured, managed, and maintained at the host platform server. Each gateway server establishes communication connection with each external device respectively, namely the gateway servers are global.
According to the technical scheme of the embodiment, the gateway server comprises the application server, the signaling server, the global gateway server and the external equipment, so that the selection problem when the gateway server is stacked and deployed is solved, the gateway server is matched for the external equipment according to the service request, the processing capacity of the gateway server is fully utilized, the success rate of the service request is improved, and the safety of the concurrent service request is ensured.
Example four
Fig. 5 is a schematic structural diagram of a gateway selection apparatus in a service system according to a fourth embodiment of the present invention. With reference to fig. 5, the apparatus comprises: a service request acquisition module 410, a target gateway server determination module 420 and a service request sending module 430.
The service system comprises a plurality of external devices and a plurality of gateway servers, wherein each gateway server is in communication connection with each external device;
the target gateway server determining module 420 is configured to determine, according to a first online gateway list, a target gateway server that is matched with a target external device, where the first online gateway list records, in real time, a gateway server in an online state currently in a service system;
and a service request sending module 430, configured to send the service request to the target gateway server, so that the target client accesses the target external device through the target gateway server.
Optionally, the apparatus further includes:
the first gateway server adding module is used for adding the first gateway server into a first online gateway list when detecting that the first gateway server in the service system is converted from an offline state to an online state;
and the second gateway server removing module is used for removing the second gateway server from the first online gateway list when detecting that the second gateway server in the service system is converted from the online state to the offline state.
Optionally, the apparatus further includes:
the simulation online notification module is used for performing unified simulation online on all the external equipment when detecting that the first online gateway list is switched from a blank state to a gateway information existing state, and notifying a client subscribing the external equipment to perform state updating so as to indicate the client to initiate a service request aiming at the external equipment simulating online; and/or
And the simulated offline notification module is used for performing unified simulated offline on all the external devices and notifying the client subscribing the external devices to perform state updating when detecting that the first online gateway list is switched from the gateway information state to the blank state, so as to indicate that the client stops initiating the service request aiming at the external devices which simulate offline.
Optionally, the target gateway server determining module 420 includes:
and the first target gateway server determining unit is used for determining a target gateway server matched with the target external equipment from the first online gateway list according to the service request and in a polling index mode.
Optionally, the first online gateway list further records a weight value corresponding to the gateway server currently in an online state in real time;
a target gateway server determination module 420 comprising:
the information copying unit is used for copying the gateway server in the first online gateway list and the corresponding weight value into a second online gateway list of the local thread;
a service processing path number determining unit, configured to determine the number of service processing paths of each gateway server according to the gateway servers in the second online gateway list and the corresponding weight values;
a third online gateway list generating unit, configured to generate a third online gateway list according to the number of service processing paths of each gateway server; the third online gateway list records the sequencing of each gateway server and the corresponding service processing path;
and the second target gateway server determining unit is used for determining a target gateway server matched with the target external equipment and a target service processing path from the third online gateway list according to the service request and in a polling index mode.
Optionally, the second target gateway server determining unit includes:
and the target gateway server determining subunit is used for performing polling index by adopting an atomic operation class, and determining a target gateway server matched with the target external equipment and a target service processing path from the third online gateway list according to the service request.
The gateway selection device in the service system provided by the embodiment of the invention can execute the gateway selection method in the service system provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
Fig. 6 is a schematic structural diagram of a server according to a fifth embodiment of the present invention, and as shown in fig. 6, the server includes:
one or more processors 510, one processor 510 being illustrated in FIG. 6;
a memory 520;
the apparatus may further include: an input device 530 and an output device 540.
The processor 510, the memory 520, the input device 530 and the output device 540 of the apparatus may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The memory 520 is a non-transitory computer-readable storage medium, and can be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to a gateway selection method in a service system in an embodiment of the present invention (for example, the service request obtaining module 410, the target gateway server determining module 420, and the service request sending module 430 shown in fig. 5). The processor 510 executes software programs, instructions and modules stored in the memory 520 to execute various functional applications and data processing of the computer device, that is, to implement the gateway selection method in a service system of the above method embodiment, that is:
acquiring a service request of a target client aiming at target external equipment, wherein the service system comprises a plurality of external equipment and a plurality of gateway servers, and each gateway server is in communication connection with each external equipment;
determining a target gateway server matched with the target external equipment according to a first online gateway list, and recording a gateway server in an online state currently in the service system in real time in the first online gateway list;
and sending the service request to the target gateway server so that the target client accesses the target external device through the target gateway server.
The memory 520 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the computer device, and the like. Further, memory 520 may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 520 may optionally include memory located remotely from processor 510, which may be connected to a terminal device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 530 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus. The output device 540 may include a display device such as a display screen.
Example six
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a gateway selection method in a service system, according to an embodiment of the present invention:
acquiring a service request of a target client aiming at target external equipment, wherein the service system comprises a plurality of external equipment and a plurality of gateway servers, and each gateway server is in communication connection with each external equipment;
determining a target gateway server matched with the target external equipment according to a first online gateway list, and recording a gateway server in an online state currently in the service system in the first online gateway list in real time;
and sending the service request to the target gateway server so that the target client accesses the target external device through the target gateway server.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing description is only exemplary of the invention and that the principles of the technology may be employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (9)

1. A method for selecting a gateway in a service system, comprising:
acquiring a service request of a target client aiming at target external equipment, wherein the service system comprises a plurality of external equipment and a plurality of gateway servers, and each gateway server is respectively in communication connection with each external equipment;
determining a target gateway server matched with the target external equipment according to a first online gateway list, and recording a gateway server in an online state currently in the service system in real time in the first online gateway list;
sending the service request to the target gateway server so that the target client accesses the target external device through the target gateway server;
the first online gateway list also records a weight value corresponding to the gateway server in an online state in real time;
according to the first online gateway list, determining a target gateway server matched with the target external device, including:
copying the gateway server in the first online gateway list and the corresponding weight value into a second online gateway list of a local thread;
determining the number of service processing paths of each gateway server according to the gateway servers in the second online gateway list and the corresponding weight values;
generating a third online gateway list according to the number of service processing paths of each gateway server; the third online gateway list records the sequencing of each gateway server and the corresponding service processing path;
and according to the service request, determining a target gateway server and a target service processing path which are matched with the target external equipment from the third online gateway list in a polling index mode.
2. The method of claim 1, further comprising:
when detecting that a first gateway server in the service system is converted from an offline state to an online state, adding the first gateway server into the first online gateway list;
and when detecting that a second gateway server in the service system is converted from an online state to an offline state, removing the second gateway server from the first online gateway list.
3. The method of claim 1, further comprising:
when detecting that the first online gateway list is switched from a blank state to a state with gateway information, performing unified online simulation on all external equipment, and notifying a client subscribing the external equipment to perform state updating so as to indicate the client to initiate a service request aiming at the external equipment on which the online simulation is performed; and/or
When the first online gateway list is detected to be switched to a blank state from a state with gateway information, all the external devices are subjected to unified simulation offline, and a client subscribing the external devices is informed to perform state updating so as to indicate the client to stop initiating a service request aiming at the external devices subjected to simulation offline.
4. The method according to any one of claims 1-3, wherein determining a target gateway server matching the target peripheral device according to the first online gateway list comprises:
and according to the service request, determining a target gateway server matched with the target external equipment from the first online gateway list in a polling index mode.
5. The method according to claim 1, wherein determining a target gateway server and a target traffic processing path matching the target external device from the third online gateway list according to the service request and in a polling index manner comprises:
and performing polling index by adopting an atomic operation class, and determining a target gateway server matched with the target external equipment and a target service processing path from the third online gateway list according to the service request.
6. A business system, comprising: the system comprises an application server, a signaling server, at least one gateway server and at least one external device;
the application server is in communication connection with the signaling server, the signaling server is in communication connection with each gateway server, each external device is in communication connection with the application server and the signaling server respectively, and each gateway server is in communication connection with each external device respectively;
the application server is used for realizing the gateway selection method in the service system of any one of claims 1 to 5;
the signaling server is used for receiving the online registration information of the gateway server, determining the online state of the gateway server according to the online registration information and sending the online state to the application server;
the signaling server is also used for receiving a service request of a target client to the target external equipment and sending the service request to the application server;
and the gateway server is used for realizing the service request of the target client to the target external equipment.
7. A gateway selection apparatus in a service system, comprising:
the service system comprises a plurality of external devices and a plurality of gateway servers, wherein each gateway server is respectively in communication connection with each external device;
the target gateway server determining module is used for determining a target gateway server matched with the target external device according to a first online gateway list, and the first online gateway list records the gateway server currently in an online state in the service system in real time;
the service request sending module is used for sending the service request to the target gateway server so that the target client accesses the target external equipment through the target gateway server;
the first online gateway list also records a weight value corresponding to the gateway server in an online state in real time;
a target gateway server determination module comprising:
the information copying unit is used for copying the gateway server in the first online gateway list and the corresponding weight value into a second online gateway list of the local thread;
a service processing path number determining unit, configured to determine the number of service processing paths of each gateway server according to the gateway servers in the second online gateway list and the corresponding weight values;
a third online gateway list generating unit, configured to generate a third online gateway list according to the number of service processing paths of each gateway server; the third online gateway list records the sequencing of each gateway server and the corresponding service processing path;
and the second target gateway server determining unit is used for determining a target gateway server matched with the target external equipment and a target service processing path from the third online gateway list according to the service request and in a polling index mode.
8. A server, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 5.
CN202011382538.5A 2020-11-30 2020-11-30 Gateway selection method, system, device, server and medium in service system Active CN112738153B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011382538.5A CN112738153B (en) 2020-11-30 2020-11-30 Gateway selection method, system, device, server and medium in service system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011382538.5A CN112738153B (en) 2020-11-30 2020-11-30 Gateway selection method, system, device, server and medium in service system

Publications (2)

Publication Number Publication Date
CN112738153A CN112738153A (en) 2021-04-30
CN112738153B true CN112738153B (en) 2023-03-07

Family

ID=75597118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011382538.5A Active CN112738153B (en) 2020-11-30 2020-11-30 Gateway selection method, system, device, server and medium in service system

Country Status (1)

Country Link
CN (1) CN112738153B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115348155A (en) * 2022-08-10 2022-11-15 北京飞讯数码科技有限公司 Method and device for realizing service disaster tolerance based on cluster server

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791576A (en) * 2016-12-23 2017-05-31 安徽四创电子股份有限公司 The emerging system and its fusion method of video monitoring system and video conferencing system
CN110048903A (en) * 2019-03-12 2019-07-23 视联动力信息技术股份有限公司 A kind of association turns gateway status monitoring method and device
CN110768840A (en) * 2019-10-30 2020-02-07 珠海格力电器股份有限公司 Control method, device, equipment and storage medium of communication equipment
CN111065077A (en) * 2018-10-17 2020-04-24 阿里巴巴集团控股有限公司 Bluetooth Mesh network and communication method, equipment and storage medium thereof
CN111935752A (en) * 2020-08-28 2020-11-13 广州市百果园信息技术有限公司 Gateway access method, gateway access device, computer equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8860779B2 (en) * 2011-05-23 2014-10-14 Broadcom Corporation Two-way audio and video communication utilizing segment-based adaptive streaming techniques

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791576A (en) * 2016-12-23 2017-05-31 安徽四创电子股份有限公司 The emerging system and its fusion method of video monitoring system and video conferencing system
CN111065077A (en) * 2018-10-17 2020-04-24 阿里巴巴集团控股有限公司 Bluetooth Mesh network and communication method, equipment and storage medium thereof
CN110048903A (en) * 2019-03-12 2019-07-23 视联动力信息技术股份有限公司 A kind of association turns gateway status monitoring method and device
CN110768840A (en) * 2019-10-30 2020-02-07 珠海格力电器股份有限公司 Control method, device, equipment and storage medium of communication equipment
CN111935752A (en) * 2020-08-28 2020-11-13 广州市百果园信息技术有限公司 Gateway access method, gateway access device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN112738153A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN111800443B (en) Data processing system and method, device and electronic equipment
CN105574082A (en) Storm based stream processing method and system
US8682954B2 (en) Replication in a network environment
CN109951546A (en) Transactions requests processing method, device, equipment and medium based on intelligent contract
WO2022187005A1 (en) Replication of parent record having linked child records that were previously replicated asynchronously across data storage regions
CN112738153B (en) Gateway selection method, system, device, server and medium in service system
CN110096381B (en) Method, device, equipment and medium for realizing remote procedure call
US20140351210A1 (en) Data processing system, data processing apparatus, and storage medium
CN111935177B (en) Service control method and device
CN113472638B (en) Edge gateway control method, system, device, electronic equipment and storage medium
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN113986995A (en) Request distribution method and device, storage medium and electronic equipment
WO2022187008A1 (en) Asynchronous replication of linked parent and child records across data storage regions
WO2022187006A2 (en) Media storage for online meetings in edge network storage
US11604877B1 (en) Nested courses of action to support incident response in an information technology environment
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium
CN113157475A (en) Log processing method and device, storage medium and electronic equipment
CN114979128A (en) Cross-region communication method and device and electronic equipment
CN113032477A (en) Long-distance data synchronization method and device based on GTID and computing equipment
CN115114361B (en) Resource retrieval method and system based on unified interface of container cloud platform
CN110262756B (en) Method and device for caching data
CN112181937B (en) Method and device for transferring data
CN113542069B (en) Flow traction method and device, electronic equipment and storage medium
US9674282B2 (en) Synchronizing SLM statuses of a plurality of appliances in a cluster
US11954541B1 (en) Highly available message ingestion by a data intake and query system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant