Service switching method, electronic equipment and service switching system

文档序号:1952352 发布日期:2021-12-10 浏览:21次 中文

阅读说明:本技术 服务切换方法、电子设备及服务切换系统 (Service switching method, electronic equipment and service switching system ) 是由 张志正 许和 张怡 于 2021-09-14 设计创作,主要内容包括:本申请公开了一种服务切换方法、电子设备及服务切换系统,方法包括:确定连接到服务端上的至少一个客户端,获取客户端发送的第一数据;基于第一数据以及服务端的负载信息,将客户端划分为第一类客户端和第二类客户端;响应第一类客户端的服务请求,由服务端通过与第一类客户端之间的连接提供服务;响应第二类客户端的服务请求,由与服务端关联的节点向第二类客户端提供请求的服务,其中,节点中安装有与客户端相关联的基础数据,服务包括向第二类客户端提供基础数据的服务。该方法能够对不同类型的客户端提供相适配的服务,避免请求服务的客户端数量过大而使得服务端的负载过大,从而导致错误发生。(The application discloses a service switching method, electronic equipment and a service switching system, wherein the method comprises the following steps: determining at least one client connected to a server, and acquiring first data sent by the client; based on the first data and the load information of the server, the client is divided into a first type of client and a second type of client; responding to a service request of the first type of client, and providing service by the service side through connection with the first type of client; responding to the service request of the second type of client, and providing the requested service to the second type of client by a node associated with the service, wherein the node is provided with basic data associated with the client, and the service comprises the service for providing the basic data to the second type of client. The method can provide adaptive services for different types of clients, and avoids the phenomenon that the load of the server is overlarge due to overlarge number of clients requesting for services, thereby causing errors.)

1. A method of service switching, the method comprising:

determining at least one client connected to a server, and acquiring first data sent by the client;

dividing the clients into first type clients and second type clients based on the first data and the load information of the server;

responding to the service request of the first type of client, and providing service by the service side through connection with the first type of client;

responding to the service request of the second type of client, and providing the requested service to the second type of client by a node associated with a service end, wherein basic data associated with the client is installed in the node, and the service comprises the service for providing the basic data to the second type of client.

2. The method of claim 1, the first data comprising at least one of: correspondingly, the dividing the client into a first class of client and a second class of client based on the first data and the load information of the server includes:

and dividing the clients into first type clients and second type clients based on the self-starting time and the user information.

3. The method of claim 1, wherein the first data includes user information of the client, and the dividing the client into a first class of client and a second class of client based on the first data and load information of the server comprises:

determining a user weight corresponding to the client based on the user information;

determining the client with the first user weight as a first class of client;

and performing distinguishing operation on the client with the second user weight, wherein the distinguishing operation comprises the following steps: and based on the load information and the user information of the client with the second user weight, distinguishing the client with the second user weight into the first type of client and the second type of client.

4. The method of claim 1, further comprising:

acquiring a timestamp in the first data, wherein the timestamp is used for representing the self-starting time of the client;

and constructing a service queue at least based on the timestamp, wherein the service queue comprises a plurality of object units for indicating the service of the server, the object units respectively correspond to respective clients, and the positions of first class object units corresponding to the first class clients in the service queue are different from the positions of second class object units corresponding to the second class clients in the service queue.

5. The method of claim 4, further comprising:

and adjusting the service queue based on the service conditions of the service end to the first class of client and the second class of client.

6. The method of claim 5, wherein the adjusting the service queue based on the service condition of the service end to the first class of client and the second class of client comprises:

and under the condition that at least part of the first class clients and/or the second class clients finish downloading the required data packets, adjusting the service queue based on the load information.

7. The method of claim 1, wherein the data package comprises an image file and user data, and the service is provided by the server through a connection with the first type of client, and the method comprises the following steps:

and sending the image file and/or the user data to the first class client by the server, so that the first class client realizes the installation of an operating system based on the acquired image file and/or locally uses the user data.

8. The method of claim 1, wherein the node is a hotspot machine, and the providing, by a node associated with a server, requested services to the second class of clients in response to the service requests of the second class of clients comprises:

and connecting the second type of client to a hotspot machine based on the first instruction so as to perform basic data interaction with the second type of client through the hotspot machine, wherein the second type of client receives or waits for the response of the server while performing basic data interaction with the hotspot machine.

9. An electronic device, comprising:

the acquisition module is configured to determine at least one client connected to a server and acquire first data sent by the client;

the dividing module is configured to divide the clients into a first class of clients and a second class of clients based on the first data and the load information of the server;

the processing module is configured to respond to the service request of the first type of client and provide service through connection between the service end and the first type of client;

responding to the service request of the second type of client, and providing the requested service to the second type of client by a node associated with a service end, wherein basic data associated with the client is installed in the node, and the service comprises the service for providing the basic data to the second type of client.

10. A service switching system comprising the server according to any one of claims 1 to 8, a client and a node.

Technical Field

The present disclosure relates to the field of client-server interaction, and in particular, to a service switching method, an electronic device, and a service switching system.

Background

In a network, a client needs to perform data interaction with a server (such as a server). Particularly, in a use scene of a desktop cloud client, the same user experience as that of a traditional PC can be realized, and meanwhile, the performance requirement is guaranteed. The user system needs to be installed on the client, but the identities of users using the same client may be different, and if users with different identities use the client, the operating system or other data corresponding to the identity needs to be used, but the operating systems corresponding to other identities are not used. This requires downloading the corresponding operating system and/or other data from the server to the local at the client to reinstall the operating system. However, in the process of acquiring the required data from the server by a large number of clients, the server cannot provide all effective services for the large number of clients at the same time due to limited service capability, which results in reduced user experience.

Disclosure of Invention

A service switching method of the embodiment of the application comprises the following steps:

determining at least one client connected to a server, and acquiring first data sent by the client;

dividing the clients into first type clients and second type clients based on the first data and the load information of the server;

responding to the service request of the first type of client, and providing service by the service side through connection with the first type of client;

responding to the service request of the second type of client, and providing the requested service to the second type of client by a node associated with a service end, wherein basic data associated with the client is installed in the node, and the service comprises the service for providing the basic data to the second type of client.

Optionally, the first data includes at least one of: correspondingly, the dividing the client into a first class of client and a second class of client based on the first data and the load information of the server includes:

and dividing the clients into first type clients and second type clients based on the self-starting time and the user information.

Optionally, the first data includes user information of the client, and the dividing the client into a first class of client and a second class of client based on the first data and load information of the server includes:

determining a user weight corresponding to the client based on the user information;

determining the client with the first user weight as a first class of client;

and performing distinguishing operation on the client with the second user weight, wherein the distinguishing operation comprises the following steps: and based on the load information and the user information of the client with the second user weight, distinguishing the client with the second user weight into the first type of client and the second type of client.

Optionally, the method further comprises:

acquiring a timestamp in the first data, wherein the timestamp is used for representing the self-starting time of the client;

and constructing a service queue at least based on the timestamp, wherein the service queue comprises a plurality of object units for indicating the service of the server, the object units respectively correspond to respective clients, and the positions of first class object units corresponding to the first class clients in the service queue are different from the positions of second class object units corresponding to the second class clients in the service queue.

Optionally, the method further comprises:

and adjusting the service queue based on the service conditions of the service end to the first class of client and the second class of client.

Optionally, the adjusting the service queue based on the service condition of the service end to the first class of client and the second class of client includes:

and under the condition that at least part of the first class clients and/or the second class clients finish downloading the required data packets, adjusting the service queue based on the load information.

Optionally, the data package includes an image file and user data, and the providing of the service by the server through the connection with the first type of client includes:

and sending the image file and/or the user data to the first class client by the server, so that the first class client realizes the installation of an operating system based on the acquired image file and/or locally uses the user data.

Optionally, the node is a hotspot machine, and the responding to the service request of the second type of client provides the requested service to the second type of client by the node associated with the service end, including:

and connecting the second type of client to a hotspot machine based on the first instruction so as to perform basic data interaction with the second type of client through the hotspot machine, wherein the second type of client receives or waits for the response of the server while performing basic data interaction with the hotspot machine.

An embodiment of the present application further provides an electronic device, including:

the acquisition module is configured to determine at least one client connected to a server and acquire first data sent by the client;

the dividing module is configured to divide the clients into a first class of clients and a second class of clients based on the first data and the load information of the server;

the processing module is configured to respond to the service request of the first type of client and provide service through connection between the service end and the first type of client;

responding to the service request of the second type of client, and providing the requested service to the second type of client by a node associated with a service end, wherein basic data associated with the client is installed in the node, and the service comprises the service for providing the basic data to the second type of client.

The embodiment of the application also provides a service switching system, which comprises the server, the client and the node.

The service switching method can provide adaptive services for different types of clients according to the actual requirements of the clients and the actual conditions of the load of the server, and avoids the phenomenon that the load of the server is overlarge due to the overlarge number of clients requesting for services, so that errors are caused. Moreover, even if the load of the server and/or the self condition of the client changes in the process of providing the service, the method can realize the re-switching of the service to the client, improve the service efficiency, ensure the effectiveness and the flexibility of the service to the client and improve the satisfaction degree of users.

Drawings

Fig. 1 is a flowchart of a service switching method according to an embodiment of the present application;

FIG. 2 is a flowchart of one embodiment of step S200 in FIG. 1 according to an embodiment of the present application;

fig. 3 is a flowchart of an embodiment of a service switching method according to an embodiment of the present application;

fig. 4 is a flowchart of a service switching method according to an embodiment of the present application;

fig. 5 is a flowchart of another embodiment of a service switching method according to the present application;

fig. 6 is a block diagram of an electronic device according to an embodiment of the present application.

Detailed Description

Various aspects and features of the present application are described herein with reference to the drawings.

It will be understood that various modifications may be made to the embodiments of the present application. Accordingly, the foregoing description should not be construed as limiting, but merely as exemplifications of embodiments. Those skilled in the art will envision other modifications within the scope and spirit of the application.

The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the application and, together with a general description of the application given above and the detailed description of the embodiments given below, serve to explain the principles of the application.

These and other characteristics of the present application will become apparent from the following description of preferred forms of embodiment, given as non-limiting examples, with reference to the attached drawings.

It is also to be understood that although the present application has been described with reference to some specific examples, those skilled in the art are able to ascertain many other equivalents to the practice of the present application.

The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the application, which can be embodied in various forms. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the application of unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present application in virtually any appropriately detailed structure.

The specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments in accordance with the application.

The method for switching the service can be applied to a server (such as a server), and particularly can be applied to an interactive process between the server and one or more clients. The server can serve the clients according to the identities of the clients, the load conditions of the clients and the starting sequence of the clients, wherein the first type of clients are served by using the server, and the second type of clients are served by using the associated nodes. Meanwhile, each service is switched in time according to actual requirements, so that even if the interaction process changes, the client can be subjected to adaptive service, the effectiveness of the client service is ensured, and the user satisfaction is improved.

As shown in fig. 1 in conjunction with fig. 4, the method comprises the steps of:

s100, determining at least one client connected to a server, and acquiring first data sent by the client.

The server may be a server, which is connected to one or more clients and can provide services for the clients. The service may be of various types, including providing the client with the required files, programs, and/or user data corresponding to the client, etc. The service process may be that the client sends first data to the server, where the first data is data related to the client, such as identity information of the client, related user information, usage information of the client, and the like.

The server may determine at least one client connected thereto, for example, by detecting a connection port, or by broadcasting to the client and receiving feedback from the client. Therefore, an instruction can be sent to the client to enable the client to send the first data, so that the server can acquire the first data through the corresponding communication line.

In addition, the client has a corresponding user identifier, and after different users use the same client, the first data can be changed correspondingly. For example, when a client originally used by a first user is used by a second user, and the identity information of the first user and the identity information of the second user are changed, the content of first data sent by the client to a server is also changed correspondingly.

S200, based on the first data and the load information of the server, the clients are divided into first type clients and second type clients.

The server (e.g. server) is working to have a load, which may include network load, hardware resource load and/or software load, etc., and the load information may be information related to the load, which can characterize the load condition of the current server.

The server can completely grasp the information of each connected client and the load condition of the server based on the first data and the load information. Therefore, the clients can be classified based on the first data and the load information of the server, and at least the clients are divided into first-class clients and second-class clients. Clients of the same type have the same or similar status, identity, and/or interaction. The service modes of the corresponding service terminals are different among different types of clients. The server can perform unified processing on the clients of the same type.

In this embodiment, after the server divides the client into the first type of client and the second type of client, different services can be provided for the first type of client and the second type of client.

For example, in a specific embodiment, the divided first type of clients have higher identity priority and are started earlier, and the server needs to provide priority service; and the divided second type of client has lower identity priority and later starting time, and does not need the server to provide priority service.

S300, responding to the service request of the first type of client, and providing service by the server through the connection between the server and the first type of client.

The first type of client sends a service request to the server to request the server to provide services to the server, wherein the service request comprises the steps of providing required files, programs and/or user data corresponding to the client for the first type of client and the like. And the service end can directly provide the services for the first type of client through the connection with the first type of client. The service end directly provides services for the connected first type clients, so that the service quality is high, and the first type clients can be completely served if the service efficiency is high. For example, a required data packet is sent to the first type of client, and the data packet contains all required data in the first type of client.

In addition, the service end provides services through connection with the first type of client, including providing services for the first type of client through a data path of the connection between the service end and the first type of client, for example, the service end sends a data packet to the first type of client through the data path, or receives feedback information of the first type of client through the data path so as to further provide services for the first type of client according to the feedback information.

S400, responding to the service request of the second type of client, and providing the requested service to the second type of client by a node associated with the service, wherein the node is provided with basic data associated with the client, and the service comprises the service for providing the basic data to the second type of client.

Specifically, the node is associated with the server, and the node may be an intermediate device, an intermediate module (software and/or hardware), or other device that provides the transit service, different from the server.

After the second type of client sends a service request to the server, the server responds to the request and informs the node to provide service for the second type of client. This enables services, especially services capable of providing basic data, to the second class of clients through the node even if the service end is in a busy state and is not enough to provide complete services to all clients, thereby improving service efficiency.

The node is provided with basic data associated with the client, and the basic data comprises basic data required by the second type of client, so that the second type of client can receive the service of the basic data in advance without waiting for the idle of the server. Once the server has extra service capacity, if the load is reduced, part or all of the second type clients can be converted into the first type clients according to the first data of the second type clients, and the server directly provides complete service for the first type clients, so that the service of the clients can be switched in time to adapt to the changing service process.

The service switching method can provide adaptive services for different types of clients according to the actual requirements of the clients and the actual conditions of the load of the server, and avoids the phenomenon that the load of the server is overlarge due to the overlarge number of clients requesting for services, so that errors are caused. Moreover, even if the load of the server and/or the self condition of the client changes in the process of providing the service, the method can realize the re-switching of the service to the client, improve the service efficiency, ensure the effectiveness and the flexibility of the service to the client and improve the satisfaction degree of users.

In one embodiment of the application, the first data comprises at least one of: correspondingly, the dividing the client into a first class of client and a second class of client based on the first data and the load information of the server includes:

and dividing the clients into first type clients and second type clients based on the self-starting time and the user information.

Specifically, the self-starting time of the client is the time when the client starts a small system (such as a microkernel system) of the client, after the client starts, a connection with the server is established, and the service priority of the client with an earlier self-starting time is generally higher than that of the client with a later self-starting time, that is, the server provides a service to the client with an earlier self-starting time in advance.

The user information of the client may be identification information of the client, or may be identity information of a user using the client. For example, in a machine room of a school, a teacher has a teacher client used by the teacher, and a student has a student client used by the student. The user information of the teacher client is different from the user information of the student clients.

The server divides the clients into a first type of clients and a second type of clients based on the self-starting time and the user information. For example, a part of all the clients can be classified into the first type clients based on the user information, such as all the teacher clients are classified into the first type clients, so that the server can directly provide complete services for the teacher clients. And then if the service end has service capability, the rest clients can be divided, for example, the division is carried out according to the self-starting time of the rest clients, the student clients with the earlier self-starting time can also be divided into the first class clients, and the student clients with the later self-starting time can be divided into the second class clients. Of course, the judgment of the self-starting time may be implemented based on a preset time criterion.

In an embodiment of the application, the first data includes user information of the client, and the dividing the client into a first class of client and a second class of client based on the first data and load information of the server, as shown in fig. 2, includes:

s210, determining the user weight corresponding to the client based on the user information.

The client has its own weight, and the division of the weight may be determined based on the user information of the client, the network location where the client is located, and/or the processing capability of the client itself. If the weight corresponding to the client in the core network in the network is higher, the weight corresponding to the client in the outer network is lower.

In this embodiment, the user weight corresponding to the client may be determined based on the user information. If the user identity is shown to have a higher weight in the user information, it may be determined that the corresponding client has a higher user weight. And conversely, determining that the user weight corresponding to the client is lower. In addition, the user information may be directly embodied by specific user-related data, or may be embodied based on the use account.

Of course, the user weights corresponding to different clients may also be the same. As in the above embodiment, the second user weight of the client used with the student identity is the same. And the first user weight of the client used in teacher identity is higher than the second user weight.

S220, determining the client with the first user weight as a first class of client.

The first user weight is higher than other user weights, and in order to preferentially serve the client with the first user weight, the server side can determine the client with the first user weight as the first class client.

The second user weight is lower than the first user weight, and the server may not provide service for the client with the second user weight temporarily. But rather is provided with the underlying services by the nodes.

S230, performing a distinguishing operation on the client with the second user weight, wherein the distinguishing operation includes: and based on the load information and the user information of the client with the second user weight, distinguishing the client with the second user weight into the first type of client and the second type of client.

The server side directly provides services for the clients with the first user weight, and the number of the clients with the first user weight may be limited, so that the server side has additional service capacity.

For example, after the server directly provides complete service for the first-class clients, the server may divide the remaining clients that are not divided based on the current load and the user information of the clients of the second user weight, and divide the clients with the second user weight into the first-class clients and the second-class clients. Namely, one part of the remaining clients which are not divided is divided into the first type of clients, and the other part is divided into the second type of clients.

For example, a client that has been provided with a base data service but still needs a full service may have a higher second user weight and a client that has not been provided with a base data service may have a lower second user weight. When the server divides the remaining clients which are not divided, the clients which are already provided with basic data service and still need complete service can be divided into first-class clients, and other clients can be divided into second-class clients.

In one embodiment of the present application, as shown in fig. 3, the method further comprises the steps of:

s500, acquiring a timestamp which is used for representing the self-starting time of the client in the first data;

s600, constructing a service queue at least based on the timestamp, wherein the service queue comprises a plurality of object units for indicating the service of the server, the object units respectively correspond to respective clients, and the positions of the first class object units corresponding to the first class clients in the service queue are different from the positions of the second class object units corresponding to the second class clients in the service queue.

Specifically, the self-starting time of the client corresponds to a time stamp, the time stamp is associated with the client, and the time stamp is contained in first data sent by the client to the server.

When a server side directly or indirectly provides services for a client side, a service queue needs to be established, object units are arranged in the service queue, the object units comprise specific service contents and are used for indicating the service of the server side, and the server side serves the object units in the service queue.

The object unit is associated with the client, the first type of client corresponds to the first object unit, the second type of client corresponds to the second object unit, the position of the first object unit in the service queue is different from that of the second object unit, and the first object unit is positioned in front of the second object unit in the service queue so as to be processed by the server in advance. The object units of the same type have different precedence position relationships, for example, the object units with the earlier timestamps in the first type of object units are arranged at a higher position in the service queue and are served by the server in advance.

In one embodiment of the present application, the method further comprises:

and adjusting the service queue based on the service conditions of the service end to the first class of client and the second class of client.

Specifically, when the server side services different types of clients, the service condition may change, and the server side can adjust the service object and the service mode based on the changed current state.

For example, in the service process of the first type of client, the server gradually completes the service task of the first type of client, the number of the first type of object units in the service queue is gradually reduced, and in order to ensure the processing efficiency, the server may adjust the service of the second type of client, for example, convert part of the second type of client into the first type of client. And further adjusting the positions of the object units corresponding to the clients in the service queue so that the service end can service the object units.

In an embodiment of the present application, the adjusting the service queue based on the service condition of the service end to the first class of client and the second class of client includes:

and under the condition that at least part of the first class clients and/or the second class clients finish downloading the required data packets, adjusting the service queue based on the load information.

Specifically, the server sends a data packet to the first type of client according to the service request of the client. The data in the data packet is data required by the first-class client, and the first-class client meets the specific requirements of the user based on the received data packet. For example, the data package may have applications, files or other user data, etc. that the user desires. Of course, the node associated with the server may also send a data packet with only the basic data to the second type of client.

After a period of service, at least part of the first type of client and/or the second type of client finishes downloading the data packet sent by the server or the node. At this time, the server may adjust the service object, i.e., adjust the service queue. Specifically, the server may adjust the service queue based on the current load information. When the load decreases, the number of the first type object unit can be increased, and the position of the first type object unit in the service queue is moved to the front.

In one embodiment, in conjunction with fig. 5, the server adjusts the position of the corresponding object unit in the service queue based on the connection status with the client. If the heartbeat of the server and the client in the remote connection mode is overtime, the server adjusts the sequence of the corresponding object units C in the service queue, the object units C corresponding to the disconnected client are adjusted to the tail of the service queue, after the heartbeat is recovered, if the user information corresponding to the client is not changed, the sequence of the object units C in the service queue is unchanged, if the user information corresponding to the client is changed in the disconnection process, the server downloads progress information of a data packet from the server according to all the clients, and the object units C are inserted into the service queue. For example: and if the downloading progress of the disconnected client side for downloading the data packet is 70.1%, the downloading progress of the client side A is 80.1% and the downloading progress of the client side B is 60.2%, inserting the object unit C corresponding to the client side recovered after disconnection between the object unit A corresponding to the client side A and the object unit B corresponding to the client side B.

In an embodiment of the present application, the data package includes an image file and user data, and the providing of the service by the server through the connection with the first type of client includes:

and sending the image file and/or the user data to the first class client by the server, so that the first class client realizes the installation of an operating system based on the acquired image file and/or locally uses the user data.

Specifically, the image file may be an image file of an operating system or an image file of another application program, and after the server sends the image file to the first type of client, the first type of client may install the operating system based on the image file or may install the application program based on the image file.

The user data may be related data that the user needs to use locally on the client, such as a document required by the user, a data set that the client needs to process, and the like.

The server side directly sends the mirror image file and the user data to the first type of client side, so that the requirements of the first type of client side can be met in time.

In an embodiment of the present application, the node is a hotspot machine, and the responding to the service request of the second type of client, and the node associated with the service end providing the requested service to the second type of client includes:

and connecting the second type of client to a hotspot machine based on the first instruction so as to perform basic data interaction with the second type of client through the hotspot machine, wherein the second type of client receives or waits for the response of the server while performing basic data interaction with the hotspot machine.

Specifically, with reference to fig. 5, the server connects the second type of client to the hotspot machine based on the first instruction (certainly, the connection state between the second type of client and the server may also be maintained), the hotspot machine may provide basic data for the second type of client, and the hotspot machine performs basic data interaction with the second type of client. However, the second type of client can also wait for the response of the server while receiving the basic service provided by the hotspot machine. The server side can respond to the second type of client side under the condition of load reduction, and specifically, part of the second type of client side can be converted into the first type of client side according to the load information, so that the server side continues to serve the converted first type of client side. Therefore, the stagnation of the service resources is avoided, and the service resources are effectively utilized. Meanwhile, because the hotspot machine is used for providing basic service for part of the second clients, the overload of the server is avoided, so that corresponding service can be provided for all the clients step by step even when a large number of clients require to be served, and finally all the clients obtain complete service content.

An embodiment of the present application further provides an electronic device, as shown in fig. 6, including:

the acquisition module is configured to determine at least one client connected to a server and acquire first data sent by the client.

The server may be a server, which is connected to one or more clients and can provide services for the clients. The service may be of various types, including providing the client with the required files, programs, and/or user data corresponding to the client, etc. The service process may be that the client sends first data to the server, where the first data is data related to the client, such as identity information of the client, related user information, usage information of the client, and the like.

The obtaining module may determine at least one client connected thereto, for example, by detecting a connection port, or by broadcasting to the client and receiving feedback from the client. Therefore, the server can send the instruction to the client so that the client sends the first data, and the server can acquire the first data through the corresponding communication line.

In addition, the client has a corresponding user identifier, and after different users use the same client, the first data can be changed correspondingly. For example, when a client originally used by a first user is used by a second user, and the identity information of the first user and the identity information of the second user are changed, the content of first data sent by the client to a server is also changed correspondingly.

The dividing module is configured to divide the clients into first class clients and second class clients based on the first data and the load information of the server.

The server (e.g. server) is working to have a load, which may include network load, hardware resource load and/or software load, etc., and the load information may be information related to the load, which can characterize the load condition of the current server.

The dividing module can completely grasp the information of each connected client and the load condition of the dividing module based on the first data and the load information. Therefore, the clients can be classified based on the first data and the load information of the server, and at least the clients are divided into first-class clients and second-class clients. Clients of the same type have the same or similar status, identity, and/or interaction. The service modes of the corresponding service terminals are different among different types of clients. The server can perform unified processing on the clients of the same type.

In this embodiment, after the dividing module divides the client into the first type of client and the second type of client, the server may provide different services for the first type of client and the second type of client.

For example, in a specific embodiment, the divided first type of clients have higher identity priority and are started earlier, and the server needs to provide priority service; and the divided second type of client has lower identity priority and later starting time, and does not need the server to provide priority service.

And the processing module is configured to respond to the service request of the first type of client and provide service through the connection between the service end and the first type of client.

Responding to the service request of the second type of client, and providing the requested service to the second type of client by a node associated with a service end, wherein basic data associated with the client is installed in the node, and the service comprises the service for providing the basic data to the second type of client.

Specifically, the first type of client sends a service request to the server to request the processing module of the server to provide service to the server, including providing the first type of client with a required file, a required program, and/or user data corresponding to the client. And the processing module can directly provide the services for the first type client through the connection with the first type client. Because the processing module directly provides the service for the connected first-class client, the service quality is higher, for example, the service efficiency is higher, and the first-class client can be given complete service. For example, a required data packet is sent to the first type of client, and the data packet contains all required data in the first type of client.

In addition, the processing module provides services through the connection between the server and the first class of clients, including providing services for the first class of clients through a data path of the connection between the server and the first class of clients, for example, the server sends a data packet to the first class of clients through the data path, or receives feedback information of the first class of clients through the data path, so as to further provide services for the first class of clients according to the feedback information.

In this embodiment, the node is associated with the server, and the node may be an intermediate device, an intermediate module (software and/or hardware), or other device that provides transit service, different from the server.

After the second type of client sends a service request to the server, the processing module responds to the request and informs the node of providing service to the second type of client. This enables services, especially services capable of providing basic data, to the second class of clients through the node even if the service end is in a busy state and is not enough to provide complete services to all clients, thereby improving service efficiency.

The node is provided with basic data associated with the client, and the basic data comprises basic data required by the second type of client, so that the second type of client can receive the service of the basic data in advance without waiting for the idle of the server. Once the processing module has extra service capability, if the load is reduced, part or all of the second type clients can be converted into the first type clients according to the first data of the second type clients, and the processing module directly provides complete service for the first type clients, so that the service of the clients can be switched in time to adapt to the changing service process.

In one embodiment of the application, the first data comprises at least one of: the self-starting time of the client and the user information of the client, correspondingly, the dividing module is further configured to:

and dividing the clients into first type clients and second type clients based on the self-starting time and the user information.

In an embodiment of the application, the first data includes user information of the client, and the dividing module is further configured to:

determining a user weight corresponding to the client based on the user information;

determining the client with the first user weight as a first class of client;

and performing distinguishing operation on the client with the second user weight, wherein the distinguishing operation comprises the following steps: and based on the load information and the user information of the client with the second user weight, distinguishing the client with the second user weight into the first type of client and the second type of client.

In one embodiment of the present application, the processing module is further configured to:

acquiring a timestamp in the first data, wherein the timestamp is used for representing the self-starting time of the client;

and constructing a service queue at least based on the timestamp, wherein the service queue comprises a plurality of object units for indicating the service of the server, the object units respectively correspond to respective clients, and the positions of first class object units corresponding to the first class clients in the service queue are different from the positions of second class object units corresponding to the second class clients in the service queue.

In one embodiment of the present application, the processing module is further configured to:

and adjusting the service queue based on the service conditions of the service end to the first class of client and the second class of client.

In one embodiment of the present application, the processing module is further configured to:

and under the condition that at least part of the first class clients and/or the second class clients finish downloading the required data packets, adjusting the service queue based on the load information.

In an embodiment of the application, the data package includes an image file and user data, and the processing module is further configured to:

and sending the image file and/or the user data to the first class client by the server, so that the first class client realizes the installation of an operating system based on the acquired image file and/or locally uses the user data.

In an embodiment of the application, the node is a hotspot machine, and the processing module is further configured to:

and connecting the second type of client to a hotspot machine based on the first instruction so as to perform basic data interaction with the second type of client through the hotspot machine, wherein the second type of client receives or waits for the response of the server while performing basic data interaction with the hotspot machine.

The embodiment of the application also provides a service switching system, which comprises the server, the client and the node. The server and the nodes provide services for the client.

The above embodiments are only exemplary embodiments of the present application, and are not intended to limit the present application, and the protection scope of the present application is defined by the claims. Various modifications and equivalents may be made by those skilled in the art within the spirit and scope of the present application and such modifications and equivalents should also be considered to be within the scope of the present application.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:内容分享方法、装置、设备以及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!